From 636f443f236037dff74dbdaf946e533583cd3f07 Mon Sep 17 00:00:00 2001 From: Meha Kaushik Date: Thu, 30 Jan 2020 16:33:12 -0800 Subject: [PATCH 1/9] Added cosmosDB sql stored procedure, udf and trigger cmdlets --- .../cli/command_modules/cosmosdb/_params.py | 26 + .../cli/command_modules/cosmosdb/commands.py | 21 + .../cli/command_modules/cosmosdb/custom.py | 140 +- .../test_cosmosdb_sql_stored_procedure.yaml | 2185 +++++++++++++++ .../recordings/test_cosmosdb_sql_trigger.yaml | 2334 +++++++++++++++++ ...st_cosmosdb_sql_user_defined_function.yaml | 2185 +++++++++++++++ .../tests/latest/test_cosmosdb_commands.py | 126 + 7 files changed, 7016 insertions(+), 1 deletion(-) create mode 100644 src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_stored_procedure.yaml create mode 100644 src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_trigger.yaml create mode 100644 src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_user_defined_function.yaml 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 57962bcc120..147c3a67595 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py @@ -115,6 +115,32 @@ def load_arguments(self, _): c.argument('conflict_resolution_policy', options_list=['--conflict-resolution-policy', '-c'], type=shell_safe_json_parse, completer=FilesCompleter(), help='Conflict Resolution Policy, you can enter it as a string or as a file, e.g., --conflict-resolution-policy @policy-file.json or ' + SQL_GREMLIN_CONFLICT_RESOLUTION_POLICY_EXAMPLE) c.argument('throughput', help='The throughput of SQL container (RU/s). Default value is 400') +# SQL stored procedure + with self.argument_context('cosmosdb sql stored_procedure') as c: + c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") + c.argument('container_name', options_list=['--container-name', '-c'], help="Container name") + c.argument('stored_procedure_name', options_list=['--name', '-n'], help="StoredProcedure name") + c.argument('stored_procedure_body', options_list=['--body', '-b'], help="StoredProcedure body") + +# SQL trigger + with self.argument_context('cosmosdb sql trigger') as c: + c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") + c.argument('container_name', options_list=['--container', '-c'], help="Container name") + c.argument('trigger_name', options_list=['--name', '-n'], help="Trigger name") + c.argument('trigger_body', options_list=['--body', '-b'], help="Trigger body") + c.argument('trigger_type', options_list=['--type', '-t'], help="Trigger type, values can be: Pre or Post") + c.argument('trigger_operation', options_list=['--operation'], help="The operation of the trigger. Values can be: All, Create, Update, Delete, Replace") + +# SQL user defined function + with self.argument_context('cosmosdb sql user_defined_function') as c: + c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") + c.argument('container_name', options_list=['--container', '-c'], help="Container name") + c.argument('user_defined_function_name', options_list=['--name', '-n'], help="UserDefinedFunction name") + c.argument('user_defined_function_body', options_list=['--body', '-b'], help="UserDefinedFunction body") + # MongoDB with self.argument_context('cosmosdb mongodb database') as c: c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) 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 75adfa7cc73..259cacd9155 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py @@ -77,6 +77,27 @@ def load_command_table(self, _): g.command('list', 'list_sql_containers') g.command('show', 'get_sql_container') g.command('delete', 'delete_sql_container') + + with self.command_group('cosmosdb sql stored_procedure', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: + g.custom_command('create', 'cli_cosmosdb_sql_stored_procedure_create_update') + g.custom_command('update', 'cli_cosmosdb_sql_stored_procedure_create_update') + g.command('list', 'list_sql_stored_procedures') + g.command('show', 'get_sql_stored_procedure') + g.command('delete', 'delete_sql_stored_procedure') + + with self.command_group('cosmosdb sql trigger', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: + g.custom_command('create', 'cli_cosmosdb_sql_trigger_create') + g.custom_command('update', 'cli_cosmosdb_sql_trigger_update') + g.command('list', 'list_sql_triggers') + g.command('show', 'get_sql_trigger') + g.command('delete', 'delete_sql_trigger') + + with self.command_group('cosmosdb sql user_defined_function', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: + g.custom_command('create', 'cli_cosmosdb_sql_user_defined_function_create_update') + g.custom_command('update', 'cli_cosmosdb_sql_user_defined_function_create_update') + g.command('list', 'list_sql_user_defined_functions') + g.command('show', 'get_sql_user_defined_function') + g.command('delete', 'delete_sql_user_defined_function') # MongoDB api with self.command_group('cosmosdb mongodb', is_preview=True): 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 be7ca40bf7d..3019cde6a1f 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py @@ -21,6 +21,12 @@ SqlContainerResource, SqlContainerCreateUpdateParameters, ContainerPartitionKey, + SqlStoredProcedureResource, + SqlStoredProcedureCreateUpdateParameters, + SqlTriggerResource, + SqlTriggerCreateUpdateParameters, + SqlUserDefinedFunctionResource, + SqlUserDefinedFunctionCreateUpdateParameters, TableResource, TableCreateUpdateParameters, MongoDBDatabaseResource, @@ -282,7 +288,6 @@ def cli_cosmosdb_sql_container_create(client, container_name, sql_container_create_update_resource) - def cli_cosmosdb_sql_container_update(client, resource_group_name, account_name, @@ -319,6 +324,139 @@ def cli_cosmosdb_sql_container_update(client, container_name, sql_container_create_update_resource) +def cli_cosmosdb_sql_stored_procedure_create_update(client, + resource_group_name, + account_name, + database_name, + container_name, + stored_procedure_name, + stored_procedure_body): + + """Creates or Updates an Azure Cosmos DB SQL stored procedure """ + sql_stored_procedure_resource = SqlStoredProcedureResource(id=stored_procedure_name) + sql_stored_procedure_resource.body = stored_procedure_body + + sql_stored_procedure_create_update_resource = SqlStoredProcedureCreateUpdateParameters( + resource=sql_stored_procedure_resource, + options={}) + + return client.create_update_sql_stored_procedure(resource_group_name, + account_name, + database_name, + container_name, + stored_procedure_name, + sql_stored_procedure_create_update_resource) + +def cli_cosmosdb_sql_user_defined_function_create_update(client, + resource_group_name, + account_name, + database_name, + container_name, + user_defined_function_name, + user_defined_function_body): + + """Creates or Updates an Azure Cosmos DB SQL user defined function """ + sql_user_defined_function_resource = SqlUserDefinedFunctionResource(id=user_defined_function_name) + sql_user_defined_function_resource.body = user_defined_function_body + + sql_user_defined_function_create_update_resource = SqlUserDefinedFunctionCreateUpdateParameters( + resource=sql_user_defined_function_resource, + options={}) + + return client.create_update_sql_user_defined_function(resource_group_name, + account_name, + database_name, + container_name, + user_defined_function_name, + sql_user_defined_function_create_update_resource) + +def _populate_sql_trigger_definition(sql_trigger_resource, + trigger_body, + trigger_operation, + trigger_type): + if all(arg is None for arg in + [trigger_body, trigger_operation, trigger_type]): + return False + + if trigger_body is not None: + sql_trigger_resource.body = trigger_body + + if trigger_body is not None: + sql_trigger_resource.trigger_operation = trigger_operation + + if trigger_body is not None: + sql_trigger_resource.trigger_type = trigger_type + + return True + +def cli_cosmosdb_sql_trigger_create(client, + resource_group_name, + account_name, + database_name, + container_name, + trigger_name, + trigger_body, + trigger_type=None, + trigger_operation=None): + + """Creates an Azure Cosmos DB SQL trigger """ + if trigger_operation is None: + trigger_operation = "All" + + if trigger_type is None: + trigger_type = "Pre" + + sql_trigger_resource = SqlTriggerResource(id=trigger_name) + sql_trigger_resource.body = trigger_body + sql_trigger_resource.trigger_type = trigger_type + sql_trigger_resource.trigger_operation = trigger_operation + + sql_trigger_create_update_resource = SqlTriggerCreateUpdateParameters( + resource=sql_trigger_resource, + options={}) + + return client.create_update_sql_trigger(resource_group_name, + account_name, + database_name, + container_name, + trigger_name, + sql_trigger_create_update_resource) + +def cli_cosmosdb_sql_trigger_update(client, + resource_group_name, + account_name, + database_name, + container_name, + trigger_name, + trigger_body=None, + trigger_type=None, + trigger_operation=None): + + """Updates an Azure Cosmos DB SQL trigger """ + logger.debug('reading SQL trigger') + sql_trigger = client.get_sql_trigger(resource_group_name, account_name, database_name, container_name, trigger_name) + + sql_trigger_resource = SqlTriggerResource(id=trigger_name) + sql_trigger_resource.body = sql_trigger.resource.body + sql_trigger_resource.trigger_operation = sql_trigger.resource.trigger_operation + sql_trigger_resource.trigger_type = sql_trigger.resource.trigger_type + + if _populate_sql_trigger_definition(sql_trigger_resource, + trigger_body, + trigger_operation, + trigger_type): + logger.debug('replacing SQL trigger') + + sql_trigger_create_update_resource = SqlTriggerCreateUpdateParameters( + resource=sql_trigger_resource, + options={}) + + return client.create_update_sql_trigger(resource_group_name, + account_name, + database_name, + container_name, + trigger_name, + sql_trigger_create_update_resource) def cli_cosmosdb_gremlin_database_create(client, resource_group_name, diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_stored_procedure.yaml b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_stored_procedure.yaml new file mode 100644 index 00000000000..d987626809b --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_stored_procedure.yaml @@ -0,0 +1,2185 @@ +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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_stored_procedure000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001","name":"cli_test_cosmosdb_sql_stored_procedure000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-30T19:25:23Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 30 Jan 2020 19:25:24 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005","name":"cli000005","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000005-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000005-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000005-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000005-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/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '1462' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:25:31 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/operationResults/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:26:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:26:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:27:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:27:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:28: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:28:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:29:04 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:29:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:30:05 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:30:36 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:31:06 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:31:36 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:32: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:32: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:33: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:33: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:34:08 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:34: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:35: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:35: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:36: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8b54d8d7-a423-4e99-b421-4fe59066f2c7?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:36: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005","name":"cli000005","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000005.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000005-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1751' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:36:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005","name":"cli000005","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000005.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000005-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1751' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:36:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + Content-Length: + - '70' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -a -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/7a817e6e-cd4b-4a41-91bc-a1ab91a675eb?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:36:42 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/operationResults/7a817e6e-cd4b-4a41-91bc-a1ab91a675eb?api-version=2019-08-01 + 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.9.2 + 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 sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/7a817e6e-cd4b-4a41-91bc-a1ab91a675eb?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/7a817e6e-cd4b-4a41-91bc-a1ab91a675eb?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:37: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.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"PNpKAA==","_self":"dbs/PNpKAA==/","_etag":"\"0000c300-0000-0700-0000-5e33304c0000\"","_colls":"colls/","_users":"users/","_ts":1580413004}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '526' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:37:13 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000003", "indexingPolicy": {"automatic": + true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": + [{"path": "/\"_etag\"/?"}]}, "partitionKey": {"paths": ["/thePartitionKey"], + "kind": "Hash"}}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + Content-Length: + - '284' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fa3244ef-496d-477d-b385-e2a3afb0f060?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg/containers/cliehgxq2pjquve?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:37:15 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/operationResults/fa3244ef-496d-477d-b385-e2a3afb0f060?api-version=2019-08-01 + 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.9.2 + 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 sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fa3244ef-496d-477d-b385-e2a3afb0f060?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fa3244ef-496d-477d-b385-e2a3afb0f060?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:37:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"PNpKAMca-lY=","_ts":1580413038,"_self":"dbs/PNpKAA==/colls/PNpKAMca-lY=/","_etag":"\"0000c500-0000-0700-0000-5e33306e0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1121' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg/containers/cliehgxq2pjquve?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:37:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000004", "body": "sampleBody"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql stored_procedure create + Connection: + - keep-alive + Content-Length: + - '92' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --resource-group -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e61f9454-4aa4-42d6-be72-1204d47959f4?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg/containers/cliehgxq2pjquve/storedProcedures/cli6vi4gtzvan4t?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:37:49 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004/operationResults/e61f9454-4aa4-42d6-be72-1204d47959f4?api-version=2019-08-01 + 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.9.2 + 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 sql stored_procedure create + Connection: + - keep-alive + ParameterSetName: + - --resource-group -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e61f9454-4aa4-42d6-be72-1204d47959f4?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e61f9454-4aa4-42d6-be72-1204d47959f4?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:38:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql stored_procedure create + Connection: + - keep-alive + ParameterSetName: + - --resource-group -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/storedProcedures","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody","_rid":"PNpKAMca-lYBAAAAAAAAgA==","_self":"dbs/PNpKAA==/colls/PNpKAMca-lY=/sprocs/PNpKAMca-lYBAAAAAAAAgA==/","_etag":"\"0000423a-0000-0700-0000-5e3330900000\"","_ts":1580413072}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '665' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg/containers/cliehgxq2pjquve/storedProcedures/cli6vi4gtzvan4t?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:38:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000004", "body": "sampleBody2"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql stored_procedure update + Connection: + - keep-alive + Content-Length: + - '93' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9e86a730-edb0-47ad-8e8b-08b6623bd98a?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg/containers/cliehgxq2pjquve/storedProcedures/cli6vi4gtzvan4t?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:38:22 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004/operationResults/9e86a730-edb0-47ad-8e8b-08b6623bd98a?api-version=2019-08-01 + 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.9.2 + 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 sql stored_procedure update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9e86a730-edb0-47ad-8e8b-08b6623bd98a?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9e86a730-edb0-47ad-8e8b-08b6623bd98a?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:38: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.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql stored_procedure update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/storedProcedures","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody2","_rid":"PNpKAMca-lYBAAAAAAAAgA==","_self":"dbs/PNpKAA==/colls/PNpKAMca-lY=/sprocs/PNpKAMca-lYBAAAAAAAAgA==/","_etag":"\"0000443a-0000-0700-0000-5e3330b10000\"","_ts":1580413105}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '666' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg/containers/cliehgxq2pjquve/storedProcedures/cli6vi4gtzvan4t?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:38: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.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql stored_procedure show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/storedProcedures","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody2","_rid":"PNpKAMca-lYBAAAAAAAAgA==","_self":"dbs/PNpKAA==/colls/PNpKAMca-lY=/sprocs/PNpKAMca-lYBAAAAAAAAgA==/","_etag":"\"0000443a-0000-0700-0000-5e3330b10000\"","_ts":1580413105}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '666' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg/containers/cliehgxq2pjquve/storedProcedures/cli6vi4gtzvan4t?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:38: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.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql stored_procedure list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/?api-version=2019-08-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures//cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/storedProcedures","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody2","_rid":"PNpKAMca-lYBAAAAAAAAgA==","_self":"dbs/PNpKAA==/colls/PNpKAMca-lY=/sprocs/PNpKAMca-lYBAAAAAAAAgA==/","_etag":"\"0000443a-0000-0700-0000-5e3330b10000\"","_ts":1580413105}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '679' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg/containers/cliehgxq2pjquve/storedProcedures/?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:38:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql stored_procedure delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -d -c -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/bb8d4cef-ddd2-4f59-8da7-e3f143b4378a?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg/containers/cliehgxq2pjquve/storedProcedures/cli6vi4gtzvan4t?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:38:58 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/cli000004/operationResults/bb8d4cef-ddd2-4f59-8da7-e3f143b4378a?api-version=2019-08-01 + 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.9.2 + 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 sql stored_procedure delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/bb8d4cef-ddd2-4f59-8da7-e3f143b4378a?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/bb8d4cef-ddd2-4f59-8da7-e3f143b4378a?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:39: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.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql stored_procedure list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_stored_procedure000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/storedProcedures/?api-version=2019-08-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_stored_procedureangjfawa7udoobpuivapeg66k5xtshk4vqmeh/providers/Microsoft.DocumentDB/databaseAccounts/cliujlhbht342zc/sqlDatabases/clij7wwzk3aepgg/containers/cliehgxq2pjquve/storedProcedures/?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 19:39: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.9.2 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_trigger.yaml b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_trigger.yaml new file mode 100644 index 00000000000..0def231a74f --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_trigger.yaml @@ -0,0 +1,2334 @@ +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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_trigger000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001","name":"cli_test_cosmosdb_sql_trigger000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-31T00:12:28Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 31 Jan 2020 00:12:32 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005","name":"cli000005","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000005-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000005-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000005-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000005-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/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '1462' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:12:37 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/operationResults/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:13:55 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:14:25 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:14: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:15:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:15: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:16: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:16: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:17: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:17: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:18: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:18: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:19: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:19: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:20: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:21:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:21: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:22:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:22:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:23:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:23: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:24:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:24:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:25: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/11d8c936-de40-4d7f-8c0e-c1a11aa1a918?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:25:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005","name":"cli000005","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000005.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000005-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1751' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:25:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005","name":"cli000005","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000005.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000005-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1751' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:25:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + Content-Length: + - '70' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -a -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a1b62335-e510-4197-8ff2-ec13631ff610?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:25:35 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/operationResults/a1b62335-e510-4197-8ff2-ec13631ff610?api-version=2019-08-01 + 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.9.2 + 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 sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a1b62335-e510-4197-8ff2-ec13631ff610?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a1b62335-e510-4197-8ff2-ec13631ff610?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:26:05 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"EORqAA==","_self":"dbs/EORqAA==/","_etag":"\"0000b800-0000-0700-0000-5e3374010000\"","_colls":"colls/","_users":"users/","_ts":1580430337}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '526' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:26:06 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000003", "indexingPolicy": {"automatic": + true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": + [{"path": "/\"_etag\"/?"}]}, "partitionKey": {"paths": ["/thePartitionKey"], + "kind": "Hash"}}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + Content-Length: + - '284' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/7f6e2832-b2c6-4736-a04f-f3fa5a375226?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak/containers/clihtpapxs6oxcn?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:26:08 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/operationResults/7f6e2832-b2c6-4736-a04f-f3fa5a375226?api-version=2019-08-01 + 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.9.2 + 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 sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/7f6e2832-b2c6-4736-a04f-f3fa5a375226?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/7f6e2832-b2c6-4736-a04f-f3fa5a375226?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:26: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.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"EORqAPdYq5o=","_ts":1580430370,"_self":"dbs/EORqAA==/colls/EORqAPdYq5o=/","_etag":"\"0000ba00-0000-0700-0000-5e3374220000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1121' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak/containers/clihtpapxs6oxcn?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:26:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000004", "body": "sampleBody", "triggerType": + "Pre", "triggerOperation": "All"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql trigger create + Connection: + - keep-alive + Content-Length: + - '141' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --resource-group -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2002112d-3dd4-47e5-9526-a0c35fb139eb?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak/containers/clihtpapxs6oxcn/triggers/clighurv3vgutcp?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:26:42 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004/operationResults/2002112d-3dd4-47e5-9526-a0c35fb139eb?api-version=2019-08-01 + 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.9.2 + 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 sql trigger create + Connection: + - keep-alive + ParameterSetName: + - --resource-group -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2002112d-3dd4-47e5-9526-a0c35fb139eb?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2002112d-3dd4-47e5-9526-a0c35fb139eb?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:27: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.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql trigger create + Connection: + - keep-alive + ParameterSetName: + - --resource-group -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody","triggerType":"Pre","triggerOperation":"All","_rid":"EORqAPdYq5oBAAAAAAAAcA==","_self":"dbs/EORqAA==/colls/EORqAPdYq5o=/triggers/EORqAPdYq5oBAAAAAAAAcA==/","_etag":"\"0000f6c1-0000-0700-0000-5e3374440000\"","_ts":1580430404}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '696' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak/containers/clihtpapxs6oxcn/triggers/clighurv3vgutcp?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:27:13 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql trigger update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n -b --operation -t + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody","triggerType":"Pre","triggerOperation":"All","_rid":"EORqAPdYq5oBAAAAAAAAcA==","_self":"dbs/EORqAA==/colls/EORqAPdYq5o=/triggers/EORqAPdYq5oBAAAAAAAAcA==/","_etag":"\"0000f6c1-0000-0700-0000-5e3374440000\"","_ts":1580430404}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '696' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak/containers/clihtpapxs6oxcn/triggers/clighurv3vgutcp?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:27: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.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000004", "body": "sampleBody2", + "triggerType": "Pre", "triggerOperation": "Delete"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql trigger update + Connection: + - keep-alive + Content-Length: + - '145' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -a -d -c -n -b --operation -t + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/7c5a9e2a-88fd-44a2-96ad-46635effbf5f?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak/containers/clihtpapxs6oxcn/triggers/clighurv3vgutcp?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:27:16 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004/operationResults/7c5a9e2a-88fd-44a2-96ad-46635effbf5f?api-version=2019-08-01 + 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.9.2 + 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 sql trigger update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n -b --operation -t + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/7c5a9e2a-88fd-44a2-96ad-46635effbf5f?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/7c5a9e2a-88fd-44a2-96ad-46635effbf5f?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:27:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql trigger update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n -b --operation -t + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody2","triggerType":"Pre","triggerOperation":"Delete","_rid":"EORqAPdYq5oBAAAAAAAAcA==","_self":"dbs/EORqAA==/colls/EORqAPdYq5o=/triggers/EORqAPdYq5oBAAAAAAAAcA==/","_etag":"\"000048c3-0000-0700-0000-5e3374660000\"","_ts":1580430438}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '700' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak/containers/clihtpapxs6oxcn/triggers/clighurv3vgutcp?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:27:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql trigger show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody2","triggerType":"Pre","triggerOperation":"Delete","_rid":"EORqAPdYq5oBAAAAAAAAcA==","_self":"dbs/EORqAA==/colls/EORqAPdYq5o=/triggers/EORqAPdYq5oBAAAAAAAAcA==/","_etag":"\"000048c3-0000-0700-0000-5e3374660000\"","_ts":1580430438}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '700' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak/containers/clihtpapxs6oxcn/triggers/clighurv3vgutcp?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:27:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql trigger list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/?api-version=2019-08-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers//cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody2","triggerType":"Pre","triggerOperation":"Delete","_rid":"EORqAPdYq5oBAAAAAAAAcA==","_self":"dbs/EORqAA==/colls/EORqAPdYq5o=/triggers/EORqAPdYq5oBAAAAAAAAcA==/","_etag":"\"000048c3-0000-0700-0000-5e3374660000\"","_ts":1580430438}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '713' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak/containers/clihtpapxs6oxcn/triggers/?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:27:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql trigger delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -d -c -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/17bb37b0-9bda-4ed1-877a-e6c315b5dc1a?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak/containers/clihtpapxs6oxcn/triggers/clighurv3vgutcp?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:27:51 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/cli000004/operationResults/17bb37b0-9bda-4ed1-877a-e6c315b5dc1a?api-version=2019-08-01 + 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.9.2 + 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 sql trigger delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/17bb37b0-9bda-4ed1-877a-e6c315b5dc1a?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/17bb37b0-9bda-4ed1-877a-e6c315b5dc1a?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:28:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql trigger list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_trigger000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/triggers/?api-version=2019-08-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_triggeru5tmxn6i2wmaahzldsk2cs4x4dgautzidqrl5v3jmp5tig/providers/Microsoft.DocumentDB/databaseAccounts/cli26id4x4mkfau/sqlDatabases/clijnknztprs7ak/containers/clihtpapxs6oxcn/triggers/?api-version=2019-08-01 + content-type: + - application/json + date: + - Fri, 31 Jan 2020 00:28:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_user_defined_function.yaml b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_user_defined_function.yaml new file mode 100644 index 00000000000..26c863dcb8f --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_sql_user_defined_function.yaml @@ -0,0 +1,2185 @@ +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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_user_defined_function000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001","name":"cli_test_cosmosdb_sql_user_defined_function000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-30T21:03:36Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 30 Jan 2020 21:03:38 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005","name":"cli000005","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000005-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000005-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000005-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000005-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/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '1462' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:03:44 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/operationResults/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:04:17 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:04:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:05:17 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:05:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:06:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:06:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:07:17 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:07:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:08:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:08:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:09:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:09:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:10:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:10:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:11:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:11:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:12:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:12:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:13:21 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:13:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Dequeued","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:14:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9bf54c69-3863-4985-879a-598b7253ed33?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:14:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005","name":"cli000005","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000005.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000005-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1751' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:14: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.9.2 + 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.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005","name":"cli000005","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000005.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000005-westus","locationName":"West + US","documentEndpoint":"https://cli000005-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000005-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[]}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1751' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:14: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.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + Content-Length: + - '70' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -a -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e26da19e-14a2-4822-aa57-4c7409edf137?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:14:52 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/operationResults/e26da19e-14a2-4822-aa57-4c7409edf137?api-version=2019-08-01 + 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.9.2 + 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 sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e26da19e-14a2-4822-aa57-4c7409edf137?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e26da19e-14a2-4822-aa57-4c7409edf137?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:15:23 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"NmlXAA==","_self":"dbs/NmlXAA==/","_etag":"\"0000e303-0000-0700-0000-5e33474e0000\"","_colls":"colls/","_users":"users/","_ts":1580418894}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '526' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:15: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.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000003", "indexingPolicy": {"automatic": + true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": + [{"path": "/\"_etag\"/?"}]}, "partitionKey": {"paths": ["/thePartitionKey"], + "kind": "Hash"}}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + Content-Length: + - '284' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/aa07853b-546c-4506-96d2-bbc385458eb4?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl/containers/clioujoymubuzhb?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:15:44 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/operationResults/aa07853b-546c-4506-96d2-bbc385458eb4?api-version=2019-08-01 + 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.9.2 + 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 sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/aa07853b-546c-4506-96d2-bbc385458eb4?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/aa07853b-546c-4506-96d2-bbc385458eb4?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:16:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"NmlXAIjCoHA=","_ts":1580418946,"_self":"dbs/NmlXAA==/colls/NmlXAIjCoHA=/","_etag":"\"0000e503-0000-0700-0000-5e3347820000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1121' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl/containers/clioujoymubuzhb?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:16:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000004", "body": "sampleBody"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql user_defined_function create + Connection: + - keep-alive + Content-Length: + - '92' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --resource-group -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1b6ef9c4-61e0-468e-a8f0-7ea3ad96a1bf?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl/containers/clioujoymubuzhb/userDefinedFunctions/cli2yv4adyz25ur?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:16:17 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004/operationResults/1b6ef9c4-61e0-468e-a8f0-7ea3ad96a1bf?api-version=2019-08-01 + 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.9.2 + 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 sql user_defined_function create + Connection: + - keep-alive + ParameterSetName: + - --resource-group -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1b6ef9c4-61e0-468e-a8f0-7ea3ad96a1bf?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1b6ef9c4-61e0-468e-a8f0-7ea3ad96a1bf?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:16:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql user_defined_function create + Connection: + - keep-alive + ParameterSetName: + - --resource-group -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/userDefinedFunctions","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody","_rid":"NmlXAIjCoHABAAAAAAAAYA==","_self":"dbs/NmlXAA==/colls/NmlXAIjCoHA=/udfs/NmlXAIjCoHABAAAAAAAAYA==/","_etag":"\"0100387b-0000-0700-0000-5e3347a30000\"","_ts":1580418979}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '671' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl/containers/clioujoymubuzhb/userDefinedFunctions/cli2yv4adyz25ur?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:16:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000004", "body": "sampleBody2"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql user_defined_function update + Connection: + - keep-alive + Content-Length: + - '93' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/296bbf44-1f14-4b13-a75b-3d87a1ab28a6?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl/containers/clioujoymubuzhb/userDefinedFunctions/cli2yv4adyz25ur?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:16:51 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004/operationResults/296bbf44-1f14-4b13-a75b-3d87a1ab28a6?api-version=2019-08-01 + 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.9.2 + 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 sql user_defined_function update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/296bbf44-1f14-4b13-a75b-3d87a1ab28a6?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/296bbf44-1f14-4b13-a75b-3d87a1ab28a6?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:17:21 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql user_defined_function update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n -b + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/userDefinedFunctions","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody2","_rid":"NmlXAIjCoHABAAAAAAAAYA==","_self":"dbs/NmlXAA==/colls/NmlXAIjCoHA=/udfs/NmlXAIjCoHABAAAAAAAAYA==/","_etag":"\"0100837b-0000-0700-0000-5e3347c50000\"","_ts":1580419013}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '672' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl/containers/clioujoymubuzhb/userDefinedFunctions/cli2yv4adyz25ur?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:17:21 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql user_defined_function show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004?api-version=2019-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/userDefinedFunctions","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody2","_rid":"NmlXAIjCoHABAAAAAAAAYA==","_self":"dbs/NmlXAA==/colls/NmlXAIjCoHA=/udfs/NmlXAIjCoHABAAAAAAAAYA==/","_etag":"\"0100837b-0000-0700-0000-5e3347c50000\"","_ts":1580419013}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '672' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl/containers/clioujoymubuzhb/userDefinedFunctions/cli2yv4adyz25ur?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:17: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.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql user_defined_function list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/?api-version=2019-08-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions//cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/userDefinedFunctions","name":"cli000004","properties":{"resource":{"id":"cli000004","body":"sampleBody2","_rid":"NmlXAIjCoHABAAAAAAAAYA==","_self":"dbs/NmlXAA==/colls/NmlXAIjCoHA=/udfs/NmlXAIjCoHABAAAAAAAAYA==/","_etag":"\"0100837b-0000-0700-0000-5e3347c50000\"","_ts":1580419013}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '685' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl/containers/clioujoymubuzhb/userDefinedFunctions/?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:17:25 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql user_defined_function delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -d -c -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004?api-version=2019-08-01 + response: + body: + string: '{"status":"Enqueued","error":{}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/167b1287-833a-40f5-b5ae-101589829ed5?api-version=2019-08-01 + cache-control: + - no-store, no-cache + content-length: + - '32' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl/containers/clioujoymubuzhb/userDefinedFunctions/cli2yv4adyz25ur?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:17:26 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/cli000004/operationResults/167b1287-833a-40f5-b5ae-101589829ed5?api-version=2019-08-01 + 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.9.2 + 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 sql user_defined_function delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c -n + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/167b1287-833a-40f5-b5ae-101589829ed5?api-version=2019-08-01 + response: + body: + string: '{"status":"Succeeded","error":{}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '33' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/167b1287-833a-40f5-b5ae-101589829ed5?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:17: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.9.2 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql user_defined_function list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -c + User-Agent: + - python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-cosmosdb/0.11.0 Azure-SDK-For-Python AZURECLI/2.0.80 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_user_defined_function000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000005/sqlDatabases/cli000002/containers/cli000003/userDefinedFunctions/?api-version=2019-08-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-location: + - https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/cli_test_cosmosdb_sql_user_defined_function2x2jh2b2bxrzjk6bonnlgeegfctv65wb/providers/Microsoft.DocumentDB/databaseAccounts/cli3n7ws4bd4zs6/sqlDatabases/cliqh23qrfxlhyl/containers/clioujoymubuzhb/userDefinedFunctions/?api-version=2019-08-01 + content-type: + - application/json + date: + - Thu, 30 Jan 2020 21:17: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.9.2 + 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 fcfb151b670..d269478291c 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 @@ -447,6 +447,132 @@ def test_cosmosdb_sql_container(self, resource_group): container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() assert len(container_list) == 0 + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_stored_procedure') + def test_cosmosdb_sql_stored_procedure(self, resource_group): + db_name = self.create_random_name(prefix='cli', length=15) + ctn_name = self.create_random_name(prefix='cli', length=15) + partition_key = "/thePartitionKey" + sproc_name = self.create_random_name(prefix='cli', length=15) + body = "sampleBody" + nbody = "sampleBody2" + + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': db_name, + 'ctn_name': ctn_name, + 'part': partition_key, + 'sproc_name': sproc_name, + 'body': body, + 'nbody': nbody + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg}') + self.cmd('az cosmosdb sql database create -g {rg} -a {acc} -n {db_name}') + self.cmd('az cosmosdb sql container create -g {rg} -a {acc} -d {db_name} -n {ctn_name} -p {part} ').get_output_in_json() + sproc_create = self.cmd('az cosmosdb sql stored_procedure create --resource-group {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name} -b {body}').get_output_in_json() + + assert sproc_create["name"] == sproc_name + assert sproc_create["resource"]["body"] == body + + sproc_update = self.cmd('az cosmosdb sql stored_procedure update -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name} -b {nbody}').get_output_in_json() + assert sproc_update["resource"]["body"] == nbody + + sproc_show = self.cmd('az cosmosdb sql stored_procedure show -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name}').get_output_in_json() + assert sproc_show["name"] == sproc_name + + sproc_list = self.cmd('az cosmosdb sql stored_procedure list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() + assert len(sproc_list) == 1 + + self.cmd('az cosmosdb sql stored_procedure delete -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name}') + sproc_list = self.cmd('az cosmosdb sql stored_procedure list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() + assert len(sproc_list) == 0 + + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_user_defined_function') + def test_cosmosdb_sql_user_defined_function(self, resource_group): + db_name = self.create_random_name(prefix='cli', length=15) + ctn_name = self.create_random_name(prefix='cli', length=15) + partition_key = "/thePartitionKey" + udf_name = self.create_random_name(prefix='cli', length=15) + body = "sampleBody" + nbody = "sampleBody2" + + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': db_name, + 'ctn_name': ctn_name, + 'part': partition_key, + 'udf_name': udf_name, + 'body': body, + 'nbody': nbody + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg}') + self.cmd('az cosmosdb sql database create -g {rg} -a {acc} -n {db_name}') + self.cmd('az cosmosdb sql container create -g {rg} -a {acc} -d {db_name} -n {ctn_name} -p {part} ').get_output_in_json() + udf_create = self.cmd('az cosmosdb sql user_defined_function create --resource-group {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name} -b {body}').get_output_in_json() + + assert udf_create["name"] == udf_name + assert udf_create["resource"]["body"] == body + + udf_update = self.cmd('az cosmosdb sql user_defined_function update -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name} -b {nbody}').get_output_in_json() + assert udf_update["resource"]["body"] == nbody + + udf_show = self.cmd('az cosmosdb sql user_defined_function show -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name}').get_output_in_json() + assert udf_show["name"] == udf_name + + udf_list = self.cmd('az cosmosdb sql user_defined_function list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() + assert len(udf_list) == 1 + + self.cmd('az cosmosdb sql user_defined_function delete -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name}') + udf_list = self.cmd('az cosmosdb sql user_defined_function list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() + assert len(udf_list) == 0 + + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_trigger') + def test_cosmosdb_sql_trigger(self, resource_group): + db_name = self.create_random_name(prefix='cli', length=15) + ctn_name = self.create_random_name(prefix='cli', length=15) + partition_key = "/thePartitionKey" + trigger_name = self.create_random_name(prefix='cli', length=15) + body = "sampleBody" + trigger_type = "Pre" + trigger_operation = "Delete" + nbody = "sampleBody2" + + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': db_name, + 'ctn_name': ctn_name, + 'part': partition_key, + 'trigger_name': trigger_name, + 'body': body, + 'type' : trigger_type, + 'op' : trigger_operation, + 'nbody': nbody + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg}') + self.cmd('az cosmosdb sql database create -g {rg} -a {acc} -n {db_name}') + self.cmd('az cosmosdb sql container create -g {rg} -a {acc} -d {db_name} -n {ctn_name} -p {part} ').get_output_in_json() + trigger_create = self.cmd('az cosmosdb sql trigger create --resource-group {rg} -a {acc} -d {db_name} -c {ctn_name} -n {trigger_name} -b {body}').get_output_in_json() + + assert trigger_create["name"] == trigger_name + assert trigger_create["resource"]["body"] == body + + trigger_update = self.cmd('az cosmosdb sql trigger update -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {trigger_name} -b {nbody} --operation {op} -t {type}').get_output_in_json() + assert trigger_update["resource"]["body"] == nbody + assert trigger_update["resource"]["triggerOperation"] == trigger_operation + assert trigger_update["resource"]["triggerType"] == trigger_type + + trigger_show = self.cmd('az cosmosdb sql trigger show -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {trigger_name}').get_output_in_json() + assert trigger_show["name"] == trigger_name + + trigger_list = self.cmd('az cosmosdb sql trigger list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() + assert len(trigger_list) == 1 + + self.cmd('az cosmosdb sql trigger delete -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {trigger_name}') + trigger_list = self.cmd('az cosmosdb sql trigger list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() + assert len(trigger_list) == 0 + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_mongodb_database') def test_cosmosdb_mongodb_database(self, resource_group): db_name = self.create_random_name(prefix='cli', length=15) From 03b1131e5cd08f17d7f0886d46d80d01dee909c5 Mon Sep 17 00:00:00 2001 From: Meha Kaushik Date: Fri, 31 Jan 2020 12:28:02 -0800 Subject: [PATCH 2/9] added help, fixed indentation, fixed wrong code --- .../cli/command_modules/cosmosdb/_help.py | 94 ++++++++++++++- .../cli/command_modules/cosmosdb/commands.py | 2 +- .../cli/command_modules/cosmosdb/custom.py | 112 +++++++++--------- 3 files changed, 150 insertions(+), 58 deletions(-) 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 bc19c0d7865..84ed49e74b5 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py @@ -509,7 +509,99 @@ short-summary: Manage SQL resources of Azure Cosmos DB account. """ -helps['cosmosdb sql container'] = """ +helps['cosmosdb sql stored_procedure'] = """ +type: group +short-summary: Manage Azure Cosmos DB SQL stored procedures. +""" + +helps['cosmosdb sql stored_procedure create'] = """ +type: command +short-summary: Create an SQL stored procedure under an Azure Cosmos DB SQL container. +examples: + - name: Create an Azure Cosmos DB SQL stored procedure. + text: az cosmosdb sql stored_procedure create -g MyResourceGroup -a MyAccount -d MyDatabase -c MyContainer -n MyStoredProcedure -b StoredProcedureBody + crafted: true +""" + +helps['cosmosdb sql stored_procedure delete'] = """ +type: command +short-summary: Delete the SQL stored procedure under an Azure Cosmos DB SQL container. +""" + +helps['cosmosdb sql stored_procedure list'] = """ +type: command +short-summary: List the SQL stored procedures under an Azure Cosmos DB SQL container. +""" + +helps['cosmosdb sql stored_procedure show'] = """ +type: command +short-summary: Show the details of a SQL stored procedure under an Azure Cosmos DB SQL container. +""" + +helps['cosmosdb sql'] = """ +type: group +short-summary: Manage SQL resources of Azure Cosmos DB account. +""" + +helps['cosmosdb sql trigger'] = """ +type: group +short-summary: Manage Azure Cosmos DB SQL triggers. +""" + +helps['cosmosdb sql trigger create'] = """ +type: command +short-summary: Create an SQL trigger under an Azure Cosmos DB SQL container. +examples: + - name: Create an Azure Cosmos DB SQL trigger. + text: az cosmosdb sql trigger create -g MyResourceGroup -a MyAccount -d MyDatabase -c MyContainer -n MyTrigger -b TriggerBody + crafted: true +""" + +helps['cosmosdb sql trigger delete'] = """ +type: command +short-summary: Delete the SQL trigger under an Azure Cosmos DB SQL container. +""" + +helps['cosmosdb sql trigger list'] = """ +type: command +short-summary: List the SQL triggers under an Azure Cosmos DB SQL container. +""" + +helps['cosmosdb sql trigger show'] = """ +type: command +short-summary: Show the details of a SQL trigger under an Azure Cosmos DB SQL container. +""" + +helps['cosmosdb sql user_defined_function'] = """ +type: group +short-summary: Manage Azure Cosmos DB SQL user defined functions. +""" + +helps['cosmosdb sql user_defined_function create'] = """ +type: command +short-summary: Create an SQL user defined function under an Azure Cosmos DB SQL container. +examples: + - name: Create an Azure Cosmos DB SQL user defined function. + text: az cosmosdb sql user_defined_function create -g MyResourceGroup -a MyAccount -d MyDatabase -c MyContainer -n MyUserDefinedFunction -b UserDefinedFunctionBody + crafted: true +""" + +helps['cosmosdb sql user_defined_function delete'] = """ +type: command +short-summary: Delete the SQL user defined function under an Azure Cosmos DB SQL container. +""" + +helps['cosmosdb sql user_defined_function list'] = """ +type: command +short-summary: List the SQL user defined functions under an Azure Cosmos DB SQL container. +""" + +helps['cosmosdb sql user_defined_function show'] = """ +type: command +short-summary: Show the details of a SQL user defined function under an Azure Cosmos DB SQL container. +""" + +helps['cosmosdb sql stored_procedure'] = """ type: group short-summary: Manage Azure Cosmos DB SQL containers. """ 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 259cacd9155..7c6cde6bb5a 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py @@ -77,7 +77,7 @@ def load_command_table(self, _): g.command('list', 'list_sql_containers') g.command('show', 'get_sql_container') g.command('delete', 'delete_sql_container') - + with self.command_group('cosmosdb sql stored_procedure', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: g.custom_command('create', 'cli_cosmosdb_sql_stored_procedure_create_update') g.custom_command('update', 'cli_cosmosdb_sql_stored_procedure_create_update') 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 3019cde6a1f..c7427d9962c 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py @@ -325,12 +325,12 @@ def cli_cosmosdb_sql_container_update(client, sql_container_create_update_resource) def cli_cosmosdb_sql_stored_procedure_create_update(client, - resource_group_name, - account_name, - database_name, - container_name, - stored_procedure_name, - stored_procedure_body): + resource_group_name, + account_name, + database_name, + container_name, + stored_procedure_name, + stored_procedure_body): """Creates or Updates an Azure Cosmos DB SQL stored procedure """ sql_stored_procedure_resource = SqlStoredProcedureResource(id=stored_procedure_name) @@ -341,19 +341,19 @@ def cli_cosmosdb_sql_stored_procedure_create_update(client, options={}) return client.create_update_sql_stored_procedure(resource_group_name, - account_name, - database_name, - container_name, - stored_procedure_name, - sql_stored_procedure_create_update_resource) + account_name, + database_name, + container_name, + stored_procedure_name, + sql_stored_procedure_create_update_resource) def cli_cosmosdb_sql_user_defined_function_create_update(client, - resource_group_name, - account_name, - database_name, - container_name, - user_defined_function_name, - user_defined_function_body): + resource_group_name, + account_name, + database_name, + container_name, + user_defined_function_name, + user_defined_function_body): """Creates or Updates an Azure Cosmos DB SQL user defined function """ sql_user_defined_function_resource = SqlUserDefinedFunctionResource(id=user_defined_function_name) @@ -364,16 +364,16 @@ def cli_cosmosdb_sql_user_defined_function_create_update(client, options={}) return client.create_update_sql_user_defined_function(resource_group_name, - account_name, - database_name, - container_name, - user_defined_function_name, - sql_user_defined_function_create_update_resource) + account_name, + database_name, + container_name, + user_defined_function_name, + sql_user_defined_function_create_update_resource) def _populate_sql_trigger_definition(sql_trigger_resource, - trigger_body, - trigger_operation, - trigger_type): + trigger_body, + trigger_operation, + trigger_type): if all(arg is None for arg in [trigger_body, trigger_operation, trigger_type]): return False @@ -381,23 +381,23 @@ def _populate_sql_trigger_definition(sql_trigger_resource, if trigger_body is not None: sql_trigger_resource.body = trigger_body - if trigger_body is not None: + if trigger_operation is not None: sql_trigger_resource.trigger_operation = trigger_operation - if trigger_body is not None: + if trigger_type is not None: sql_trigger_resource.trigger_type = trigger_type return True def cli_cosmosdb_sql_trigger_create(client, - resource_group_name, - account_name, - database_name, - container_name, - trigger_name, - trigger_body, - trigger_type=None, - trigger_operation=None): + resource_group_name, + account_name, + database_name, + container_name, + trigger_name, + trigger_body, + trigger_type=None, + trigger_operation=None): """Creates an Azure Cosmos DB SQL trigger """ if trigger_operation is None: @@ -416,21 +416,21 @@ def cli_cosmosdb_sql_trigger_create(client, options={}) return client.create_update_sql_trigger(resource_group_name, - account_name, - database_name, - container_name, - trigger_name, - sql_trigger_create_update_resource) + account_name, + database_name, + container_name, + trigger_name, + sql_trigger_create_update_resource) def cli_cosmosdb_sql_trigger_update(client, - resource_group_name, - account_name, - database_name, - container_name, - trigger_name, - trigger_body=None, - trigger_type=None, - trigger_operation=None): + resource_group_name, + account_name, + database_name, + container_name, + trigger_name, + trigger_body=None, + trigger_type=None, + trigger_operation=None): """Updates an Azure Cosmos DB SQL trigger """ logger.debug('reading SQL trigger') @@ -442,9 +442,9 @@ def cli_cosmosdb_sql_trigger_update(client, sql_trigger_resource.trigger_type = sql_trigger.resource.trigger_type if _populate_sql_trigger_definition(sql_trigger_resource, - trigger_body, - trigger_operation, - trigger_type): + trigger_body, + trigger_operation, + trigger_type): logger.debug('replacing SQL trigger') sql_trigger_create_update_resource = SqlTriggerCreateUpdateParameters( @@ -452,11 +452,11 @@ def cli_cosmosdb_sql_trigger_update(client, options={}) return client.create_update_sql_trigger(resource_group_name, - account_name, - database_name, - container_name, - trigger_name, - sql_trigger_create_update_resource) + account_name, + database_name, + container_name, + trigger_name, + sql_trigger_create_update_resource) def cli_cosmosdb_gremlin_database_create(client, resource_group_name, From 972341703625e87b673b321e3ab7d9ba07a0850a Mon Sep 17 00:00:00 2001 From: Meha Kaushik Date: Fri, 31 Jan 2020 12:35:41 -0800 Subject: [PATCH 3/9] fixed a typo --- src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 84ed49e74b5..ad106830eb3 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py @@ -601,7 +601,7 @@ short-summary: Show the details of a SQL user defined function under an Azure Cosmos DB SQL container. """ -helps['cosmosdb sql stored_procedure'] = """ +helps['cosmosdb sql container'] = """ type: group short-summary: Manage Azure Cosmos DB SQL containers. """ From 04fc7a641213b0ca27872680d1eb3bc93926ed80 Mon Sep 17 00:00:00 2001 From: Meha Kaushik Date: Fri, 31 Jan 2020 12:53:30 -0800 Subject: [PATCH 4/9] indentation fix --- .../azure/cli/command_modules/cosmosdb/custom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 c7427d9962c..94937229c0f 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py @@ -364,11 +364,11 @@ def cli_cosmosdb_sql_user_defined_function_create_update(client, options={}) return client.create_update_sql_user_defined_function(resource_group_name, - account_name, - database_name, - container_name, - user_defined_function_name, - sql_user_defined_function_create_update_resource) + account_name, + database_name, + container_name, + user_defined_function_name, + sql_user_defined_function_create_update_resource) def _populate_sql_trigger_definition(sql_trigger_resource, trigger_body, From dafde66c3c28cfa6ebeda843c54c2e5c37c55db2 Mon Sep 17 00:00:00 2001 From: Meha Kaushik Date: Fri, 31 Jan 2020 13:57:11 -0800 Subject: [PATCH 5/9] flake8 issues fixed --- .../azure/cli/command_modules/cosmosdb/custom.py | 7 +++++++ .../cosmosdb/tests/latest/test_cosmosdb_commands.py | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) 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 94937229c0f..7ca1ac3c2cd 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py @@ -288,6 +288,7 @@ def cli_cosmosdb_sql_container_create(client, container_name, sql_container_create_update_resource) + def cli_cosmosdb_sql_container_update(client, resource_group_name, account_name, @@ -324,6 +325,7 @@ def cli_cosmosdb_sql_container_update(client, container_name, sql_container_create_update_resource) + def cli_cosmosdb_sql_stored_procedure_create_update(client, resource_group_name, account_name, @@ -347,6 +349,7 @@ def cli_cosmosdb_sql_stored_procedure_create_update(client, stored_procedure_name, sql_stored_procedure_create_update_resource) + def cli_cosmosdb_sql_user_defined_function_create_update(client, resource_group_name, account_name, @@ -370,6 +373,7 @@ def cli_cosmosdb_sql_user_defined_function_create_update(client, user_defined_function_name, sql_user_defined_function_create_update_resource) + def _populate_sql_trigger_definition(sql_trigger_resource, trigger_body, trigger_operation, @@ -389,6 +393,7 @@ def _populate_sql_trigger_definition(sql_trigger_resource, return True + def cli_cosmosdb_sql_trigger_create(client, resource_group_name, account_name, @@ -422,6 +427,7 @@ def cli_cosmosdb_sql_trigger_create(client, trigger_name, sql_trigger_create_update_resource) + def cli_cosmosdb_sql_trigger_update(client, resource_group_name, account_name, @@ -458,6 +464,7 @@ def cli_cosmosdb_sql_trigger_update(client, trigger_name, sql_trigger_create_update_resource) + def cli_cosmosdb_gremlin_database_create(client, resource_group_name, account_name, 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 d269478291c..9a232ca483e 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 @@ -455,7 +455,7 @@ def test_cosmosdb_sql_stored_procedure(self, resource_group): sproc_name = self.create_random_name(prefix='cli', length=15) body = "sampleBody" nbody = "sampleBody2" - + self.kwargs.update({ 'acc': self.create_random_name(prefix='cli', length=15), 'db_name': db_name, @@ -495,7 +495,7 @@ def test_cosmosdb_sql_user_defined_function(self, resource_group): udf_name = self.create_random_name(prefix='cli', length=15) body = "sampleBody" nbody = "sampleBody2" - + self.kwargs.update({ 'acc': self.create_random_name(prefix='cli', length=15), 'db_name': db_name, @@ -537,7 +537,7 @@ def test_cosmosdb_sql_trigger(self, resource_group): trigger_type = "Pre" trigger_operation = "Delete" nbody = "sampleBody2" - + self.kwargs.update({ 'acc': self.create_random_name(prefix='cli', length=15), 'db_name': db_name, @@ -545,8 +545,8 @@ def test_cosmosdb_sql_trigger(self, resource_group): 'part': partition_key, 'trigger_name': trigger_name, 'body': body, - 'type' : trigger_type, - 'op' : trigger_operation, + 'type': trigger_type, + 'op': trigger_operation, 'nbody': nbody }) From ef3546a1e8e9cb8565776a157200d855fa2fc448 Mon Sep 17 00:00:00 2001 From: Meha Kaushik Date: Thu, 20 Feb 2020 13:40:35 -0800 Subject: [PATCH 6/9] PR comments --- .../cli/command_modules/cosmosdb/_params.py | 88 ++++++++++--------- .../cli/command_modules/cosmosdb/commands.py | 34 +++---- .../tests/latest/test_cosmosdb_commands.py | 50 +++++------ 3 files changed, 88 insertions(+), 84 deletions(-) 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 147c3a67595..79768bf69ee 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py @@ -37,8 +37,8 @@ def load_arguments(self, _): - - from azure.mgmt.cosmosdb.models import KeyKind, DefaultConsistencyLevel, DatabaseAccountKind + from knack.arguments import CLIArgumentType + from azure.mgmt.cosmosdb.models import KeyKind, DefaultConsistencyLevel, DatabaseAccountKind, TriggerType, TriggerOperation with self.argument_context('cosmosdb') as c: c.argument('account_name', arg_type=name_type, help='Name of the Cosmos DB database account', completer=get_resource_name_completion_list('Microsoft.DocumentDb/databaseAccounts'), id_part='name') @@ -97,16 +97,20 @@ def load_arguments(self, _): with self.argument_context('cosmosdb database') as c: c.argument('throughput', type=int, help='Offer Throughput (RU/s)') + account_name_type = CLIArgumentType(options_list=['--account-name', '-a'], help="Cosmosdb account name.") + database_name_type = CLIArgumentType(options_list=['--database-name', '-d'], help='Database name.') + container_name_type = CLIArgumentType(options_list=['--container-name', '-c'], help='Container name.') + # SQL database with self.argument_context('cosmosdb sql database') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('database_name', options_list=['--name', '-n'], help="Database name") c.argument('throughput', help='The throughput of SQL database (RU/s). Default value is 400') # SQL container with self.argument_context('cosmosdb sql container') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) - c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") + c.argument('account_name', account_name_type, id_part=None) + c.argument('database_name', database_name_type) c.argument('container_name', options_list=['--name', '-n'], help="Container name") c.argument('partition_key_path', options_list=['--partition-key-path', '-p'], help='Partition Key Path, e.g., \'/address/zipcode\'') c.argument('default_ttl', options_list=['--ttl'], type=int, help='Default TTL. If the value is missing or set to "-1", items don’t expire. If the value is set to "n", items will expire "n" seconds after last modified time.') @@ -116,40 +120,40 @@ def load_arguments(self, _): c.argument('throughput', help='The throughput of SQL container (RU/s). Default value is 400') # SQL stored procedure - with self.argument_context('cosmosdb sql stored_procedure') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) - c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") - c.argument('container_name', options_list=['--container-name', '-c'], help="Container name") + with self.argument_context('cosmosdb sql stored-procedure') as c: + c.argument('account_name', account_name_type, id_part=None) + c.argument('database_name', database_name_type) + c.argument('container_name', container_name_type) c.argument('stored_procedure_name', options_list=['--name', '-n'], help="StoredProcedure name") - c.argument('stored_procedure_body', options_list=['--body', '-b'], help="StoredProcedure body") + c.argument('stored_procedure_body', options_list=['--body', '-b'],completer=FilesCompleter(), help="StoredProcedure body, you can enter it as a string or as a file, e.g., --body @sprocbody-file.json") # SQL trigger with self.argument_context('cosmosdb sql trigger') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) - c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") - c.argument('container_name', options_list=['--container', '-c'], help="Container name") + c.argument('account_name', account_name_type, id_part=None) + c.argument('database_name', database_name_type) + c.argument('container_name', container_name_type) c.argument('trigger_name', options_list=['--name', '-n'], help="Trigger name") - c.argument('trigger_body', options_list=['--body', '-b'], help="Trigger body") - c.argument('trigger_type', options_list=['--type', '-t'], help="Trigger type, values can be: Pre or Post") - c.argument('trigger_operation', options_list=['--operation'], help="The operation of the trigger. Values can be: All, Create, Update, Delete, Replace") + c.argument('trigger_body', options_list=['--body', '-b'],completer=FilesCompleter(), help="Trigger body, you can enter it as a string or as a file, e.g., --body @triggerbody-file.json") + c.argument('trigger_type', options_list=['--type', '-t'], arg_type=get_enum_type(TriggerType), help="Trigger type, values can be: Pre or Post") + c.argument('trigger_operation', options_list=['--operation'], arg_type=get_enum_type(TriggerOperation), help="The operation of the trigger. Values can be: All, Create, Update, Delete, Replace") # SQL user defined function - with self.argument_context('cosmosdb sql user_defined_function') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) - c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") - c.argument('container_name', options_list=['--container', '-c'], help="Container name") + with self.argument_context('cosmosdb sql user-defined-function') as c: + c.argument('account_name', account_name_type, id_part=None) + c.argument('database_name', database_name_type) + c.argument('container_name', container_name_type) c.argument('user_defined_function_name', options_list=['--name', '-n'], help="UserDefinedFunction name") - c.argument('user_defined_function_body', options_list=['--body', '-b'], help="UserDefinedFunction body") + c.argument('user_defined_function_body', options_list=['--body', '-b'],completer=FilesCompleter(), help="UserDefinedFunction body, you can enter it as a string or as a file, e.g., --body @udfbody-file.json") # MongoDB with self.argument_context('cosmosdb mongodb database') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('database_name', options_list=['--name', '-n'], help="Database name") c.argument('throughput', help='The throughput of MongoDB database (RU/s). Default value is 400') with self.argument_context('cosmosdb mongodb collection') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) - c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") + c.argument('account_name', account_name_type, id_part=None) + c.argument('database_name', database_name_type) c.argument('collection_name', options_list=['--name', '-n'], help="Collection name") c.argument('shard_key_path', options_list=['--shard'], help="Sharding key path.") c.argument('indexes', options_list=['--idx'], type=shell_safe_json_parse, completer=FilesCompleter(), help='Indexes, you can enter it as a string or as a file, e.g., --idx @indexes-file.json or ' + MONGODB_INDEXES_EXAMPLE) @@ -157,12 +161,12 @@ def load_arguments(self, _): # Cassandra with self.argument_context('cosmosdb cassandra keyspace') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('keyspace_name', options_list=['--name', '-n'], help="Keyspace name") c.argument('throughput', help='The throughput of Cassandra keyspace (RU/s). Default value is 400') with self.argument_context('cosmosdb cassandra table') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('keyspace_name', options_list=['--keyspace-name', '-k'], help="Keyspace name") c.argument('table_name', options_list=['--name', '-n'], help="Table name") c.argument('default_ttl', options_list=['--ttl'], type=int, help='Default TTL. If the value is missing or set to "-1", items don’t expire. If the value is set to "n", items will expire "n" seconds after last modified time.') @@ -171,13 +175,13 @@ def load_arguments(self, _): # Gremlin with self.argument_context('cosmosdb gremlin database') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('database_name', options_list=['--name', '-n'], help="Database name") c.argument('throughput', help='The throughput Gremlin database (RU/s). Default value is 400') with self.argument_context('cosmosdb gremlin graph') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) - c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") + c.argument('account_name', account_name_type, id_part=None) + c.argument('database_name', database_name_type) c.argument('graph_name', options_list=['--name', '-n'], help="Graph name") c.argument('partition_key_path', options_list=['--partition-key-path', '-p'], help='Partition Key Path, e.g., \'/address/zipcode\'') c.argument('default_ttl', options_list=['--ttl'], type=int, help='Default TTL. If the value is missing or set to "-1", items don’t expire. If the value is set to "n", items will expire "n" seconds after last modified time.') @@ -187,56 +191,56 @@ def load_arguments(self, _): # Table with self.argument_context('cosmosdb table') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('table_name', options_list=['--name', '-n'], help="Table name") c.argument('throughput', help='The throughput of Table (RU/s). Default value is 400') # Throughput with self.argument_context('cosmosdb sql database throughput') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('database_name', options_list=['--name', '-n'], help="Database name") c.argument('throughput', type=int, help='The throughput of SQL database (RU/s).') with self.argument_context('cosmosdb sql container throughput') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) - c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") + c.argument('account_name', account_name_type, id_part=None) + c.argument('database_name', database_name_type) c.argument('container_name', options_list=['--name', '-n'], help="Container name") c.argument('throughput', type=int, help='The throughput of SQL container (RU/s).') with self.argument_context('cosmosdb mongodb database throughput') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('database_name', options_list=['--name', '-n'], help="Database name") c.argument('throughput', type=int, help='The throughput of MongoDB database (RU/s).') with self.argument_context('cosmosdb mongodb collection throughput') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) - c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") + c.argument('account_name', account_name_type, id_part=None) + c.argument('database_name', database_name_type) c.argument('collection_name', options_list=['--name', '-n'], help="Collection name") c.argument('throughput', type=int, help='The throughput of MongoDB collection (RU/s).') with self.argument_context('cosmosdb cassandra keyspace throughput') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('keyspace_name', options_list=['--name', '-n'], help="Keyspace name") c.argument('throughput', type=int, help='The throughput of Cassandra keyspace (RU/s).') with self.argument_context('cosmosdb cassandra table throughput') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('keyspace_name', options_list=['--keyspace-name', '-k'], help="Keyspace name") c.argument('table_name', options_list=['--name', '-n'], help="Table name") c.argument('throughput', type=int, help='The throughput of Cassandra table (RU/s).') with self.argument_context('cosmosdb gremlin database throughput') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('database_name', options_list=['--name', '-n'], help="Database name") c.argument('throughput', type=int, help='The throughput of Gremlin database (RU/s).') with self.argument_context('cosmosdb gremlin graph throughput') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) - c.argument('database_name', options_list=['--database-name', '-d'], help="Database name") + c.argument('account_name', account_name_type, id_part=None) + c.argument('database_name', database_name_type) c.argument('graph_name', options_list=['--name', '-n'], help="Grapth name") c.argument('throughput', type=int, help='The throughput Gremlin graph (RU/s).') with self.argument_context('cosmosdb table throughput') as c: - c.argument('account_name', options_list=['--account-name', '-a'], help="Cosmosdb account name", id_part=None) + c.argument('account_name', account_name_type, id_part=None) c.argument('table_name', options_list=['--name', '-n'], help="Table name") c.argument('throughput', type=int, help='The throughput of Table (RU/s).') 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 7c6cde6bb5a..39e6a8d7bcb 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py @@ -56,7 +56,7 @@ def load_command_table(self, _): g.command('list-connection-strings', 'list_connection_strings', table_transformer=list_connection_strings_output, deprecate_info=g.deprecate(redirect='cosmosdb keys list', hide=True)) g.command('regenerate-key', 'regenerate_key', deprecate_info=g.deprecate(redirect='cosmosdb keys regenerate', hide=True)) g.command('check-name-exists', 'check_name_exists') - g.command('delete', 'delete') + g.command('delete', 'delete', confirmation=True) g.command('failover-priority-change', 'failover_priority_change') g.custom_command('create', 'cli_cosmosdb_create') g.custom_command('update', 'cli_cosmosdb_update') @@ -69,35 +69,35 @@ def load_command_table(self, _): g.custom_command('create', 'cli_cosmosdb_sql_database_create') g.command('list', 'list_sql_databases') g.command('show', 'get_sql_database') - g.command('delete', 'delete_sql_database') + g.command('delete', 'delete_sql_database', confirmation=True) with self.command_group('cosmosdb sql container', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: g.custom_command('create', 'cli_cosmosdb_sql_container_create') g.custom_command('update', 'cli_cosmosdb_sql_container_update') g.command('list', 'list_sql_containers') g.command('show', 'get_sql_container') - g.command('delete', 'delete_sql_container') + g.command('delete', 'delete_sql_container', confirmation=True) - with self.command_group('cosmosdb sql stored_procedure', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: + with self.command_group('cosmosdb sql stored-procedure', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: g.custom_command('create', 'cli_cosmosdb_sql_stored_procedure_create_update') g.custom_command('update', 'cli_cosmosdb_sql_stored_procedure_create_update') g.command('list', 'list_sql_stored_procedures') g.command('show', 'get_sql_stored_procedure') - g.command('delete', 'delete_sql_stored_procedure') + g.command('delete', 'delete_sql_stored_procedure', confirmation=True) with self.command_group('cosmosdb sql trigger', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: g.custom_command('create', 'cli_cosmosdb_sql_trigger_create') g.custom_command('update', 'cli_cosmosdb_sql_trigger_update') g.command('list', 'list_sql_triggers') g.command('show', 'get_sql_trigger') - g.command('delete', 'delete_sql_trigger') + g.command('delete', 'delete_sql_trigger', confirmation=True) - with self.command_group('cosmosdb sql user_defined_function', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: + with self.command_group('cosmosdb sql user-defined-function', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: g.custom_command('create', 'cli_cosmosdb_sql_user_defined_function_create_update') g.custom_command('update', 'cli_cosmosdb_sql_user_defined_function_create_update') g.command('list', 'list_sql_user_defined_functions') g.command('show', 'get_sql_user_defined_function') - g.command('delete', 'delete_sql_user_defined_function') + g.command('delete', 'delete_sql_user_defined_function', confirmation=True) # MongoDB api with self.command_group('cosmosdb mongodb', is_preview=True): @@ -106,14 +106,14 @@ def load_command_table(self, _): g.custom_command('create', 'cli_cosmosdb_mongodb_database_create') g.command('list', 'list_mongo_db_databases') g.command('show', 'get_mongo_db_database') - g.command('delete', 'delete_mongo_db_database') + g.command('delete', 'delete_mongo_db_database', confirmation=True) with self.command_group('cosmosdb mongodb collection', cosmosdb_mongo_sdk, client_factory=cf_mongo_db_resources) as g: g.custom_command('create', 'cli_cosmosdb_mongodb_collection_create') g.custom_command('update', 'cli_cosmosdb_mongodb_collection_update') g.command('list', 'list_mongo_db_collections') g.command('show', 'get_mongo_db_collection') - g.command('delete', 'delete_mongo_db_collection') + g.command('delete', 'delete_mongo_db_collection', confirmation=True) # Cassandra api with self.command_group('cosmosdb cassandra', is_preview=True): @@ -122,14 +122,14 @@ def load_command_table(self, _): g.custom_command('create', 'cli_cosmosdb_cassandra_keyspace_create') g.command('list', 'list_cassandra_keyspaces') g.command('show', 'get_cassandra_keyspace') - g.command('delete', 'delete_cassandra_keyspace') + g.command('delete', 'delete_cassandra_keyspace', confirmation=True) with self.command_group('cosmosdb cassandra table', cosmosdb_cassandra_sdk, client_factory=cf_cassandra_resources) as g: g.custom_command('create', 'cli_cosmosdb_cassandra_table_create') g.custom_command('update', 'cli_cosmosdb_cassandra_table_update') g.command('list', 'list_cassandra_tables') g.command('show', 'get_cassandra_table') - g.command('delete', 'delete_cassandra_table') + g.command('delete', 'delete_cassandra_table', confirmation=True) # Gremlin api with self.command_group('cosmosdb gremlin', is_preview=True): @@ -138,21 +138,21 @@ def load_command_table(self, _): g.custom_command('create', 'cli_cosmosdb_gremlin_database_create') g.command('list', 'list_gremlin_databases') g.command('show', 'get_gremlin_database') - g.command('delete', 'delete_gremlin_database') + g.command('delete', 'delete_gremlin_database', confirmation=True) with self.command_group('cosmosdb gremlin graph', cosmosdb_gremlin_sdk, client_factory=cf_gremlin_resources) as g: g.custom_command('create', 'cli_cosmosdb_gremlin_graph_create') g.custom_command('update', 'cli_cosmosdb_gremlin_graph_update') g.command('list', 'list_gremlin_graphs') g.command('show', 'get_gremlin_graph') - g.command('delete', 'delete_gremlin_graph') + g.command('delete', 'delete_gremlin_graph', confirmation=True) # Table api with self.command_group('cosmosdb table', cosmosdb_table_sdk, client_factory=cf_table_resources, is_preview=True) as g: g.custom_command('create', 'cli_cosmosdb_table_create') g.command('list', 'list_tables') g.command('show', 'get_table') - g.command('delete', 'delete_table') + g.command('delete', 'delete_table', confirmation=True) # Offer throughput with self.command_group('cosmosdb sql database throughput', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: @@ -208,7 +208,7 @@ def load_command_table(self, _): g.cosmosdb_custom('list', 'cli_cosmosdb_database_list', table_transformer=list_database_output) g.cosmosdb_custom('exists', 'cli_cosmosdb_database_exists') g.cosmosdb_custom('create', 'cli_cosmosdb_database_create', table_transformer=database_output) - g.cosmosdb_custom('delete', 'cli_cosmosdb_database_delete') + g.cosmosdb_custom('delete', 'cli_cosmosdb_database_delete', confirmation=True) # collection operations with self.command_group('cosmosdb collection', deprecate_info=self.deprecate(redirect=COLLECTION_DEPRECATON_INFO, hide=True)) as g: @@ -216,5 +216,5 @@ def load_command_table(self, _): g.cosmosdb_custom('list', 'cli_cosmosdb_collection_list', table_transformer=list_collection_output) g.cosmosdb_custom('exists', 'cli_cosmosdb_collection_exists') g.cosmosdb_custom('create', 'cli_cosmosdb_collection_create', table_transformer=collection_output) - g.cosmosdb_custom('delete', 'cli_cosmosdb_collection_delete') + g.cosmosdb_custom('delete', 'cli_cosmosdb_collection_delete', confirmation=True) g.cosmosdb_custom('update', 'cli_cosmosdb_collection_update') 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 9a232ca483e..4e673d6b856 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 @@ -70,7 +70,7 @@ def test_delete_database_account(self, resource_group): }) self.cmd('az cosmosdb create -n {acc} -g {rg}') - self.cmd('az cosmosdb delete -n {acc} -g {rg}') + self.cmd('az cosmosdb delete -n {acc} -g {rg} --yes') self.cmd('az cosmosdb show -n {acc} -g {rg}', expect_failure=True) @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_account') @@ -325,7 +325,7 @@ def test_cosmosdb_database(self, resource_group): database_list = self.cmd('az cosmosdb database list -g {rg} -n {acc}').get_output_in_json() assert len(database_list) == 1 - self.cmd('az cosmosdb database delete -g {rg} -n {acc} -d {db_name}') + self.cmd('az cosmosdb database delete -g {rg} -n {acc} -d {db_name} --yes') assert not self.cmd('az cosmosdb database exists -g {rg} -n {acc} -d {db_name}').get_output_in_json() @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_collection') @@ -372,7 +372,7 @@ def test_cosmosdb_collection(self, resource_group): disable_ttl = self.cmd('az cosmosdb collection update --default-ttl 0 -g {rg} -n {acc} -d {db_name} -c {col}').get_output_in_json() assert "defaultTtl" not in disable_ttl["collection"] - self.cmd('az cosmosdb collection delete -g {rg} -n {acc} -d {db_name} -c {col}') + self.cmd('az cosmosdb collection delete -g {rg} -n {acc} -d {db_name} -c {col} --yes') assert not self.cmd('az cosmosdb collection exists -g {rg} -n {acc} -d {db_name} -c {col}').get_output_in_json() @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_database') @@ -395,7 +395,7 @@ def test_cosmosdb_sql_database(self, resource_group): database_list = self.cmd('az cosmosdb sql database list -g {rg} -a {acc}').get_output_in_json() assert len(database_list) == 1 - self.cmd('az cosmosdb sql database delete -g {rg} -a {acc} -n {db_name}') + self.cmd('az cosmosdb sql database delete -g {rg} -a {acc} -n {db_name} --yes') database_list = self.cmd('az cosmosdb sql database list -g {rg} -a {acc}').get_output_in_json() assert len(database_list) == 0 @@ -443,7 +443,7 @@ def test_cosmosdb_sql_container(self, resource_group): container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() assert len(container_list) == 1 - self.cmd('az cosmosdb sql container delete -g {rg} -a {acc} -d {db_name} -n {ctn_name}') + self.cmd('az cosmosdb sql container delete -g {rg} -a {acc} -d {db_name} -n {ctn_name} --yes') container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() assert len(container_list) == 0 @@ -469,22 +469,22 @@ def test_cosmosdb_sql_stored_procedure(self, resource_group): self.cmd('az cosmosdb create -n {acc} -g {rg}') self.cmd('az cosmosdb sql database create -g {rg} -a {acc} -n {db_name}') self.cmd('az cosmosdb sql container create -g {rg} -a {acc} -d {db_name} -n {ctn_name} -p {part} ').get_output_in_json() - sproc_create = self.cmd('az cosmosdb sql stored_procedure create --resource-group {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name} -b {body}').get_output_in_json() + sproc_create = self.cmd('az cosmosdb sql stored-procedure create --resource-group {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name} -b {body}').get_output_in_json() assert sproc_create["name"] == sproc_name assert sproc_create["resource"]["body"] == body - sproc_update = self.cmd('az cosmosdb sql stored_procedure update -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name} -b {nbody}').get_output_in_json() + sproc_update = self.cmd('az cosmosdb sql stored-procedure update -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name} -b {nbody}').get_output_in_json() assert sproc_update["resource"]["body"] == nbody - sproc_show = self.cmd('az cosmosdb sql stored_procedure show -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name}').get_output_in_json() + sproc_show = self.cmd('az cosmosdb sql stored-procedure show -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name}').get_output_in_json() assert sproc_show["name"] == sproc_name - sproc_list = self.cmd('az cosmosdb sql stored_procedure list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() + sproc_list = self.cmd('az cosmosdb sql stored-procedure list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() assert len(sproc_list) == 1 - self.cmd('az cosmosdb sql stored_procedure delete -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name}') - sproc_list = self.cmd('az cosmosdb sql stored_procedure list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() + self.cmd('az cosmosdb sql stored-procedure delete -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {sproc_name} --yes') + sproc_list = self.cmd('az cosmosdb sql stored-procedure list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() assert len(sproc_list) == 0 @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_user_defined_function') @@ -509,22 +509,22 @@ def test_cosmosdb_sql_user_defined_function(self, resource_group): self.cmd('az cosmosdb create -n {acc} -g {rg}') self.cmd('az cosmosdb sql database create -g {rg} -a {acc} -n {db_name}') self.cmd('az cosmosdb sql container create -g {rg} -a {acc} -d {db_name} -n {ctn_name} -p {part} ').get_output_in_json() - udf_create = self.cmd('az cosmosdb sql user_defined_function create --resource-group {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name} -b {body}').get_output_in_json() + udf_create = self.cmd('az cosmosdb sql user-defined-function create --resource-group {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name} -b {body}').get_output_in_json() assert udf_create["name"] == udf_name assert udf_create["resource"]["body"] == body - udf_update = self.cmd('az cosmosdb sql user_defined_function update -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name} -b {nbody}').get_output_in_json() + udf_update = self.cmd('az cosmosdb sql user-defined-function update -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name} -b {nbody}').get_output_in_json() assert udf_update["resource"]["body"] == nbody - udf_show = self.cmd('az cosmosdb sql user_defined_function show -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name}').get_output_in_json() + udf_show = self.cmd('az cosmosdb sql user-defined-function show -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name}').get_output_in_json() assert udf_show["name"] == udf_name - udf_list = self.cmd('az cosmosdb sql user_defined_function list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() + udf_list = self.cmd('az cosmosdb sql user-defined-function list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() assert len(udf_list) == 1 - self.cmd('az cosmosdb sql user_defined_function delete -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name}') - udf_list = self.cmd('az cosmosdb sql user_defined_function list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() + self.cmd('az cosmosdb sql user-defined-function delete -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {udf_name} --yes') + udf_list = self.cmd('az cosmosdb sql user-defined-function list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() assert len(udf_list) == 0 @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_trigger') @@ -569,7 +569,7 @@ def test_cosmosdb_sql_trigger(self, resource_group): trigger_list = self.cmd('az cosmosdb sql trigger list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() assert len(trigger_list) == 1 - self.cmd('az cosmosdb sql trigger delete -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {trigger_name}') + self.cmd('az cosmosdb sql trigger delete -g {rg} -a {acc} -d {db_name} -c {ctn_name} -n {trigger_name} --yes') trigger_list = self.cmd('az cosmosdb sql trigger list -g {rg} -a {acc} -d {db_name} -c {ctn_name}').get_output_in_json() assert len(trigger_list) == 0 @@ -593,7 +593,7 @@ def test_cosmosdb_mongodb_database(self, resource_group): database_list = self.cmd('az cosmosdb mongodb database list -g {rg} -a {acc}').get_output_in_json() assert len(database_list) == 1 - self.cmd('az cosmosdb mongodb database delete -g {rg} -a {acc} -n {db_name}') + self.cmd('az cosmosdb mongodb database delete -g {rg} -a {acc} -n {db_name} --yes') database_list = self.cmd('az cosmosdb mongodb database list -g {rg} -a {acc}').get_output_in_json() assert len(database_list) == 0 @@ -629,7 +629,7 @@ def test_cosmosdb_mongodb_collection(self, resource_group): 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() assert len(collection_list) == 1 - self.cmd('az cosmosdb mongodb collection delete -g {rg} -a {acc} -d {db_name} -n {col_name}') + self.cmd('az cosmosdb mongodb collection delete -g {rg} -a {acc} -d {db_name} -n {col_name} --yes') collection_list = self.cmd( 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() assert len(collection_list) == 0 @@ -654,7 +654,7 @@ def test_cosmosdb_cassandra_keyspace(self, resource_group): keyspace_list = self.cmd('az cosmosdb cassandra keyspace list -g {rg} -a {acc}').get_output_in_json() assert len(keyspace_list) == 1 - self.cmd('az cosmosdb cassandra keyspace delete -g {rg} -a {acc} -n {ks_name}') + self.cmd('az cosmosdb cassandra keyspace delete -g {rg} -a {acc} -n {ks_name} --yes') keyspace_list = self.cmd('az cosmosdb cassandra keyspace list -g {rg} -a {acc}').get_output_in_json() assert len(keyspace_list) == 0 @@ -686,7 +686,7 @@ def test_cosmosdb_cassandra_table(self, resource_group): table_list = self.cmd('az cosmosdb cassandra table list -g {rg} -a {acc} -k {ks_name}').get_output_in_json() assert len(table_list) == 1 - self.cmd('az cosmosdb cassandra table delete -g {rg} -a {acc} -k {ks_name} -n {table_name}') + self.cmd('az cosmosdb cassandra table delete -g {rg} -a {acc} -k {ks_name} -n {table_name} --yes') table_list = self.cmd('az cosmosdb cassandra table list -g {rg} -a {acc} -k {ks_name}').get_output_in_json() assert len(table_list) == 0 @@ -710,7 +710,7 @@ def test_cosmosdb_gremlin_database(self, resource_group): database_list = self.cmd('az cosmosdb gremlin database list -g {rg} -a {acc}').get_output_in_json() assert len(database_list) == 1 - self.cmd('az cosmosdb gremlin database delete -g {rg} -a {acc} -n {db_name}') + self.cmd('az cosmosdb gremlin database delete -g {rg} -a {acc} -n {db_name} --yes') database_list = self.cmd('az cosmosdb gremlin database list -g {rg} -a {acc}').get_output_in_json() assert len(database_list) == 0 @@ -754,7 +754,7 @@ def test_cosmosdb_gremlin_graph(self, resource_group): graph_list = self.cmd('az cosmosdb gremlin graph list -g {rg} -a {acc} -d {db_name}').get_output_in_json() assert len(graph_list) == 1 - self.cmd('az cosmosdb gremlin graph delete -g {rg} -a {acc} -d {db_name} -n {gp_name}') + self.cmd('az cosmosdb gremlin graph delete -g {rg} -a {acc} -d {db_name} -n {gp_name} --yes') graph_list = self.cmd('az cosmosdb gremlin graph list -g {rg} -a {acc} -d {db_name}').get_output_in_json() assert len(graph_list) == 0 @@ -778,7 +778,7 @@ def test_cosmosdb_table(self, resource_group): table_list = self.cmd('az cosmosdb table list -g {rg} -a {acc}').get_output_in_json() assert len(table_list) == 1 - self.cmd('az cosmosdb table delete -g {rg} -a {acc} -n {table_name}') + self.cmd('az cosmosdb table delete -g {rg} -a {acc} -n {table_name} --yes') table_list = self.cmd('az cosmosdb table list -g {rg} -a {acc}').get_output_in_json() assert len(table_list) == 0 From c0444a413b13f191da6648d829477f2c6ad57970 Mon Sep 17 00:00:00 2001 From: Meha Kaushik Date: Thu, 20 Feb 2020 13:47:43 -0800 Subject: [PATCH 7/9] changed help accordingly --- .../cli/command_modules/cosmosdb/_help.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) 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 ad106830eb3..c51679fa60b 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py @@ -509,31 +509,31 @@ short-summary: Manage SQL resources of Azure Cosmos DB account. """ -helps['cosmosdb sql stored_procedure'] = """ +helps['cosmosdb sql stored-procedure'] = """ type: group short-summary: Manage Azure Cosmos DB SQL stored procedures. """ -helps['cosmosdb sql stored_procedure create'] = """ +helps['cosmosdb sql stored-procedure create'] = """ type: command short-summary: Create an SQL stored procedure under an Azure Cosmos DB SQL container. examples: - name: Create an Azure Cosmos DB SQL stored procedure. - text: az cosmosdb sql stored_procedure create -g MyResourceGroup -a MyAccount -d MyDatabase -c MyContainer -n MyStoredProcedure -b StoredProcedureBody + text: az cosmosdb sql stored-procedure create -g MyResourceGroup -a MyAccount -d MyDatabase -c MyContainer -n MyStoredProcedure -b StoredProcedureBody crafted: true """ -helps['cosmosdb sql stored_procedure delete'] = """ +helps['cosmosdb sql stored-procedure delete'] = """ type: command short-summary: Delete the SQL stored procedure under an Azure Cosmos DB SQL container. """ -helps['cosmosdb sql stored_procedure list'] = """ +helps['cosmosdb sql stored-procedure list'] = """ type: command short-summary: List the SQL stored procedures under an Azure Cosmos DB SQL container. """ -helps['cosmosdb sql stored_procedure show'] = """ +helps['cosmosdb sql stored-procedure show'] = """ type: command short-summary: Show the details of a SQL stored procedure under an Azure Cosmos DB SQL container. """ @@ -572,31 +572,31 @@ short-summary: Show the details of a SQL trigger under an Azure Cosmos DB SQL container. """ -helps['cosmosdb sql user_defined_function'] = """ +helps['cosmosdb sql user-defined-function'] = """ type: group short-summary: Manage Azure Cosmos DB SQL user defined functions. """ -helps['cosmosdb sql user_defined_function create'] = """ +helps['cosmosdb sql user-defined-function create'] = """ type: command short-summary: Create an SQL user defined function under an Azure Cosmos DB SQL container. examples: - name: Create an Azure Cosmos DB SQL user defined function. - text: az cosmosdb sql user_defined_function create -g MyResourceGroup -a MyAccount -d MyDatabase -c MyContainer -n MyUserDefinedFunction -b UserDefinedFunctionBody + text: az cosmosdb sql user-defined-function create -g MyResourceGroup -a MyAccount -d MyDatabase -c MyContainer -n MyUserDefinedFunction -b UserDefinedFunctionBody crafted: true """ -helps['cosmosdb sql user_defined_function delete'] = """ +helps['cosmosdb sql user-defined-function delete'] = """ type: command short-summary: Delete the SQL user defined function under an Azure Cosmos DB SQL container. """ -helps['cosmosdb sql user_defined_function list'] = """ +helps['cosmosdb sql user-defined-function list'] = """ type: command short-summary: List the SQL user defined functions under an Azure Cosmos DB SQL container. """ -helps['cosmosdb sql user_defined_function show'] = """ +helps['cosmosdb sql user-defined-function show'] = """ type: command short-summary: Show the details of a SQL user defined function under an Azure Cosmos DB SQL container. """ From e2b39419410ea073e393b919b8538a2be1e1adc8 Mon Sep 17 00:00:00 2001 From: Meha Kaushik Date: Thu, 20 Feb 2020 14:08:55 -0800 Subject: [PATCH 8/9] style fix --- src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 79768bf69ee..34bd0fea673 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py @@ -125,7 +125,7 @@ def load_arguments(self, _): c.argument('database_name', database_name_type) c.argument('container_name', container_name_type) c.argument('stored_procedure_name', options_list=['--name', '-n'], help="StoredProcedure name") - c.argument('stored_procedure_body', options_list=['--body', '-b'],completer=FilesCompleter(), help="StoredProcedure body, you can enter it as a string or as a file, e.g., --body @sprocbody-file.json") + c.argument('stored_procedure_body', options_list=['--body', '-b'], completer=FilesCompleter(), help="StoredProcedure body, you can enter it as a string or as a file, e.g., --body @sprocbody-file.json") # SQL trigger with self.argument_context('cosmosdb sql trigger') as c: @@ -133,7 +133,7 @@ def load_arguments(self, _): c.argument('database_name', database_name_type) c.argument('container_name', container_name_type) c.argument('trigger_name', options_list=['--name', '-n'], help="Trigger name") - c.argument('trigger_body', options_list=['--body', '-b'],completer=FilesCompleter(), help="Trigger body, you can enter it as a string or as a file, e.g., --body @triggerbody-file.json") + c.argument('trigger_body', options_list=['--body', '-b'], completer=FilesCompleter(), help="Trigger body, you can enter it as a string or as a file, e.g., --body @triggerbody-file.json") c.argument('trigger_type', options_list=['--type', '-t'], arg_type=get_enum_type(TriggerType), help="Trigger type, values can be: Pre or Post") c.argument('trigger_operation', options_list=['--operation'], arg_type=get_enum_type(TriggerOperation), help="The operation of the trigger. Values can be: All, Create, Update, Delete, Replace") @@ -143,7 +143,7 @@ def load_arguments(self, _): c.argument('database_name', database_name_type) c.argument('container_name', container_name_type) c.argument('user_defined_function_name', options_list=['--name', '-n'], help="UserDefinedFunction name") - c.argument('user_defined_function_body', options_list=['--body', '-b'],completer=FilesCompleter(), help="UserDefinedFunction body, you can enter it as a string or as a file, e.g., --body @udfbody-file.json") + c.argument('user_defined_function_body', options_list=['--body', '-b'], completer=FilesCompleter(), help="UserDefinedFunction body, you can enter it as a string or as a file, e.g., --body @udfbody-file.json") # MongoDB with self.argument_context('cosmosdb mongodb database') as c: From b3726f3043e57ca62cf07150b5f215707115de1a Mon Sep 17 00:00:00 2001 From: Meha Kaushik Date: Fri, 21 Feb 2020 10:19:34 -0800 Subject: [PATCH 9/9] change in help msg --- src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 34bd0fea673..a243b359c40 100644 --- a/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py +++ b/src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py @@ -134,8 +134,8 @@ def load_arguments(self, _): c.argument('container_name', container_name_type) c.argument('trigger_name', options_list=['--name', '-n'], help="Trigger name") c.argument('trigger_body', options_list=['--body', '-b'], completer=FilesCompleter(), help="Trigger body, you can enter it as a string or as a file, e.g., --body @triggerbody-file.json") - c.argument('trigger_type', options_list=['--type', '-t'], arg_type=get_enum_type(TriggerType), help="Trigger type, values can be: Pre or Post") - c.argument('trigger_operation', options_list=['--operation'], arg_type=get_enum_type(TriggerOperation), help="The operation of the trigger. Values can be: All, Create, Update, Delete, Replace") + c.argument('trigger_type', options_list=['--type', '-t'], arg_type=get_enum_type(TriggerType), help="Trigger type") + c.argument('trigger_operation', options_list=['--operation'], arg_type=get_enum_type(TriggerOperation), help="The operation of the trigger.") # SQL user defined function with self.argument_context('cosmosdb sql user-defined-function') as c: