diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/_client_factory.py b/src/azure-cli/azure/cli/command_modules/cosmosdb/_client_factory.py index 6855a1f2193..a6871cfc200 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/_client_factory.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/_client_factory.py @@ -78,6 +78,14 @@ def cf_cosmosdb(cli_ctx, **_): return get_mgmt_service_client(cli_ctx, CosmosDBManagementClient) +def cf_db_private_endpoint_connections(cli_ctx, _): + return cf_cosmosdb(cli_ctx).private_endpoint_connections + + +def cf_db_private_link_resources(cli_ctx, _): + return cf_cosmosdb(cli_ctx).private_link_resources + + def cf_db_accounts(cli_ctx, _): return cf_cosmosdb(cli_ctx).database_accounts diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py b/src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py index c51679fa60b..6bbde2a6310 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py @@ -486,6 +486,61 @@ short-summary: Manage Azure Comsos DB network rules. """ + +helps['cosmosdb private-endpoint-connection'] = """ +type: group +short-summary: Manage Azure Comsos DB private endpoint connections. +""" + +helps['cosmosdb private-endpoint-connection approve'] = """ +type: command +short-summary: Approve the specified private endpoint connection associated with Azure Comsos DB. +examples: + - name: Approve the specified private endpoint connection associated with Azure Comsos DB. + text: az cosmosdb private-endpoint-connection approve --account-name MyAccount --name MyPrivateEndpoint --resource-group MyResourceGroup --description "Approved" +""" + + +helps['cosmosdb private-endpoint-connection delete'] = """ +type: command +short-summary: Delete the specified private endpoint connection associated with Azure Comsos DB. +examples: + - name: Delete the specified private endpoint connection associated with Azure Comsos DB. + text: az cosmosdb private-endpoint-connection delete --account-name MyAccount --name MyPrivateEndpoint --resource-group MyResourceGroup + +""" + +helps['cosmosdb private-endpoint-connection reject'] = """ +type: command +short-summary: Reject the specified private endpoint connection associated with Azure Comsos DB. +examples: + - name: Reject the specified private endpoint connection associated with Azure Comsos DB. + text: az cosmosdb private-endpoint-connection reject --account-name MyAccount --name MyPrivateEndpoint --resource-group MyResourceGroup --description "Rejected" +""" + + +helps['cosmosdb private-endpoint-connection show'] = """ +type: command +short-summary: Show details of a private endpoint connection associated with Azure Comsos DB. +examples: + - name: Show details of a private endpoint connection associated with Azure Comsos DB. + text: az cosmosdb private-endpoint-connection show --account-name MyAccount --name MyPrivateEndpoint --resource-group MyResourceGroup +""" + +helps['cosmosdb private-link-resource'] = """ +type: group +short-summary: Manage Azure Comsos DB private link resources. +""" + +helps['cosmosdb private-link-resource list'] = """ +type: command +short-summary: List the private link resources supported for Azure Comsos DB. +example: + - name: List the private link resources supported for Azure Comsos DB. + text: cosmosdb private-link-resource list --account-name MyAccount --resource-group MyResourceGroup +""" + + helps['cosmosdb regenerate-key'] = """ type: command short-summary: Regenerate an access key for a Azure Cosmos DB database account. diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py b/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py index 89d900cb7f9..42917b97ed8 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py @@ -102,6 +102,25 @@ def load_arguments(self, _): database_name_type = CLIArgumentType(options_list=['--database-name', '-d'], help='Database name.') container_name_type = CLIArgumentType(options_list=['--container-name', '-c'], help='Container name.') + with self.argument_context('cosmosdb private-endpoint-connection') as c: + c.argument('private_endpoint_connection_name', options_list=['--name', '-n'], required=False, + help='The name of the private endpoint connection associated with Azure Cosmos DB. ' + 'Required if --connection-id is not specified') + c.argument('account_name', account_name_type, required=False, + help='Name of the Cosmos DB database account. Required if --connection-id is not specified') + c.argument('resource_group_name', required=False, + help='The resource group name of specified Cosmos DB account. Required if --connection-id is not specified') + + for item in ['approve', 'reject', 'delete', 'show']: + with self.argument_context('cosmosdb private-endpoint-connection {}'.format(item)) as c: + c.extra('connection_id', options_list=['--id'], required=False, + help='The ID of the private endpoint connection associated with Azure Cosmos DB. ' + 'If specified --account-name --resource-group/-g and --name/-n, this should be omitted.') + c.argument('description', options_list=['--description'], required=False, help='Comments for the {} operation.'.format(item)) + + with self.argument_context('cosmosdb private-link-resource') as c: + c.argument('account_name', account_name_type, required=True, help="Cosmosdb account name", id_part=None) + # SQL database with self.argument_context('cosmosdb sql database') as c: c.argument('account_name', account_name_type, id_part=None) diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/_validators.py b/src/azure-cli/azure/cli/command_modules/cosmosdb/_validators.py index fbae1331e86..634f3f94c50 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/_validators.py @@ -3,6 +3,8 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +from knack.util import CLIError + def validate_failover_policies(ns): """ Extracts multiple space-separated failoverPolicies in regionName=failoverPriority format """ @@ -19,6 +21,20 @@ def validate_ip_range_filter(ns): ns.ip_range_filter = ",".join(ns.ip_range_filter) +def validate_private_endpoint_connection_id(ns): + if ns.connection_id: + from azure.cli.core.util import parse_proxy_resource_id + result = parse_proxy_resource_id(ns.connection_id) + ns.resource_group_name = result['resource_group'] + ns.account_name = result['name'] + ns.private_endpoint_connection_name = result['child_name_1'] + + if not all([ns.account_name, ns.resource_group_name, ns.private_endpoint_connection_name]): + raise CLIError(None, 'incorrect usage: [--id ID | --name NAME --account-name NAME --resource-group NAME]') + + del ns.connection_id + + def validate_capabilities(ns): """ Extracts multiple space-separated capabilities """ from azure.mgmt.cosmosdb.models import Capability diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py b/src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py index 46a5b9f4028..0c221bb8035 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py @@ -8,7 +8,16 @@ from azure.cli.core.commands import CliCommandType -from azure.cli.command_modules.cosmosdb._client_factory import cf_db_accounts, cf_sql_resources, cf_mongo_db_resources, cf_cassandra_resources, cf_gremlin_resources, cf_table_resources +from azure.cli.command_modules.cosmosdb._client_factory import ( + cf_db_accounts, + cf_db_private_endpoint_connections, + cf_db_private_link_resources, + cf_sql_resources, + cf_mongo_db_resources, + cf_cassandra_resources, + cf_gremlin_resources, + cf_table_resources +) from azure.cli.command_modules.cosmosdb._format import ( database_output, @@ -18,6 +27,10 @@ list_connection_strings_output ) +from ._validators import ( + validate_private_endpoint_connection_id +) + DATABASE_DEPRECATION_INFO = 'cosmosdb sql database, cosmosdb mongodb database, cosmosdb cassandra keyspace or cosmosdb gremlin database' COLLECTION_DEPRECATON_INFO = 'cosmosdb sql container, cosmosdb mongodb collection, cosmosdb cassandra table, cosmosdb gremlin graph or cosmosdb table' @@ -29,6 +42,14 @@ def load_command_table(self, _): operations_tmpl='azure.mgmt.cosmosdb.operations#DatabaseAccountsOperations.{}', client_factory=cf_db_accounts) + cosmosdb_private_endpoint_connections_sdk = CliCommandType( + operations_tmpl='azure.mgmt.cosmosdb.operations#PrivateEndpointConnectionsOperations.{}', + client_factory=cf_db_private_endpoint_connections) + + cosmosdb_private_link_resources_sdk = CliCommandType( + operations_tmpl='azure.mgmt.cosmosdb.operations#PrivateLinkResourcesOperations.{}', + client_factory=cf_db_private_link_resources) + cosmosdb_sql_sdk = CliCommandType( operations_tmpl='azure.mgmt.cosmosdb.operations#SqlResourcesOperations.{}', client_factory=cf_sql_resources) @@ -62,6 +83,22 @@ def load_command_table(self, _): g.custom_command('update', 'cli_cosmosdb_update') g.custom_command('list', 'cli_cosmosdb_list') + with self.command_group('cosmosdb private-endpoint-connection', + cosmosdb_private_endpoint_connections_sdk, + client_factory=cf_db_private_endpoint_connections) as g: + g.custom_command('approve', 'approve_private_endpoint_connection', + validator=validate_private_endpoint_connection_id) + g.custom_command('reject', 'reject_private_endpoint_connection', + validator=validate_private_endpoint_connection_id) + g.command('delete', 'delete', validator=validate_private_endpoint_connection_id) + g.show_command('show', 'get', validator=validate_private_endpoint_connection_id) + + with self.command_group('cosmosdb private-link-resource', + cosmosdb_private_link_resources_sdk, + client_factory=cf_db_private_link_resources) as g: + from azure.cli.core.commands.transform import gen_dict_to_list_transform + g.show_command('list', 'list_by_database_account', transform=gen_dict_to_list_transform(key='values')) + # SQL api with self.command_group('cosmosdb sql', is_preview=True): pass diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py b/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py index 82973ef9e17..577b7c5b4fa 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py @@ -991,6 +991,41 @@ def cli_cosmosdb_network_rule_remove(cmd, return docdb_account +def _update_private_endpoint_connection_status(client, resource_group_name, account_name, + private_endpoint_connection_name, is_approved=True, description=None): + private_endpoint_connection = client.get(resource_group_name=resource_group_name, account_name=account_name, + private_endpoint_connection_name=private_endpoint_connection_name) + + new_status = "Approved" if is_approved else "Rejected" + private_endpoint_connection.private_link_service_connection_state.status = new_status + private_endpoint_connection.private_link_service_connection_state.description = description + + return client.create_or_update(resource_group_name=resource_group_name, + account_name=account_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_link_service_connection_state=private_endpoint_connection.private_link_service_connection_state) + + +def approve_private_endpoint_connection(client, resource_group_name, account_name, private_endpoint_connection_name, + description=None): + """Approve a private endpoint connection request for Azure Cosmos DB.""" + + return _update_private_endpoint_connection_status( + client, resource_group_name, account_name, private_endpoint_connection_name, is_approved=True, + description=description + ) + + +def reject_private_endpoint_connection(client, resource_group_name, account_name, private_endpoint_connection_name, + description=None): + """Reject a private endpoint connection request for Azure Cosmos DB.""" + + return _update_private_endpoint_connection_status( + client, resource_group_name, account_name, private_endpoint_connection_name, is_approved=False, + description=description + ) + + ###################### # data plane APIs ###################### diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_private_endpoint.yaml b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_private_endpoint.yaml new file mode 100644 index 00000000000..b110a6410da --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_private_endpoint.yaml @@ -0,0 +1,2601 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-resource/8.0.1 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_pe000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001","name":"cli_test_cosmosdb_pe000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-04-15T23:54:02Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 15 Apr 2020 23:54:02 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"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '198' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n -g + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002?api-version=2019-12-12 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002","name":"cli-test-cosmosdb-pe-000002","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Creating","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + cache-control: + - no-store, no-cache + content-length: + - '1547' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23:54:06 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/operationResults/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.10.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 create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23:54: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23:55:07 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23:55: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23:56:07 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23:56: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23:57: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23:57: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23:58: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23:59: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 23:59: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:00: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:00: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:01: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:01: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:02: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:02: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:03: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:03: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/18fdb0c3-e453-4448-b28c-e8b723be0167?api-version=2019-12-12 + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:04: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002?api-version=2019-12-12 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002","name":"cli-test-cosmosdb-pe-000002","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-test-cosmosdb-pe-000002.documents.azure.com:443/","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-pe-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-pe-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-pe-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1904' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64?api-version=2019-12-12 + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002?api-version=2019-12-12 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002","name":"cli-test-cosmosdb-pe-000002","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-test-cosmosdb-pe-000002.documents.azure.com:443/","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-pe-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-pe-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-pe-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-test-cosmosdb-pe-000002-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1904' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64?api-version=2019-12-12 + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00: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.10.0 + status: + code: 200 + message: Ok +- request: + body: '{"location": "centraluseuap", "tags": {}, "properties": {"addressSpace": + {"addressPrefixes": ["10.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"properties": + {"addressPrefix": "10.0.0.0/24"}, "name": "cli-subnet-000004"}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + Content-Length: + - '229' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n -g -l --subnet-name + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-network/10.0.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003?api-version=2020-03-01 + response: + body: + string: "{\r\n \"name\": \"cli-vnet-000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003\",\r\n + \ \"etag\": \"W/\\\"4787f499-90c0-4411-85ef-1c8055ef7ce3\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"816d7cb1-bbca-4885-b13e-cfc10e46b6e9\",\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\": \"cli-subnet-000004\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004\",\r\n + \ \"etag\": \"W/\\\"4787f499-90c0-4411-85ef-1c8055ef7ce3\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\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 \"enableVmProtection\": 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/centraluseuap/operations/29be1171-29cc-4078-9777-9408feef7348?api-version=2020-03-01 + cache-control: + - no-cache + content-length: + - '1535' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 16 Apr 2020 00:04:17 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: + - 1424dde7-67b5-4367-84b4-2ca502526f15 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l --subnet-name + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-network/10.0.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centraluseuap/operations/29be1171-29cc-4078-9777-9408feef7348?api-version=2020-03-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, 16 Apr 2020 00:04:20 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: + - d759fd9c-c9e9-4c1c-934a-44c731264805 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l --subnet-name + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-network/10.0.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003?api-version=2020-03-01 + response: + body: + string: "{\r\n \"name\": \"cli-vnet-000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003\",\r\n + \ \"etag\": \"W/\\\"136b24e6-f2e8-440a-83ff-73243edf9251\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"816d7cb1-bbca-4885-b13e-cfc10e46b6e9\",\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\": \"cli-subnet-000004\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004\",\r\n + \ \"etag\": \"W/\\\"136b24e6-f2e8-440a-83ff-73243edf9251\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\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 \"enableVmProtection\": false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1537' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 16 Apr 2020 00:04:21 GMT + etag: + - W/"136b24e6-f2e8-440a-83ff-73243edf9251" + 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: + - f0827b45-96eb-41ad-a2c1-f07066473744 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + ParameterSetName: + - -n --vnet-name -g --disable-private-endpoint-network-policies + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-network/10.0.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004?api-version=2020-03-01 + response: + body: + string: "{\r\n \"name\": \"cli-subnet-000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004\",\r\n + \ \"etag\": \"W/\\\"136b24e6-f2e8-440a-83ff-73243edf9251\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '639' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 16 Apr 2020 00:04:21 GMT + etag: + - W/"136b24e6-f2e8-440a-83ff-73243edf9251" + 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: + - ab50f233-d041-4e19-a032-be1fecd2494e + status: + code: 200 + message: OK +- request: + body: 'b''{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004", + "properties": {"addressPrefix": "10.0.0.0/24", "delegations": [], "privateEndpointNetworkPolicies": + "Disabled", "privateLinkServiceNetworkPolicies": "Enabled"}, "name": "cli-subnet-000004"}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + Content-Length: + - '451' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n --vnet-name -g --disable-private-endpoint-network-policies + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-network/10.0.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004?api-version=2020-03-01 + response: + body: + string: "{\r\n \"name\": \"cli-subnet-000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004\",\r\n + \ \"etag\": \"W/\\\"e49617ae-94d8-4ccf-bcf2-9e434138fdf1\\\"\",\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}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centraluseuap/operations/75e20fb5-6606-4213-9421-0dbb86720c3b?api-version=2020-03-01 + cache-control: + - no-cache + content-length: + - '639' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 16 Apr 2020 00:04:22 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: + - 9ea2fa09-9775-45c2-a721-8194177ca042 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + ParameterSetName: + - -n --vnet-name -g --disable-private-endpoint-network-policies + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-network/10.0.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centraluseuap/operations/75e20fb5-6606-4213-9421-0dbb86720c3b?api-version=2020-03-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, 16 Apr 2020 00:04:26 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: + - dde746fd-48d8-4b6d-88b1-23d0b6929c74 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + ParameterSetName: + - -n --vnet-name -g --disable-private-endpoint-network-policies + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-network/10.0.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004?api-version=2020-03-01 + response: + body: + string: "{\r\n \"name\": \"cli-subnet-000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004\",\r\n + \ \"etag\": \"W/\\\"ab6f994a-69b0-45e0-99d5-53c1258b6dae\\\"\",\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}" + headers: + cache-control: + - no-cache + content-length: + - '640' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 16 Apr 2020 00:04:26 GMT + etag: + - W/"ab6f994a-69b0-45e0-99d5-53c1258b6dae" + 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: + - 01db6dc4-06bd-4e72-a3f2-39c2d5ed4179 + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "centraluseuap", "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004"}, + "privateLinkServiceConnections": [{"properties": {"privateLinkServiceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002", + "groupIds": ["Sql"]}, "name": "cli-pec-000006"}]}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + Content-Length: + - '668' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --vnet-name --subnet -l --connection-name --private-connection-resource-id + --group-ids + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-network/10.0.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005?api-version=2020-03-01 + response: + body: + string: "{\r\n \"name\": \"cli-pe-000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005\",\r\n + \ \"etag\": \"W/\\\"0f42e9fc-1e00-4ddd-a17b-666cbc03d65e\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"73e52a93-e846-4a08-97f6-d7c798f1b6aa\",\r\n \"privateLinkServiceConnections\": + [\r\n {\r\n \"name\": \"cli-pec-000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005/privateLinkServiceConnections/cli-pec-000006\",\r\n + \ \"etag\": \"W/\\\"0f42e9fc-1e00-4ddd-a17b-666cbc03d65e\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002\",\r\n + \ \"groupIds\": [\r\n \"Sql\"\r\n ],\r\n \"privateLinkServiceConnectionState\": + {\r\n \"status\": \"Approved\",\r\n \"description\": + \"\",\r\n \"actionsRequired\": \"None\"\r\n }\r\n },\r\n + \ \"type\": \"Microsoft.Network/privateEndpoints/privateLinkServiceConnections\"\r\n + \ }\r\n ],\r\n \"manualPrivateLinkServiceConnections\": [],\r\n + \ \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004\"\r\n + \ },\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/networkInterfaces/cli-pe-000005.nic.a8ca0f8d-08a8-4946-92d0-30a55268cd46\"\r\n + \ }\r\n ]\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centraluseuap/operations/90bdbad2-0185-40f2-8f96-3e92b1a71208?api-version=2020-03-01 + cache-control: + - no-cache + content-length: + - '2298' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 16 Apr 2020 00:04:29 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: + - 9ceda7b8-46f4-4173-97b0-789c015d7182 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + ParameterSetName: + - -g -n --vnet-name --subnet -l --connection-name --private-connection-resource-id + --group-ids + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-network/10.0.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centraluseuap/operations/90bdbad2-0185-40f2-8f96-3e92b1a71208?api-version=2020-03-01 + response: + body: + string: "{\r\n \"status\": \"InProgress\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '30' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 16 Apr 2020 00:04:40 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: + - e0aae5ae-9a66-4e58-a8a9-686bbd8134d6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + ParameterSetName: + - -g -n --vnet-name --subnet -l --connection-name --private-connection-resource-id + --group-ids + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-network/10.0.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centraluseuap/operations/90bdbad2-0185-40f2-8f96-3e92b1a71208?api-version=2020-03-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, 16 Apr 2020 00:04:50 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: + - d6384728-e021-42dc-98b2-8e3f8d9cfdac + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-endpoint create + Connection: + - keep-alive + ParameterSetName: + - -g -n --vnet-name --subnet -l --connection-name --private-connection-resource-id + --group-ids + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-network/10.0.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005?api-version=2020-03-01 + response: + body: + string: "{\r\n \"name\": \"cli-pe-000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005\",\r\n + \ \"etag\": \"W/\\\"0df5c688-5fde-475c-9b4a-085450b82804\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"73e52a93-e846-4a08-97f6-d7c798f1b6aa\",\r\n \"privateLinkServiceConnections\": + [\r\n {\r\n \"name\": \"cli-pec-000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005/privateLinkServiceConnections/cli-pec-000006\",\r\n + \ \"etag\": \"W/\\\"0df5c688-5fde-475c-9b4a-085450b82804\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002\",\r\n + \ \"groupIds\": [\r\n \"Sql\"\r\n ],\r\n \"privateLinkServiceConnectionState\": + {\r\n \"status\": \"Approved\",\r\n \"description\": + \"\",\r\n \"actionsRequired\": \"None\"\r\n }\r\n },\r\n + \ \"type\": \"Microsoft.Network/privateEndpoints/privateLinkServiceConnections\"\r\n + \ }\r\n ],\r\n \"manualPrivateLinkServiceConnections\": [],\r\n + \ \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/virtualNetworks/cli-vnet-000003/subnets/cli-subnet-000004\"\r\n + \ },\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/networkInterfaces/cli-pe-000005.nic.a8ca0f8d-08a8-4946-92d0-30a55268cd46\"\r\n + \ }\r\n ]\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2299' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 16 Apr 2020 00:04:50 GMT + etag: + - W/"0df5c688-5fde-475c-9b4a-085450b82804" + 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: + - ac677435-c8c6-4c72-bbac-ad011980c171 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection show + Connection: + - keep-alive + ParameterSetName: + - --id + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005?api-version=2019-08-01-preview + response: + body: + string: '{"name":"cli-pe-000005","type":"Microsoft.DocumentDB/databaseAccounts/privateEndpointConnections","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005","properties":{"provisioningState":"Succeeded","groupId":"Sql","privateEndpoint":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005"},"privateLinkServiceConnectionState":{"status":"Approved","actionsRequired":"None"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '774' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64/privateEndpointConnections/cli-pe-rnvaskh2mxbxwkhjp?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:04: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.10.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection show + Connection: + - keep-alive + ParameterSetName: + - --account-name --name --resource-group + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005?api-version=2019-08-01-preview + response: + body: + string: '{"name":"cli-pe-000005","type":"Microsoft.DocumentDB/databaseAccounts/privateEndpointConnections","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005","properties":{"provisioningState":"Succeeded","groupId":"Sql","privateEndpoint":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005"},"privateLinkServiceConnectionState":{"status":"Approved","actionsRequired":"None"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '774' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64/privateEndpointConnections/cli-pe-rnvaskh2mxbxwkhjp?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:04: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.10.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection show + Connection: + - keep-alive + ParameterSetName: + - -a -n -g + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005?api-version=2019-08-01-preview + response: + body: + string: '{"name":"cli-pe-000005","type":"Microsoft.DocumentDB/databaseAccounts/privateEndpointConnections","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005","properties":{"provisioningState":"Succeeded","groupId":"Sql","privateEndpoint":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005"},"privateLinkServiceConnectionState":{"status":"Approved","actionsRequired":"None"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '774' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64/privateEndpointConnections/cli-pe-rnvaskh2mxbxwkhjp?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:04: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.10.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection approve + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --name --description + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005?api-version=2019-08-01-preview + response: + body: + string: '{"name":"cli-pe-000005","type":"Microsoft.DocumentDB/databaseAccounts/privateEndpointConnections","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005","properties":{"provisioningState":"Succeeded","groupId":"Sql","privateEndpoint":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005"},"privateLinkServiceConnectionState":{"status":"Approved","actionsRequired":"None"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '774' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64/privateEndpointConnections/cli-pe-rnvaskh2mxbxwkhjp?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:04: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.10.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"privateLinkServiceConnectionState": {"status": "Approved", + "description": "You are approved!"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection approve + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --account-name --resource-group --name --description + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005?api-version=2019-08-01-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/6eea1240-9ebe-49a2-ade2-336c4344ca12?api-version=2019-08-01-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64/privateEndpointConnections/cli-pe-rnvaskh2mxbxwkhjp?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:04:53 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005/operationResults/6eea1240-9ebe-49a2-ade2-336c4344ca12?api-version=2019-08-01-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.10.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection approve + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --name --description + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/6eea1240-9ebe-49a2-ade2-336c4344ca12?api-version=2019-08-01-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/6eea1240-9ebe-49a2-ade2-336c4344ca12?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:05: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.10.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection approve + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --name --description + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005?api-version=2019-08-01-preview + response: + body: + string: '{"name":"cli-pe-000005","type":"Microsoft.DocumentDB/databaseAccounts/privateEndpointConnections","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005","properties":{"provisioningState":"Succeeded","groupId":"Sql","privateEndpoint":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005"},"privateLinkServiceConnectionState":{"status":"Approved","description":"You + are approved!","actionsRequired":"None"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '808' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64/privateEndpointConnections/cli-pe-rnvaskh2mxbxwkhjp?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:05: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.10.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection reject + Connection: + - keep-alive + ParameterSetName: + - --id --description + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005?api-version=2019-08-01-preview + response: + body: + string: '{"name":"cli-pe-000005","type":"Microsoft.DocumentDB/databaseAccounts/privateEndpointConnections","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005","properties":{"provisioningState":"Succeeded","groupId":"Sql","privateEndpoint":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005"},"privateLinkServiceConnectionState":{"status":"Approved","description":"You + are approved!","actionsRequired":"None"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '808' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64/privateEndpointConnections/cli-pe-rnvaskh2mxbxwkhjp?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:05: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.10.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"privateLinkServiceConnectionState": {"status": "Rejected", + "description": "You are rejected!"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection reject + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --id --description + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005?api-version=2019-08-01-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/d913095a-c5f8-47ef-8b8e-8b4bd8c54777?api-version=2019-08-01-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64/privateEndpointConnections/cli-pe-rnvaskh2mxbxwkhjp?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:05:25 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005/operationResults/d913095a-c5f8-47ef-8b8e-8b4bd8c54777?api-version=2019-08-01-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.10.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection reject + Connection: + - keep-alive + ParameterSetName: + - --id --description + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/d913095a-c5f8-47ef-8b8e-8b4bd8c54777?api-version=2019-08-01-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/d913095a-c5f8-47ef-8b8e-8b4bd8c54777?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:05: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.10.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection reject + Connection: + - keep-alive + ParameterSetName: + - --id --description + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/d913095a-c5f8-47ef-8b8e-8b4bd8c54777?api-version=2019-08-01-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/d913095a-c5f8-47ef-8b8e-8b4bd8c54777?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:06: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.10.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection reject + Connection: + - keep-alive + ParameterSetName: + - --id --description + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005?api-version=2019-08-01-preview + response: + body: + string: '{"name":"cli-pe-000005","type":"Microsoft.DocumentDB/databaseAccounts/privateEndpointConnections","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005","properties":{"provisioningState":"Succeeded","groupId":"Sql","privateEndpoint":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.Network/privateEndpoints/cli-pe-000005"},"privateLinkServiceConnectionState":{"status":"Rejected","description":"You + are rejected!","actionsRequired":"None"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '808' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64/privateEndpointConnections/cli-pe-rnvaskh2mxbxwkhjp?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:06: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.10.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --id + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005?api-version=2019-08-01-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/6da1403f-61b2-4542-b2fe-30857b0f7a79?api-version=2019-08-01-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_peajy3nmofbn2nkgjmmv6weh3ichluohlreoozmvmuqin5av2gqfxrp4q/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-bxu2k64/privateEndpointConnections/cli-pe-rnvaskh2mxbxwkhjp?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00:06:27 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_pe000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-pe-000002/privateEndpointConnections/cli-pe-000005/operationResults/6da1403f-61b2-4542-b2fe-30857b0f7a79?api-version=2019-08-01-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.10.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-endpoint-connection delete + Connection: + - keep-alive + ParameterSetName: + - --id + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/6da1403f-61b2-4542-b2fe-30857b0f7a79?api-version=2019-08-01-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/6da1403f-61b2-4542-b2fe-30857b0f7a79?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Thu, 16 Apr 2020 00: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.10.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_private_link_resource.yaml b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_private_link_resource.yaml new file mode 100644 index 00000000000..88817b9363a --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_private_link_resource.yaml @@ -0,0 +1,1256 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-resource/8.0.1 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_plr000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_plr000001","name":"cli_test_cosmosdb_plr000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-04-15T22:38:51Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 15 Apr 2020 22:38: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": "westus", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "westus", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '198' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n -g + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_plr000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-000002?api-version=2019-12-12 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_plr000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-000002","name":"cli-test-cosmosdb-plr-000002","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Creating","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + cache-control: + - no-store, no-cache + content-length: + - '1547' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_plrrfqcz3j5lg3x3cqeg37iglbmjidcwwlq7457ei3iiaqxd47spei3ex/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-2yneba?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:38:56 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_plr000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-000002/operationResults/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.10.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 create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:39: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:39: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:40: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:40: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:41: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:42: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:43: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:43: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:44: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:44: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:45: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:45: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:46: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:47: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:48: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ff47ac55-4440-4169-bc4c-d9fa3c2d143a?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:49: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_plr000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-000002?api-version=2019-12-12 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_plr000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-000002","name":"cli-test-cosmosdb-plr-000002","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-test-cosmosdb-plr-000002.documents.azure.com:443/","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-plr-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-plr-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-plr-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1904' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_plrrfqcz3j5lg3x3cqeg37iglbmjidcwwlq7457ei3iiaqxd47spei3ex/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-2yneba?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:49: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.10.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: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_plr000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-000002?api-version=2019-12-12 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_plr000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-000002","name":"cli-test-cosmosdb-plr-000002","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-test-cosmosdb-plr-000002.documents.azure.com:443/","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-plr-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-plr-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","documentEndpoint":"https://cli-test-cosmosdb-plr-000002-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-test-cosmosdb-plr-000002-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1904' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_plrrfqcz3j5lg3x3cqeg37iglbmjidcwwlq7457ei3iiaqxd47spei3ex/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-2yneba?api-version=2019-12-12 + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:49: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.10.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb private-link-resource list + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python AZURECLI/2.3.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_plr000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-000002/privateLinkResources?api-version=2019-08-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_plr000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-000002/privateLinkResources/Sql","name":"Sql","type":"Microsoft.DocumentDB/databaseAccounts/privateLinkResources","properties":{"groupId":"Sql","requiredMembers":["cli-test-cosmosdb-plr-000002-westus","cli-test-cosmosdb-plr-000002"],"requiredZoneNames":["privatelink.documents.azure.com"]}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '522' + content-location: + - https://management.documents.azure.com:450/subscriptions/15d08dec-240b-4ba6-b837-442a4efe11bc/resourceGroups/cli_test_cosmosdb_plrrfqcz3j5lg3x3cqeg37iglbmjidcwwlq7457ei3iiaqxd47spei3ex/providers/Microsoft.DocumentDB/databaseAccounts/cli-test-cosmosdb-plr-2yneba/privateLinkResources?api-version=2019-08-01-preview + content-type: + - application/json + date: + - Wed, 15 Apr 2020 22:49: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.10.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_commands.py b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_commands.py index 5d1f3efb0ab..ad9d7c28cbf 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_commands.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_commands.py @@ -301,6 +301,74 @@ def test_cosmosdb_network_rule_remove(self, resource_group): assert len(vnet_rules) == 0 + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_plr') + def test_cosmosdb_private_link_resource(self, resource_group): + self.kwargs.update({ + 'acc': self.create_random_name('cli-test-cosmosdb-plr-', 28), + 'loc': 'centraluseuap' + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg}') + + self.cmd('cosmosdb private-link-resource list --account-name {acc} --resource-group {rg}', + checks=[self.check('length(@)', 1), self.check('[0].groupId', 'Sql')]) + + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_pe') + def test_cosmosdb_private_endpoint(self, resource_group): + self.kwargs.update({ + 'acc': self.create_random_name('cli-test-cosmosdb-pe-', 28), + 'loc': 'centraluseuap', + 'vnet': self.create_random_name('cli-vnet-', 24), + 'subnet': self.create_random_name('cli-subnet-', 24), + 'pe': self.create_random_name('cli-pe-', 24), + 'pe_connection': self.create_random_name('cli-pec-', 24) + }) + + # Prepare cosmos db account and network + account = self.cmd('az cosmosdb create -n {acc} -g {rg}').get_output_in_json() + self.kwargs['acc_id'] = account['id'] + self.cmd('network vnet create -n {vnet} -g {rg} -l {loc} --subnet-name {subnet}', + checks=self.check('length(newVNet.subnets)', 1)) + self.cmd('network vnet subnet update -n {subnet} --vnet-name {vnet} -g {rg} ' + '--disable-private-endpoint-network-policies true', + checks=self.check('privateEndpointNetworkPolicies', 'Disabled')) + + # Create a private endpoint connection + pe = self.cmd('network private-endpoint create -g {rg} -n {pe} --vnet-name {vnet} --subnet {subnet} -l {loc} ' + '--connection-name {pe_connection} --private-connection-resource-id {acc_id} ' + '--group-ids Sql').get_output_in_json() + self.kwargs['pe_id'] = pe['id'] + self.kwargs['pe_name'] = self.kwargs['pe_id'].split('/')[-1] + + # Show the connection at cosmos db side + results = self.kwargs['pe_id'].split('/') + self.kwargs['pec_id'] = '/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.DocumentDB/databaseAccounts/{2}/privateEndpointConnections/{3}'.format(results[2], results[4], self.kwargs['acc'], results[-1]) + self.cmd('cosmosdb private-endpoint-connection show --id {pec_id}', + checks=self.check('id', '{pec_id}')) + self.cmd('cosmosdb private-endpoint-connection show --account-name {acc} --name {pe_name} --resource-group {rg}', + checks=self.check('name', '{pe_name}')) + self.cmd('cosmosdb private-endpoint-connection show -a {acc} -n {pe_name} -g {rg}', + checks=self.check('name', '{pe_name}')) + + # Test approval/rejection + self.kwargs.update({ + 'approval_desc': 'You are approved!', + 'rejection_desc': 'You are rejected!' + }) + self.cmd('cosmosdb private-endpoint-connection approve --account-name {acc} --resource-group {rg} --name {pe_name} ' + '--description "{approval_desc}"', checks=[ + self.check('privateLinkServiceConnectionState.status', 'Approved'), + self.check('privateLinkServiceConnectionState.description', '{approval_desc}') + ]) + self.cmd('cosmosdb private-endpoint-connection reject --id {pec_id} ' + '--description "{rejection_desc}"', checks=[ + self.check('privateLinkServiceConnectionState.status', 'Rejected'), + self.check('privateLinkServiceConnectionState.description', '{rejection_desc}') + ]) + + # Test delete + self.cmd('cosmosdb private-endpoint-connection delete --id {pec_id}') + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_database') def test_cosmosdb_database(self, resource_group):