diff --git a/src/db-up/azext_db_up/custom.py b/src/db-up/azext_db_up/custom.py index 0f4a4ddd04e..9387c67641a 100644 --- a/src/db-up/azext_db_up/custom.py +++ b/src/db-up/azext_db_up/custom.py @@ -60,7 +60,7 @@ def mysql_up(cmd, client, resource_group_name=None, server_name=None, location=N _create_database(db_context, cmd, resource_group_name, server_name, database_name) # check ip address(es) of the user and configure firewall rules - mysql_errors = (mysql_connector.errors.DatabaseError) + mysql_errors = (mysql_connector.errors.DatabaseError, mysql_connector.errors.InterfaceError) host, user = _configure_firewall_rules( db_context, mysql_errors, cmd, server_result, resource_group_name, server_name, administrator_login, administrator_login_password, database_name) @@ -127,13 +127,11 @@ def postgres_up(cmd, client, resource_group_name=None, server_name=None, locatio if administrator_login_password is not None: _run_postgresql_commands(host, user, administrator_login_password, database_name) - return { - 'connectionStrings': _create_postgresql_connection_string( - host, user, administrator_login_password, database_name), - 'host': host, - 'username': user, - 'password': administrator_login_password if administrator_login_password is not None else '*****' - } + return _form_response( + _create_postgresql_connection_string(host, user, administrator_login_password, database_name), + host, user, + administrator_login_password if administrator_login_password is not None else '*****' + ) def server_down(cmd, client, resource_group_name=None, server_name=None, delete_group=None): @@ -154,7 +152,10 @@ def create_mysql_connection_string( administrator_login_password='{password}'): user = '{}@{}'.format(administrator_login, server_name) host = '{}.mysql.database.azure.com'.format(server_name) - return _create_mysql_connection_string(host, user, administrator_login_password, database_name) + return _form_response( + _create_mysql_connection_string(host, user, administrator_login_password, database_name), + host, user, administrator_login_password + ) def create_postgresql_connection_string( @@ -162,7 +163,19 @@ def create_postgresql_connection_string( administrator_login_password='{password}'): user = '{}@{}'.format(administrator_login, server_name) host = '{}.postgres.database.azure.com'.format(server_name) - return _create_postgresql_connection_string(host, user, administrator_login_password, database_name) + return _form_response( + _create_postgresql_connection_string(host, user, administrator_login_password, database_name), + host, user, administrator_login_password + ) + + +def _form_response(connection_strings, host, username, password): + return { + 'connectionStrings': connection_strings, + 'host': host, + 'username': username, + 'password': password + } def _create_mysql_connection_string(host, user, password, database): diff --git a/src/db-up/azext_db_up/tests/__init__.py b/src/db-up/azext_db_up/tests/__init__.py new file mode 100644 index 00000000000..34913fb394d --- /dev/null +++ b/src/db-up/azext_db_up/tests/__init__.py @@ -0,0 +1,4 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- diff --git a/src/db-up/azext_db_up/tests/latest/__init__.py b/src/db-up/azext_db_up/tests/latest/__init__.py new file mode 100644 index 00000000000..34913fb394d --- /dev/null +++ b/src/db-up/azext_db_up/tests/latest/__init__.py @@ -0,0 +1,4 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- diff --git a/src/db-up/azext_db_up/tests/latest/recordings/test_mysql_flow.yaml b/src/db-up/azext_db_up/tests/latest/recordings/test_mysql_flow.yaml new file mode 100644 index 00000000000..e1e12239686 --- /dev/null +++ b/src/db-up/azext_db_up/tests/latest/recordings/test_mysql_flow.yaml @@ -0,0 +1,1254 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group + ''group000001'' could not be found."}}'} + headers: + cache-control: [no-cache] + content-length: ['116'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:09:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-failure-cause: [gateway] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group + ''group000001'' could not be found."}}'} + headers: + cache-control: [no-cache] + content-length: ['116'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:09:18 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-failure-cause: [gateway] + status: {code: 404, message: Not Found} +- request: + body: '{"location": "westus2"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + Content-Length: ['23'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","location":"westus2","properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['202'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:09:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DBforMySQL/servers/server000002'' + under resource group ''group000001'' was not found."}}'} + headers: + cache-control: [no-cache] + content-length: ['181'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:09:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-failure-cause: [gateway] + status: {code: 404, message: Not Found} +- request: + body: '{"sku": {"name": "GP_Gen5_4"}, "properties": {"version": "5.7", "sslEnforcement": + "Disabled", "storageProfile": {"geoRedundantBackup": "Disabled"}, "createMode": + "Default", "administratorLogin": "weeklyDunnock0", "administratorLoginPassword": + "d5092323-3207-45c4-b950-57aff6b17a1a"}, "location": "westus2"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + Content-Length: ['306'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2019-02-28T00:09:20.513Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/cc4fb553-a3da-49c7-a8d2-c4b073fb76b8?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:09:20 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/operationResults/cc4fb553-a3da-49c7-a8d2-c4b073fb76b8?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/cc4fb553-a3da-49c7-a8d2-c4b073fb76b8?api-version=2017-12-01 + response: + body: {string: '{"name":"cc4fb553-a3da-49c7-a8d2-c4b073fb76b8","status":"InProgress","startTime":"2019-02-28T00:09:20.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:10:20 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/cc4fb553-a3da-49c7-a8d2-c4b073fb76b8?api-version=2017-12-01 + response: + body: {string: '{"name":"cc4fb553-a3da-49c7-a8d2-c4b073fb76b8","status":"InProgress","startTime":"2019-02-28T00:09:20.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:20 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/cc4fb553-a3da-49c7-a8d2-c4b073fb76b8?api-version=2017-12-01 + response: + body: {string: '{"name":"cc4fb553-a3da-49c7-a8d2-c4b073fb76b8","status":"InProgress","startTime":"2019-02-28T00:09:20.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:12:20 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/cc4fb553-a3da-49c7-a8d2-c4b073fb76b8?api-version=2017-12-01 + response: + body: {string: '{"name":"cc4fb553-a3da-49c7-a8d2-c4b073fb76b8","status":"InProgress","startTime":"2019-02-28T00:09:20.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:13:21 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/cc4fb553-a3da-49c7-a8d2-c4b073fb76b8?api-version=2017-12-01 + response: + body: {string: '{"name":"cc4fb553-a3da-49c7-a8d2-c4b073fb76b8","status":"Succeeded","startTime":"2019-02-28T00:09:20.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:14:21 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"weeklyDunnock0","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutoGrow":"Disabled"},"version":"5.7","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.mysql.database.azure.com","earliestRestoreDate":"2019-02-28T00:19:20.887+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002","name":"server000002","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['780'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:14:21 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"value": "28800"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + Content-Length: ['34'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/configurations/wait_timeout?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpdateElasticServerConfig","startTime":"2019-02-28T00:14:23.21Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/1c5dd795-ecd6-4fe4-b7a5-edc544e906e2?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['79'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:14:22 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/operationResults/1c5dd795-ecd6-4fe4-b7a5-edc544e906e2?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/1c5dd795-ecd6-4fe4-b7a5-edc544e906e2?api-version=2017-12-01 + response: + body: {string: '{"name":"1c5dd795-ecd6-4fe4-b7a5-edc544e906e2","status":"Succeeded","startTime":"2019-02-28T00:14:23.21Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:14:38 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/configurations/wait_timeout?api-version=2017-12-01 + response: + body: {string: '{"properties":{"value":"28800","description":"The number of seconds + the server waits for activity on a noninteractive connection before closing + it.","defaultValue":"120","dataType":"Integer","allowedValues":"1-2147483","source":"user-override"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/configurations/wait_timeout","name":"wait_timeout","type":"Microsoft.DBforMySQL/servers/configurations"}'} + headers: + cache-control: [no-cache] + content-length: ['511'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:14:37 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"startIpAddress": "0.0.0.0", "endIpAddress": "0.0.0.0"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + Content-Length: ['72'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2019-02-28T00:14:39.677Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/20ecf4ed-4ddd-4965-9ad9-a2ba4115fee2?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:14:39 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/operationResults/20ecf4ed-4ddd-4965-9ad9-a2ba4115fee2?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/20ecf4ed-4ddd-4965-9ad9-a2ba4115fee2?api-version=2017-12-01 + response: + body: {string: '{"name":"20ecf4ed-4ddd-4965-9ad9-a2ba4115fee2","status":"Succeeded","startTime":"2019-02-28T00:14:39.677Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:14:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"0.0.0.0"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/azure-access","name":"azure-access","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['332'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:14:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The requested resource + of type ''Microsoft.DBforMySQL/servers/databases'' with name ''sampledb'' + was not found."}}'} + headers: + cache-control: [no-cache] + content-length: ['157'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:14:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 404, message: Not Found} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerDatabase","startTime":"2019-02-28T00:14:56.577Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/ab8b6471-f913-4d4e-bbab-99fd4150f1f1?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['82'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:14:56 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/operationResults/ab8b6471-f913-4d4e-bbab-99fd4150f1f1?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/ab8b6471-f913-4d4e-bbab-99fd4150f1f1?api-version=2017-12-01 + response: + body: {string: '{"name":"ab8b6471-f913-4d4e-bbab-99fd4150f1f1","status":"Succeeded","startTime":"2019-02-28T00:14:56.577Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:11 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"properties":{"charset":"latin1","collation":"latin1_swedish_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforMySQL/servers/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['315'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:11 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"startIpAddress": "131.107.160.207", "endIpAddress": "131.107.160.207"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + Content-Length: ['88'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/devbox?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2019-02-28T00:15:17.367Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/bbbb7895-9302-4294-8d60-17b7d46ee44f?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:17 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/operationResults/bbbb7895-9302-4294-8d60-17b7d46ee44f?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/bbbb7895-9302-4294-8d60-17b7d46ee44f?api-version=2017-12-01 + response: + body: {string: '{"name":"bbbb7895-9302-4294-8d60-17b7d46ee44f","status":"Succeeded","startTime":"2019-02-28T00:15:17.367Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/devbox?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"131.107.160.207","endIpAddress":"131.107.160.207"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/devbox","name":"devbox","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['336'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","location":"westus2","properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['202'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:33 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"weeklyDunnock0","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutoGrow":"Disabled"},"version":"5.7","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.mysql.database.azure.com","earliestRestoreDate":"2019-02-28T00:19:20.887+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002","name":"server000002","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['780'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:34 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"properties":{"charset":"latin1","collation":"latin1_swedish_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforMySQL/servers/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['315'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:34 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"startIpAddress": "131.107.160.207", "endIpAddress": "131.107.160.207"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + Content-Length: ['88'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/devbox?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2019-02-28T00:15:38.4Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/d38ea967-8c5d-45a2-826e-83203902985c?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['85'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:38 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/operationResults/d38ea967-8c5d-45a2-826e-83203902985c?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/d38ea967-8c5d-45a2-826e-83203902985c?api-version=2017-12-01 + response: + body: {string: '{"name":"d38ea967-8c5d-45a2-826e-83203902985c","status":"Succeeded","startTime":"2019-02-28T00:15:38.4Z"}'} + headers: + cache-control: [no-cache] + content-length: ['105'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/devbox?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"131.107.160.207","endIpAddress":"131.107.160.207"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/devbox","name":"devbox","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['336'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","location":"westus2","properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['202'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"weeklyDunnock0","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutoGrow":"Disabled"},"version":"5.7","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.mysql.database.azure.com","earliestRestoreDate":"2019-02-28T00:19:20.887+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002","name":"server000002","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['780'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"administratorLoginPassword": "d5092323-3207-45c4-b950-57aff6b17a1a"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + Content-Length: ['86'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2019-02-28T00:15:55.927Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/8ce3be03-7804-41c1-9242-d4020ffb894e?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:55 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/operationResults/8ce3be03-7804-41c1-9242-d4020ffb894e?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/westus2/azureAsyncOperation/8ce3be03-7804-41c1-9242-d4020ffb894e?api-version=2017-12-01 + response: + body: {string: '{"name":"8ce3be03-7804-41c1-9242-d4020ffb894e","status":"Succeeded","startTime":"2019-02-28T00:15:55.927Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:16:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"weeklyDunnock0","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutoGrow":"Disabled"},"version":"5.7","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.mysql.database.azure.com","earliestRestoreDate":"2019-02-28T00:19:20.887+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002","name":"server000002","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['780'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:16:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql up] + Connection: [keep-alive] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"properties":{"charset":"latin1","collation":"latin1_swedish_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforMySQL/servers/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['315'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:16:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql db show] + Connection: [keep-alive] + ParameterSetName: [-n -g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"properties":{"charset":"latin1","collation":"latin1_swedish_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforMySQL/servers/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['315'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:17:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql down] + Connection: [keep-alive] + Content-Length: ['0'] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:17:01 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:17:16 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:17:32 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:17:47 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:18:03 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:18:18 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:18:33 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUE5HM0NRNlJGQlBEVERNUTVHTFUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:18:48 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group show] + Connection: [keep-alive] + ParameterSetName: [-n] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group + ''group000001'' could not be found."}}'} + headers: + cache-control: [no-cache] + content-length: ['116'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:18:50 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-failure-cause: [gateway] + status: {code: 404, message: Not Found} +version: 1 diff --git a/src/db-up/azext_db_up/tests/latest/recordings/test_postgres_flow.yaml b/src/db-up/azext_db_up/tests/latest/recordings/test_postgres_flow.yaml new file mode 100644 index 00000000000..a0fb1234387 --- /dev/null +++ b/src/db-up/azext_db_up/tests/latest/recordings/test_postgres_flow.yaml @@ -0,0 +1,1073 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group + ''group000001'' could not be found."}}'} + headers: + cache-control: [no-cache] + content-length: ['116'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:09:00 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-failure-cause: [gateway] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group + ''group000001'' could not be found."}}'} + headers: + cache-control: [no-cache] + content-length: ['116'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:09:00 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-failure-cause: [gateway] + status: {code: 404, message: Not Found} +- request: + body: '{"location": "westus2"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Length: ['23'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","location":"westus2","properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['202'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:09:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DBforPostgreSQL/servers/server000002'' + under resource group ''group000001'' was not found."}}'} + headers: + cache-control: [no-cache] + content-length: ['186'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:09:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-failure-cause: [gateway] + status: {code: 404, message: Not Found} +- request: + body: '{"sku": {"name": "GP_Gen5_4"}, "properties": {"version": "10", "sslEnforcement": + "Disabled", "storageProfile": {"geoRedundantBackup": "Disabled"}, "createMode": + "Default", "administratorLogin": "wistfulFalcon0", "administratorLoginPassword": + "c5478aad-a1cd-4b1d-99de-2d8478ced18b"}, "location": "westus2"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Length: ['305'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2019-02-28T00:09:02.73Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/078d0f90-2c19-4c5e-b25f-bb332421a348?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['73'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:09:02 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/operationResults/078d0f90-2c19-4c5e-b25f-bb332421a348?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/078d0f90-2c19-4c5e-b25f-bb332421a348?api-version=2017-12-01 + response: + body: {string: '{"name":"078d0f90-2c19-4c5e-b25f-bb332421a348","status":"InProgress","startTime":"2019-02-28T00:09:02.73Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:10:02 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/078d0f90-2c19-4c5e-b25f-bb332421a348?api-version=2017-12-01 + response: + body: {string: '{"name":"078d0f90-2c19-4c5e-b25f-bb332421a348","status":"Succeeded","startTime":"2019-02-28T00:09:02.73Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"wistfulFalcon0","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutoGrow":"Disabled"},"version":"10","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.postgres.database.azure.com","earliestRestoreDate":"2019-02-28T00:19:03.027+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002","name":"server000002","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['792'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"value": "28800000"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Length: ['37'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/configurations/idle_in_transaction_session_timeout?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpdateElasticServerConfig","startTime":"2019-02-28T00:11:04.313Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/d8069495-b728-4a9c-921f-e96cba89b5f3?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['80'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:03 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/operationResults/d8069495-b728-4a9c-921f-e96cba89b5f3?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/d8069495-b728-4a9c-921f-e96cba89b5f3?api-version=2017-12-01 + response: + body: {string: '{"name":"d8069495-b728-4a9c-921f-e96cba89b5f3","status":"Succeeded","startTime":"2019-02-28T00:11:04.313Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/configurations/idle_in_transaction_session_timeout?api-version=2017-12-01 + response: + body: {string: '{"properties":{"value":"28800000","description":"Sets the maximum + allowed duration of any idling transaction.","defaultValue":"0","dataType":"Integer","allowedValues":"0-2147483647","source":"user-override"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/configurations/idle_in_transaction_session_timeout","name":"idle_in_transaction_session_timeout","type":"Microsoft.DBforPostgreSQL/servers/configurations"}'} + headers: + cache-control: [no-cache] + content-length: ['530'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"startIpAddress": "0.0.0.0", "endIpAddress": "0.0.0.0"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Length: ['72'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2019-02-28T00:11:20.773Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/160672e7-5fae-4700-bba4-d9ac8a68e798?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:20 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/operationResults/160672e7-5fae-4700-bba4-d9ac8a68e798?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/160672e7-5fae-4700-bba4-d9ac8a68e798?api-version=2017-12-01 + response: + body: {string: '{"name":"160672e7-5fae-4700-bba4-d9ac8a68e798","status":"Succeeded","startTime":"2019-02-28T00:11:20.773Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:35 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"0.0.0.0"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access","name":"azure-access","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['342'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:35 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The requested resource + of type ''Microsoft.DBforPostgreSQL/servers/databases'' with name ''sampledb'' + was not found."}}'} + headers: + cache-control: [no-cache] + content-length: ['162'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:36 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 404, message: Not Found} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerDatabase","startTime":"2019-02-28T00:11:37.8Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/186473e8-2234-4aaf-9e12-7c2dd8c7f505?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['80'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:37 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/operationResults/186473e8-2234-4aaf-9e12-7c2dd8c7f505?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/186473e8-2234-4aaf-9e12-7c2dd8c7f505?api-version=2017-12-01 + response: + body: {string: '{"name":"186473e8-2234-4aaf-9e12-7c2dd8c7f505","status":"Succeeded","startTime":"2019-02-28T00:11:37.8Z"}'} + headers: + cache-control: [no-cache] + content-length: ['105'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:52 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"properties":{"charset":"UTF8","collation":"English_United States.1252"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforPostgreSQL/servers/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['332'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:11:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"startIpAddress": "131.107.160.207", "endIpAddress": "131.107.160.207"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Length: ['88'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/devbox?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2019-02-28T00:12:14.177Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/9680c32d-ea8c-413f-9987-03a71da1a490?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:12:14 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/operationResults/9680c32d-ea8c-413f-9987-03a71da1a490?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/9680c32d-ea8c-413f-9987-03a71da1a490?api-version=2017-12-01 + response: + body: {string: '{"name":"9680c32d-ea8c-413f-9987-03a71da1a490","status":"Succeeded","startTime":"2019-02-28T00:12:14.177Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:12:29 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/devbox?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"131.107.160.207","endIpAddress":"131.107.160.207"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/devbox","name":"devbox","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['346'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:12:29 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","location":"westus2","properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['202'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:12:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"wistfulFalcon0","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutoGrow":"Disabled"},"version":"10","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.postgres.database.azure.com","earliestRestoreDate":"2019-02-28T00:19:03.027+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002","name":"server000002","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['792'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:12:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"properties":{"charset":"UTF8","collation":"English_United States.1252"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforPostgreSQL/servers/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['332'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:12:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","location":"westus2","properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['202'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:12:39 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"wistfulFalcon0","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutoGrow":"Disabled"},"version":"10","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.postgres.database.azure.com","earliestRestoreDate":"2019-02-28T00:19:03.027+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002","name":"server000002","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['792'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:12:39 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"administratorLoginPassword": "c5478aad-a1cd-4b1d-99de-2d8478ced18b"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Length: ['86'] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2019-02-28T00:12:40.19Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/b1b94196-b173-4ed3-a300-e6d189f9a362?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['73'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:12:39 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/operationResults/b1b94196-b173-4ed3-a300-e6d189f9a362?api-version=2017-12-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/westus2/azureAsyncOperation/b1b94196-b173-4ed3-a300-e6d189f9a362?api-version=2017-12-01 + response: + body: {string: '{"name":"b1b94196-b173-4ed3-a300-e6d189f9a362","status":"Succeeded","startTime":"2019-02-28T00:12:40.19Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:13:39 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"wistfulFalcon0","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutoGrow":"Disabled"},"version":"10","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.postgres.database.azure.com","earliestRestoreDate":"2019-02-28T00:19:03.027+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002","name":"server000002","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['792'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:13:40 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres up] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-p] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"properties":{"charset":"UTF8","collation":"English_United States.1252"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforPostgreSQL/servers/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['332'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:13:41 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres db show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + ParameterSetName: [-n -g -s] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 + response: + body: {string: '{"properties":{"charset":"UTF8","collation":"English_United States.1252"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforPostgreSQL/servers/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['332'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:13:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres down] + Connection: [keep-alive] + Content-Length: ['0'] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:13:49 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:14:05 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:14:20 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:14:36 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:14:51 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:15:07 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres down] + Connection: [keep-alive] + ParameterSetName: [-y --delete-group] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEJGWlRGSjVPMlo2SzNVNTNaT0YtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 28 Feb 2019 00:15:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group show] + Connection: [keep-alive] + ParameterSetName: [-n] + User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34 + resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.60] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2018-05-01 + response: + body: {string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group + ''group000001'' could not be found."}}'} + headers: + cache-control: [no-cache] + content-length: ['116'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 28 Feb 2019 00:15:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-failure-cause: [gateway] + status: {code: 404, message: Not Found} +version: 1 diff --git a/src/db-up/azext_db_up/tests/latest/test_db_up_scenarios.py b/src/db-up/azext_db_up/tests/latest/test_db_up_scenarios.py new file mode 100644 index 00000000000..d826cf7fbea --- /dev/null +++ b/src/db-up/azext_db_up/tests/latest/test_db_up_scenarios.py @@ -0,0 +1,71 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import mock +import psycopg2 +from azure.cli.testsdk import (ScenarioTest, JMESPathCheck, ResourceGroupPreparer, + api_version_constraint) + + +class DbUpTests(ScenarioTest): + def test_mysql_flow(self): + group = self.create_random_name(prefix='group', length=24) + server = self.create_random_name(prefix='server', length=24) + + with mock.patch('azext_db_up.custom._run_mysql_commands'): + output = self.cmd('mysql up -g {} -s {}'.format(group, server)).get_output_in_json() + user, server_name = output['username'].split('@') + password, database = output['password'], 'sampledb' + self.assertEqual(server, server_name) + + # test followup iterations of up + self.cmd('mysql up', checks=[JMESPathCheck('password', '*****')]) + self.cmd('mysql up -p {}'.format(password), checks=[JMESPathCheck('password', password)]) + + # check that db and server exist + self.cmd('mysql db show -n {} -g {} -s {}'.format(database, group, server)) + + # remove all resources used by up + self.cmd('mysql down -y --delete-group') + + # check group no longer exists + with self.assertRaises(SystemExit) as ex: + self.cmd('group show -n {}'.format(group)) + self.assertEqual(ex.exception.code, 3) + + # check that show-connection-string matches previous output + output_mirror = self.cmd('mysql show-connection-string -p {} -u {} -d {} -s {}'.format( + password, user, database, server)).get_output_in_json() + self.assertEqual(output, output_mirror) + + def test_postgres_flow(self): + group = self.create_random_name(prefix='group', length=24) + server = self.create_random_name(prefix='server', length=24) + + with mock.patch('azext_db_up.custom._run_postgresql_commands'): + output = self.cmd('postgres up -g {} -s {}'.format(group, server)).get_output_in_json() + user, server_name = output['username'].split('@') + password, database = output['password'], 'sampledb' + self.assertEqual(server, server_name) + + # test followup iterations of up + self.cmd('postgres up', checks=[JMESPathCheck('password', '*****')]) + self.cmd('postgres up -p {}'.format(password), checks=[JMESPathCheck('password', password)]) + + # check that db and server exist + self.cmd('postgres db show -n {} -g {} -s {}'.format(database, group, server)) + + # remove all resources used by up + self.cmd('postgres down -y --delete-group') + + # check group no longer exists + with self.assertRaises(SystemExit) as ex: + self.cmd('group show -n {}'.format(group)) + self.assertEqual(ex.exception.code, 3) + + # check that show-connection-string matches previous output + output_mirror = self.cmd('postgres show-connection-string -p {} -u {} -d {} -s {}'.format( + password, user, database, server)).get_output_in_json() + self.assertEqual(output, output_mirror)