diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1833beaa291..e84af531884 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -12,6 +12,8 @@ /src/managementgroups/ @rajshah11 +/src/rdbms_vnet/ @rahulgouthamDOTgs + /src/alias/ @chewong @troydai /src/managementpartner/ @jeffrey-ace diff --git a/src/index.json b/src/index.json index b7aaf31c04c..ae3f558c5d0 100644 --- a/src/index.json +++ b/src/index.json @@ -508,6 +508,51 @@ } } ], + "rdbms-vnet": [ + { + "filename": "rdbms_vnet-10.0.0-py2.py3-none-any.whl", + "sha256Digest": "c10d63f21308751212b3bd68448b0dfe27d6e79bf9c54412680229f69f9bcec7", + "downloadUrl": "https://prodrdbmsclipackages.blob.core.windows.net/cliextensions/rdbms_vnet-10.0.0-py2.py3-none-any.whl", + "metadata": { + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "ragoutha@microsoft.com", + "name": "Rahul G S", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "rdbms-vnet", + "summary": "Support for Virtual Network rules in Azure MySQL and Azure PostgreSQL resources", + "version": "10.0.0" + } + } + ], "alias": [ { "filename": "alias-0.5.1-py2.py3-none-any.whl", diff --git a/src/rdbms_vnet/azext_rdbms_vnet/__init__.py b/src/rdbms_vnet/azext_rdbms_vnet/__init__.py new file mode 100644 index 00000000000..8781e2cabdd --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/__init__.py @@ -0,0 +1,32 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader + +import azext_rdbms_vnet._help # pylint: disable=unused-import + + +class RdbmsExtCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + from azext_rdbms_vnet._util import RdbmsArgumentContext + rdbms_custom = CliCommandType(operations_tmpl='azext_rdbms_vnet.custom#{}') + super(RdbmsExtCommandsLoader, self).__init__(cli_ctx=cli_ctx, + min_profile='2017-03-10-profile', + custom_command_type=rdbms_custom, + argument_context_cls=RdbmsArgumentContext) + + def load_command_table(self, args): + from azext_rdbms_vnet.commands import load_command_table + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_rdbms_vnet._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = RdbmsExtCommandsLoader diff --git a/src/rdbms_vnet/azext_rdbms_vnet/_client_factory.py b/src/rdbms_vnet/azext_rdbms_vnet/_client_factory.py new file mode 100644 index 00000000000..7b07a149c80 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/_client_factory.py @@ -0,0 +1,80 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core.commands.client_factory import get_mgmt_service_client + +# CLIENT FACTORIES + +RM_URI_OVERRIDE = 'AZURE_CLI_RDBMS_RM_URI' +SUB_ID_OVERRIDE = 'AZURE_CLI_RDBMS_SUB_ID' +CLIENT_ID = 'AZURE_CLIENT_ID' +TENANT_ID = 'AZURE_TENANT_ID' +CLIENT_SECRET = 'AZURE_CLIENT_SECRET' + + +def get_mysql_management_client(cli_ctx, **_): + from os import getenv + from azext_rdbms_vnet.mysql import MySQLManagementClient + + # Allow overriding resource manager URI using environment variable + # for testing purposes. Subscription id is also determined by environment + # variable. + rm_uri_override = getenv(RM_URI_OVERRIDE) + if rm_uri_override: + client_id = getenv(CLIENT_ID) + if client_id: + from azure.common.credentials import ServicePrincipalCredentials + credentials = ServicePrincipalCredentials( + client_id=client_id, + secret=getenv(CLIENT_SECRET), + tenant=getenv(TENANT_ID)) + else: + from msrest.authentication import Authentication # pylint: disable=import-error + credentials = Authentication() + + return MySQLManagementClient( + subscription_id=getenv(SUB_ID_OVERRIDE), + base_url=rm_uri_override, + credentials=credentials) + else: + # Normal production scenario. + return get_mgmt_service_client(cli_ctx, MySQLManagementClient) + + +def get_postgresql_management_client(cli_ctx, **_): + from os import getenv + from azext_rdbms_vnet.postgresql import PostgreSQLManagementClient + + # Allow overriding resource manager URI using environment variable + # for testing purposes. Subscription id is also determined by environment + # variable. + rm_uri_override = getenv(RM_URI_OVERRIDE) + if rm_uri_override: + client_id = getenv(CLIENT_ID) + if client_id: + from azure.common.credentials import ServicePrincipalCredentials + credentials = ServicePrincipalCredentials( + client_id=client_id, + secret=getenv(CLIENT_SECRET), + tenant=getenv(TENANT_ID)) + else: + from msrest.authentication import Authentication # pylint: disable=import-error + credentials = Authentication() + + return PostgreSQLManagementClient( + subscription_id=getenv(SUB_ID_OVERRIDE), + base_url=rm_uri_override, + credentials=credentials) + else: + # Normal production scenario. + return get_mgmt_service_client(cli_ctx, PostgreSQLManagementClient) + + +def cf_mysql_virtual_network_rules_operations(cli_ctx, _): + return get_mysql_management_client(cli_ctx).virtual_network_rules + + +def cf_postgres_virtual_network_rules_operations(cli_ctx, _): + return get_postgresql_management_client(cli_ctx).virtual_network_rules diff --git a/src/rdbms_vnet/azext_rdbms_vnet/_help.py b/src/rdbms_vnet/azext_rdbms_vnet/_help.py new file mode 100644 index 00000000000..e5ffbf40ef7 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/_help.py @@ -0,0 +1,32 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.help_files import helps + +# pylint: disable=line-too-long + + +def add_helps(command_group, server_type): + helps['{} server vnet-rule'.format(command_group)] = """ + type: group + short-summary: Manage a server's virtual network rules. + """ + helps['{} server vnet-rule update'.format(command_group)] = """ + type: command + short-summary: Update a virtual network rule. + """ + helps['{} server vnet-rule create'.format(command_group)] = """ + type: command + short-summary: Create a virtual network rule to allows access to a {} server. + examples: + - name: Create a virtual network rule by providing the subnet id. + text: az {} server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet /subscriptions/{{SubID}}/resourceGroups/{{ResourceGroup}}/providers/Microsoft.Network/virtualNetworks/vnetName/subnets/subnetName + - name: Create a vnet rule by providing the vnet and subnet name. The subnet id is created by taking the resource group name and subscription id of the server. + text: az {} server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet subnetName --vnet-name vnetName + """.format(server_type, command_group, command_group) + + +add_helps("mysql", "MySQL") +add_helps("postgres", "PostgreSQL") diff --git a/src/rdbms_vnet/azext_rdbms_vnet/_params.py b/src/rdbms_vnet/azext_rdbms_vnet/_params.py new file mode 100644 index 00000000000..e4378b1e297 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/_params.py @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long + +from azure.cli.core.commands.parameters import get_three_state_flag # pylint: disable=line-too-long +from azure.cli.command_modules.sql._validators import validate_subnet + + +def load_arguments(self, _): # pylint: disable=too-many-statements + + for scope in ['mysql server vnet-rule', 'postgres server vnet-rule']: + with self.argument_context(scope) as c: + c.argument('server_name', options_list=['--server-name', '-s']) + c.argument('virtual_network_rule_name', options_list=['--name', '-n'], id_part='child_name_1', help='The name of the vnet rule.') + c.argument('virtual_network_subnet_id', options_list=['--subnet'], help='Name or ID of the subnet that allows access to an Azure Postgres Server. If subnet name is provided, --vnet-name must be provided.') + c.argument('ignore_missing_vnet_service_endpoint', options_list=['--ignore-missing-endpoint', '-i'], help='Create vnet rule before virtual network has vnet service endpoint enabled', arg_type=get_three_state_flag()) + + with self.argument_context('postgres server vnet-rule create') as c: + c.extra('vnet_name', options_list=['--vnet-name'], help='The virtual network name', validator=validate_subnet) + + with self.argument_context('postgres server vnet-rule update') as c: + c.extra('vnet_name', options_list=['--vnet-name'], help='The virtual network name', validator=validate_subnet) + + with self.argument_context('mysql server vnet-rule create') as c: + c.extra('vnet_name', options_list=['--vnet-name'], help='The virtual network name', validator=validate_subnet) + + with self.argument_context('mysql server vnet-rule update') as c: + c.extra('vnet_name', options_list=['--vnet-name'], help='The virtual network name', validator=validate_subnet) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/_util.py b/src/rdbms_vnet/azext_rdbms_vnet/_util.py new file mode 100644 index 00000000000..fec26f22702 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/_util.py @@ -0,0 +1,32 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core.commands import AzArgumentContext + + +class RdbmsArgumentContext(AzArgumentContext): # pylint: disable=too-few-public-methods + + def __init__(self, command_loader, scope, **kwargs): # pylint: disable=unused-argument + super(RdbmsArgumentContext, self).__init__(command_loader, scope) + self.validators = [] + + def expand(self, dest, model_type, group_name=None, patches=None): + super(RdbmsArgumentContext, self).expand(dest, model_type, group_name, patches) + + from knack.arguments import ignore_type + + # Remove the validator and store it into a list + arg = self.command_loader.argument_registry.arguments[self.command_scope].get(dest, None) + if not arg: # when the argument context scope is N/A + return + + self.validators.append(arg.settings['validator']) + if dest == 'parameters': + from .validators import get_combined_validator + self.argument(dest, + arg_type=ignore_type, + validator=get_combined_validator(self.validators)) + else: + self.argument(dest, arg_type=ignore_type, validator=None) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/azext_metadata.json b/src/rdbms_vnet/azext_rdbms_vnet/azext_metadata.json new file mode 100644 index 00000000000..7f7f4a76ebd --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/azext_metadata.json @@ -0,0 +1,3 @@ +{ + "azext.minCliCoreVersion": "2.0.24" +} \ No newline at end of file diff --git a/src/rdbms_vnet/azext_rdbms_vnet/commands.py b/src/rdbms_vnet/azext_rdbms_vnet/commands.py new file mode 100644 index 00000000000..ce76cd0c017 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/commands.py @@ -0,0 +1,44 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core.commands import CliCommandType + +from azext_rdbms_vnet._client_factory import ( + cf_mysql_virtual_network_rules_operations, + cf_postgres_virtual_network_rules_operations) + + +# pylint: disable=too-many-locals, too-many-statements, line-too-long +def load_command_table(self, _): + + rdbms_custom = CliCommandType(operations_tmpl='azext_rdbms_vnet.custom#{}') + + mysql_vnet_sdk = CliCommandType( + operations_tmpl='azext_rdbms_vnet.mysql.operations.virtual_network_rules_operations#VirtualNetworkRulesOperations.{}', + client_arg_name='self', + client_factory=cf_mysql_virtual_network_rules_operations + ) + + postgres_vnet_sdk = CliCommandType( + operations_tmpl='azext_rdbms_vnet.postgresql.operations.virtual_network_rules_operations#VirtualNetworkRulesOperations.{}', + client_arg_name='self', + client_factory=cf_postgres_virtual_network_rules_operations + ) + with self.command_group('mysql server vnet-rule', mysql_vnet_sdk) as g: + g.command('create', 'create_or_update') + g.command('delete', 'delete', confirmation=True) + g.command('show', 'get') + g.command('list', 'list_by_server') + g.generic_update_command('update', getter_name='_custom_vnet_update_get', getter_type=rdbms_custom, + setter_name='_custom_vnet_update_set', setter_type=rdbms_custom, setter_arg_name='parameters') + + with self.command_group('postgres server vnet-rule', postgres_vnet_sdk) as g: + g.command('create', 'create_or_update') + g.command('delete', 'delete', confirmation=True) + g.command('show', 'get') + g.command('list', 'list_by_server') + g.generic_update_command('update', + getter_name='_custom_vnet_update_get', getter_type=rdbms_custom, + setter_name='_custom_vnet_update_set', setter_type=rdbms_custom, setter_arg_name='parameters') diff --git a/src/rdbms_vnet/azext_rdbms_vnet/custom.py b/src/rdbms_vnet/azext_rdbms_vnet/custom.py new file mode 100644 index 00000000000..7d6dec72283 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/custom.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +def _custom_vnet_update_get(client, resource_group_name, server_name, virtual_network_rule_name): + return client.get(resource_group_name, server_name, virtual_network_rule_name) + + +def _custom_vnet_update_set(client, resource_group_name, server_name, virtual_network_rule_name, + virtual_network_subnet_id, + ignore_missing_vnet_service_endpoint=None): + return client.create_or_update(resource_group_name, server_name, + virtual_network_rule_name, virtual_network_subnet_id, + ignore_missing_vnet_service_endpoint) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/__init__.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/__init__.py new file mode 100644 index 00000000000..624450eee2f --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .my_sql_management_client import MySQLManagementClient +from .version import VERSION + +__all__ = ['MySQLManagementClient'] + +__version__ = VERSION + diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/__init__.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/__init__.py new file mode 100644 index 00000000000..de3ca6004ad --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/__init__.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource +from .tracked_resource import TrackedResource +from .storage_profile import StorageProfile +from .server_properties_for_create import ServerPropertiesForCreate +from .server_properties_for_default_create import ServerPropertiesForDefaultCreate +from .server_properties_for_restore import ServerPropertiesForRestore +from .server_properties_for_geo_restore import ServerPropertiesForGeoRestore +from .sku import Sku +from .server import Server +from .server_for_create import ServerForCreate +from .server_update_parameters import ServerUpdateParameters +from .firewall_rule import FirewallRule +from .virtual_network_rule import VirtualNetworkRule +from .database import Database +from .configuration import Configuration +from .operation_display import OperationDisplay +from .operation import Operation +from .operation_list_result import OperationListResult +from .log_file import LogFile +from .performance_tier_service_level_objectives import PerformanceTierServiceLevelObjectives +from .performance_tier_properties import PerformanceTierProperties +from .name_availability_request import NameAvailabilityRequest +from .name_availability import NameAvailability +from .server_paged import ServerPaged +from .firewall_rule_paged import FirewallRulePaged +from .virtual_network_rule_paged import VirtualNetworkRulePaged +from .database_paged import DatabasePaged +from .configuration_paged import ConfigurationPaged +from .log_file_paged import LogFilePaged +from .performance_tier_properties_paged import PerformanceTierPropertiesPaged +from .my_sql_management_client_enums import ( + ServerVersion, + SslEnforcementEnum, + ServerState, + GeoRedundantBackup, + SkuTier, + VirtualNetworkRuleState, + OperationOrigin, +) + +__all__ = [ + 'ProxyResource', + 'TrackedResource', + 'StorageProfile', + 'ServerPropertiesForCreate', + 'ServerPropertiesForDefaultCreate', + 'ServerPropertiesForRestore', + 'ServerPropertiesForGeoRestore', + 'Sku', + 'Server', + 'ServerForCreate', + 'ServerUpdateParameters', + 'FirewallRule', + 'VirtualNetworkRule', + 'Database', + 'Configuration', + 'OperationDisplay', + 'Operation', + 'OperationListResult', + 'LogFile', + 'PerformanceTierServiceLevelObjectives', + 'PerformanceTierProperties', + 'NameAvailabilityRequest', + 'NameAvailability', + 'ServerPaged', + 'FirewallRulePaged', + 'VirtualNetworkRulePaged', + 'DatabasePaged', + 'ConfigurationPaged', + 'LogFilePaged', + 'PerformanceTierPropertiesPaged', + 'ServerVersion', + 'SslEnforcementEnum', + 'ServerState', + 'GeoRedundantBackup', + 'SkuTier', + 'VirtualNetworkRuleState', + 'OperationOrigin', +] diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/configuration.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/configuration.py new file mode 100644 index 00000000000..958b4df2237 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class Configuration(ProxyResource): + """Represents a Configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param value: Value of the configuration. + :type value: str + :ivar description: Description of the configuration. + :vartype description: str + :ivar default_value: Default value of the configuration. + :vartype default_value: str + :ivar data_type: Data type of the configuration. + :vartype data_type: str + :ivar allowed_values: Allowed values of the configuration. + :vartype allowed_values: str + :param source: Source of the configuration. + :type source: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'default_value': {'readonly': True}, + 'data_type': {'readonly': True}, + 'allowed_values': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, + 'data_type': {'key': 'properties.dataType', 'type': 'str'}, + 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + } + + def __init__(self, value=None, source=None): + super(Configuration, self).__init__() + self.value = value + self.description = None + self.default_value = None + self.data_type = None + self.allowed_values = None + self.source = source diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/configuration_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/configuration_paged.py new file mode 100644 index 00000000000..dbf329cbf45 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/configuration_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Configuration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Configuration]'} + } + + def __init__(self, *args, **kwargs): + + super(ConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/database.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/database.py new file mode 100644 index 00000000000..f4e129302c9 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/database.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class Database(ProxyResource): + """Represents a Database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param charset: The charset of the database. + :type charset: str + :param collation: The collation of the database. + :type collation: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'charset': {'key': 'properties.charset', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + } + + def __init__(self, charset=None, collation=None): + super(Database, self).__init__() + self.charset = charset + self.collation = collation diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/database_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/database_paged.py new file mode 100644 index 00000000000..bf317192044 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/database_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`Database ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Database]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabasePaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/firewall_rule.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/firewall_rule.py new file mode 100644 index 00000000000..ed7b9c13a02 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/firewall_rule.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param start_ip_address: The start IP address of the server firewall rule. + Must be IPv4 format. + :type start_ip_address: str + :param end_ip_address: The end IP address of the server firewall rule. + Must be IPv4 format. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, + 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, start_ip_address, end_ip_address): + super(FirewallRule, self).__init__() + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/firewall_rule_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/firewall_rule_paged.py new file mode 100644 index 00000000000..d58692c7a13 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/firewall_rule_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class FirewallRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`FirewallRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FirewallRule]'} + } + + def __init__(self, *args, **kwargs): + + super(FirewallRulePaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/log_file.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/log_file.py new file mode 100644 index 00000000000..56ba143dae2 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/log_file.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class LogFile(ProxyResource): + """Represents a log file. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param size_in_kb: Size of the log file. + :type size_in_kb: long + :ivar created_time: Creation timestamp of the log file. + :vartype created_time: datetime + :ivar last_modified_time: Last modified timestamp of the log file. + :vartype last_modified_time: datetime + :param log_file_type: Type of the log file. + :type log_file_type: str + :param url: The url to download the log file from. + :type url: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'log_file_type': {'key': 'properties.type', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + } + + def __init__(self, size_in_kb=None, log_file_type=None, url=None): + super(LogFile, self).__init__() + self.size_in_kb = size_in_kb + self.created_time = None + self.last_modified_time = None + self.log_file_type = log_file_type + self.url = url diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/log_file_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/log_file_paged.py new file mode 100644 index 00000000000..e935cdd3bb0 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/log_file_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class LogFilePaged(Paged): + """ + A paging container for iterating over a list of :class:`LogFile ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LogFile]'} + } + + def __init__(self, *args, **kwargs): + + super(LogFilePaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/my_sql_management_client_enums.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/my_sql_management_client_enums.py new file mode 100644 index 00000000000..05295d49fe6 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/my_sql_management_client_enums.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ServerVersion(Enum): + + five_full_stop_six = "5.6" + five_full_stop_seven = "5.7" + + +class SslEnforcementEnum(Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ServerState(Enum): + + ready = "Ready" + dropping = "Dropping" + disabled = "Disabled" + + +class GeoRedundantBackup(Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class SkuTier(Enum): + + basic = "Basic" + general_purpose = "GeneralPurpose" + memory_optimized = "MemoryOptimized" + + +class VirtualNetworkRuleState(Enum): + + initializing = "Initializing" + in_progress = "InProgress" + ready = "Ready" + deleting = "Deleting" + unknown = "Unknown" + + +class OperationOrigin(Enum): + + not_specified = "NotSpecified" + user = "user" + system = "system" diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/name_availability.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/name_availability.py new file mode 100644 index 00000000000..b7759d8d472 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/name_availability.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NameAvailability(Model): + """Represents a resource name availability. + + :param message: Error Message. + :type message: str + :param name_available: Indicates whether the resource name is available. + :type name_available: bool + :param reason: Reason for name being unavailable. + :type reason: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, message=None, name_available=None, reason=None): + super(NameAvailability, self).__init__() + self.message = message + self.name_available = name_available + self.reason = reason diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/name_availability_request.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/name_availability_request.py new file mode 100644 index 00000000000..715b87ea367 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/name_availability_request.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NameAvailabilityRequest(Model): + """Request from client to check resource name availability. + + :param name: Resource name to verify. + :type name: str + :param type: Resource type used for verification. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, name, type=None): + super(NameAvailabilityRequest, self).__init__() + self.name = name + self.type = type diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/operation.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/operation.py new file mode 100644 index 00000000000..d177c6129f3 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/operation.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation or action. + :vartype display: ~azure.mgmt.rdbms.mysql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'NotSpecified', 'user', 'system' + :vartype origin: str or ~azure.mgmt.rdbms.mysql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self): + super(Operation, self).__init__() + self.name = None + self.display = None + self.origin = None + self.properties = None diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/operation_display.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/operation_display.py new file mode 100644 index 00000000000..66b7f736d29 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/operation_display.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Operation resource provider name. + :vartype provider: str + :ivar resource: Resource on which the operation is performed. + :vartype resource: str + :ivar operation: Localized friendly name for the operation. + :vartype operation: str + :ivar description: Operation description. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + super(OperationDisplay, self).__init__() + self.provider = None + self.resource = None + self.operation = None + self.description = None diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/operation_list_result.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/operation_list_result.py new file mode 100644 index 00000000000..55da5a63aa3 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/operation_list_result.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationListResult(Model): + """A list of resource provider operations. + + :param value: The list of resource provider operations. + :type value: list[~azure.mgmt.rdbms.mysql.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, value=None): + super(OperationListResult, self).__init__() + self.value = value diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/performance_tier_properties.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/performance_tier_properties.py new file mode 100644 index 00000000000..dd50ed653f8 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/performance_tier_properties.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PerformanceTierProperties(Model): + """Performance tier properties. + + :param id: ID of the performance tier. + :type id: str + :param service_level_objectives: Service level objectives associated with + the performance tier + :type service_level_objectives: + list[~azure.mgmt.rdbms.mysql.models.PerformanceTierServiceLevelObjectives] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, + } + + def __init__(self, id=None, service_level_objectives=None): + super(PerformanceTierProperties, self).__init__() + self.id = id + self.service_level_objectives = service_level_objectives diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/performance_tier_properties_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/performance_tier_properties_paged.py new file mode 100644 index 00000000000..94fbd7b3ab9 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/performance_tier_properties_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class PerformanceTierPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`PerformanceTierProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PerformanceTierProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(PerformanceTierPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/performance_tier_service_level_objectives.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/performance_tier_service_level_objectives.py new file mode 100644 index 00000000000..08541b20c60 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/performance_tier_service_level_objectives.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PerformanceTierServiceLevelObjectives(Model): + """Service level objectives for performance tier. + + :param id: ID for the service level objective. + :type id: str + :param edition: Edition of the performance tier. + :type edition: str + :param v_core: vCore associated with the service level objective + :type v_core: int + :param hardware_generation: Hardware generation associated with the + service level objective + :type hardware_generation: str + :param max_backup_retention_days: Maximum Backup retention in days for the + performance tier edition + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the + performance tier edition + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'v_core': {'key': 'vCore', 'type': 'int'}, + 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, + } + + def __init__(self, id=None, edition=None, v_core=None, hardware_generation=None, max_backup_retention_days=None, min_backup_retention_days=None, max_storage_mb=None, min_storage_mb=None): + super(PerformanceTierServiceLevelObjectives, self).__init__() + self.id = id + self.edition = edition + self.v_core = v_core + self.hardware_generation = hardware_generation + self.max_backup_retention_days = max_backup_retention_days + self.min_backup_retention_days = min_backup_retention_days + self.max_storage_mb = max_storage_mb + self.min_storage_mb = min_storage_mb diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/proxy_resource.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/proxy_resource.py new file mode 100644 index 00000000000..b982916c5e5 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/proxy_resource.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProxyResource(Model): + """Resource properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self): + super(ProxyResource, self).__init__() + self.id = None + self.name = None + self.type = None diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server.py new file mode 100644 index 00000000000..46e114056c5 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class Server(TrackedResource): + """Represents a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The location the resource resides in. + :type location: str + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.mysql.models.Sku + :param administrator_login: The administrator's login name of a server. + Can only be specified when the server is being created (and is required + for creation). + :type administrator_login: str + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum + :param user_visible_state: A state of a server that is visible to user. + Possible values include: 'Ready', 'Dropping', 'Disabled' + :type user_visible_state: str or + ~azure.mgmt.rdbms.mysql.models.ServerState + :param fully_qualified_domain_name: The fully qualified domain name of a + server. + :type fully_qualified_domain_name: str + :param earliest_restore_date: Earliest restore point creation time + (ISO8601 format) + :type earliest_restore_date: datetime + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + } + + def __init__(self, location, tags=None, sku=None, administrator_login=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name=None, earliest_restore_date=None, storage_profile=None): + super(Server, self).__init__(location=location, tags=tags) + self.sku = sku + self.administrator_login = administrator_login + self.version = version + self.ssl_enforcement = ssl_enforcement + self.user_visible_state = user_visible_state + self.fully_qualified_domain_name = fully_qualified_domain_name + self.earliest_restore_date = earliest_restore_date + self.storage_profile = storage_profile diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_for_create.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_for_create.py new file mode 100644 index 00000000000..2de6f910be1 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_for_create.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServerForCreate(Model): + """Represents a server to be created. + + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.mysql.models.Sku + :param properties: Properties of the server. + :type properties: ~azure.mgmt.rdbms.mysql.models.ServerPropertiesForCreate + :param location: The location the resource resides in. + :type location: str + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + """ + + _validation = { + 'properties': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, properties, location, sku=None, tags=None): + super(ServerForCreate, self).__init__() + self.sku = sku + self.properties = properties + self.location = location + self.tags = tags diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_paged.py new file mode 100644 index 00000000000..b64a325011a --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ServerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Server ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Server]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerPaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_create.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_create.py new file mode 100644 index 00000000000..fb22126068f --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_create.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServerPropertiesForCreate(Model): + """The properties used to create a new server. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServerPropertiesForDefaultCreate, + ServerPropertiesForRestore, ServerPropertiesForGeoRestore + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile + :param create_mode: Constant filled by server. + :type create_mode: str + """ + + _validation = { + 'create_mode': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + } + + _subtype_map = { + 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore'} + } + + def __init__(self, version=None, ssl_enforcement=None, storage_profile=None): + super(ServerPropertiesForCreate, self).__init__() + self.version = version + self.ssl_enforcement = ssl_enforcement + self.storage_profile = storage_profile + self.create_mode = None diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_default_create.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_default_create.py new file mode 100644 index 00000000000..5421c3059e4 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_default_create.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .server_properties_for_create import ServerPropertiesForCreate + + +class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): + """The properties used to create a new server. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile + :param create_mode: Constant filled by server. + :type create_mode: str + :param administrator_login: The administrator's login name of a server. + Can only be specified when the server is being created (and is required + for creation). + :type administrator_login: str + :param administrator_login_password: The password of the administrator + login. + :type administrator_login_password: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + } + + def __init__(self, administrator_login, administrator_login_password, version=None, ssl_enforcement=None, storage_profile=None): + super(ServerPropertiesForDefaultCreate, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile) + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.create_mode = 'Default' diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_geo_restore.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_geo_restore.py new file mode 100644 index 00000000000..64c73098025 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_geo_restore.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .server_properties_for_create import ServerPropertiesForCreate + + +class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): + """The properties used to create a new server by restoring to a different + region from a geo replicated backup. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile + :param create_mode: Constant filled by server. + :type create_mode: str + :param source_server_id: The source server id to restore from. + :type source_server_id: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + } + + def __init__(self, source_server_id, version=None, ssl_enforcement=None, storage_profile=None): + super(ServerPropertiesForGeoRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile) + self.source_server_id = source_server_id + self.create_mode = 'GeoRestore' diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_restore.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_restore.py new file mode 100644 index 00000000000..fe6ab57faf8 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_properties_for_restore.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .server_properties_for_create import ServerPropertiesForCreate + + +class ServerPropertiesForRestore(ServerPropertiesForCreate): + """The properties used to create a new server by restoring from a backup. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile + :param create_mode: Constant filled by server. + :type create_mode: str + :param source_server_id: The source server id to restore from. + :type source_server_id: str + :param restore_point_in_time: Restore point creation time (ISO8601 + format), specifying the time to restore from. + :type restore_point_in_time: datetime + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + 'restore_point_in_time': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, + } + + def __init__(self, source_server_id, restore_point_in_time, version=None, ssl_enforcement=None, storage_profile=None): + super(ServerPropertiesForRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile) + self.source_server_id = source_server_id + self.restore_point_in_time = restore_point_in_time + self.create_mode = 'PointInTimeRestore' diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_update_parameters.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_update_parameters.py new file mode 100644 index 00000000000..5da1465629f --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/server_update_parameters.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServerUpdateParameters(Model): + """Parameters allowd to update for a server. + + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.mysql.models.Sku + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile + :param administrator_login_password: The password of the administrator + login. + :type administrator_login_password: str + :param version: The version of a server. Possible values include: '5.6', + '5.7' + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, sku=None, storage_profile=None, administrator_login_password=None, version=None, ssl_enforcement=None, tags=None): + super(ServerUpdateParameters, self).__init__() + self.sku = sku + self.storage_profile = storage_profile + self.administrator_login_password = administrator_login_password + self.version = version + self.ssl_enforcement = ssl_enforcement + self.tags = tags diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/sku.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/sku.py new file mode 100644 index 00000000000..480a830a498 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/sku.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """Billing information related properties of a server. + + :param name: The name of the sku, typically, tier + family + cores, e.g. + B_Gen4_1, GP_Gen5_8. + :type name: str + :param tier: The tier of the particular SKU, e.g. Basic. Possible values + include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' + :type tier: str or ~azure.mgmt.rdbms.mysql.models.SkuTier + :param capacity: The scale up/out capacity, representing server's compute + units. + :type capacity: int + :param size: The size code, to be interpreted by resource as appropriate. + :type size: str + :param family: The family of hardware. + :type family: str + """ + + _validation = { + 'capacity': {'minimum': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__(self, name=None, tier=None, capacity=None, size=None, family=None): + super(Sku, self).__init__() + self.name = name + self.tier = tier + self.capacity = capacity + self.size = size + self.family = family diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/storage_profile.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/storage_profile.py new file mode 100644 index 00000000000..1bc8092ae4b --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/storage_profile.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageProfile(Model): + """Storage Profile properties of a server. + + :param backup_retention_days: Backup retention days for the server. + :type backup_retention_days: int + :param geo_redundant_backup: Enable Geo-redundant or not for server + backup. Possible values include: 'Enabled', 'Disabled' + :type geo_redundant_backup: str or + ~azure.mgmt.rdbms.mysql.models.GeoRedundantBackup + :param storage_mb: Max storage allowed for a server. + :type storage_mb: int + """ + + _attribute_map = { + 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, + 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, + 'storage_mb': {'key': 'storageMB', 'type': 'int'}, + } + + def __init__(self, backup_retention_days=None, geo_redundant_backup=None, storage_mb=None): + super(StorageProfile, self).__init__() + self.backup_retention_days = backup_retention_days + self.geo_redundant_backup = geo_redundant_backup + self.storage_mb = storage_mb diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/tracked_resource.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/tracked_resource.py new file mode 100644 index 00000000000..0d199e6f6f9 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/tracked_resource.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class TrackedResource(ProxyResource): + """Resource properties including location and tags for track resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The location the resource resides in. + :type location: str + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + super(TrackedResource, self).__init__() + self.location = location + self.tags = tags diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/virtual_network_rule.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/virtual_network_rule.py new file mode 100644 index 00000000000..42553474ddd --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/virtual_network_rule.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: The ARM resource id of the virtual + network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or + ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None): + super(VirtualNetworkRule, self).__init__() + self.virtual_network_subnet_id = virtual_network_subnet_id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + self.state = None diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/virtual_network_rule_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/virtual_network_rule_paged.py new file mode 100644 index 00000000000..a7eaf18d22b --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/models/virtual_network_rule_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/my_sql_management_client.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/my_sql_management_client.py new file mode 100644 index 00000000000..cf4d7d88893 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/my_sql_management_client.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.servers_operations import ServersOperations +from .operations.firewall_rules_operations import FirewallRulesOperations +from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations +from .operations.databases_operations import DatabasesOperations +from .operations.configurations_operations import ConfigurationsOperations +from .operations.log_files_operations import LogFilesOperations +from .operations.location_based_performance_tier_operations import LocationBasedPerformanceTierOperations +from .operations.check_name_availability_operations import CheckNameAvailabilityOperations +from .operations.operations import Operations +from . import models + + +class MySQLManagementClientConfiguration(AzureConfiguration): + """Configuration for MySQLManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID that identifies an Azure + subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(MySQLManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-mysql/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class MySQLManagementClient(object): + """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. + + :ivar config: Configuration for client. + :vartype config: MySQLManagementClientConfiguration + + :ivar servers: Servers operations + :vartype servers: azure.mgmt.rdbms.mysql.operations.ServersOperations + :ivar firewall_rules: FirewallRules operations + :vartype firewall_rules: azure.mgmt.rdbms.mysql.operations.FirewallRulesOperations + :ivar virtual_network_rules: VirtualNetworkRules operations + :vartype virtual_network_rules: azure.mgmt.rdbms.mysql.operations.VirtualNetworkRulesOperations + :ivar databases: Databases operations + :vartype databases: azure.mgmt.rdbms.mysql.operations.DatabasesOperations + :ivar configurations: Configurations operations + :vartype configurations: azure.mgmt.rdbms.mysql.operations.ConfigurationsOperations + :ivar log_files: LogFiles operations + :vartype log_files: azure.mgmt.rdbms.mysql.operations.LogFilesOperations + :ivar location_based_performance_tier: LocationBasedPerformanceTier operations + :vartype location_based_performance_tier: azure.mgmt.rdbms.mysql.operations.LocationBasedPerformanceTierOperations + :ivar check_name_availability: CheckNameAvailability operations + :vartype check_name_availability: azure.mgmt.rdbms.mysql.operations.CheckNameAvailabilityOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.rdbms.mysql.operations.Operations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID that identifies an Azure + subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = MySQLManagementClientConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2017-12-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.servers = ServersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.firewall_rules = FirewallRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_network_rules = VirtualNetworkRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.databases = DatabasesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.configurations = ConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.log_files = LogFilesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.location_based_performance_tier = LocationBasedPerformanceTierOperations( + self._client, self.config, self._serialize, self._deserialize) + self.check_name_availability = CheckNameAvailabilityOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/__init__.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/__init__.py new file mode 100644 index 00000000000..6020f85ddf6 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/__init__.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .servers_operations import ServersOperations +from .firewall_rules_operations import FirewallRulesOperations +from .virtual_network_rules_operations import VirtualNetworkRulesOperations +from .databases_operations import DatabasesOperations +from .configurations_operations import ConfigurationsOperations +from .log_files_operations import LogFilesOperations +from .location_based_performance_tier_operations import LocationBasedPerformanceTierOperations +from .check_name_availability_operations import CheckNameAvailabilityOperations +from .operations import Operations + +__all__ = [ + 'ServersOperations', + 'FirewallRulesOperations', + 'VirtualNetworkRulesOperations', + 'DatabasesOperations', + 'ConfigurationsOperations', + 'LogFilesOperations', + 'LocationBasedPerformanceTierOperations', + 'CheckNameAvailabilityOperations', + 'Operations', +] diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/check_name_availability_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/check_name_availability_operations.py new file mode 100644 index 00000000000..d7212d29648 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/check_name_availability_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class CheckNameAvailabilityOperations(object): + """CheckNameAvailabilityOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def execute( + self, name, type=None, custom_headers=None, raw=False, **operation_config): + """Check the availability of name for resource. + + :param name: Resource name to verify. + :type name: str + :param type: Resource type used for verification. + :type type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NameAvailability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mysql.models.NameAvailability or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + name_availability_request = models.NameAvailabilityRequest(name=name, type=type) + + # Construct URL + url = self.execute.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_availability_request, 'NameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('NameAvailability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/configurations_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/configurations_operations.py new file mode 100644 index 00000000000..7dfdb70fc1d --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/configurations_operations.py @@ -0,0 +1,309 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class ConfigurationsOperations(object): + """ConfigurationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, **operation_config): + parameters = models.Configuration(value=value, source=source) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Configuration') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Configuration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, **operation_config): + """Updates a configuration of a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param configuration_name: The name of the server configuration. + :type configuration_name: str + :param value: Value of the configuration. + :type value: str + :param source: Source of the configuration. + :type source: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + Configuration or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Configuration] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + configuration_name=configuration_name, + value=value, + source=source, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('Configuration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/configurations/{configurationName}'} + + def get( + self, resource_group_name, server_name, configuration_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a configuration of server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param configuration_name: The name of the server configuration. + :type configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Configuration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mysql.models.Configuration or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Configuration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/configurations/{configurationName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """List all the configurations in a given server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Configuration + :rtype: + ~azure.mgmt.rdbms.mysql.models.ConfigurationPaged[~azure.mgmt.rdbms.mysql.models.Configuration] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/configurations'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/databases_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/databases_operations.py new file mode 100644 index 00000000000..5d294b9de38 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/databases_operations.py @@ -0,0 +1,416 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class DatabasesOperations(object): + """DatabasesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, **operation_config): + parameters = models.Database(charset=charset, collation=collation) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Database') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Database', response) + if response.status_code == 201: + deserialized = self._deserialize('Database', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, **operation_config): + """Creates a new database or updates an existing database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param charset: The charset of the database. + :type charset: str + :param collation: The collation of the database. + :type collation: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns Database or + ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Database] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + charset=charset, + collation=collation, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('Database', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/databases/{databaseName}'} + + + def _delete_initial( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Deletes a database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/databases/{databaseName}'} + + def get( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Database or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mysql.models.Database or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Database', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/databases/{databaseName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """List all the databases in a given server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Database + :rtype: + ~azure.mgmt.rdbms.mysql.models.DatabasePaged[~azure.mgmt.rdbms.mysql.models.Database] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/databases'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/firewall_rules_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/firewall_rules_operations.py new file mode 100644 index 00000000000..3d8aa4f4e2f --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/firewall_rules_operations.py @@ -0,0 +1,418 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class FirewallRulesOperations(object): + """FirewallRulesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config): + parameters = models.FirewallRule(start_ip_address=start_ip_address, end_ip_address=end_ip_address) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'FirewallRule') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('FirewallRule', response) + if response.status_code == 201: + deserialized = self._deserialize('FirewallRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config): + """Creates a new firewall rule or updates an existing firewall rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param firewall_rule_name: The name of the server firewall rule. + :type firewall_rule_name: str + :param start_ip_address: The start IP address of the server firewall + rule. Must be IPv4 format. + :type start_ip_address: str + :param end_ip_address: The end IP address of the server firewall rule. + Must be IPv4 format. + :type end_ip_address: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns FirewallRule + or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.FirewallRule] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + firewall_rule_name=firewall_rule_name, + start_ip_address=start_ip_address, + end_ip_address=end_ip_address, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('FirewallRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/firewallRules/{firewallRuleName}'} + + + def _delete_initial( + self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): + """Deletes a server firewall rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param firewall_rule_name: The name of the server firewall rule. + :type firewall_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + firewall_rule_name=firewall_rule_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/firewallRules/{firewallRuleName}'} + + def get( + self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a server firewall rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param firewall_rule_name: The name of the server firewall rule. + :type firewall_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FirewallRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mysql.models.FirewallRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('FirewallRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/firewallRules/{firewallRuleName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """List all the firewall rules in a given server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FirewallRule + :rtype: + ~azure.mgmt.rdbms.mysql.models.FirewallRulePaged[~azure.mgmt.rdbms.mysql.models.FirewallRule] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/firewallRules'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/location_based_performance_tier_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/location_based_performance_tier_operations.py new file mode 100644 index 00000000000..ad72ff2e518 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/location_based_performance_tier_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class LocationBasedPerformanceTierOperations(object): + """LocationBasedPerformanceTierOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def list( + self, location_name, custom_headers=None, raw=False, **operation_config): + """List all the performance tiers at specified location in a given + subscription. + + :param location_name: The name of the location. + :type location_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerformanceTierProperties + :rtype: + ~azure.mgmt.rdbms.mysql.models.PerformanceTierPropertiesPaged[~azure.mgmt.rdbms.mysql.models.PerformanceTierProperties] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.PerformanceTierPropertiesPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PerformanceTierPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/performanceTiers'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/log_files_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/log_files_operations.py new file mode 100644 index 00000000000..113a981bc87 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/log_files_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class LogFilesOperations(object): + """LogFilesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """List all the log files in a given server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of LogFile + :rtype: + ~azure.mgmt.rdbms.mysql.models.LogFilePaged[~azure.mgmt.rdbms.mysql.models.LogFile] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.LogFilePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.LogFilePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/logFiles'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/operations.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/operations.py new file mode 100644 index 00000000000..3e99cc4f817 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/operations.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mysql.models.OperationListResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.DBforMySQL/operations'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/servers_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/servers_operations.py new file mode 100644 index 00000000000..6679e48634d --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/servers_operations.py @@ -0,0 +1,586 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class ServersOperations(object): + """ServersOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_initial( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServerForCreate') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Server', response) + if response.status_code == 201: + deserialized = self._deserialize('Server', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates a new server or updates an existing server. The update action + will overwrite the existing server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param parameters: The required parameters for creating or updating a + server. + :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerForCreate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns Server or + ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Server] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + server_name=server_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('Server', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}'} + + + def _update_initial( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServerUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Server', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + """Updates an existing server. The request body can contain one to many of + the properties present in the normal server definition. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param parameters: The required parameters for updating a server. + :type parameters: + ~azure.mgmt.rdbms.mysql.models.ServerUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns Server or + ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Server] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('Server', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}'} + + + def _delete_initial( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Deletes a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}'} + + def get( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Server or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mysql.models.Server or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Server', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List all the servers in a given resource group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Server + :rtype: + ~azure.mgmt.rdbms.mysql.models.ServerPaged[~azure.mgmt.rdbms.mysql.models.Server] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all the servers in a given subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Server + :rtype: + ~azure.mgmt.rdbms.mysql.models.ServerPaged[~azure.mgmt.rdbms.mysql.models.Server] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/servers'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/virtual_network_rules_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/virtual_network_rules_operations.py new file mode 100644 index 00000000000..39f501fd3fc --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/operations/virtual_network_rules_operations.py @@ -0,0 +1,421 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class VirtualNetworkRulesOperations(object): + """VirtualNetworkRulesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def get( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets a virtual network rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualNetworkRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, **operation_config): + parameters = models.VirtualNetworkRule(virtual_network_subnet_id=virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualNetworkRule') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkRule', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an existing virtual network rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param virtual_network_subnet_id: The ARM resource id of the virtual + network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule + before the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + VirtualNetworkRule or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + virtual_network_rule_name=virtual_network_rule_name, + virtual_network_subnet_id=virtual_network_subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + + def _delete_initial( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + """Deletes the virtual network rule with the given name. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + virtual_network_rule_name=virtual_network_rule_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual network rules in a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualNetworkRule + :rtype: + ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRulePaged[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/mysql/version.py b/src/rdbms_vnet/azext_rdbms_vnet/mysql/version.py new file mode 100644 index 00000000000..e0ec669828c --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/mysql/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/__init__.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/__init__.py new file mode 100644 index 00000000000..41ac8ae569f --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .postgre_sql_management_client import PostgreSQLManagementClient +from .version import VERSION + +__all__ = ['PostgreSQLManagementClient'] + +__version__ = VERSION + diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/__init__.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/__init__.py new file mode 100644 index 00000000000..e455d4de83e --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/__init__.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource +from .tracked_resource import TrackedResource +from .storage_profile import StorageProfile +from .server_properties_for_create import ServerPropertiesForCreate +from .server_properties_for_default_create import ServerPropertiesForDefaultCreate +from .server_properties_for_restore import ServerPropertiesForRestore +from .server_properties_for_geo_restore import ServerPropertiesForGeoRestore +from .sku import Sku +from .server import Server +from .server_for_create import ServerForCreate +from .server_update_parameters import ServerUpdateParameters +from .firewall_rule import FirewallRule +from .virtual_network_rule import VirtualNetworkRule +from .database import Database +from .configuration import Configuration +from .operation_display import OperationDisplay +from .operation import Operation +from .operation_list_result import OperationListResult +from .log_file import LogFile +from .performance_tier_service_level_objectives import PerformanceTierServiceLevelObjectives +from .performance_tier_properties import PerformanceTierProperties +from .name_availability_request import NameAvailabilityRequest +from .name_availability import NameAvailability +from .server_paged import ServerPaged +from .firewall_rule_paged import FirewallRulePaged +from .virtual_network_rule_paged import VirtualNetworkRulePaged +from .database_paged import DatabasePaged +from .configuration_paged import ConfigurationPaged +from .log_file_paged import LogFilePaged +from .performance_tier_properties_paged import PerformanceTierPropertiesPaged +from .postgre_sql_management_client_enums import ( + ServerVersion, + SslEnforcementEnum, + ServerState, + GeoRedundantBackup, + SkuTier, + VirtualNetworkRuleState, + OperationOrigin, +) + +__all__ = [ + 'ProxyResource', + 'TrackedResource', + 'StorageProfile', + 'ServerPropertiesForCreate', + 'ServerPropertiesForDefaultCreate', + 'ServerPropertiesForRestore', + 'ServerPropertiesForGeoRestore', + 'Sku', + 'Server', + 'ServerForCreate', + 'ServerUpdateParameters', + 'FirewallRule', + 'VirtualNetworkRule', + 'Database', + 'Configuration', + 'OperationDisplay', + 'Operation', + 'OperationListResult', + 'LogFile', + 'PerformanceTierServiceLevelObjectives', + 'PerformanceTierProperties', + 'NameAvailabilityRequest', + 'NameAvailability', + 'ServerPaged', + 'FirewallRulePaged', + 'VirtualNetworkRulePaged', + 'DatabasePaged', + 'ConfigurationPaged', + 'LogFilePaged', + 'PerformanceTierPropertiesPaged', + 'ServerVersion', + 'SslEnforcementEnum', + 'ServerState', + 'GeoRedundantBackup', + 'SkuTier', + 'VirtualNetworkRuleState', + 'OperationOrigin', +] diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/configuration.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/configuration.py new file mode 100644 index 00000000000..958b4df2237 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class Configuration(ProxyResource): + """Represents a Configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param value: Value of the configuration. + :type value: str + :ivar description: Description of the configuration. + :vartype description: str + :ivar default_value: Default value of the configuration. + :vartype default_value: str + :ivar data_type: Data type of the configuration. + :vartype data_type: str + :ivar allowed_values: Allowed values of the configuration. + :vartype allowed_values: str + :param source: Source of the configuration. + :type source: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'default_value': {'readonly': True}, + 'data_type': {'readonly': True}, + 'allowed_values': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, + 'data_type': {'key': 'properties.dataType', 'type': 'str'}, + 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + } + + def __init__(self, value=None, source=None): + super(Configuration, self).__init__() + self.value = value + self.description = None + self.default_value = None + self.data_type = None + self.allowed_values = None + self.source = source diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/configuration_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/configuration_paged.py new file mode 100644 index 00000000000..b861ae03fff --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/configuration_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Configuration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Configuration]'} + } + + def __init__(self, *args, **kwargs): + + super(ConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/database.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/database.py new file mode 100644 index 00000000000..f4e129302c9 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/database.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class Database(ProxyResource): + """Represents a Database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param charset: The charset of the database. + :type charset: str + :param collation: The collation of the database. + :type collation: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'charset': {'key': 'properties.charset', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + } + + def __init__(self, charset=None, collation=None): + super(Database, self).__init__() + self.charset = charset + self.collation = collation diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/database_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/database_paged.py new file mode 100644 index 00000000000..2dc1e436779 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/database_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`Database ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Database]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabasePaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/firewall_rule.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/firewall_rule.py new file mode 100644 index 00000000000..ed7b9c13a02 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/firewall_rule.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param start_ip_address: The start IP address of the server firewall rule. + Must be IPv4 format. + :type start_ip_address: str + :param end_ip_address: The end IP address of the server firewall rule. + Must be IPv4 format. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, + 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, start_ip_address, end_ip_address): + super(FirewallRule, self).__init__() + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/firewall_rule_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/firewall_rule_paged.py new file mode 100644 index 00000000000..a07ec3d0c92 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/firewall_rule_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class FirewallRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`FirewallRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FirewallRule]'} + } + + def __init__(self, *args, **kwargs): + + super(FirewallRulePaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/log_file.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/log_file.py new file mode 100644 index 00000000000..56ba143dae2 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/log_file.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class LogFile(ProxyResource): + """Represents a log file. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param size_in_kb: Size of the log file. + :type size_in_kb: long + :ivar created_time: Creation timestamp of the log file. + :vartype created_time: datetime + :ivar last_modified_time: Last modified timestamp of the log file. + :vartype last_modified_time: datetime + :param log_file_type: Type of the log file. + :type log_file_type: str + :param url: The url to download the log file from. + :type url: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'log_file_type': {'key': 'properties.type', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + } + + def __init__(self, size_in_kb=None, log_file_type=None, url=None): + super(LogFile, self).__init__() + self.size_in_kb = size_in_kb + self.created_time = None + self.last_modified_time = None + self.log_file_type = log_file_type + self.url = url diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/log_file_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/log_file_paged.py new file mode 100644 index 00000000000..a666ecd9d39 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/log_file_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class LogFilePaged(Paged): + """ + A paging container for iterating over a list of :class:`LogFile ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LogFile]'} + } + + def __init__(self, *args, **kwargs): + + super(LogFilePaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/name_availability.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/name_availability.py new file mode 100644 index 00000000000..b7759d8d472 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/name_availability.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NameAvailability(Model): + """Represents a resource name availability. + + :param message: Error Message. + :type message: str + :param name_available: Indicates whether the resource name is available. + :type name_available: bool + :param reason: Reason for name being unavailable. + :type reason: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, message=None, name_available=None, reason=None): + super(NameAvailability, self).__init__() + self.message = message + self.name_available = name_available + self.reason = reason diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/name_availability_request.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/name_availability_request.py new file mode 100644 index 00000000000..715b87ea367 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/name_availability_request.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NameAvailabilityRequest(Model): + """Request from client to check resource name availability. + + :param name: Resource name to verify. + :type name: str + :param type: Resource type used for verification. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, name, type=None): + super(NameAvailabilityRequest, self).__init__() + self.name = name + self.type = type diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/operation.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/operation.py new file mode 100644 index 00000000000..c0ad896a743 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/operation.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation or action. + :vartype display: ~azure.mgmt.rdbms.postgresql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'NotSpecified', 'user', 'system' + :vartype origin: str or + ~azure.mgmt.rdbms.postgresql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self): + super(Operation, self).__init__() + self.name = None + self.display = None + self.origin = None + self.properties = None diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/operation_display.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/operation_display.py new file mode 100644 index 00000000000..66b7f736d29 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/operation_display.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Operation resource provider name. + :vartype provider: str + :ivar resource: Resource on which the operation is performed. + :vartype resource: str + :ivar operation: Localized friendly name for the operation. + :vartype operation: str + :ivar description: Operation description. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + super(OperationDisplay, self).__init__() + self.provider = None + self.resource = None + self.operation = None + self.description = None diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/operation_list_result.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/operation_list_result.py new file mode 100644 index 00000000000..b6521d80d2b --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/operation_list_result.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationListResult(Model): + """A list of resource provider operations. + + :param value: The list of resource provider operations. + :type value: list[~azure.mgmt.rdbms.postgresql.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, value=None): + super(OperationListResult, self).__init__() + self.value = value diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/performance_tier_properties.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/performance_tier_properties.py new file mode 100644 index 00000000000..cb1c8d45112 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/performance_tier_properties.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PerformanceTierProperties(Model): + """Performance tier properties. + + :param id: ID of the performance tier. + :type id: str + :param service_level_objectives: Service level objectives associated with + the performance tier + :type service_level_objectives: + list[~azure.mgmt.rdbms.postgresql.models.PerformanceTierServiceLevelObjectives] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, + } + + def __init__(self, id=None, service_level_objectives=None): + super(PerformanceTierProperties, self).__init__() + self.id = id + self.service_level_objectives = service_level_objectives diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/performance_tier_properties_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/performance_tier_properties_paged.py new file mode 100644 index 00000000000..e6fe88ac2fa --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/performance_tier_properties_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class PerformanceTierPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`PerformanceTierProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PerformanceTierProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(PerformanceTierPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/performance_tier_service_level_objectives.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/performance_tier_service_level_objectives.py new file mode 100644 index 00000000000..08541b20c60 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/performance_tier_service_level_objectives.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PerformanceTierServiceLevelObjectives(Model): + """Service level objectives for performance tier. + + :param id: ID for the service level objective. + :type id: str + :param edition: Edition of the performance tier. + :type edition: str + :param v_core: vCore associated with the service level objective + :type v_core: int + :param hardware_generation: Hardware generation associated with the + service level objective + :type hardware_generation: str + :param max_backup_retention_days: Maximum Backup retention in days for the + performance tier edition + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the + performance tier edition + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'v_core': {'key': 'vCore', 'type': 'int'}, + 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, + } + + def __init__(self, id=None, edition=None, v_core=None, hardware_generation=None, max_backup_retention_days=None, min_backup_retention_days=None, max_storage_mb=None, min_storage_mb=None): + super(PerformanceTierServiceLevelObjectives, self).__init__() + self.id = id + self.edition = edition + self.v_core = v_core + self.hardware_generation = hardware_generation + self.max_backup_retention_days = max_backup_retention_days + self.min_backup_retention_days = min_backup_retention_days + self.max_storage_mb = max_storage_mb + self.min_storage_mb = min_storage_mb diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/postgre_sql_management_client_enums.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/postgre_sql_management_client_enums.py new file mode 100644 index 00000000000..a8ad3f87370 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/postgre_sql_management_client_enums.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ServerVersion(Enum): + + nine_full_stop_five = "9.5" + nine_full_stop_six = "9.6" + + +class SslEnforcementEnum(Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ServerState(Enum): + + ready = "Ready" + dropping = "Dropping" + disabled = "Disabled" + + +class GeoRedundantBackup(Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class SkuTier(Enum): + + basic = "Basic" + general_purpose = "GeneralPurpose" + memory_optimized = "MemoryOptimized" + + +class VirtualNetworkRuleState(Enum): + + initializing = "Initializing" + in_progress = "InProgress" + ready = "Ready" + deleting = "Deleting" + unknown = "Unknown" + + +class OperationOrigin(Enum): + + not_specified = "NotSpecified" + user = "user" + system = "system" diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/proxy_resource.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/proxy_resource.py new file mode 100644 index 00000000000..b982916c5e5 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/proxy_resource.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProxyResource(Model): + """Resource properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self): + super(ProxyResource, self).__init__() + self.id = None + self.name = None + self.type = None diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server.py new file mode 100644 index 00000000000..c7bc6e3e1a6 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class Server(TrackedResource): + """Represents a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The location the resource resides in. + :type location: str + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku + :param administrator_login: The administrator's login name of a server. + Can only be specified when the server is being created (and is required + for creation). + :type administrator_login: str + :param version: Server version. Possible values include: '9.5', '9.6' + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum + :param user_visible_state: A state of a server that is visible to user. + Possible values include: 'Ready', 'Dropping', 'Disabled' + :type user_visible_state: str or + ~azure.mgmt.rdbms.postgresql.models.ServerState + :param fully_qualified_domain_name: The fully qualified domain name of a + server. + :type fully_qualified_domain_name: str + :param earliest_restore_date: Earliest restore point creation time + (ISO8601 format) + :type earliest_restore_date: datetime + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + } + + def __init__(self, location, tags=None, sku=None, administrator_login=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name=None, earliest_restore_date=None, storage_profile=None): + super(Server, self).__init__(location=location, tags=tags) + self.sku = sku + self.administrator_login = administrator_login + self.version = version + self.ssl_enforcement = ssl_enforcement + self.user_visible_state = user_visible_state + self.fully_qualified_domain_name = fully_qualified_domain_name + self.earliest_restore_date = earliest_restore_date + self.storage_profile = storage_profile diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_for_create.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_for_create.py new file mode 100644 index 00000000000..3b28a60b632 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_for_create.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServerForCreate(Model): + """Represents a server to be created. + + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku + :param properties: Properties of the server. + :type properties: + ~azure.mgmt.rdbms.postgresql.models.ServerPropertiesForCreate + :param location: The location the resource resides in. + :type location: str + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + """ + + _validation = { + 'properties': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, properties, location, sku=None, tags=None): + super(ServerForCreate, self).__init__() + self.sku = sku + self.properties = properties + self.location = location + self.tags = tags diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_paged.py new file mode 100644 index 00000000000..140a01ce65b --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ServerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Server ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Server]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerPaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_create.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_create.py new file mode 100644 index 00000000000..8101e6cf31a --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_create.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServerPropertiesForCreate(Model): + """The properties used to create a new server. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServerPropertiesForDefaultCreate, + ServerPropertiesForRestore, ServerPropertiesForGeoRestore + + :param version: Server version. Possible values include: '9.5', '9.6' + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile + :param create_mode: Constant filled by server. + :type create_mode: str + """ + + _validation = { + 'create_mode': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + } + + _subtype_map = { + 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore'} + } + + def __init__(self, version=None, ssl_enforcement=None, storage_profile=None): + super(ServerPropertiesForCreate, self).__init__() + self.version = version + self.ssl_enforcement = ssl_enforcement + self.storage_profile = storage_profile + self.create_mode = None diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_default_create.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_default_create.py new file mode 100644 index 00000000000..487e01908dd --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_default_create.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .server_properties_for_create import ServerPropertiesForCreate + + +class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): + """The properties used to create a new server. + + :param version: Server version. Possible values include: '9.5', '9.6' + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile + :param create_mode: Constant filled by server. + :type create_mode: str + :param administrator_login: The administrator's login name of a server. + Can only be specified when the server is being created (and is required + for creation). + :type administrator_login: str + :param administrator_login_password: The password of the administrator + login. + :type administrator_login_password: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + } + + def __init__(self, administrator_login, administrator_login_password, version=None, ssl_enforcement=None, storage_profile=None): + super(ServerPropertiesForDefaultCreate, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile) + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.create_mode = 'Default' diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_geo_restore.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_geo_restore.py new file mode 100644 index 00000000000..56650199678 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_geo_restore.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .server_properties_for_create import ServerPropertiesForCreate + + +class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): + """The properties used to create a new server by restoring to a different + region from a geo replicated backup. + + :param version: Server version. Possible values include: '9.5', '9.6' + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile + :param create_mode: Constant filled by server. + :type create_mode: str + :param source_server_id: The source server id to restore from. + :type source_server_id: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + } + + def __init__(self, source_server_id, version=None, ssl_enforcement=None, storage_profile=None): + super(ServerPropertiesForGeoRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile) + self.source_server_id = source_server_id + self.create_mode = 'GeoRestore' diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_restore.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_restore.py new file mode 100644 index 00000000000..3e0ed598ea7 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_properties_for_restore.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .server_properties_for_create import ServerPropertiesForCreate + + +class ServerPropertiesForRestore(ServerPropertiesForCreate): + """The properties used to create a new server by restoring from a backup. + + :param version: Server version. Possible values include: '9.5', '9.6' + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile + :param create_mode: Constant filled by server. + :type create_mode: str + :param source_server_id: The source server id to restore from. + :type source_server_id: str + :param restore_point_in_time: Restore point creation time (ISO8601 + format), specifying the time to restore from. + :type restore_point_in_time: datetime + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + 'restore_point_in_time': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, + } + + def __init__(self, source_server_id, restore_point_in_time, version=None, ssl_enforcement=None, storage_profile=None): + super(ServerPropertiesForRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile) + self.source_server_id = source_server_id + self.restore_point_in_time = restore_point_in_time + self.create_mode = 'PointInTimeRestore' diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_update_parameters.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_update_parameters.py new file mode 100644 index 00000000000..5888125236a --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/server_update_parameters.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServerUpdateParameters(Model): + """Parameters allowd to update for a server. + + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile + :param administrator_login_password: The password of the administrator + login. + :type administrator_login_password: str + :param version: The version of a server. Possible values include: '9.5', + '9.6' + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, sku=None, storage_profile=None, administrator_login_password=None, version=None, ssl_enforcement=None, tags=None): + super(ServerUpdateParameters, self).__init__() + self.sku = sku + self.storage_profile = storage_profile + self.administrator_login_password = administrator_login_password + self.version = version + self.ssl_enforcement = ssl_enforcement + self.tags = tags diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/sku.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/sku.py new file mode 100644 index 00000000000..fb973426b82 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/sku.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """Billing information related properties of a server. + + :param name: The name of the sku, typically, tier + family + cores, e.g. + B_Gen4_1, GP_Gen5_8. + :type name: str + :param tier: The tier of the particular SKU, e.g. Basic. Possible values + include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' + :type tier: str or ~azure.mgmt.rdbms.postgresql.models.SkuTier + :param capacity: The scale up/out capacity, representing server's compute + units. + :type capacity: int + :param size: The size code, to be interpreted by resource as appropriate. + :type size: str + :param family: The family of hardware. + :type family: str + """ + + _validation = { + 'capacity': {'minimum': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__(self, name=None, tier=None, capacity=None, size=None, family=None): + super(Sku, self).__init__() + self.name = name + self.tier = tier + self.capacity = capacity + self.size = size + self.family = family diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/storage_profile.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/storage_profile.py new file mode 100644 index 00000000000..0f408839ce2 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/storage_profile.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageProfile(Model): + """Storage Profile properties of a server. + + :param backup_retention_days: Backup retention days for the server. + :type backup_retention_days: int + :param geo_redundant_backup: Enable Geo-redundant or not for server + backup. Possible values include: 'Enabled', 'Disabled' + :type geo_redundant_backup: str or + ~azure.mgmt.rdbms.postgresql.models.GeoRedundantBackup + :param storage_mb: Max storage allowed for a server. + :type storage_mb: int + """ + + _attribute_map = { + 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, + 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, + 'storage_mb': {'key': 'storageMB', 'type': 'int'}, + } + + def __init__(self, backup_retention_days=None, geo_redundant_backup=None, storage_mb=None): + super(StorageProfile, self).__init__() + self.backup_retention_days = backup_retention_days + self.geo_redundant_backup = geo_redundant_backup + self.storage_mb = storage_mb diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/tracked_resource.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/tracked_resource.py new file mode 100644 index 00000000000..0d199e6f6f9 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/tracked_resource.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class TrackedResource(ProxyResource): + """Resource properties including location and tags for track resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The location the resource resides in. + :type location: str + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + super(TrackedResource, self).__init__() + self.location = location + self.tags = tags diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/virtual_network_rule.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/virtual_network_rule.py new file mode 100644 index 00000000000..9e76bc7002a --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/virtual_network_rule.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: The ARM resource id of the virtual + network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or + ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None): + super(VirtualNetworkRule, self).__init__() + self.virtual_network_subnet_id = virtual_network_subnet_id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + self.state = None diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/virtual_network_rule_paged.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/virtual_network_rule_paged.py new file mode 100644 index 00000000000..df6f247ff1a --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/models/virtual_network_rule_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/__init__.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/__init__.py new file mode 100644 index 00000000000..6020f85ddf6 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/__init__.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .servers_operations import ServersOperations +from .firewall_rules_operations import FirewallRulesOperations +from .virtual_network_rules_operations import VirtualNetworkRulesOperations +from .databases_operations import DatabasesOperations +from .configurations_operations import ConfigurationsOperations +from .log_files_operations import LogFilesOperations +from .location_based_performance_tier_operations import LocationBasedPerformanceTierOperations +from .check_name_availability_operations import CheckNameAvailabilityOperations +from .operations import Operations + +__all__ = [ + 'ServersOperations', + 'FirewallRulesOperations', + 'VirtualNetworkRulesOperations', + 'DatabasesOperations', + 'ConfigurationsOperations', + 'LogFilesOperations', + 'LocationBasedPerformanceTierOperations', + 'CheckNameAvailabilityOperations', + 'Operations', +] diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/check_name_availability_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/check_name_availability_operations.py new file mode 100644 index 00000000000..18904a3d002 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/check_name_availability_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class CheckNameAvailabilityOperations(object): + """CheckNameAvailabilityOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def execute( + self, name, type=None, custom_headers=None, raw=False, **operation_config): + """Check the availability of name for resource. + + :param name: Resource name to verify. + :type name: str + :param type: Resource type used for verification. + :type type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NameAvailability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.postgresql.models.NameAvailability or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + name_availability_request = models.NameAvailabilityRequest(name=name, type=type) + + # Construct URL + url = self.execute.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_availability_request, 'NameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('NameAvailability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/configurations_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/configurations_operations.py new file mode 100644 index 00000000000..64b9d83210c --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/configurations_operations.py @@ -0,0 +1,309 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class ConfigurationsOperations(object): + """ConfigurationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, **operation_config): + parameters = models.Configuration(value=value, source=source) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Configuration') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Configuration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, **operation_config): + """Updates a configuration of a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param configuration_name: The name of the server configuration. + :type configuration_name: str + :param value: Value of the configuration. + :type value: str + :param source: Source of the configuration. + :type source: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + Configuration or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Configuration] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + configuration_name=configuration_name, + value=value, + source=source, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('Configuration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/configurations/{configurationName}'} + + def get( + self, resource_group_name, server_name, configuration_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a configuration of server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param configuration_name: The name of the server configuration. + :type configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Configuration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.postgresql.models.Configuration or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Configuration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/configurations/{configurationName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """List all the configurations in a given server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Configuration + :rtype: + ~azure.mgmt.rdbms.postgresql.models.ConfigurationPaged[~azure.mgmt.rdbms.postgresql.models.Configuration] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/configurations'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/databases_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/databases_operations.py new file mode 100644 index 00000000000..cfd4ee7ae05 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/databases_operations.py @@ -0,0 +1,416 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class DatabasesOperations(object): + """DatabasesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, **operation_config): + parameters = models.Database(charset=charset, collation=collation) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Database') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Database', response) + if response.status_code == 201: + deserialized = self._deserialize('Database', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, **operation_config): + """Creates a new database or updates an existing database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param charset: The charset of the database. + :type charset: str + :param collation: The collation of the database. + :type collation: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns Database or + ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Database] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + charset=charset, + collation=collation, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('Database', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases/{databaseName}'} + + + def _delete_initial( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Deletes a database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases/{databaseName}'} + + def get( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Database or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.postgresql.models.Database or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Database', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases/{databaseName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """List all the databases in a given server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Database + :rtype: + ~azure.mgmt.rdbms.postgresql.models.DatabasePaged[~azure.mgmt.rdbms.postgresql.models.Database] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/firewall_rules_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/firewall_rules_operations.py new file mode 100644 index 00000000000..82410f3d1d9 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/firewall_rules_operations.py @@ -0,0 +1,418 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class FirewallRulesOperations(object): + """FirewallRulesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config): + parameters = models.FirewallRule(start_ip_address=start_ip_address, end_ip_address=end_ip_address) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'FirewallRule') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('FirewallRule', response) + if response.status_code == 201: + deserialized = self._deserialize('FirewallRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config): + """Creates a new firewall rule or updates an existing firewall rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param firewall_rule_name: The name of the server firewall rule. + :type firewall_rule_name: str + :param start_ip_address: The start IP address of the server firewall + rule. Must be IPv4 format. + :type start_ip_address: str + :param end_ip_address: The end IP address of the server firewall rule. + Must be IPv4 format. + :type end_ip_address: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns FirewallRule + or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.FirewallRule] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + firewall_rule_name=firewall_rule_name, + start_ip_address=start_ip_address, + end_ip_address=end_ip_address, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('FirewallRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}'} + + + def _delete_initial( + self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): + """Deletes a server firewall rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param firewall_rule_name: The name of the server firewall rule. + :type firewall_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + firewall_rule_name=firewall_rule_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}'} + + def get( + self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a server firewall rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param firewall_rule_name: The name of the server firewall rule. + :type firewall_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FirewallRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.postgresql.models.FirewallRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('FirewallRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """List all the firewall rules in a given server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FirewallRule + :rtype: + ~azure.mgmt.rdbms.postgresql.models.FirewallRulePaged[~azure.mgmt.rdbms.postgresql.models.FirewallRule] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/location_based_performance_tier_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/location_based_performance_tier_operations.py new file mode 100644 index 00000000000..6ec7e16a894 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/location_based_performance_tier_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class LocationBasedPerformanceTierOperations(object): + """LocationBasedPerformanceTierOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def list( + self, location_name, custom_headers=None, raw=False, **operation_config): + """List all the performance tiers at specified location in a given + subscription. + + :param location_name: The name of the location. + :type location_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerformanceTierProperties + :rtype: + ~azure.mgmt.rdbms.postgresql.models.PerformanceTierPropertiesPaged[~azure.mgmt.rdbms.postgresql.models.PerformanceTierProperties] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.PerformanceTierPropertiesPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PerformanceTierPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/performanceTiers'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/log_files_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/log_files_operations.py new file mode 100644 index 00000000000..b1eb3b583f8 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/log_files_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class LogFilesOperations(object): + """LogFilesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """List all the log files in a given server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of LogFile + :rtype: + ~azure.mgmt.rdbms.postgresql.models.LogFilePaged[~azure.mgmt.rdbms.postgresql.models.LogFile] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.LogFilePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.LogFilePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/logFiles'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/operations.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/operations.py new file mode 100644 index 00000000000..0f99df04b8b --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/operations.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.postgresql.models.OperationListResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.DBforPostgreSQL/operations'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/servers_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/servers_operations.py new file mode 100644 index 00000000000..c6944576af8 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/servers_operations.py @@ -0,0 +1,585 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class ServersOperations(object): + """ServersOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_initial( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServerForCreate') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Server', response) + if response.status_code == 201: + deserialized = self._deserialize('Server', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates a new server, or will overwrite an existing server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param parameters: The required parameters for creating or updating a + server. + :type parameters: ~azure.mgmt.rdbms.postgresql.models.ServerForCreate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns Server or + ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Server] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + server_name=server_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('Server', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}'} + + + def _update_initial( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServerUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Server', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + """Updates an existing server. The request body can contain one to many of + the properties present in the normal server definition. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param parameters: The required parameters for updating a server. + :type parameters: + ~azure.mgmt.rdbms.postgresql.models.ServerUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns Server or + ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Server] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('Server', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}'} + + + def _delete_initial( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Deletes a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}'} + + def get( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Server or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.postgresql.models.Server or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Server', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List all the servers in a given resource group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Server + :rtype: + ~azure.mgmt.rdbms.postgresql.models.ServerPaged[~azure.mgmt.rdbms.postgresql.models.Server] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all the servers in a given subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Server + :rtype: + ~azure.mgmt.rdbms.postgresql.models.ServerPaged[~azure.mgmt.rdbms.postgresql.models.Server] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/servers'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/virtual_network_rules_operations.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/virtual_network_rules_operations.py new file mode 100644 index 00000000000..6c53758a599 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/operations/virtual_network_rules_operations.py @@ -0,0 +1,421 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class VirtualNetworkRulesOperations(object): + """VirtualNetworkRulesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def get( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets a virtual network rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualNetworkRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, **operation_config): + parameters = models.VirtualNetworkRule(virtual_network_subnet_id=virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualNetworkRule') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkRule', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an existing virtual network rule. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param virtual_network_subnet_id: The ARM resource id of the virtual + network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule + before the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + VirtualNetworkRule or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + virtual_network_rule_name=virtual_network_rule_name, + virtual_network_subnet_id=virtual_network_subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + + def _delete_initial( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + """Deletes the virtual network rule with the given name. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param virtual_network_rule_name: The name of the virtual network + rule. + :type virtual_network_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + virtual_network_rule_name=virtual_network_rule_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual network rules in a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualNetworkRule + :rtype: + ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRulePaged[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules'} diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/postgre_sql_management_client.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/postgre_sql_management_client.py new file mode 100644 index 00000000000..ad1301005da --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/postgre_sql_management_client.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.servers_operations import ServersOperations +from .operations.firewall_rules_operations import FirewallRulesOperations +from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations +from .operations.databases_operations import DatabasesOperations +from .operations.configurations_operations import ConfigurationsOperations +from .operations.log_files_operations import LogFilesOperations +from .operations.location_based_performance_tier_operations import LocationBasedPerformanceTierOperations +from .operations.check_name_availability_operations import CheckNameAvailabilityOperations +from .operations.operations import Operations +from . import models + + +class PostgreSQLManagementClientConfiguration(AzureConfiguration): + """Configuration for PostgreSQLManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID that identifies an Azure + subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(PostgreSQLManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-postgresql/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class PostgreSQLManagementClient(object): + """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. + + :ivar config: Configuration for client. + :vartype config: PostgreSQLManagementClientConfiguration + + :ivar servers: Servers operations + :vartype servers: azure.mgmt.rdbms.postgresql.operations.ServersOperations + :ivar firewall_rules: FirewallRules operations + :vartype firewall_rules: azure.mgmt.rdbms.postgresql.operations.FirewallRulesOperations + :ivar virtual_network_rules: VirtualNetworkRules operations + :vartype virtual_network_rules: azure.mgmt.rdbms.postgresql.operations.VirtualNetworkRulesOperations + :ivar databases: Databases operations + :vartype databases: azure.mgmt.rdbms.postgresql.operations.DatabasesOperations + :ivar configurations: Configurations operations + :vartype configurations: azure.mgmt.rdbms.postgresql.operations.ConfigurationsOperations + :ivar log_files: LogFiles operations + :vartype log_files: azure.mgmt.rdbms.postgresql.operations.LogFilesOperations + :ivar location_based_performance_tier: LocationBasedPerformanceTier operations + :vartype location_based_performance_tier: azure.mgmt.rdbms.postgresql.operations.LocationBasedPerformanceTierOperations + :ivar check_name_availability: CheckNameAvailability operations + :vartype check_name_availability: azure.mgmt.rdbms.postgresql.operations.CheckNameAvailabilityOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.rdbms.postgresql.operations.Operations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID that identifies an Azure + subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = PostgreSQLManagementClientConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2017-12-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.servers = ServersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.firewall_rules = FirewallRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_network_rules = VirtualNetworkRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.databases = DatabasesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.configurations = ConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.log_files = LogFilesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.location_based_performance_tier = LocationBasedPerformanceTierOperations( + self._client, self.config, self._serialize, self._deserialize) + self.check_name_availability = CheckNameAvailabilityOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/postgresql/version.py b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/version.py new file mode 100644 index 00000000000..e0ec669828c --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/postgresql/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + diff --git a/src/rdbms_vnet/azext_rdbms_vnet/tests/__init__.py b/src/rdbms_vnet/azext_rdbms_vnet/tests/__init__.py new file mode 100644 index 00000000000..34913fb394d --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/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/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_mysql_proxy_resources_mgmt.yaml b/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_mysql_proxy_resources_mgmt.yaml new file mode 100644 index 00000000000..2719fc99b79 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_mysql_proxy_resources_mgmt.yaml @@ -0,0 +1,1948 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-05-08T01:04:59Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-05-08T01:04:59Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:05: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: ['1199'] + status: {code: 201, message: Created} +- request: + body: '{"sku": {"name": "GP_Gen5_2"}, "properties": {"storageProfile": {}, "createMode": + "Default", "administratorLogin": "cloudsa", "administratorLoginPassword": "SecretPassword123"}, + "location": "brazilsouth"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server create] + Connection: [keep-alive] + Content-Length: ['204'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-05-08T01:05:03.903Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/b03880ad-66d4-44f7-ad17-38f3d7f3d5fd?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:05:03 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/b03880ad-66d4-44f7-ad17-38f3d7f3d5fd?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 server create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/b03880ad-66d4-44f7-ad17-38f3d7f3d5fd?api-version=2017-12-01 + response: + body: {string: '{"name":"b03880ad-66d4-44f7-ad17-38f3d7f3d5fd","status":"InProgress","startTime":"2018-05-08T01:05:03.903Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:06:05 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 server create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/b03880ad-66d4-44f7-ad17-38f3d7f3d5fd?api-version=2017-12-01 + response: + body: {string: '{"name":"b03880ad-66d4-44f7-ad17-38f3d7f3d5fd","status":"Succeeded","startTime":"2018-05-08T01:05:03.903Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:07:07 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 server create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000002.mysql.database.azure.com","earliestRestoreDate":"2018-05-08T01:15:04.247+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002","name":"azuredbclitest000002","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['916'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:07:08 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": "255.255.255.255"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server firewall-rule create] + Connection: [keep-alive] + Content-Length: ['80'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2018-05-08T01:07:11.59Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/b5cf1b18-b1d4-413e-a6af-ce87157b3787?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['86'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:07:11 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/b5cf1b18-b1d4-413e-a6af-ce87157b3787?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 server firewall-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/b5cf1b18-b1d4-413e-a6af-ce87157b3787?api-version=2017-12-01 + response: + body: {string: '{"name":"b5cf1b18-b1d4-413e-a6af-ce87157b3787","status":"Succeeded","startTime":"2018-05-08T01:07:11.59Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:07: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: [mysql server firewall-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['416'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:07: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 server firewall-rule show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['416'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:07: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: [mysql server firewall-rule update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['416'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:07: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": "123.123.123.123", "endIpAddress": "123.123.123.124"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server firewall-rule update] + Connection: [keep-alive] + Content-Length: ['88'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2018-05-08T01:07:40.873Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/bec1c311-10f2-406c-ac0e-f1d62429d7c3?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:07:40 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/bec1c311-10f2-406c-ac0e-f1d62429d7c3?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: [mysql server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/bec1c311-10f2-406c-ac0e-f1d62429d7c3?api-version=2017-12-01 + response: + body: {string: '{"name":"bec1c311-10f2-406c-ac0e-f1d62429d7c3","status":"Succeeded","startTime":"2018-05-08T01:07:40.873Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:07:57 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 server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"123.123.123.123","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['424'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:07:59 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 server firewall-rule update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"123.123.123.123","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['424'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:08: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: '{"properties": {"startIpAddress": "0.0.0.0", "endIpAddress": "123.123.123.124"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server firewall-rule update] + Connection: [keep-alive] + Content-Length: ['80'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2018-05-08T01:08:04.167Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/98c9245e-3568-4886-bcad-b4e56dbd865c?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:08:04 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/98c9245e-3568-4886-bcad-b4e56dbd865c?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 server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/98c9245e-3568-4886-bcad-b4e56dbd865c?api-version=2017-12-01 + response: + body: {string: '{"name":"98c9245e-3568-4886-bcad-b4e56dbd865c","status":"Succeeded","startTime":"2018-05-08T01:08:04.167Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:08: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 server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['416'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:08:22 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 server firewall-rule update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['416'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:08:24 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": "255.255.255.255"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server firewall-rule update] + Connection: [keep-alive] + Content-Length: ['80'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2018-05-08T01:08:27.11Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/2178e297-79d8-4f7d-9bc6-08f16ab0693b?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['86'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:08:26 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/2178e297-79d8-4f7d-9bc6-08f16ab0693b?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: [mysql server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/2178e297-79d8-4f7d-9bc6-08f16ab0693b?api-version=2017-12-01 + response: + body: {string: '{"name":"2178e297-79d8-4f7d-9bc6-08f16ab0693b","status":"Succeeded","startTime":"2018-05-08T01:08:27.11Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:08:43 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 server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['416'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:08:45 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": "123.123.123.123", "endIpAddress": "123.123.123.124"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server firewall-rule create] + Connection: [keep-alive] + Content-Length: ['88'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule2?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2018-05-08T01:08:48.47Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/5593effc-882c-40b4-8992-0b7714d76cbf?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['86'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:08:48 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/5593effc-882c-40b4-8992-0b7714d76cbf?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 server firewall-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/5593effc-882c-40b4-8992-0b7714d76cbf?api-version=2017-12-01 + response: + body: {string: '{"name":"5593effc-882c-40b4-8992-0b7714d76cbf","status":"Succeeded","startTime":"2018-05-08T01:08:48.47Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:09:04 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 server firewall-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule2?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"123.123.123.123","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule2","name":"rule2","type":"Microsoft.DBforMySQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['424'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:09:06 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 server firewall-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforMySQL/servers/firewallRules"},{"properties":{"startIpAddress":"123.123.123.123","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule2","name":"rule2","type":"Microsoft.DBforMySQL/servers/firewallRules"}]}'} + headers: + cache-control: [no-cache] + content-length: ['853'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:09:08 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 server firewall-rule delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServerFirewallRule","startTime":"2018-05-08T01:09:11.923Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/d1942b8a-8964-4c31-bf1c-1a1d6644e219?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['84'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:09:11 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/d1942b8a-8964-4c31-bf1c-1a1d6644e219?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-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server firewall-rule delete] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/d1942b8a-8964-4c31-bf1c-1a1d6644e219?api-version=2017-12-01 + response: + body: {string: '{"name":"d1942b8a-8964-4c31-bf1c-1a1d6644e219","status":"Succeeded","startTime":"2018-05-08T01:09:11.923Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:09:28 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 server firewall-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"startIpAddress":"123.123.123.123","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule2","name":"rule2","type":"Microsoft.DBforMySQL/servers/firewallRules"}]}'} + headers: + cache-control: [no-cache] + content-length: ['436'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:09:30 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 server firewall-rule delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules/rule2?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServerFirewallRule","startTime":"2018-05-08T01:09:33.273Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/3b94cce0-cd1e-422b-bfd3-583cb1568792?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['84'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:09:32 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/3b94cce0-cd1e-422b-bfd3-583cb1568792?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-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server firewall-rule delete] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/3b94cce0-cd1e-422b-bfd3-583cb1568792?api-version=2017-12-01 + response: + body: {string: '{"name":"3b94cce0-cd1e-422b-bfd3-583cb1568792","status":"Succeeded","startTime":"2018-05-08T01:09:33.273Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:09: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: [mysql server firewall-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/firewallRules?api-version=2017-12-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:09: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: '{"location": "brazilsouth", "tags": {}, "properties": {"addressSpace": + {"addressPrefixes": ["10.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"properties": + {"addressPrefix": "10.0.0.0/24"}, "name": "clitestsubnet1"}]}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + Content-Length: ['217'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet?api-version=2018-02-01 + response: + body: {string: "{\r\n \"name\": \"clitestvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet\"\ + ,\r\n \"etag\": \"W/\\\"4a302e46-7790-4e46-9d43-0c6791e8efeb\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"brazilsouth\"\ + ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ + \ \"Updating\",\r\n \"resourceGuid\": \"813a8544-d320-4141-b2d6-e7bcc1fb3239\"\ + ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ + 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ + : []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"clitestsubnet1\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1\"\ + ,\r\n \"etag\": \"W/\\\"4a302e46-7790-4e46-9d43-0c6791e8efeb\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n }\r\ + \n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\"\ + : false,\r\n \"enableVmProtection\": false\r\n }\r\n}"} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/brazilsouth/operations/0778d372-2d62-4485-ab0e-b51fa1532c08?api-version=2018-02-01'] + cache-control: [no-cache] + content-length: ['1267'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:09:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/brazilsouth/operations/0778d372-2d62-4485-ab0e-b51fa1532c08?api-version=2018-02-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['30'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:09:59 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/brazilsouth/operations/0778d372-2d62-4485-ab0e-b51fa1532c08?api-version=2018-02-01 + response: + body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['29'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:10:11 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet?api-version=2018-02-01 + response: + body: {string: "{\r\n \"name\": \"clitestvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet\"\ + ,\r\n \"etag\": \"W/\\\"a13a5dfa-b8a3-4fe2-b9cc-0d539ec0c97c\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"brazilsouth\"\ + ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ + \ \"Succeeded\",\r\n \"resourceGuid\": \"813a8544-d320-4141-b2d6-e7bcc1fb3239\"\ + ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ + 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ + : []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"clitestsubnet1\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1\"\ + ,\r\n \"etag\": \"W/\\\"a13a5dfa-b8a3-4fe2-b9cc-0d539ec0c97c\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n }\r\ + \n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\"\ + : false,\r\n \"enableVmProtection\": false\r\n }\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['1269'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:10:12 GMT'] + etag: [W/"a13a5dfa-b8a3-4fe2-b9cc-0d539ec0c97c"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"addressPrefix": "10.0.1.0/24"}, "name": "clitestsubnet2"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet subnet create] + Connection: [keep-alive] + Content-Length: ['74'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2?api-version=2018-02-01 + response: + body: {string: "{\r\n \"name\": \"clitestsubnet2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2\"\ + ,\r\n \"etag\": \"W/\\\"a27e7fda-d02e-41b4-8c96-d450806ac84b\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ + addressPrefix\": \"10.0.1.0/24\"\r\n }\r\n}"} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/brazilsouth/operations/9584d78e-36ae-4802-973f-9035548a0b02?api-version=2018-02-01'] + cache-control: [no-cache] + content-length: ['422'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:10:13 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet subnet create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/brazilsouth/operations/9584d78e-36ae-4802-973f-9035548a0b02?api-version=2018-02-01 + response: + body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['29'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:10:18 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet subnet create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2?api-version=2018-02-01 + response: + body: {string: "{\r\n \"name\": \"clitestsubnet2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2\"\ + ,\r\n \"etag\": \"W/\\\"91d8e25b-1a2e-4ce2-a44d-0af1e91b5f37\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + addressPrefix\": \"10.0.1.0/24\"\r\n }\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['423'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:10:20 GMT'] + etag: [W/"91d8e25b-1a2e-4ce2-a44d-0af1e91b5f37"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''{"properties": {"virtualNetworkSubnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1", + "ignoreMissingVnetServiceEndpoint": true}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server vnet-rule create] + Connection: [keep-alive] + Content-Length: ['309'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerVnetFirewallRule","startTime":"2018-05-08T01:10:24.063Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/f58085f1-10cb-4407-8c87-10141136eab6?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:10:24 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/f58085f1-10cb-4407-8c87-10141136eab6?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: [mysql server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/f58085f1-10cb-4407-8c87-10141136eab6?api-version=2017-12-01 + response: + body: {string: '{"name":"f58085f1-10cb-4407-8c87-10141136eab6","status":"Succeeded","startTime":"2018-05-08T01:10:24.063Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:10: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 server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1","name":"vnet_rule1","type":"Microsoft.DBforMySQL/servers/virtualNetworkRules"}'} + headers: + cache-control: [no-cache] + content-length: ['683'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:10:57 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 server vnet-rule show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1","name":"vnet_rule1","type":"Microsoft.DBforMySQL/servers/virtualNetworkRules"}'} + headers: + cache-control: [no-cache] + content-length: ['683'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:10:59 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: 'b''{"properties": {"virtualNetworkSubnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2", + "ignoreMissingVnetServiceEndpoint": true}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server vnet-rule create] + Connection: [keep-alive] + Content-Length: ['309'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerVnetFirewallRule","startTime":"2018-05-08T01:11:02.78Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/acd29980-7e43-45f7-9d51-222f04c78058?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['89'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:11:02 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/acd29980-7e43-45f7-9d51-222f04c78058?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: [mysql server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/acd29980-7e43-45f7-9d51-222f04c78058?api-version=2017-12-01 + response: + body: {string: '{"name":"acd29980-7e43-45f7-9d51-222f04c78058","status":"Succeeded","startTime":"2018-05-08T01:11:02.78Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:11:33 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 server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2?api-version=2017-12-01 + response: + body: {string: '{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2","name":"vnet_rule2","type":"Microsoft.DBforMySQL/servers/virtualNetworkRules"}'} + headers: + cache-control: [no-cache] + content-length: ['683'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:11:36 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 server vnet-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1","name":"vnet_rule1","type":"Microsoft.DBforMySQL/servers/virtualNetworkRules"},{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2","name":"vnet_rule2","type":"Microsoft.DBforMySQL/servers/virtualNetworkRules"}]}'} + headers: + cache-control: [no-cache] + content-length: ['1379'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:11: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 server vnet-rule delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServerVnetFirewallRule","startTime":"2018-05-08T01:11:41.26Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/d9e714b8-e5f8-48e1-9a77-da80992c7f9b?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:11:41 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/d9e714b8-e5f8-48e1-9a77-da80992c7f9b?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-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server vnet-rule delete] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/d9e714b8-e5f8-48e1-9a77-da80992c7f9b?api-version=2017-12-01 + response: + body: {string: '{"name":"d9e714b8-e5f8-48e1-9a77-da80992c7f9b","status":"Succeeded","startTime":"2018-05-08T01:11:41.26Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:11:58 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 server vnet-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2","name":"vnet_rule2","type":"Microsoft.DBforMySQL/servers/virtualNetworkRules"}]}'} + headers: + cache-control: [no-cache] + content-length: ['695'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:12:00 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 server vnet-rule delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServerVnetFirewallRule","startTime":"2018-05-08T01:12:03.36Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/113d3ca7-6b8a-4b91-bc5e-13a6cd96b564?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:12:02 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/113d3ca7-6b8a-4b91-bc5e-13a6cd96b564?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-deletes: ['14997'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server vnet-rule delete] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/113d3ca7-6b8a-4b91-bc5e-13a6cd96b564?api-version=2017-12-01 + response: + body: {string: '{"name":"113d3ca7-6b8a-4b91-bc5e-13a6cd96b564","status":"Succeeded","startTime":"2018-05-08T01:12:03.36Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01: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 server vnet-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-mysql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/virtualNetworkRules?api-version=2017-12-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:12: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 db list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/databases?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"charset":"utf8","collation":"utf8_general_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/databases/information_schema","name":"information_schema","type":"Microsoft.DBforMySQL/servers/databases"},{"properties":{"charset":"latin1","collation":"latin1_swedish_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/databases/mysql","name":"mysql","type":"Microsoft.DBforMySQL/servers/databases"},{"properties":{"charset":"utf8","collation":"utf8_general_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/databases/performance_schema","name":"performance_schema","type":"Microsoft.DBforMySQL/servers/databases"},{"properties":{"charset":"utf8","collation":"utf8_general_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/databases/sys","name":"sys","type":"Microsoft.DBforMySQL/servers/databases"}]}'} + headers: + cache-control: [no-cache] + content-length: ['1647'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:12:24 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 server configuration show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_slow_admin_statements?api-version=2017-12-01 + response: + body: {string: '{"properties":{"value":"OFF","description":"Include slow administrative + statements in the statements written to the slow query log.","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_slow_admin_statements","name":"log_slow_admin_statements","type":"Microsoft.DBforMySQL/servers/configurations"}'} + headers: + cache-control: [no-cache] + content-length: ['613'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:12:25 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": "ON"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server configuration set] + Connection: [keep-alive] + Content-Length: ['31'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_slow_admin_statements?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpdateElasticServerConfig","startTime":"2018-05-08T01:12:27.09Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/7d95bbfa-dffd-4f53-a88b-7e5d9411cc84?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['79'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:12:26 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/7d95bbfa-dffd-4f53-a88b-7e5d9411cc84?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: [mysql server configuration set] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/7d95bbfa-dffd-4f53-a88b-7e5d9411cc84?api-version=2017-12-01 + response: + body: {string: '{"name":"7d95bbfa-dffd-4f53-a88b-7e5d9411cc84","status":"Succeeded","startTime":"2018-05-08T01:12:27.09Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:12:44 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 server configuration set] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_slow_admin_statements?api-version=2017-12-01 + response: + body: {string: '{"properties":{"value":"ON","description":"Include slow administrative + statements in the statements written to the slow query log.","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF","source":"user-override"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_slow_admin_statements","name":"log_slow_admin_statements","type":"Microsoft.DBforMySQL/servers/configurations"}'} + headers: + cache-control: [no-cache] + content-length: ['611'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:12:47 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": {"source": "system-default"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server configuration set] + Connection: [keep-alive] + Content-Length: ['44'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_slow_admin_statements?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpdateElasticServerConfig","startTime":"2018-05-08T01:12:50.293Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/bea92d9c-5b0d-4fba-9b91-1dcd673301a6?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['80'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:12:50 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/bea92d9c-5b0d-4fba-9b91-1dcd673301a6?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 server configuration set] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/bea92d9c-5b0d-4fba-9b91-1dcd673301a6?api-version=2017-12-01 + response: + body: {string: '{"name":"bea92d9c-5b0d-4fba-9b91-1dcd673301a6","status":"Succeeded","startTime":"2018-05-08T01:12:50.293Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:13:07 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 server configuration set] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_slow_admin_statements?api-version=2017-12-01 + response: + body: {string: '{"properties":{"value":"OFF","description":"Include slow administrative + statements in the statements written to the slow query log.","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_slow_admin_statements","name":"log_slow_admin_statements","type":"Microsoft.DBforMySQL/servers/configurations"}'} + headers: + cache-control: [no-cache] + content-length: ['613'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:13:08 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 server configuration list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"value":"OFF","description":"Indicates + the status of the Event Scheduler.","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF,DISABLED","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/event_scheduler","name":"event_scheduler","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"4","description":"Number + of digits by which to increase the scale of the result of division operations.","defaultValue":"4","dataType":"Integer","allowedValues":"0-30","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/div_precision_increment","name":"div_precision_increment","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"1024","description":"Maximum + allowed result length in bytes for the GROUP_CONCAT().","defaultValue":"1024","dataType":"Integer","allowedValues":"4-16777216","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/group_concat_max_len","name":"group_concat_max_len","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"ON","description":"Whether + innodb adaptive hash indexes are enabled or disabled.","defaultValue":"ON","dataType":"Enumeration","allowedValues":"ON,OFF","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_adaptive_hash_index","name":"innodb_adaptive_hash_index","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"50","description":"The + length of time in seconds an InnoDB transaction waits for a row lock before + giving up.","defaultValue":"50","dataType":"Integer","allowedValues":"1-3600","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_lock_wait_timeout","name":"innodb_lock_wait_timeout","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"1800","description":"Number + of seconds the server waits for activity on an interactive connection before + closing it.","defaultValue":"1800","dataType":"Integer","allowedValues":"10-1800","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/interactive_timeout","name":"interactive_timeout","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"OFF","description":"Logs + queries that are expected to retrieve all rows to slow query log.","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_queries_not_using_indexes","name":"log_queries_not_using_indexes","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"0","description":"Limits + the number of such queries per minute that can be written to the slow query + log.","defaultValue":"0","dataType":"Integer","allowedValues":"0-4294967295","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_throttle_queries_not_using_indexes","name":"log_throttle_queries_not_using_indexes","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"OFF","description":"Include + slow administrative statements in the statements written to the slow query + log.","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_slow_admin_statements","name":"log_slow_admin_statements","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"OFF","description":"When + the slow query log is enabled, this variable enables logging for queries that + have taken more than long_query_time seconds to execute on the slave.","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_slow_slave_statements","name":"log_slow_slave_statements","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"OFF","description":"This + variable applies when binary logging is enabled. It controls whether stored + function creators can be trusted not to create stored functions that will + cause unsafe events to be written to the binary log.","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/log_bin_trust_function_creators","name":"log_bin_trust_function_creators","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"10","description":"If + a query takes longer than this many seconds, the server increments the Slow_queries + status variable.","defaultValue":"10","dataType":"Numeric","allowedValues":"0-1E+100","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/long_query_time","name":"long_query_time","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"0","description":"Can + be used to cause queries which examine fewer than the stated number of rows + not to be logged.","defaultValue":"0","dataType":"Integer","allowedValues":"0-18446744073709551615","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/min_examined_row_limit","name":"min_examined_row_limit","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"OFF","description":"Enable + or disable the slow query log","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/slow_query_log","name":"slow_query_log","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"","description":"The + current server SQL mode.","defaultValue":"","dataType":"Set","allowedValues":",ALLOW_INVALID_DATES,ANSI_QUOTES,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE,IGNORE_SPACE,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION,NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_UNSIGNED_SUBTRACTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY,PAD_CHAR_TO_FULL_LENGTH,PIPES_AS_CONCAT,REAL_AS_FLOAT,STRICT_ALL_TABLES,STRICT_TRANS_TABLES","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/sql_mode","name":"sql_mode","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"120","description":"The + number of seconds the server waits for activity on a noninteractive connection + before closing it.","defaultValue":"120","dataType":"Integer","allowedValues":"60-86400","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/wait_timeout","name":"wait_timeout","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"120","description":"The + number of seconds the server waits for network reading action, especially + for LOAD DATA LOCAL FILE.","defaultValue":"120","dataType":"Integer","allowedValues":"10-3600","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/net_read_timeout","name":"net_read_timeout","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"240","description":"The + number of seconds the server waits for network writing action, especially + for LOAD DATA LOCAL FILE.","defaultValue":"240","dataType":"Integer","allowedValues":"10-3600","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/net_write_timeout","name":"net_write_timeout","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"509875341","description":"The + server ID, used in replication to give each master and slave a unique identity.","defaultValue":"1000","dataType":"Integer","allowedValues":"1000-4294967295","source":"user-override"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/server_id","name":"server_id","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"536870912","description":"The + maximum size of one packet or any generated/intermediate string, or any parameter + sent by the mysql_stmt_send_long_data() C API function.","defaultValue":"536870912","dataType":"Integer","allowedValues":"1024-1073741824","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/max_allowed_packet","name":"max_allowed_packet","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"60","description":"The + number of seconds to wait for more data from the master before the slave considers + the connection broken, aborts the read, and tries to reconnect.","defaultValue":"60","dataType":"Integer","allowedValues":"30-3600","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/slave_net_timeout","name":"slave_net_timeout","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"SYSTEM","description":"The + server time zone","defaultValue":"SYSTEM","dataType":"String","allowedValues":"[+|-][0]{0,1}[0-9]:[0-5][0-9]|[+|-][1][0-2]:[0-5][0-9]|SYSTEM","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/time_zone","name":"time_zone","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"1000","description":"Controls + how many microseconds the binary log commit waits before synchronizing the + binary log file to disk.","defaultValue":"1000","dataType":"Integer","allowedValues":"0,11-1000000","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/binlog_group_commit_sync_delay","name":"binlog_group_commit_sync_delay","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"0","description":"The + maximum number of transactions to wait for before aborting the current delay + as specified by binlog-group-commit-sync-delay.","defaultValue":"0","dataType":"Integer","allowedValues":"0-1000000","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/binlog_group_commit_sync_no_delay_count","name":"binlog_group_commit_sync_no_delay_count","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"latin1","description":"Use + charset_name as the default server character set.","defaultValue":"latin1","dataType":"Enumeration","allowedValues":"BIG5,DEC8,CP850,HP8,KOI8R,LATIN1,LATIN2,SWE7,ASCII,UJIS,SJIS,HEBREW,TIS620,EUCKR,KOI8U,GB2312,GREEK,CP1250,GBK,LATIN5,ARMSCII8,UTF8,UCS2,CP866,KEYBCS2,MACCE,MACROMAN,CP852,LATIN7,UTF8MB4,CP1251,UTF16,CP1256,CP1257,UTF32,BINARY,GEOSTD8,CP932,EUCJPMS","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/character_set_server","name":"character_set_server","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"262144","description":"The + minimum size of the buffer that is used for plain index scans, range index + scans, and joins that do not use indexes and thus perform full table scans.","defaultValue":"262144","dataType":"Integer","allowedValues":"128-2097152","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/join_buffer_size","name":"join_buffer_size","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"2000","description":"The + number of open tables for all threads.","defaultValue":"2000","dataType":"Integer","allowedValues":"1-4000","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/table_open_cache","name":"table_open_cache","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"OFF","description":"InnoDB + stores the data and indexes for each newly created table in a separate .ibd + file instead of the system tablespace.","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_file_per_table","name":"innodb_file_per_table","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"1","description":"If + set to 1, table names are stored in lowercase on disk and comparisons are + not case sensitive. If set to 2, table names are stored as given but compared + in lowercase.","defaultValue":"1","dataType":"Enumeration","allowedValues":"1,2","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/lower_case_table_names","name":"lower_case_table_names","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"OFF","description":"This + option places an upper limit on the total size in bytes of all relay logs + on the slave.","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/slave_compressed_protocol","name":"slave_compressed_protocol","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"200","description":"Sets + an upper limit on I/O activity performed by InnoDB background tasks, such + as flushing pages from the buffer pool and merging data from the change buffer.","defaultValue":"200","dataType":"Integer","allowedValues":"100-1500","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_io_capacity","name":"innodb_io_capacity","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"4","description":"The + number of I/O threads for read operations in InnoDB.","defaultValue":"4","dataType":"Integer","allowedValues":"1-64","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_read_io_threads","name":"innodb_read_io_threads","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"0","description":"InnoDB + tries to keep the number of operating system threads concurrently inside InnoDB + less than or equal to the limit given by this variable.","defaultValue":"0","dataType":"Integer","allowedValues":"0-1000","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_thread_concurrency","name":"innodb_thread_concurrency","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"4","description":"The + number of I/O threads for write operations in InnoDB.","defaultValue":"4","dataType":"Integer","allowedValues":"1-64","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_write_io_threads","name":"innodb_write_io_threads","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"4","description":"The + number of page cleaner threads that flush dirty pages from buffer pool instances.","defaultValue":"4","dataType":"Integer","allowedValues":"1-64","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_page_cleaners","name":"innodb_page_cleaners","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"134217728","description":"Specifies + an upper limit on the size of the temporary log files used during online DDL + operations for InnoDB tables.","defaultValue":"134217728","dataType":"Integer","allowedValues":"65536-2147483648","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_online_alter_log_max_size","name":"innodb_online_alter_log_max_size","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"","description":"A + string to be executed by the server for each client that connects.","defaultValue":"","dataType":"String","allowedValues":"","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/init_connect","name":"init_connect","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"REPEATABLE-READ","description":"The + default transaction isolation level.","defaultValue":"REPEATABLE-READ","dataType":"Enumeration","allowedValues":"READ-UNCOMMITTED,READ-COMMITTED,REPEATABLE-READ,SERIALIZABLE","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/tx_isolation","name":"tx_isolation","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"200","description":"This + variable indicates the number of equality ranges in an equality comparison + condition when the optimizer should switch from using index dives to index + statistics in estimating the number of qualifying rows.","defaultValue":"200","dataType":"Integer","allowedValues":"0-4294967295","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/eq_range_index_dive_limit","name":"eq_range_index_dive_limit","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"37","description":"Specifies + the approximate percentage of the InnoDB buffer pool used for the old block + sublist.","defaultValue":"37","dataType":"Integer","allowedValues":"5-95","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_old_blocks_pct","name":"innodb_old_blocks_pct","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"1000","description":"Non-zero + values protect against the buffer pool being filled by data that is referenced + only for a brief period, such as during a full table scan.","defaultValue":"1000","dataType":"Integer","allowedValues":"0-4294967295","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_old_blocks_time","name":"innodb_old_blocks_time","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"56","description":"Controls + the sensitivity of linear read-ahead that InnoDB uses to prefetch pages into + the buffer pool.","defaultValue":"56","dataType":"Integer","allowedValues":"0-64","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_read_ahead_threshold","name":"innodb_read_ahead_threshold","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"1024","description":"The + cutoff on the size of index values that determines which filesort algorithm + to use.","defaultValue":"1024","dataType":"Integer","allowedValues":"4-8388608","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/max_length_for_sort_data","name":"max_length_for_sort_data","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"100","description":"If + more than this many successive connection requests from a host are interrupted + without a successful connection, the server blocks that host from further + connections.","defaultValue":"100","dataType":"Integer","allowedValues":"1-18446744073709551615","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/max_connect_errors","name":"max_connect_errors","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"10000","description":"Defines + how long InnoDB threads sleep before joining the InnoDB queue, in microseconds.","defaultValue":"10000","dataType":"Integer","allowedValues":"0-1000000","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_thread_sleep_delay","name":"innodb_thread_sleep_delay","type":"Microsoft.DBforMySQL/servers/configurations"},{"properties":{"value":"Barracuda","description":"Indicates + the InnoDB file format for file-per-table tablespaces.","defaultValue":"Barracuda","dataType":"Enumeration","allowedValues":"Antelope,Barracuda","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/innodb_file_format","name":"innodb_file_format","type":"Microsoft.DBforMySQL/servers/configurations"}]}'} + headers: + cache-control: [no-cache] + content-length: ['29201'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:13:12 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": "ON"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server configuration set] + Connection: [keep-alive] + Content-Length: ['31'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/slow_query_log?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpdateElasticServerConfig","startTime":"2018-05-08T01:13:15.197Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/b539dad1-c907-4405-9cbd-d5e4398e2655?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['80'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:13:15 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/b539dad1-c907-4405-9cbd-d5e4398e2655?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 server configuration set] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/b539dad1-c907-4405-9cbd-d5e4398e2655?api-version=2017-12-01 + response: + body: {string: '{"name":"b539dad1-c907-4405-9cbd-d5e4398e2655","status":"Succeeded","startTime":"2018-05-08T01:13:15.197Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:13: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 server configuration set] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/slow_query_log?api-version=2017-12-01 + response: + body: {string: '{"properties":{"value":"ON","description":"Enable or disable the + slow query log","defaultValue":"OFF","dataType":"Enumeration","allowedValues":"ON,OFF","source":"user-override"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/configurations/slow_query_log","name":"slow_query_log","type":"Microsoft.DBforMySQL/servers/configurations"}'} + headers: + cache-control: [no-cache] + content-length: ['538'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:13: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 server-logs list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/logFiles?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"name":"mysql-slow-azuredbclitest000002-2018050801.log","sizeInKB":1,"createdTime":"0001-01-01T00:00:00+00:00","lastModifiedTime":"2018-05-08T01:13:15+00:00","type":"slowlog","url":"https://wasd2prodbrso1fse32.file.core.windows.net/a88cfe32616c46589ff638d007db0e99/serverlogs/mysql-slow-azuredbclitest000002-2018050801.log?sv=2015-04-05&sr=f&sig=bvK3XZXr3vodzFI2eJ9B13b4WSYw9NzXQSTUWBo6UiY%3D&se=2018-05-08T02%3A13%3A36Z&sp=r"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/logFiles/mysql-slow-azuredbclitest000002-2018050801.log","name":"mysql-slow-azuredbclitest000002-2018050801.log","type":"Microsoft.DBforMySQL/servers/logFiles"}]}'} + headers: + cache-control: [no-cache] + content-length: ['1039'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:13: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: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.32] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 08 May 2018 01:13:37 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdNVUJOSlREVUI1QjVXNjJFVVVKSE5EUlZVNEFVVzJCWEszT3w0RDdGMzc0RjMzOTYyRUZBLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + 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} +version: 1 diff --git a/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_mysql_replica_mgmt.yaml b/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_mysql_replica_mgmt.yaml new file mode 100644 index 00000000000..33e46ce0234 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_mysql_replica_mgmt.yaml @@ -0,0 +1,1699 @@ +interactions: +- request: + body: '{"tags": {"use": "az-test"}, "location": "westus"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:42:21 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: '{"sku": {"name": "GP_Gen4_2"}, "properties": {"storageProfile": {}, "administratorLoginPassword": + "SecretPassword123", "administratorLogin": "cloudsa", "createMode": "Default"}, + "location": "brazilsouth"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server create] + Connection: [keep-alive] + Content-Length: ['204'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002?api-version=2017-12-01-preview + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-03-07T06:42:27.5Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/a054d595-6618-443e-ae0a-6077180c7d66?api-version=2017-12-01-preview'] + cache-control: [no-cache] + content-length: ['72'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:42:27 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/a054d595-6618-443e-ae0a-6077180c7d66?api-version=2017-12-01-preview'] + 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 server create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/a054d595-6618-443e-ae0a-6077180c7d66?api-version=2017-12-01-preview + response: + body: {string: '{"name":"a054d595-6618-443e-ae0a-6077180c7d66","status":"InProgress","startTime":"2018-03-07T06:42:27.5Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:43:28 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 server create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/a054d595-6618-443e-ae0a-6077180c7d66?api-version=2017-12-01-preview + response: + body: {string: '{"name":"a054d595-6618-443e-ae0a-6077180c7d66","status":"Succeeded","startTime":"2018-03-07T06:42:27.5Z"}'} + headers: + cache-control: [no-cache] + content-length: ['105'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:44: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: [mysql server create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002?api-version=2017-12-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000002.mysql.database.azure.com","earliestRestoreDate":"2018-03-07T06:52:27.89+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002","name":"azuredbclitest000002","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['822'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:44:33 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 server replica create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002?api-version=2017-12-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000002.mysql.database.azure.com","earliestRestoreDate":"2018-03-07T06:52:27.89+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002","name":"azuredbclitest000002","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['822'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:49: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: 'b''b\''{"sku": {"name": "GP_Gen4_2"}, "properties": {"sourceServerId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002", + "createMode": "Replica"}, "location": "brazilsouth"}\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server replica create] + Connection: [keep-alive] + Content-Length: ['334'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep1000003?api-version=2017-12-01-preview + response: + body: {string: '{"operation":"CreateElasticServerContinuousCopy","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview'] + cache-control: [no-cache] + content-length: ['88'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:49:42 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview'] + 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:50:14 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:50:47 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:51: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: [mysql server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:51:51 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:52:24 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:52: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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:53:27 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:54:00 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:54: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: [mysql server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:55: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: [mysql server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:55: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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:56:06 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:56: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: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:57:08 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:57: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: [mysql server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:58:13 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:58:45 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:59:17 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 06:59:48 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"InProgress","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:00: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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/c88f466b-078e-4b84-8037-d57e5570a248?api-version=2017-12-01-preview + response: + body: {string: '{"name":"c88f466b-078e-4b84-8037-d57e5570a248","status":"Succeeded","startTime":"2018-03-07T06:49:42.057Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:00: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: [mysql server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep1000003?api-version=2017-12-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirep1000003.mysql.database.azure.com","earliestRestoreDate":"2018-03-07T07:00:54.35+00:00","replicationRole":"Replica","primaryServerId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002","replicaCapacity":0},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep1000003","name":"azuredbclirep1000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['1132'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:00: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 server show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002?api-version=2017-12-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000002.mysql.database.azure.com","earliestRestoreDate":"2018-03-07T06:52:27.89+00:00","replicationRole":"Primary","primaryServerId":"","replicaCapacity":5},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002","name":"azuredbclitest000002","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['825'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:00:59 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 server replica list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002/Replicas?api-version=2017-12-01-preview + response: + body: {string: '{"value":[{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirep1000003.mysql.database.azure.com","earliestRestoreDate":"2018-03-07T07:00:54.35+00:00","replicationRole":"Replica","primaryServerId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002","replicaCapacity":0},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep1000003","name":"azuredbclirep1000003","type":"Microsoft.DBforMySQL/servers"}]}'} + headers: + cache-control: [no-cache] + content-length: ['1144'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:01: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: [mysql server replica promote] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep1000003?api-version=2017-12-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirep1000003.mysql.database.azure.com","earliestRestoreDate":"2018-03-07T07:00:54.35+00:00","replicationRole":"Replica","primaryServerId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002","replicaCapacity":0},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep1000003","name":"azuredbclirep1000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['1132'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:01:07 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": {"replicationRole": "None"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server replica promote] + Connection: [keep-alive] + Content-Length: ['43'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep1000003?api-version=2017-12-01-preview + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-03-07T07:01:08.613Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/e5920aa2-6cad-494e-bc20-f859c6682065?api-version=2017-12-01-preview'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:01:09 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/e5920aa2-6cad-494e-bc20-f859c6682065?api-version=2017-12-01-preview'] + 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: [mysql server replica promote] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/e5920aa2-6cad-494e-bc20-f859c6682065?api-version=2017-12-01-preview + response: + body: {string: '{"name":"e5920aa2-6cad-494e-bc20-f859c6682065","status":"Succeeded","startTime":"2018-03-07T07:01:08.613Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:02:10 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 server replica promote] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep1000003?api-version=2017-12-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirep1000003.mysql.database.azure.com","earliestRestoreDate":"2018-03-07T07:00:54.35+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep1000003","name":"azuredbclirep1000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['915'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:02: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 server show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002?api-version=2017-12-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000002.mysql.database.azure.com","earliestRestoreDate":"2018-03-07T06:52:27.89+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002","name":"azuredbclitest000002","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['822'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:02:16 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 server replica create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002?api-version=2017-12-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000002.mysql.database.azure.com","earliestRestoreDate":"2018-03-07T06:52:27.89+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002","name":"azuredbclitest000002","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['822'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:02: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: 'b''b\''{"sku": {"name": "GP_Gen4_2"}, "properties": {"sourceServerId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002", + "createMode": "Replica"}, "location": "brazilsouth"}\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server replica create] + Connection: [keep-alive] + Content-Length: ['334'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep2000004?api-version=2017-12-01-preview + response: + body: {string: '{"operation":"CreateElasticServerContinuousCopy","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview'] + cache-control: [no-cache] + content-length: ['88'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:02:26 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview'] + 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: [mysql server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:02:58 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:03:30 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:04: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: [mysql server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:04: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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:05:05 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:05: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: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:06:08 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:06: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: [mysql server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:07:10 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:07:42 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:08:13 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:08:45 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"InProgress","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:09:15 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/50a188dc-23aa-4af3-b1ce-a7f21adcaa60?api-version=2017-12-01-preview + response: + body: {string: '{"name":"50a188dc-23aa-4af3-b1ce-a7f21adcaa60","status":"Succeeded","startTime":"2018-03-07T07:02:25.533Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:09:48 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 server replica create] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep2000004?api-version=2017-12-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirep2000004.mysql.database.azure.com","earliestRestoreDate":"2018-03-07T07:12:26.66+00:00","replicationRole":"Replica","primaryServerId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002","replicaCapacity":0},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep2000004","name":"azuredbclirep2000004","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['1132'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:09:50 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 server delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000002?api-version=2017-12-01-preview + response: + body: {string: '{"operation":"DropElasticServer","startTime":"2018-03-07T07:09:56.783Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/4a8861ed-a2cc-4d8c-992e-89c197d3ff4e?api-version=2017-12-01-preview'] + cache-control: [no-cache] + content-length: ['72'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:09:57 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/4a8861ed-a2cc-4d8c-992e-89c197d3ff4e?api-version=2017-12-01-preview'] + 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 server delete] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/4a8861ed-a2cc-4d8c-992e-89c197d3ff4e?api-version=2017-12-01-preview + response: + body: {string: '{"name":"4a8861ed-a2cc-4d8c-992e-89c197d3ff4e","status":"Succeeded","startTime":"2018-03-07T07:09:56.783Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:10:13 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 server show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep2000004?api-version=2017-12-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirep2000004.mysql.database.azure.com","earliestRestoreDate":"2018-03-07T07:12:26.66+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep2000004","name":"azuredbclirep2000004","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['915'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:15: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: [mysql server delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep1000003?api-version=2017-12-01-preview + response: + body: {string: '{"operation":"DropElasticServer","startTime":"2018-03-07T07:15:23.507Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/12e342cf-f3ea-4033-8b0c-f3d0a4f37fe2?api-version=2017-12-01-preview'] + cache-control: [no-cache] + content-length: ['72'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:15:23 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/12e342cf-f3ea-4033-8b0c-f3d0a4f37fe2?api-version=2017-12-01-preview'] + 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 server delete] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/12e342cf-f3ea-4033-8b0c-f3d0a4f37fe2?api-version=2017-12-01-preview + response: + body: {string: '{"name":"12e342cf-f3ea-4033-8b0c-f3d0a4f37fe2","status":"Succeeded","startTime":"2018-03-07T07:15:23.507Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:15: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: [mysql server delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclirep2000004?api-version=2017-12-01-preview + response: + body: {string: '{"operation":"DropElasticServer","startTime":"2018-03-07T07:15:45.32Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/f264a2d2-9a8a-4035-b217-f36ce9fec450?api-version=2017-12-01-preview'] + cache-control: [no-cache] + content-length: ['71'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:15:45 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/operationResults/f264a2d2-9a8a-4035-b217-f36ce9fec450?api-version=2017-12-01-preview'] + 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: [mysql server delete] + Connection: [keep-alive] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 azure-mgmt-rdbms/2017-12-01-preview Azure-SDK-For-Python + AZURECLI/2.0.27] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/brazilsouth/azureAsyncOperation/f264a2d2-9a8a-4035-b217-f36ce9fec450?api-version=2017-12-01-preview + response: + body: {string: '{"name":"f264a2d2-9a8a-4035-b217-f36ce9fec450","status":"Succeeded","startTime":"2018-03-07T07:15:45.32Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 07 Mar 2018 07:16: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: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.21 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.27] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 07 Mar 2018 07:16:10 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdQQkVEUVVRTjZYUlgzTDdLMlJQTVlKQ1BKRkZONkg3WEkyQnwxNzQyMUU0QTc3NUVEQUJCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_mysql_server_mgmt.yaml b/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_mysql_server_mgmt.yaml new file mode 100644 index 00000000000..34f67b1a21d --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_mysql_server_mgmt.yaml @@ -0,0 +1,1965 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-04-03T23:36:48Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.31] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-03T23:36:48Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:36:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 201, message: Created} +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-04-03T23:36:50Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.31] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002","name":"clitest.rg000002","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-03T23:36:50Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:36:50 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: '{"sku": {"name": "GP_Gen5_2"}, "properties": {"storageProfile": {"backupRetentionDays": + 10, "geoRedundantBackup": "Enabled"}, "createMode": "Default", "administratorLogin": + "cloudsa", "administratorLoginPassword": "SecretPassword123"}, "location": "koreasouth", + "tags": {"key": "1"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server create] + Connection: [keep-alive] + Content-Length: ['283'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-03T23:36:52.827Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/506c8013-5118-482c-8f8b-83d8b126e6e5?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:36:52 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/operationResults/506c8013-5118-482c-8f8b-83d8b126e6e5?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 server create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/506c8013-5118-482c-8f8b-83d8b126e6e5?api-version=2017-12-01 + response: + body: {string: '{"name":"506c8013-5118-482c-8f8b-83d8b126e6e5","status":"InProgress","startTime":"2018-04-03T23:36:52.827Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:37: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 server create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/506c8013-5118-482c-8f8b-83d8b126e6e5?api-version=2017-12-01 + response: + body: {string: '{"name":"506c8013-5118-482c-8f8b-83d8b126e6e5","status":"InProgress","startTime":"2018-04-03T23:36:52.827Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:38: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 server create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/506c8013-5118-482c-8f8b-83d8b126e6e5?api-version=2017-12-01 + response: + body: {string: '{"name":"506c8013-5118-482c-8f8b-83d8b126e6e5","status":"Succeeded","startTime":"2018-04-03T23:36:52.827Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:39: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 server create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['934'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:39:57 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 server show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['934'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:39:58 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 server update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['934'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:39:58 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": {"storageProfile": {"backupRetentionDays": 10, "geoRedundantBackup": + "Enabled", "storageMB": 5120}, "administratorLoginPassword": "SecretPassword456", + "sslEnforcement": "Disabled"}, "tags": {"key": "2"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server update] + Connection: [keep-alive] + Content-Length: ['218'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-03T23:40:01.827Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/500b151c-e057-4a60-9d9e-cc2e62ede692?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:40:00 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/operationResults/500b151c-e057-4a60-9d9e-cc2e62ede692?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: ['1196'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/500b151c-e057-4a60-9d9e-cc2e62ede692?api-version=2017-12-01 + response: + body: {string: '{"name":"500b151c-e057-4a60-9d9e-cc2e62ede692","status":"Succeeded","startTime":"2018-04-03T23:40:01.827Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:41: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: [mysql server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['935'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:41: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: [mysql server update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['935'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:41:04 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: '{"sku": {"name": "gp_Gen5_4", "tier": "GeneralPurpose", "capacity": 4, + "family": "Gen5"}, "properties": {"storageProfile": {"backupRetentionDays": + 10, "geoRedundantBackup": "Enabled", "storageMB": 5120}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server update] + Connection: [keep-alive] + Content-Length: ['204'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-03T23:41:07.197Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/3e9a0d49-c528-4202-9ac4-f10d0f4237fc?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:41:06 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/operationResults/3e9a0d49-c528-4202-9ac4-f10d0f4237fc?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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/3e9a0d49-c528-4202-9ac4-f10d0f4237fc?api-version=2017-12-01 + response: + body: {string: '{"name":"3e9a0d49-c528-4202-9ac4-f10d0f4237fc","status":"InProgress","startTime":"2018-04-03T23:41:07.197Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:42:08 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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/3e9a0d49-c528-4202-9ac4-f10d0f4237fc?api-version=2017-12-01 + response: + body: {string: '{"name":"3e9a0d49-c528-4202-9ac4-f10d0f4237fc","status":"Succeeded","startTime":"2018-04-03T23:41:07.197Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:43:08 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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['935'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:43:10 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 server show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['935'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:43: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 server update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['935'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:43:12 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: '{"sku": {"name": "gp_Gen5_2", "tier": "GeneralPurpose", "capacity": 2, + "family": "Gen5"}, "properties": {"storageProfile": {"backupRetentionDays": + 10, "geoRedundantBackup": "Enabled", "storageMB": 5120}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server update] + Connection: [keep-alive] + Content-Length: ['204'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-03T23:43:15.927Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/e6d123b7-f64e-4a57-9687-f06cec3cfe98?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:43:15 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/operationResults/e6d123b7-f64e-4a57-9687-f06cec3cfe98?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: [mysql server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/e6d123b7-f64e-4a57-9687-f06cec3cfe98?api-version=2017-12-01 + response: + body: {string: '{"name":"e6d123b7-f64e-4a57-9687-f06cec3cfe98","status":"InProgress","startTime":"2018-04-03T23:43:15.927Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:44:17 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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/e6d123b7-f64e-4a57-9687-f06cec3cfe98?api-version=2017-12-01 + response: + body: {string: '{"name":"e6d123b7-f64e-4a57-9687-f06cec3cfe98","status":"InProgress","startTime":"2018-04-03T23:43:15.927Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:45:18 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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/e6d123b7-f64e-4a57-9687-f06cec3cfe98?api-version=2017-12-01 + response: + body: {string: '{"name":"e6d123b7-f64e-4a57-9687-f06cec3cfe98","status":"Succeeded","startTime":"2018-04-03T23:43:15.927Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:46:18 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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['935'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:46: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 server update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['935'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:46: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": {"storageProfile": {"backupRetentionDays": 10, "geoRedundantBackup": + "Enabled", "storageMB": 5120}, "sslEnforcement": "Enabled"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server update] + Connection: [keep-alive] + Content-Length: ['144'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-03T23:46:23.957Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/446cb6f8-6755-40ac-b203-4b4f99804e3c?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:46:23 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/operationResults/446cb6f8-6755-40ac-b203-4b4f99804e3c?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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/446cb6f8-6755-40ac-b203-4b4f99804e3c?api-version=2017-12-01 + response: + body: {string: '{"name":"446cb6f8-6755-40ac-b203-4b4f99804e3c","status":"Succeeded","startTime":"2018-04-03T23:46:23.957Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:47:25 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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['934'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:47:25 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 server update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['934'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:47:26 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": {"storageProfile": {"backupRetentionDays": 10, "geoRedundantBackup": + "Enabled", "storageMB": 5120}}, "tags": {"key": "3"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server update] + Connection: [keep-alive] + Content-Length: ['137'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-03T23:47:29.643Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/ea613ae3-570a-4d16-8dd5-c99ba7b8b5e3?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:47:30 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/operationResults/ea613ae3-570a-4d16-8dd5-c99ba7b8b5e3?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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/ea613ae3-570a-4d16-8dd5-c99ba7b8b5e3?api-version=2017-12-01 + response: + body: {string: '{"name":"ea613ae3-570a-4d16-8dd5-c99ba7b8b5e3","status":"Succeeded","startTime":"2018-04-03T23:47:29.643Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:48: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: [mysql server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['934'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:48: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 server restore] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['934'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:53:33 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: 'b''b\''{"properties": {"createMode": "PointInTimeRestore", "sourceServerId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003", + "restorePointInTime": "2018-04-03T23:53:33.076463Z"}, "location": "koreasouth"}\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server restore] + Connection: [keep-alive] + Content-Length: ['398'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforMySQL/servers/azuredbclirestore000004?api-version=2017-12-01 + response: + body: {string: '{"operation":"RestoreElasticServer","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['75'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:53:35 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/operationResults/698f94d9-f0af-46f8-aa8c-6b46bfe23346?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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:53:46 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:53:57 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:54:08 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:54: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: [mysql server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:54:30 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:54: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: [mysql server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:54: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: [mysql server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:55: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: [mysql server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:55:14 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:55:24 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:55:36 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:55:47 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:55:58 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:56:09 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:56: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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:56: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: [mysql server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:56:42 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:56: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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:57:04 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:57:15 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:57:26 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:57: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: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"InProgress","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:57: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: [mysql server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/698f94d9-f0af-46f8-aa8c-6b46bfe23346?api-version=2017-12-01 + response: + body: {string: '{"name":"698f94d9-f0af-46f8-aa8c-6b46bfe23346","status":"Succeeded","startTime":"2018-04-03T23:53:35.703Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:57:59 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforMySQL/servers/azuredbclirestore000004?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirestore000004.mysql.database.azure.com","earliestRestoreDate":"2018-04-04T00:03:35.983+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforMySQL/servers/azuredbclirestore000004","name":"azuredbclirestore000004","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['915'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58:00 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 server georestore] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"None","primaryServerId":"","replicaCapacity":5},"location":"koreasouth","tags":{"key":"3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['934'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58: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: 'b''b\''{"sku": {"name": "GP_Gen5_2"}, "properties": {"storageProfile": + {"backupRetentionDays": 20, "geoRedundantBackup": "Disabled"}, "createMode": + "GeoRestore", "sourceServerId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003"}, + "location": "koreasouth"}\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server georestore] + Connection: [keep-alive] + Content-Length: ['448'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforMySQL/servers/azuredbcligeorestore000005?api-version=2017-12-01 + response: + body: {string: '{"operation":"RestoreElasticServer","startTime":"2018-04-03T23:58:05.637Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/aa4982f8-5366-48d9-b2f3-3cdc44220512?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['75'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58:05 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/operationResults/aa4982f8-5366-48d9-b2f3-3cdc44220512?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 server georestore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/aa4982f8-5366-48d9-b2f3-3cdc44220512?api-version=2017-12-01 + response: + body: {string: '{"name":"aa4982f8-5366-48d9-b2f3-3cdc44220512","status":"Failed","startTime":"2018-04-03T23:58:05.637Z","error":{"code":"SubscriptionDoesNotHaveServer","message":"Subscription + ''707595a1-1498-4b7d-9771-cf0455939d2c'' does not have the server ''azuredbclitest000003''."}}'} + headers: + cache-control: [no-cache] + content-length: ['309'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58:16 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 server list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforMySQL/servers?api-version=2017-12-01 + response: + body: {string: '{"value":[{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirestore000004.mysql.database.azure.com","earliestRestoreDate":"2018-04-04T00:03:35.983+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforMySQL/servers/azuredbclirestore000004","name":"azuredbclirestore000004","type":"Microsoft.DBforMySQL/servers"}]}'} + headers: + cache-control: [no-cache] + content-length: ['903'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58:17 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 server list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/servers?api-version=2017-12-01 + response: + body: {string: '{"value":[{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"shinim","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"marketplacetesting.mysql.database.azure.com","earliestRestoreDate":"2018-03-27T23:58:19.3380997+00:00","replicationRole":"","primaryServerId":""},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OrcasGATesting/providers/Microsoft.DBforMySQL/servers/marketplacetesting","name":"marketplacetesting","type":"Microsoft.DBforMySQL/servers"},{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.mysql.database.azure.com","earliestRestoreDate":"2018-04-03T23:46:53.297+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforMySQL/servers"},{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirestore000004.mysql.database.azure.com","earliestRestoreDate":"2018-04-04T00:03:35.983+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforMySQL/servers/azuredbclirestore000004","name":"azuredbclirestore000004","type":"Microsoft.DBforMySQL/servers"},{"sku":{"name":"GP_Gen5_8","tier":"GeneralPurpose","family":"Gen5","capacity":8},"properties":{"administratorLogin":"rwerwef","storageProfile":{"storageMB":771072,"backupRetentionDays":29,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"restorenortheurope.mysql.database.azure.com","earliestRestoreDate":"2018-03-21T23:15:35.6+00:00","replicationRole":"","primaryServerId":""},"location":"northeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/revatest/providers/Microsoft.DBforMySQL/servers/restorenortheurope","name":"restorenortheurope","type":"Microsoft.DBforMySQL/servers"},{"sku":{"name":"GP_Gen5_8","tier":"GeneralPurpose","family":"Gen5","capacity":8},"properties":{"administratorLogin":"rwerwef","storageProfile":{"storageMB":771072,"backupRetentionDays":29,"geoRedundantBackup":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"restoreonotnth.mysql.database.azure.com","earliestRestoreDate":"2018-03-21T23:28:08.203+00:00","replicationRole":"","primaryServerId":""},"location":"northeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/revatest/providers/Microsoft.DBforMySQL/servers/restoreonotnth","name":"restoreonotnth","type":"Microsoft.DBforMySQL/servers"}]}'} + headers: + cache-control: [no-cache] + content-length: ['3886'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58:18 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-original-request-ids: [11763038-ba3a-47b3-8be2-8bd78b977d0e, f28a011f-a6b2-46e9-93c0-9d3ba7839b6b, + 14d277bb-7f7c-47cf-a7ef-7af945162de2] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServer","startTime":"2018-04-03T23:58:20.87Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/e3ca35e6-46a8-4420-9516-44d1b9c7ee62?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['71'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58:21 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/operationResults/e3ca35e6-46a8-4420-9516-44d1b9c7ee62?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: ['1196'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [mysql server delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/e3ca35e6-46a8-4420-9516-44d1b9c7ee62?api-version=2017-12-01 + response: + body: {string: '{"name":"e3ca35e6-46a8-4420-9516-44d1b9c7ee62","status":"Succeeded","startTime":"2018-04-03T23:58:20.87Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58:36 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 server delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforMySQL/servers/azuredbclirestore000004?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServer","startTime":"2018-04-03T23:58:39.087Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/f7b1e156-9d9f-41bd-befb-d21091479268?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['72'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58:38 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/operationResults/f7b1e156-9d9f-41bd-befb-d21091479268?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 server delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/koreasouth/azureAsyncOperation/f7b1e156-9d9f-41bd-befb-d21091479268?api-version=2017-12-01 + response: + body: {string: '{"name":"f7b1e156-9d9f-41bd-befb-d21091479268","status":"Succeeded","startTime":"2018-04-03T23:58:39.087Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58: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 server list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforMySQL/servers?api-version=2017-12-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58:55 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 server list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforMySQL/servers?api-version=2017-12-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58: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: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.31] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 03 Apr 2018 23:58:56 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkc3VlhaU1NIRkVONVhXTk8zV1ZJTEtRUVlKVklHTzczUVhESXxCM0RCNzgxOTc1NThBODIzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.31] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 03 Apr 2018 23:58:57 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdaWlJQNjJYQklRSE8yTDdJRTNKUU1GSElHQ0cyUFZGR1VYTHw1OEQyRTVFQjY0MkQ1MjhGLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_postgres_proxy_resources_mgmt.yaml b/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_postgres_proxy_resources_mgmt.yaml new file mode 100644 index 00000000000..57aaad34cee --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_postgres_proxy_resources_mgmt.yaml @@ -0,0 +1,1984 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-05-08T01:13:38Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-05-08T01:13:38Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:13:39 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: '{"sku": {"name": "GP_Gen5_2"}, "properties": {"storageProfile": {}, "createMode": + "Default", "administratorLogin": "cloudsa", "administratorLoginPassword": "SecretPassword123"}, + "location": "brazilsouth"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server create] + Connection: [keep-alive] + Content-Length: ['204'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-05-08T01:13:42.4Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/5f2a2439-db58-4c5a-9fa0-0c2032627b07?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['72'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:13:41 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/5f2a2439-db58-4c5a-9fa0-0c2032627b07?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: [postgres server create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/5f2a2439-db58-4c5a-9fa0-0c2032627b07?api-version=2017-12-01 + response: + body: {string: '{"name":"5f2a2439-db58-4c5a-9fa0-0c2032627b07","status":"InProgress","startTime":"2018-05-08T01:13:42.4Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:14:43 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 server create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/5f2a2439-db58-4c5a-9fa0-0c2032627b07?api-version=2017-12-01 + response: + body: {string: '{"name":"5f2a2439-db58-4c5a-9fa0-0c2032627b07","status":"Succeeded","startTime":"2018-05-08T01:13:42.4Z"}'} + headers: + cache-control: [no-cache] + content-length: ['105'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:15:45 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 server create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000002.postgres.database.azure.com","earliestRestoreDate":"2018-05-08T01:23:42.76+00:00","replicationRole":"","primaryServerId":""},"location":"brazilsouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002","name":"azuredbclitest000002","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['904'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:15:46 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": "255.255.255.255"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server firewall-rule create] + Connection: [keep-alive] + Content-Length: ['80'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2018-05-08T01:15:50.333Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/80609a24-6eaa-4ed9-9ad1-4431159970ac?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:15:49 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/80609a24-6eaa-4ed9-9ad1-4431159970ac?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 server firewall-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/80609a24-6eaa-4ed9-9ad1-4431159970ac?api-version=2017-12-01 + response: + body: {string: '{"name":"80609a24-6eaa-4ed9-9ad1-4431159970ac","status":"Succeeded","startTime":"2018-05-08T01:15:50.333Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16:07 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 server firewall-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['426'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16:08 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 server firewall-rule show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['426'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16:10 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 server firewall-rule update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['426'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16:12 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": "123.123.123.123", "endIpAddress": "123.123.123.124"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server firewall-rule update] + Connection: [keep-alive] + Content-Length: ['88'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2018-05-08T01:16:15.25Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/8ec202e1-036b-4f08-800a-bac9be74358f?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['86'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16:14 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/8ec202e1-036b-4f08-800a-bac9be74358f?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 server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/8ec202e1-036b-4f08-800a-bac9be74358f?api-version=2017-12-01 + response: + body: {string: '{"name":"8ec202e1-036b-4f08-800a-bac9be74358f","status":"Succeeded","startTime":"2018-05-08T01:16:15.25Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16: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: [postgres server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"123.123.123.123","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['434'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16: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: [postgres server firewall-rule update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"123.123.123.123","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['434'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16: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: '{"properties": {"startIpAddress": "0.0.0.0", "endIpAddress": "123.123.123.124"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server firewall-rule update] + Connection: [keep-alive] + Content-Length: ['80'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2018-05-08T01:16:38.547Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/b81e1e4b-90bf-4613-90b6-ee58bf0b5b3a?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16:37 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/b81e1e4b-90bf-4613-90b6-ee58bf0b5b3a?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: [postgres server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/b81e1e4b-90bf-4613-90b6-ee58bf0b5b3a?api-version=2017-12-01 + response: + body: {string: '{"name":"b81e1e4b-90bf-4613-90b6-ee58bf0b5b3a","status":"Succeeded","startTime":"2018-05-08T01:16:38.547Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16: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: [postgres server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['426'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16:57 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 server firewall-rule update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['426'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:16:59 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": "255.255.255.255"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server firewall-rule update] + Connection: [keep-alive] + Content-Length: ['80'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2018-05-08T01:17:02.153Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/89b985c3-9ee6-4298-bc2c-140a2746e7c7?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:17:02 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/89b985c3-9ee6-4298-bc2c-140a2746e7c7?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: [postgres server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/89b985c3-9ee6-4298-bc2c-140a2746e7c7?api-version=2017-12-01 + response: + body: {string: '{"name":"89b985c3-9ee6-4298-bc2c-140a2746e7c7","status":"Succeeded","startTime":"2018-05-08T01:17:02.153Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:17:18 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 server firewall-rule update] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['426'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:17: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: '{"properties": {"startIpAddress": "123.123.123.123", "endIpAddress": "123.123.123.124"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server firewall-rule create] + Connection: [keep-alive] + Content-Length: ['88'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule2?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2018-05-08T01:17:23.817Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/0ac42686-1c54-46ac-8e6d-c5250bc5010e?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:17:23 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/0ac42686-1c54-46ac-8e6d-c5250bc5010e?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: [postgres server firewall-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/0ac42686-1c54-46ac-8e6d-c5250bc5010e?api-version=2017-12-01 + response: + body: {string: '{"name":"0ac42686-1c54-46ac-8e6d-c5250bc5010e","status":"Succeeded","startTime":"2018-05-08T01:17:23.817Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:17: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 server firewall-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule2?api-version=2017-12-01 + response: + body: {string: '{"properties":{"startIpAddress":"123.123.123.123","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule2","name":"rule2","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}'} + headers: + cache-control: [no-cache] + content-length: ['434'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:17:42 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 server firewall-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1","name":"rule1","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"},{"properties":{"startIpAddress":"123.123.123.123","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule2","name":"rule2","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}]}'} + headers: + cache-control: [no-cache] + content-length: ['873'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:17:44 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 server firewall-rule delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServerFirewallRule","startTime":"2018-05-08T01:17:47.343Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/ecd378bf-1d87-4d5b-9f97-1843ef92f29b?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['84'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:17:46 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/ecd378bf-1d87-4d5b-9f97-1843ef92f29b?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-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server firewall-rule delete] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/ecd378bf-1d87-4d5b-9f97-1843ef92f29b?api-version=2017-12-01 + response: + body: {string: '{"name":"ecd378bf-1d87-4d5b-9f97-1843ef92f29b","status":"Succeeded","startTime":"2018-05-08T01:17:47.343Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18: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 server firewall-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"startIpAddress":"123.123.123.123","endIpAddress":"123.123.123.124"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule2","name":"rule2","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}]}'} + headers: + cache-control: [no-cache] + content-length: ['446'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:05 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 server firewall-rule delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules/rule2?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServerFirewallRule","startTime":"2018-05-08T01:18:09.127Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/0f23f39a-e8d9-4bd6-b383-9df06239e97e?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['84'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:08 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/0f23f39a-e8d9-4bd6-b383-9df06239e97e?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-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server firewall-rule delete] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/0f23f39a-e8d9-4bd6-b383-9df06239e97e?api-version=2017-12-01 + response: + body: {string: '{"name":"0f23f39a-e8d9-4bd6-b383-9df06239e97e","status":"Succeeded","startTime":"2018-05-08T01:18:09.127Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:26 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 server firewall-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/firewallRules?api-version=2017-12-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:27 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: '{"location": "brazilsouth", "tags": {}, "properties": {"addressSpace": + {"addressPrefixes": ["10.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"properties": + {"addressPrefix": "10.0.0.0/24"}, "name": "clitestsubnet1"}]}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + Content-Length: ['217'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet?api-version=2018-02-01 + response: + body: {string: "{\r\n \"name\": \"clitestvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet\"\ + ,\r\n \"etag\": \"W/\\\"58b5ff08-b387-48b9-a31e-27c31dbc1548\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"brazilsouth\"\ + ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ + \ \"Updating\",\r\n \"resourceGuid\": \"bd558006-dcc5-4346-9b68-8441d805d563\"\ + ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ + 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ + : []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"clitestsubnet1\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1\"\ + ,\r\n \"etag\": \"W/\\\"58b5ff08-b387-48b9-a31e-27c31dbc1548\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n }\r\ + \n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\"\ + : false,\r\n \"enableVmProtection\": false\r\n }\r\n}"} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/brazilsouth/operations/59236a0e-d5eb-4769-8d07-cb28b0a433f0?api-version=2018-02-01'] + cache-control: [no-cache] + content-length: ['1267'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/brazilsouth/operations/59236a0e-d5eb-4769-8d07-cb28b0a433f0?api-version=2018-02-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['30'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:34 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/brazilsouth/operations/59236a0e-d5eb-4769-8d07-cb28b0a433f0?api-version=2018-02-01 + response: + body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['29'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:46 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet?api-version=2018-02-01 + response: + body: {string: "{\r\n \"name\": \"clitestvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet\"\ + ,\r\n \"etag\": \"W/\\\"4aa41f58-9273-401f-ae95-a1a5588538f3\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"brazilsouth\"\ + ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ + \ \"Succeeded\",\r\n \"resourceGuid\": \"bd558006-dcc5-4346-9b68-8441d805d563\"\ + ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ + 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ + : []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"clitestsubnet1\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1\"\ + ,\r\n \"etag\": \"W/\\\"4aa41f58-9273-401f-ae95-a1a5588538f3\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n }\r\ + \n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\"\ + : false,\r\n \"enableVmProtection\": false\r\n }\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['1269'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:47 GMT'] + etag: [W/"4aa41f58-9273-401f-ae95-a1a5588538f3"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"addressPrefix": "10.0.1.0/24"}, "name": "clitestsubnet2"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet subnet create] + Connection: [keep-alive] + Content-Length: ['74'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2?api-version=2018-02-01 + response: + body: {string: "{\r\n \"name\": \"clitestsubnet2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2\"\ + ,\r\n \"etag\": \"W/\\\"fc36f6f0-509d-4642-808e-a4cb4cb5c45c\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ + addressPrefix\": \"10.0.1.0/24\"\r\n }\r\n}"} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/brazilsouth/operations/17b836c5-e3e9-42ef-b56c-4fdaf8190314?api-version=2018-02-01'] + cache-control: [no-cache] + content-length: ['422'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet subnet create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/brazilsouth/operations/17b836c5-e3e9-42ef-b56c-4fdaf8190314?api-version=2018-02-01 + response: + body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['29'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet subnet create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 networkmanagementclient/2.0.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2?api-version=2018-02-01 + response: + body: {string: "{\r\n \"name\": \"clitestsubnet2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2\"\ + ,\r\n \"etag\": \"W/\\\"7c792e1e-9c86-4c06-bff9-5d65d44455f0\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + addressPrefix\": \"10.0.1.0/24\"\r\n }\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['423'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:55 GMT'] + etag: [W/"7c792e1e-9c86-4c06-bff9-5d65d44455f0"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''{"properties": {"virtualNetworkSubnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1", + "ignoreMissingVnetServiceEndpoint": true}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server vnet-rule create] + Connection: [keep-alive] + Content-Length: ['309'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerVnetFirewallRule","startTime":"2018-05-08T01:18:59.46Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/1eaf03a8-3641-49c8-912d-6da27a86f719?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['89'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:18:58 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/1eaf03a8-3641-49c8-912d-6da27a86f719?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 server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/1eaf03a8-3641-49c8-912d-6da27a86f719?api-version=2017-12-01 + response: + body: {string: '{"name":"1eaf03a8-3641-49c8-912d-6da27a86f719","status":"InProgress","startTime":"2018-05-08T01:18:59.46Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:19:30 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 server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/1eaf03a8-3641-49c8-912d-6da27a86f719?api-version=2017-12-01 + response: + body: {string: '{"name":"1eaf03a8-3641-49c8-912d-6da27a86f719","status":"InProgress","startTime":"2018-05-08T01:18:59.46Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:20: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 server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/1eaf03a8-3641-49c8-912d-6da27a86f719?api-version=2017-12-01 + response: + body: {string: '{"name":"1eaf03a8-3641-49c8-912d-6da27a86f719","status":"InProgress","startTime":"2018-05-08T01:18:59.46Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:20:33 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 server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/1eaf03a8-3641-49c8-912d-6da27a86f719?api-version=2017-12-01 + response: + body: {string: '{"name":"1eaf03a8-3641-49c8-912d-6da27a86f719","status":"InProgress","startTime":"2018-05-08T01:18:59.46Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:21:06 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 server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/1eaf03a8-3641-49c8-912d-6da27a86f719?api-version=2017-12-01 + response: + body: {string: '{"name":"1eaf03a8-3641-49c8-912d-6da27a86f719","status":"Succeeded","startTime":"2018-05-08T01:18:59.46Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:21: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: [postgres server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1","name":"vnet_rule1","type":"Microsoft.DBforPostgreSQL/servers/virtualNetworkRules"}'} + headers: + cache-control: [no-cache] + content-length: ['693'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:21: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 server vnet-rule show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1?api-version=2017-12-01 + response: + body: {string: '{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1","name":"vnet_rule1","type":"Microsoft.DBforPostgreSQL/servers/virtualNetworkRules"}'} + headers: + cache-control: [no-cache] + content-length: ['693'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:21:42 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: 'b''{"properties": {"virtualNetworkSubnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2", + "ignoreMissingVnetServiceEndpoint": true}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server vnet-rule create] + Connection: [keep-alive] + Content-Length: ['309'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServerVnetFirewallRule","startTime":"2018-05-08T01:21:45.68Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/52a3cd9f-c440-4216-989d-d0f64c0c82cb?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['89'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:21:45 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/52a3cd9f-c440-4216-989d-d0f64c0c82cb?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: [postgres server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/52a3cd9f-c440-4216-989d-d0f64c0c82cb?api-version=2017-12-01 + response: + body: {string: '{"name":"52a3cd9f-c440-4216-989d-d0f64c0c82cb","status":"Succeeded","startTime":"2018-05-08T01:21:45.68Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:22:17 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 server vnet-rule create] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2?api-version=2017-12-01 + response: + body: {string: '{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2","name":"vnet_rule2","type":"Microsoft.DBforPostgreSQL/servers/virtualNetworkRules"}'} + headers: + cache-control: [no-cache] + content-length: ['693'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:22:18 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 server vnet-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet1","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1","name":"vnet_rule1","type":"Microsoft.DBforPostgreSQL/servers/virtualNetworkRules"},{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2","name":"vnet_rule2","type":"Microsoft.DBforPostgreSQL/servers/virtualNetworkRules"}]}'} + headers: + cache-control: [no-cache] + content-length: ['1399'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:22: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: [postgres server vnet-rule delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule1?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServerVnetFirewallRule","startTime":"2018-05-08T01:22:24.033Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/ef1391ab-04fe-445e-9b07-61d258b71fcf?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['88'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:22:23 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/ef1391ab-04fe-445e-9b07-61d258b71fcf?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-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server vnet-rule delete] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/ef1391ab-04fe-445e-9b07-61d258b71fcf?api-version=2017-12-01 + response: + body: {string: '{"name":"ef1391ab-04fe-445e-9b07-61d258b71fcf","status":"Succeeded","startTime":"2018-05-08T01:22:24.033Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:22: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 server vnet-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"virtualNetworkSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/clitestvnet/subnets/clitestsubnet2","ignoreMissingVnetServiceEndpoint":true,"state":"Ready"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2","name":"vnet_rule2","type":"Microsoft.DBforPostgreSQL/servers/virtualNetworkRules"}]}'} + headers: + cache-control: [no-cache] + content-length: ['705'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:22:42 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 server vnet-rule delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules/vnet_rule2?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServerVnetFirewallRule","startTime":"2018-05-08T01:22:45.69Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/111b9234-5f7c-4b35-9c39-a1eee7ae2b0f?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['87'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:22:44 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/111b9234-5f7c-4b35-9c39-a1eee7ae2b0f?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-deletes: ['14998'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server vnet-rule delete] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/111b9234-5f7c-4b35-9c39-a1eee7ae2b0f?api-version=2017-12-01 + response: + body: {string: '{"name":"111b9234-5f7c-4b35-9c39-a1eee7ae2b0f","status":"Succeeded","startTime":"2018-05-08T01:22:45.69Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:23: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 server vnet-rule list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-postgresql/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/virtualNetworkRules?api-version=2017-12-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:23:04 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 list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/databases?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"charset":"UTF8","collation":"English_United + States.1252"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/databases/postgres","name":"postgres","type":"Microsoft.DBforPostgreSQL/servers/databases"}]}'} + headers: + cache-control: [no-cache] + content-length: ['434'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:23:06 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 server configuration show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/array_nulls?api-version=2017-12-01 + response: + body: {string: '{"properties":{"value":"on","description":"Enable input of NULL + elements in arrays.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/array_nulls","name":"array_nulls","type":"Microsoft.DBforPostgreSQL/servers/configurations"}'} + headers: + cache-control: [no-cache] + content-length: ['542'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:23:08 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": "off"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server configuration set] + Connection: [keep-alive] + Content-Length: ['32'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/array_nulls?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpdateElasticServerConfig","startTime":"2018-05-08T01:23:11.38Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/7f092593-b61b-4521-9358-21bafc7f7e72?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['79'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:23:10 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/7f092593-b61b-4521-9358-21bafc7f7e72?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 server configuration set] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/7f092593-b61b-4521-9358-21bafc7f7e72?api-version=2017-12-01 + response: + body: {string: '{"name":"7f092593-b61b-4521-9358-21bafc7f7e72","status":"Succeeded","startTime":"2018-05-08T01:23:11.38Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:23:28 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 server configuration set] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/array_nulls?api-version=2017-12-01 + response: + body: {string: '{"properties":{"value":"off","description":"Enable input of NULL + elements in arrays.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"user-override"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/array_nulls","name":"array_nulls","type":"Microsoft.DBforPostgreSQL/servers/configurations"}'} + headers: + cache-control: [no-cache] + content-length: ['542'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:23:30 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": {"source": "system-default"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server configuration set] + Connection: [keep-alive] + Content-Length: ['44'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/array_nulls?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpdateElasticServerConfig","startTime":"2018-05-08T01:23:37.127Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/311163f8-bb4c-4bb3-be60-d5ea7e7f2c95?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['80'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:23:36 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/operationResults/311163f8-bb4c-4bb3-be60-d5ea7e7f2c95?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: [postgres server configuration set] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/brazilsouth/azureAsyncOperation/311163f8-bb4c-4bb3-be60-d5ea7e7f2c95?api-version=2017-12-01 + response: + body: {string: '{"name":"311163f8-bb4c-4bb3-be60-d5ea7e7f2c95","status":"Succeeded","startTime":"2018-05-08T01:23:37.127Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:23: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: [postgres server configuration set] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/array_nulls?api-version=2017-12-01 + response: + body: {string: '{"properties":{"value":"on","description":"Enable input of NULL + elements in arrays.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/array_nulls","name":"array_nulls","type":"Microsoft.DBforPostgreSQL/servers/configurations"}'} + headers: + cache-control: [no-cache] + content-length: ['542'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:23: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: [postgres server configuration list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"value":"on","description":"Enable input + of NULL elements in arrays.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/array_nulls","name":"array_nulls","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"safe_encoding","description":"Sets + whether \"\\''\" is allowed in string literals.","defaultValue":"safe_encoding","dataType":"Enumeration","allowedValues":"safe_encoding,on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/backslash_quote","name":"backslash_quote","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"hex","description":"Sets + the output format for bytea.","defaultValue":"hex","dataType":"Enumeration","allowedValues":"escape,hex","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/bytea_output","name":"bytea_output","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Check + function bodies during CREATE FUNCTION.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/check_function_bodies","name":"check_function_bodies","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"sql_ascii","description":"Sets + the client''s character set encoding.","defaultValue":"sql_ascii","dataType":"Enumeration","allowedValues":"BIG5,EUC_CN,EUC_JP,EUC_JIS_2004,EUC_KR,EUC_TW,GB18030,GBK,ISO_8859_5,ISO_8859_6,ISO_8859_7,ISO_8859_8,JOHAB,KOI8R,KOI8U,LATIN1,LATIN2,LATIN3,LATIN4,LATIN5,LATIN6,LATIN7,LATIN8,LATIN9,LATIN10,MULE_INTERNAL,SJIS,SHIFT_JIS_2004,SQL_ASCII,UHC,UTF8,WIN866,WIN874,WIN1250,WIN1251,WIN1252,WIN1253,WIN1254,WIN1255,WIN1256,WIN1257,WIN1258","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/client_encoding","name":"client_encoding","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"notice","description":"Sets + the message levels that are sent to the client.","defaultValue":"notice","dataType":"Enumeration","allowedValues":"debug5,debug4,debug3,debug2,debug1,log,notice,warning,error","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/client_min_messages","name":"client_min_messages","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"partition","description":"Enables + the planner to use constraints to optimize queries.","defaultValue":"partition","dataType":"Enumeration","allowedValues":"partition,on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/constraint_exclusion","name":"constraint_exclusion","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0.005","description":"Sets + the planner''s estimate of the cost of processing each index entry during + an index scan.","defaultValue":"0.005","dataType":"Numeric","allowedValues":"0-1.79769e+308","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/cpu_index_tuple_cost","name":"cpu_index_tuple_cost","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0.0025","description":"Sets + the planner''s estimate of the cost of processing each operator or function + call.","defaultValue":"0.0025","dataType":"Numeric","allowedValues":"0-1.79769e+308","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/cpu_operator_cost","name":"cpu_operator_cost","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0.01","description":"Sets + the planner''s estimate of the cost of processing each tuple (row).","defaultValue":"0.01","dataType":"Numeric","allowedValues":"0-1.79769e+308","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/cpu_tuple_cost","name":"cpu_tuple_cost","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0.1","description":"Sets + the planner''s estimate of the fraction of a cursor''s rows that will be retrieved.","defaultValue":"0.1","dataType":"Numeric","allowedValues":"0-1","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/cursor_tuple_fraction","name":"cursor_tuple_fraction","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"iso, + mdy","description":"Sets the display format for date and time values.","defaultValue":"iso, + mdy","dataType":"String","allowedValues":"(iso|postgres|sql|german)\\,\\s(dmy|mdy|ymd)","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/datestyle","name":"datestyle","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"1000","description":"Sets + the amount of time, in milliseconds, to wait on a lock before checking for + deadlock.","defaultValue":"1000","dataType":"Integer","allowedValues":"1-2147483647","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/deadlock_timeout","name":"deadlock_timeout","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Logs + each query''s execution plan.","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/debug_print_plan","name":"debug_print_plan","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Logs + each query''s rewritten parse tree.","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/debug_print_rewritten","name":"debug_print_rewritten","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"100","description":"Sets + the default statistics target.","defaultValue":"100","dataType":"Integer","allowedValues":"1-10000","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/default_statistics_target","name":"default_statistics_target","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"pg_catalog.english","description":"Sets + default text search configuration.","defaultValue":"pg_catalog.english","dataType":"String","allowedValues":"[A-Za-z\\._]+","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/default_text_search_config","name":"default_text_search_config","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Sets + the default deferrable status of new transactions.","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/default_transaction_deferrable","name":"default_transaction_deferrable","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"read + committed","description":"Sets the transaction isolation level of each new + transaction.","defaultValue":"read committed","dataType":"Enumeration","allowedValues":"serializable,repeatable + read,read committed,read uncommitted","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/default_transaction_isolation","name":"default_transaction_isolation","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Sets + the default read-only status of new transactions.","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/default_transaction_read_only","name":"default_transaction_read_only","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Create + new tables with OIDs by default.","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/default_with_oids","name":"default_with_oids","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + the planner''s use of bitmap-scan plans.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/enable_bitmapscan","name":"enable_bitmapscan","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + the planner''s use of hashed aggregation plans.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/enable_hashagg","name":"enable_hashagg","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + the planner''s use of hash join plans.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/enable_hashjoin","name":"enable_hashjoin","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + the planner''s use of index-only-scan plans.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/enable_indexonlyscan","name":"enable_indexonlyscan","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + the planner''s use of index-scan plans.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/enable_indexscan","name":"enable_indexscan","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + the planner''s use of materialization.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/enable_material","name":"enable_material","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + the planner''s use of merge join plans.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/enable_mergejoin","name":"enable_mergejoin","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + the planner''s use of nested-loop join plans.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/enable_nestloop","name":"enable_nestloop","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + the planner''s use of sequential-scan plans.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/enable_seqscan","name":"enable_seqscan","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + the planner''s use of explicit sort steps.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/enable_sort","name":"enable_sort","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + the planner''s use of TID scan plans.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/enable_tidscan","name":"enable_tidscan","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Warn + about backslash escapes in ordinary string literals.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/escape_string_warning","name":"escape_string_warning","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Terminate + session on any error.","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/exit_on_error","name":"exit_on_error","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0","description":"Sets + the number of digits displayed for floating-point values.","defaultValue":"0","dataType":"Integer","allowedValues":"-15-3","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/extra_float_digits","name":"extra_float_digits","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"8","description":"Sets + the FROM-list size beyond which subqueries are not collapsed.","defaultValue":"8","dataType":"Integer","allowedValues":"1-2147483647","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/from_collapse_limit","name":"from_collapse_limit","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enables + genetic query optimization.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/geqo","name":"geqo","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"5","description":"GEQO: + effort is used to set the default for other GEQO parameters.","defaultValue":"5","dataType":"Integer","allowedValues":"1-10","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/geqo_effort","name":"geqo_effort","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0","description":"GEQO: + number of iterations of the algorithm.","defaultValue":"0","dataType":"Integer","allowedValues":"0-2147483647","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/geqo_generations","name":"geqo_generations","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0","description":"GEQO: + number of individuals in the population.","defaultValue":"0","dataType":"Integer","allowedValues":"0-2147483647","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/geqo_pool_size","name":"geqo_pool_size","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0.0","description":"GEQO: + seed for random path selection.","defaultValue":"0.0","dataType":"Numeric","allowedValues":"0-1","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/geqo_seed","name":"geqo_seed","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"2.0","description":"GEQO: + selective pressure within the population.","defaultValue":"2.0","dataType":"Numeric","allowedValues":"1.5-2","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/geqo_selection_bias","name":"geqo_selection_bias","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"12","description":"Sets + the threshold of FROM items beyond which GEQO is used.","defaultValue":"12","dataType":"Integer","allowedValues":"2-2147483647","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/geqo_threshold","name":"geqo_threshold","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0","description":"Sets + the maximum allowed result for exact search by GIN.","defaultValue":"0","dataType":"Integer","allowedValues":"0-2147483647","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/gin_fuzzy_search_limit","name":"gin_fuzzy_search_limit","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"postgres","description":"Sets + the display format for interval values.","defaultValue":"postgres","dataType":"Enumeration","allowedValues":"postgres,postgres_verbose,sql_standard,iso_8601","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/intervalstyle","name":"intervalstyle","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"8","description":"Sets + the FROM-list size beyond which JOIN constructs are not flattened.","defaultValue":"8","dataType":"Integer","allowedValues":"1-2147483647","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/join_collapse_limit","name":"join_collapse_limit","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0","description":"Sets + the maximum allowed duration (in milliseconds) of any wait for a lock. 0 turns + this off.","defaultValue":"0","dataType":"Integer","allowedValues":"0-2147483647","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/lock_timeout","name":"lock_timeout","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Logs + each checkpoint.","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/log_checkpoints","name":"log_checkpoints","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Logs + each successful connection.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/log_connections","name":"log_connections","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Logs + end of a session, including duration.","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/log_disconnections","name":"log_disconnections","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Logs + the duration of each completed SQL statement.","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/log_duration","name":"log_duration","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"default","description":"Sets + the verbosity of logged messages.","defaultValue":"default","dataType":"Enumeration","allowedValues":"terse,default,verbose","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/log_error_verbosity","name":"log_error_verbosity","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Logs + long lock waits.","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/log_lock_waits","name":"log_lock_waits","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"-1","description":"Sets + the minimum execution time (in milliseconds) above which statements will be + logged. -1 disables logging statement durations.","defaultValue":"-1","dataType":"Integer","allowedValues":"-1-2147483647","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/log_min_duration_statement","name":"log_min_duration_statement","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"error","description":"Causes + all statements generating error at or above this level to be logged.","defaultValue":"error","dataType":"Enumeration","allowedValues":"debug5,debug4,debug3,debug2,debug1,info,notice,warning,error,log,fatal,panic","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/log_min_error_statement","name":"log_min_error_statement","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"warning","description":"Sets + the message levels that are logged.","defaultValue":"warning","dataType":"Enumeration","allowedValues":"debug5,debug4,debug3,debug2,debug1,info,notice,warning,error,log,fatal,panic","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/log_min_messages","name":"log_min_messages","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"none","description":"Sets + the type of statements logged.","defaultValue":"none","dataType":"Enumeration","allowedValues":"none,ddl,mod,all","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/log_statement","name":"log_statement","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"When + generating SQL fragments, quote all identifiers.","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/quote_all_identifiers","name":"quote_all_identifiers","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"4.0","description":"Sets + the planner''s estimate of the cost of a nonsequentially fetched disk page.","defaultValue":"4.0","dataType":"Numeric","allowedValues":"0-1.79769e+308","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/random_page_cost","name":"random_page_cost","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"\"$user\", + public","description":"Sets the schema search order for names that are not + schema-qualified.","defaultValue":"\"$user\", public","dataType":"String","allowedValues":"[A-Za-z.\"$, + ]+","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/search_path","name":"search_path","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"1.0","description":"Sets + the planner''s estimate of the cost of a sequentially fetched disk page.","defaultValue":"1.0","dataType":"Numeric","allowedValues":"0-1.79769e+308","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/seq_page_cost","name":"seq_page_cost","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Causes + subtables to be included by default in various commands.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/sql_inheritance","name":"sql_inheritance","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0","description":"Sets + the maximum allowed duration (in milliseconds) of any statement. 0 turns this + off.","defaultValue":"0","dataType":"Integer","allowedValues":"0-2147483647","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/statement_timeout","name":"statement_timeout","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Enable + synchronized sequential scans.","defaultValue":"on","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/synchronize_seqscans","name":"synchronize_seqscans","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"on","description":"Sets + the current transaction''s synchronization level.","defaultValue":"on","dataType":"Enumeration","allowedValues":"local,remote_write,on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/synchronous_commit","name":"synchronous_commit","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Treats + \"expr=NULL\" as \"expr IS NULL\".","defaultValue":"off","dataType":"Boolean","allowedValues":"on,off","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/transform_null_equals","name":"transform_null_equals","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"base64","description":"Sets + how binary values are to be encoded in XML.","defaultValue":"base64","dataType":"Enumeration","allowedValues":"base64,hex","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/xmlbinary","name":"xmlbinary","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"content","description":"Sets + whether XML data in implicit parsing and serialization operations is to be + considered as documents or content fragments.","defaultValue":"content","dataType":"Enumeration","allowedValues":"content,document","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/xmloption","name":"xmloption","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"off","description":"Forces + use of parallel query facilities.","defaultValue":"off","dataType":"Enumeration","allowedValues":"off,on,regress","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/force_parallel_mode","name":"force_parallel_mode","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0","description":"Sets + the maximum allowed duration of any idling transaction.","defaultValue":"0","dataType":"Integer","allowedValues":"0-2147483647","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/idle_in_transaction_session_timeout","name":"idle_in_transaction_session_timeout","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0","description":"Sets + the maximum number of parallel processes per executor node.","defaultValue":"0","dataType":"Integer","allowedValues":"0-1024","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/max_parallel_workers_per_gather","name":"max_parallel_workers_per_gather","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"8388608","description":"Sets + the minimum size of relations to be considered for parallel scan.","defaultValue":"8388608","dataType":"Integer","allowedValues":"0-715827882","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/min_parallel_relation_size","name":"min_parallel_relation_size","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"1000","description":"Sets + the planner''s estimate of the cost of starting up worker processes for parallel + query.","defaultValue":"1000","dataType":"Numeric","allowedValues":"0-1.79769e+308","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/parallel_setup_cost","name":"parallel_setup_cost","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"0.1","description":"Sets + the planner''s estimate of the cost of passing each tuple (row) from worker + to master backend.","defaultValue":"0.1","dataType":"Numeric","allowedValues":"0-1.79769e+308","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/parallel_tuple_cost","name":"parallel_tuple_cost","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"8096","description":"Sets + the amount of memory to be used by internal sort operations and hash tables + before writing to temporary disk files.","defaultValue":"8096","dataType":"Integer","allowedValues":"8096-2097151","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/work_mem","name":"work_mem","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"8096","description":"Sets + the maximum number of temporary buffers used by each database session.","defaultValue":"8096","dataType":"Integer","allowedValues":"8096-16384","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/temp_buffers","name":"temp_buffers","type":"Microsoft.DBforPostgreSQL/servers/configurations"},{"properties":{"value":"3","description":"Sets + how many days a log file is saved for.","defaultValue":"3","dataType":"Integer","allowedValues":"1-7","source":"system-default"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/configurations/log_retention_days","name":"log_retention_days","type":"Microsoft.DBforPostgreSQL/servers/configurations"}]}'} + headers: + cache-control: [no-cache] + content-length: ['45279'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:23:58 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 server-logs list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.32] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/logFiles?api-version=2017-12-01 + response: + body: {string: '{"value":[{"properties":{"name":"postgresql-2018-05-08_011450.log","sizeInKB":3,"createdTime":"0001-01-01T00:00:00+00:00","lastModifiedTime":"2018-05-08T01:23:37+00:00","type":"text","url":"https://wasd2prodbrso1fse72.file.core.windows.net/66a3359621364526a60356c90ecc6492/pg_log/postgresql-2018-05-08_011450.log?sv=2015-04-05&sr=f&sig=NDfCz%2BqGkE%2FGhptNvUuxUZT%2Ftyd5lTQRl3gHqsiwWpw%3D&se=2018-05-08T02%3A24%3A01Z&sp=r"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000002/logFiles/postgresql-2018-05-08_011450.log","name":"postgresql-2018-05-08_011450.log","type":"Microsoft.DBforPostgreSQL/servers/logFiles"}]}'} + headers: + cache-control: [no-cache] + content-length: ['820'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 08 May 2018 01:24: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: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 + msrest_azure/0.4.29 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.32] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 08 May 2018 01:24:02 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdJNlRZV042SFNMVEc0TUdWSDRVWklDUTZaNEI3SEtUS0tUR3wxMzk2NzIzQkJEMzBEQTdBLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_postgres_server_mgmt.yaml b/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_postgres_server_mgmt.yaml new file mode 100644 index 00000000000..64af4c451a9 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/tests/recordings/test_postgres_server_mgmt.yaml @@ -0,0 +1,1837 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-04-03T23:58:58Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.31] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-03T23:58:58Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:58:59 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: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-04-03T23:58:59Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.31] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002","name":"clitest.rg000002","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-03T23:58:59Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:59:00 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: '{"sku": {"name": "GP_Gen5_2"}, "properties": {"storageProfile": {"backupRetentionDays": + 10, "geoRedundantBackup": "Enabled"}, "createMode": "Default", "administratorLogin": + "cloudsa", "administratorLoginPassword": "SecretPassword123"}, "location": "koreasouth", + "tags": {"key": "1"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server create] + Connection: [keep-alive] + Content-Length: ['283'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-03T23:59:02.453Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/27e9dd6e-3f91-4365-b425-8a685f7caf06?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Apr 2018 23:59:01 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/operationResults/27e9dd6e-3f91-4365-b425-8a685f7caf06?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: [postgres server create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/27e9dd6e-3f91-4365-b425-8a685f7caf06?api-version=2017-12-01 + response: + body: {string: '{"name":"27e9dd6e-3f91-4365-b425-8a685f7caf06","status":"InProgress","startTime":"2018-04-03T23:59:02.453Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:00: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 server create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/27e9dd6e-3f91-4365-b425-8a685f7caf06?api-version=2017-12-01 + response: + body: {string: '{"name":"27e9dd6e-3f91-4365-b425-8a685f7caf06","status":"Succeeded","startTime":"2018-04-03T23:59:02.453Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:01:04 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 server create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['923'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:01:05 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 server show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['923'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:01:07 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 server update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['923'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:01:08 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": {"storageProfile": {"backupRetentionDays": 10, "geoRedundantBackup": + "Enabled", "storageMB": 5120}, "administratorLoginPassword": "SecretPassword456", + "sslEnforcement": "Disabled"}, "tags": {"key": "2"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server update] + Connection: [keep-alive] + Content-Length: ['218'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-04T00:01:10.86Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/fc71ee97-6950-4171-b971-3cbe7d36c459?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['73'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:01:10 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/operationResults/fc71ee97-6950-4171-b971-3cbe7d36c459?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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/fc71ee97-6950-4171-b971-3cbe7d36c459?api-version=2017-12-01 + response: + body: {string: '{"name":"fc71ee97-6950-4171-b971-3cbe7d36c459","status":"Succeeded","startTime":"2018-04-04T00:01:10.86Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:02: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: [postgres server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['924'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:02:12 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 server update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['924'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:02:14 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: '{"sku": {"name": "gp_Gen5_4", "tier": "GeneralPurpose", "capacity": 4, + "family": "Gen5"}, "properties": {"storageProfile": {"backupRetentionDays": + 10, "geoRedundantBackup": "Enabled", "storageMB": 5120}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server update] + Connection: [keep-alive] + Content-Length: ['204'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-04T00:02:17.57Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/6f5004ed-f9c8-4050-bf6b-b09f709b3e4b?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['73'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:02:17 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/operationResults/6f5004ed-f9c8-4050-bf6b-b09f709b3e4b?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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/6f5004ed-f9c8-4050-bf6b-b09f709b3e4b?api-version=2017-12-01 + response: + body: {string: '{"name":"6f5004ed-f9c8-4050-bf6b-b09f709b3e4b","status":"InProgress","startTime":"2018-04-04T00:02:17.57Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:03:17 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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/6f5004ed-f9c8-4050-bf6b-b09f709b3e4b?api-version=2017-12-01 + response: + body: {string: '{"name":"6f5004ed-f9c8-4050-bf6b-b09f709b3e4b","status":"Succeeded","startTime":"2018-04-04T00:02:17.57Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:04: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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['924'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:04: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: [postgres server show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['924'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:04: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: [postgres server update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_4","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['924'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:04:22 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: '{"sku": {"name": "gp_Gen5_2", "tier": "GeneralPurpose", "capacity": 2, + "family": "Gen5"}, "properties": {"storageProfile": {"backupRetentionDays": + 10, "geoRedundantBackup": "Enabled", "storageMB": 5120}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server update] + Connection: [keep-alive] + Content-Length: ['204'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-04T00:04:25.097Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/539a3d14-54c3-4265-b33f-620f5795277a?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:04:24 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/operationResults/539a3d14-54c3-4265-b33f-620f5795277a?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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/539a3d14-54c3-4265-b33f-620f5795277a?api-version=2017-12-01 + response: + body: {string: '{"name":"539a3d14-54c3-4265-b33f-620f5795277a","status":"InProgress","startTime":"2018-04-04T00:04:25.097Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:05:26 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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/539a3d14-54c3-4265-b33f-620f5795277a?api-version=2017-12-01 + response: + body: {string: '{"name":"539a3d14-54c3-4265-b33f-620f5795277a","status":"Succeeded","startTime":"2018-04-04T00:04:25.097Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:06:26 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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['924'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:06:27 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 server update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Disabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['924'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:06:28 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": {"storageProfile": {"backupRetentionDays": 10, "geoRedundantBackup": + "Enabled", "storageMB": 5120}, "sslEnforcement": "Enabled"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server update] + Connection: [keep-alive] + Content-Length: ['144'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-04T00:06:31.977Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/c2ccdaab-9108-4a86-9621-5819f888a7f8?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:06:31 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/operationResults/c2ccdaab-9108-4a86-9621-5819f888a7f8?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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/c2ccdaab-9108-4a86-9621-5819f888a7f8?api-version=2017-12-01 + response: + body: {string: '{"name":"c2ccdaab-9108-4a86-9621-5819f888a7f8","status":"Succeeded","startTime":"2018-04-04T00:06:31.977Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:07: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: [postgres server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['923'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:07:33 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 server update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['923'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:07:36 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": {"storageProfile": {"backupRetentionDays": 10, "geoRedundantBackup": + "Enabled", "storageMB": 5120}}, "tags": {"key": "3"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server update] + Connection: [keep-alive] + Content-Length: ['137'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"UpsertElasticServer","startTime":"2018-04-04T00:07:38.593Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/066e5b4c-3e40-4a5e-a27a-d29c3213eeb9?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:07:38 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/operationResults/066e5b4c-3e40-4a5e-a27a-d29c3213eeb9?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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/066e5b4c-3e40-4a5e-a27a-d29c3213eeb9?api-version=2017-12-01 + response: + body: {string: '{"name":"066e5b4c-3e40-4a5e-a27a-d29c3213eeb9","status":"Succeeded","startTime":"2018-04-04T00:07:38.593Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:08: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 server update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['923'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:08: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 server restore] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['923'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 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: 'b''b\''{"properties": {"createMode": "PointInTimeRestore", "sourceServerId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003", + "restorePointInTime": "2018-04-04T00:13:40.8822909999999999Z"}, "location": + "koreasouth"}\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server restore] + Connection: [keep-alive] + Content-Length: ['413'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforPostgreSQL/servers/azuredbclirestore000004?api-version=2017-12-01 + response: + body: {string: '{"operation":"RestoreElasticServer","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['75'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:13:43 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/operationResults/e6798032-5c96-4f75-aca0-0ed5d18d57c1?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: [postgres server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:13: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: [postgres server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:14:05 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:14:16 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:14:28 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:14: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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:14: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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:15:00 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 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: [postgres server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:15:23 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 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: [postgres server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:15:45 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 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: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:16:06 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:16:18 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:16: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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:16: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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:16:51 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:17: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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:17:13 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"InProgress","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:17:24 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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/e6798032-5c96-4f75-aca0-0ed5d18d57c1?api-version=2017-12-01 + response: + body: {string: '{"name":"e6798032-5c96-4f75-aca0-0ed5d18d57c1","status":"Succeeded","startTime":"2018-04-04T00:13:44.123Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:17: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 server restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforPostgreSQL/servers/azuredbclirestore000004?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirestore000004.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:23:44.39+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforPostgreSQL/servers/azuredbclirestore000004","name":"azuredbclirestore000004","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['903'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:17:36 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 server georestore] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"}'} + headers: + cache-control: [no-cache] + content-length: ['923'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:17: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: 'b''b\''{"sku": {"name": "GP_Gen5_2"}, "properties": {"storageProfile": + {"backupRetentionDays": 20, "geoRedundantBackup": "Disabled"}, "createMode": + "GeoRestore", "sourceServerId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003"}, + "location": "koreasouth"}\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server georestore] + Connection: [keep-alive] + Content-Length: ['453'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforPostgreSQL/servers/azuredbcligeorestore000005?api-version=2017-12-01 + response: + body: {string: '{"operation":"RestoreElasticServer","startTime":"2018-04-04T00:17:39.79Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/33d65878-371b-4fc3-97e2-fe1e51ef1263?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:17:39 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/operationResults/33d65878-371b-4fc3-97e2-fe1e51ef1263?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: ['1195'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server georestore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/33d65878-371b-4fc3-97e2-fe1e51ef1263?api-version=2017-12-01 + response: + body: {string: '{"name":"33d65878-371b-4fc3-97e2-fe1e51ef1263","status":"Failed","startTime":"2018-04-04T00:17:39.79Z","error":{"code":"SubscriptionDoesNotHaveServer","message":"Subscription + ''707595a1-1498-4b7d-9771-cf0455939d2c'' does not have the server ''azuredbclitest000003''."}}'} + headers: + cache-control: [no-cache] + content-length: ['308'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:17:50 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 server list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforPostgreSQL/servers?api-version=2017-12-01 + response: + body: {string: '{"value":[{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirestore000004.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:23:44.39+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforPostgreSQL/servers/azuredbclirestore000004","name":"azuredbclirestore000004","type":"Microsoft.DBforPostgreSQL/servers"}]}'} + headers: + cache-control: [no-cache] + content-length: ['915'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:17:51 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 server list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/servers?api-version=2017-12-01 + response: + body: {string: '{"value":[{"sku":{"name":"B_Gen4_1","tier":"Basic","family":"Gen4","capacity":1},"properties":{"administratorLogin":"TestUser123","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"pgcarbontest1.postgres.database.azure.com","earliestRestoreDate":"2018-03-29T21:19:09.733+00:00","replicationRole":"","primaryServerId":""},"location":"eastasia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PGCarbonTesting/providers/Microsoft.DBforPostgreSQL/servers/pgcarbontest1","name":"pgcarbontest1","type":"Microsoft.DBforPostgreSQL/servers"},{"sku":{"name":"B_Gen4_1","tier":"Basic","family":"Gen4","capacity":1},"properties":{"administratorLogin":"deaadmin","storageProfile":{"storageMB":51200,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"dataexperimentation.postgres.database.azure.com","earliestRestoreDate":"2018-03-28T00:17:52.8404722+00:00","replicationRole":"","primaryServerId":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresstest/providers/Microsoft.DBforPostgreSQL/servers/dataexperimentation","name":"dataexperimentation","type":"Microsoft.DBforPostgreSQL/servers"},{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"shinim","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"eastus2gen5.postgres.database.azure.com","earliestRestoreDate":"2018-04-03T07:17:28.343+00:00","replicationRole":"","primaryServerId":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OrcasGATesting/providers/Microsoft.DBforPostgreSQL/servers/eastus2gen5","name":"eastus2gen5","type":"Microsoft.DBforPostgreSQL/servers"},{"sku":{"name":"B_Gen5_1","tier":"Basic","family":"Gen5","capacity":1},"properties":{"administratorLogin":"Username123","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"pgbasicgen5v1.postgres.database.azure.com","earliestRestoreDate":"2018-03-28T00:17:52.924888+00:00","replicationRole":"","primaryServerId":""},"location":"japaneast","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OrcasGATesting/providers/Microsoft.DBforPostgreSQL/servers/pgbasicgen5v1","name":"pgbasicgen5v1","type":"Microsoft.DBforPostgreSQL/servers"},{"sku":{"name":"B_Gen5_2","tier":"Basic","family":"Gen5","capacity":2},"properties":{"administratorLogin":"Username123","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"pgdbbasicgen5v2.postgres.database.azure.com","earliestRestoreDate":"2018-03-28T00:17:52.924888+00:00","replicationRole":"","primaryServerId":""},"location":"japaneast","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OrcasGATesting/providers/Microsoft.DBforPostgreSQL/servers/pgdbbasicgen5v2","name":"pgdbbasicgen5v2","type":"Microsoft.DBforPostgreSQL/servers"},{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"Username123","storageProfile":{"storageMB":10240,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"pgdbgpgen5v2.postgres.database.azure.com","earliestRestoreDate":"2018-03-28T00:17:52.924888+00:00","replicationRole":"","primaryServerId":""},"location":"japaneast","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OrcasGATesting/providers/Microsoft.DBforPostgreSQL/servers/pgdbgpgen5v2","name":"pgdbgpgen5v2","type":"Microsoft.DBforPostgreSQL/servers"},{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"shinim","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testjapan5.postgres.database.azure.com","earliestRestoreDate":"2018-04-03T07:12:46.603+00:00","replicationRole":"","primaryServerId":""},"location":"japaneast","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OrcasGATesting/providers/Microsoft.DBforPostgreSQL/servers/testjapan5","name":"testjapan5","type":"Microsoft.DBforPostgreSQL/servers"},{"sku":{"name":"GP_Gen4_2","tier":"GeneralPurpose","family":"Gen4","capacity":2},"properties":{"administratorLogin":"shinim","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testjapanwest5.postgres.database.azure.com","earliestRestoreDate":"2018-04-03T07:14:11.65+00:00","replicationRole":"","primaryServerId":""},"location":"japanwest","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OrcasGATesting/providers/Microsoft.DBforPostgreSQL/servers/testjapanwest5","name":"testjapanwest5","type":"Microsoft.DBforPostgreSQL/servers"},{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"shinim","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testjapanwest56.postgres.database.azure.com","earliestRestoreDate":"2018-04-03T07:14:43.86+00:00","replicationRole":"","primaryServerId":""},"location":"japanwest","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OrcasGATesting/providers/Microsoft.DBforPostgreSQL/servers/testjapanwest56","name":"testjapanwest56","type":"Microsoft.DBforPostgreSQL/servers"},{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclitest000003.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:09:02.813+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","tags":{"key":"3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003","name":"azuredbclitest000003","type":"Microsoft.DBforPostgreSQL/servers"},{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":5120,"backupRetentionDays":10,"geoRedundantBackup":"Enabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"azuredbclirestore000004.postgres.database.azure.com","earliestRestoreDate":"2018-04-04T00:23:44.39+00:00","replicationRole":"","primaryServerId":""},"location":"koreasouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforPostgreSQL/servers/azuredbclirestore000004","name":"azuredbclirestore000004","type":"Microsoft.DBforPostgreSQL/servers"},{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"shinim","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","userVisibleState":"Ready","fullyQualifiedDomainName":"southcentralustesting5.postgres.database.azure.com","earliestRestoreDate":"2018-04-03T07:19:14.41+00:00","replicationRole":"","primaryServerId":""},"location":"southcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OrcasGATesting/providers/Microsoft.DBforPostgreSQL/servers/southcentralustesting5","name":"southcentralustesting5","type":"Microsoft.DBforPostgreSQL/servers"}]}'} + headers: + cache-control: [no-cache] + content-length: ['8795'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:17:52 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-original-request-ids: [aef3c36c-e3f7-4751-b411-3faaa4dfbb9a, 7ced6b51-ceba-4c62-bfc8-38c18f7bb50a, + e25494ff-2fad-4658-8e5e-45a5073062c1, e70f8319-cdd7-4b28-8f1e-86896b1dc689, + 153903d7-3412-4609-aecf-f4fd2f34c25d, 347a66a1-8293-483d-a5f5-a14d40f8bfdf] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [postgres server delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers/azuredbclitest000003?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServer","startTime":"2018-04-04T00:17:54.53Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/45b5ddbe-5431-4a83-9dcd-a0833029e4fa?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['71'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:17:54 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/operationResults/45b5ddbe-5431-4a83-9dcd-a0833029e4fa?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 server delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/45b5ddbe-5431-4a83-9dcd-a0833029e4fa?api-version=2017-12-01 + response: + body: {string: '{"name":"45b5ddbe-5431-4a83-9dcd-a0833029e4fa","status":"Succeeded","startTime":"2018-04-04T00:17:54.53Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:18:10 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 server delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforPostgreSQL/servers/azuredbclirestore000004?api-version=2017-12-01 + response: + body: {string: '{"operation":"DropElasticServer","startTime":"2018-04-04T00:18:12.127Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/100f034a-b510-4dcb-96f6-80f5fb0991c9?api-version=2017-12-01'] + cache-control: [no-cache] + content-length: ['72'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:18:12 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/operationResults/100f034a-b510-4dcb-96f6-80f5fb0991c9?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 server delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/koreasouth/azureAsyncOperation/100f034a-b510-4dcb-96f6-80f5fb0991c9?api-version=2017-12-01 + response: + body: {string: '{"name":"100f034a-b510-4dcb-96f6-80f5fb0991c9","status":"Succeeded","startTime":"2018-04-04T00:18:12.127Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:18:27 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 server list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/servers?api-version=2017-12-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:18:28 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 server list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.0.31] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.DBforPostgreSQL/servers?api-version=2017-12-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 04 Apr 2018 00:18: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: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.31] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 04 Apr 2018 00:18:29 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdYUjRSVEM2NklaNEVPRFhKTVk0SlJDNU9UNEZJNDJHUEhRRnxBMTdGMzZFMkU2RjExNEI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + 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: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27 + msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python + AZURECLI/2.0.31] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 04 Apr 2018 00:18:30 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdZSlNKTVNETk9CSU4yRkVBVkRRNFNDM1RJUVJJQU5XSERNSHxFNzJEODRFQzcwRDE3N0Q0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/rdbms_vnet/azext_rdbms_vnet/tests/test_rdbms_commands.py b/src/rdbms_vnet/azext_rdbms_vnet/tests/test_rdbms_commands.py new file mode 100644 index 00000000000..5c4fa1110c0 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/tests/test_rdbms_commands.py @@ -0,0 +1,472 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from datetime import datetime +from dateutil.tz import tzutc # pylint: disable=import-error + +from azure.cli.core.util import CLIError +from azure.cli.testsdk.base import execute +from azure.cli.testsdk.exceptions import CliTestError # pylint: disable=unused-import +from azure.cli.testsdk import ( + JMESPathCheck, + NoneCheck, + ResourceGroupPreparer, + ScenarioTest) +from azure.cli.testsdk.preparers import ( + AbstractPreparer, + SingleValueReplacer) + + +# Constants +SERVER_NAME_PREFIX = 'azuredbclitest' +SERVER_NAME_MAX_LENGTH = 63 + + +class ServerPreparer(AbstractPreparer, SingleValueReplacer): + # pylint: disable=too-many-instance-attributes + def __init__(self, engine_type='mysql', engine_parameter_name='database_engine', + name_prefix=SERVER_NAME_PREFIX, parameter_name='server', location='brazilsouth', + admin_user='cloudsa', admin_password='SecretPassword123', + resource_group_parameter_name='resource_group', skip_delete=True, + sku_name='GP_Gen5_2'): + super(ServerPreparer, self).__init__(name_prefix, SERVER_NAME_MAX_LENGTH) + from azure.cli.testsdk import TestCli + self.cli_ctx = TestCli() + self.engine_type = engine_type + self.engine_parameter_name = engine_parameter_name + self.location = location + self.parameter_name = parameter_name + self.admin_user = admin_user + self.admin_password = admin_password + self.resource_group_parameter_name = resource_group_parameter_name + self.skip_delete = skip_delete + self.sku_name = sku_name + + def create_resource(self, name, **kwargs): + group = self._get_resource_group(**kwargs) + template = 'az {} server create -l {} -g {} -n {} -u {} -p {} --sku-name {}' + execute(self.cli_ctx, template.format(self.engine_type, + self.location, + group, name, + self.admin_user, + self.admin_password, + self.sku_name)) + return {self.parameter_name: name, + self.engine_parameter_name: self.engine_type} + + def remove_resource(self, name, **kwargs): + if not self.skip_delete: + group = self._get_resource_group(**kwargs) + execute(self.cli_ctx, 'az {} server delete -g {} -n {} --yes'.format(self.engine_type, group, name)) + + def _get_resource_group(self, **kwargs): + return kwargs.get(self.resource_group_parameter_name) + + +class ServerMgmtScenarioTest(ScenarioTest): + + @ResourceGroupPreparer(parameter_name='resource_group_1') + @ResourceGroupPreparer(parameter_name='resource_group_2') + def test_mysql_server_mgmt(self, resource_group_1, resource_group_2): + self._test_server_mgmt('mysql', resource_group_1, resource_group_2) + + @ResourceGroupPreparer(parameter_name='resource_group_1') + @ResourceGroupPreparer(parameter_name='resource_group_2') + def test_postgres_server_mgmt(self, resource_group_1, resource_group_2): + self._test_server_mgmt('postgres', resource_group_1, resource_group_2) + + def _test_server_mgmt(self, database_engine, resource_group_1, resource_group_2): + servers = [self.create_random_name(SERVER_NAME_PREFIX, SERVER_NAME_MAX_LENGTH), + self.create_random_name('azuredbclirestore', SERVER_NAME_MAX_LENGTH), + self.create_random_name('azuredbcligeorestore', SERVER_NAME_MAX_LENGTH)] + admin_login = 'cloudsa' + admin_passwords = ['SecretPassword123', 'SecretPassword456'] + edition = 'GeneralPurpose' + backupRetention = 10 + geoRedundantBackup = 'Enabled' + old_cu = 2 + new_cu = 4 + family = 'Gen5' + skuname = '{}_{}_{}'.format("GP", family, old_cu) + loc = 'koreasouth' + + geoGeoRedundantBackup = 'Disabled' + geoBackupRetention = 20 + geoloc = 'koreasouth' + + # test create server + self.cmd('{} server create -g {} --name {} -l {} ' + '--admin-user {} --admin-password {} ' + '--sku-name {} --tags key=1 --geo-redundant-backup {} ' + '--backup-retention {}' + .format(database_engine, resource_group_1, servers[0], loc, + admin_login, admin_passwords[0], skuname, + geoRedundantBackup, backupRetention), + checks=[ + JMESPathCheck('name', servers[0]), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('administratorLogin', admin_login), + JMESPathCheck('sslEnforcement', 'Enabled'), + JMESPathCheck('tags.key', '1'), + JMESPathCheck('sku.capacity', old_cu), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('storageProfile.backupRetentionDays', backupRetention), + JMESPathCheck('storageProfile.geoRedundantBackup', geoRedundantBackup)]) + + # test show server + result = self.cmd('{} server show -g {} --name {}' + .format(database_engine, resource_group_1, servers[0]), + checks=[ + JMESPathCheck('name', servers[0]), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('administratorLogin', admin_login), + JMESPathCheck('sslEnforcement', 'Enabled'), + JMESPathCheck('tags.key', '1'), + JMESPathCheck('sku.capacity', old_cu), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('storageProfile.backupRetentionDays', backupRetention), + JMESPathCheck('storageProfile.geoRedundantBackup', geoRedundantBackup)]).get_output_in_json() # pylint: disable=line-too-long + + # test update server + self.cmd('{} server update -g {} --name {} --admin-password {} ' + '--ssl-enforcement Disabled --tags key=2' + .format(database_engine, resource_group_1, servers[0], admin_passwords[1]), + checks=[ + JMESPathCheck('name', servers[0]), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('sslEnforcement', 'Disabled'), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('tags.key', '2'), + JMESPathCheck('administratorLogin', admin_login)]) + + self.cmd('{} server update -g {} --name {} --vcore {}' + .format(database_engine, resource_group_1, servers[0], new_cu), + checks=[ + JMESPathCheck('name', servers[0]), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('sku.capacity', new_cu), + JMESPathCheck('administratorLogin', admin_login)]) + + # test show server + self.cmd('{} server show -g {} --name {}' + .format(database_engine, resource_group_1, servers[0]), + checks=[ + JMESPathCheck('name', servers[0]), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('sslEnforcement', 'Disabled'), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('sku.capacity', new_cu), + JMESPathCheck('tags.key', '2'), + JMESPathCheck('administratorLogin', admin_login)]) + + # test update server per property + self.cmd('{} server update -g {} --name {} --vcore {}' + .format(database_engine, resource_group_1, servers[0], old_cu), + checks=[ + JMESPathCheck('name', servers[0]), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('sku.capacity', old_cu), + JMESPathCheck('administratorLogin', admin_login)]) + + self.cmd('{} server update -g {} --name {} --ssl-enforcement Enabled' + .format(database_engine, resource_group_1, servers[0]), + checks=[ + JMESPathCheck('name', servers[0]), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('sslEnforcement', 'Enabled'), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('administratorLogin', admin_login)]) + + self.cmd('{} server update -g {} --name {} --tags key=3' + .format(database_engine, resource_group_1, servers[0]), + checks=[ + JMESPathCheck('name', servers[0]), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('sslEnforcement', 'Enabled'), + JMESPathCheck('tags.key', '3'), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('administratorLogin', admin_login)]) + + # test restore to a new server, make sure wait at least 5 min after server created. + from time import sleep + sleep(300) + + self.cmd('{} server restore -g {} --name {} ' + '--source-server {} ' + '--restore-point-in-time {}' + .format(database_engine, resource_group_2, servers[1], result['id'], + datetime.utcnow().replace(tzinfo=tzutc()).isoformat()), + checks=[ + JMESPathCheck('name', servers[1]), + JMESPathCheck('resourceGroup', resource_group_2), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('administratorLogin', admin_login)]) + + # test georestore server + with self.assertRaises(CLIError) as exception: + self.cmd('{} server georestore -g {} --name {} --source-server {} -l {} ' + '--geo-redundant-backup {} --backup-retention {}' + .format(database_engine, resource_group_2, servers[2], result['id'], + geoloc, geoGeoRedundantBackup, geoBackupRetention), + checks=[ + JMESPathCheck('name', servers[2]), + JMESPathCheck('resourceGroup', resource_group_2), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('administratorLogin', admin_login), + JMESPathCheck('location', geoloc), + JMESPathCheck('storageProfile.backupRetentionDays', geoBackupRetention), + JMESPathCheck('storageProfile.geoRedundantBackup', geoGeoRedundantBackup)]) + self.assertTrue(' does not have the server ' in '{}'.format(exception.exception)) + + # test list servers + self.cmd('{} server list -g {}'.format(database_engine, resource_group_2), + checks=[JMESPathCheck('type(@)', 'array')]) + + # test list servers without resource group + self.cmd('{} server list'.format(database_engine), + checks=[JMESPathCheck('type(@)', 'array')]) + + # test delete server + self.cmd('{} server delete -g {} --name {} --yes' + .format(database_engine, resource_group_1, servers[0]), checks=NoneCheck()) + self.cmd('{} server delete -g {} -n {} --yes' + .format(database_engine, resource_group_2, servers[1]), checks=NoneCheck()) + + # test list server should be 0 + self.cmd('{} server list -g {}'.format(database_engine, resource_group_1), checks=[NoneCheck()]) + self.cmd('{} server list -g {}'.format(database_engine, resource_group_2), checks=[NoneCheck()]) + + +class ProxyResourcesMgmtScenarioTest(ScenarioTest): + + @ResourceGroupPreparer() + @ServerPreparer(engine_type='mysql') + def test_mysql_proxy_resources_mgmt(self, resource_group, server, database_engine): + self._test_firewall_mgmt(resource_group, server, database_engine) + self._test_vnet_firewall_mgmt(resource_group, server, database_engine) + self._test_db_mgmt(resource_group, server, database_engine) + self._test_configuration_mgmt(resource_group, server, database_engine) + self._test_log_file_mgmt(resource_group, server, database_engine) + + @ResourceGroupPreparer() + @ServerPreparer(engine_type='postgres') + def test_postgres_proxy_resources_mgmt(self, resource_group, server, database_engine): + self._test_firewall_mgmt(resource_group, server, database_engine) + self._test_vnet_firewall_mgmt(resource_group, server, database_engine) + self._test_db_mgmt(resource_group, server, database_engine) + self._test_configuration_mgmt(resource_group, server, database_engine) + self._test_log_file_mgmt(resource_group, server, database_engine) + + def _test_firewall_mgmt(self, resource_group, server, database_engine): + firewall_rule_1 = 'rule1' + start_ip_address_1 = '0.0.0.0' + end_ip_address_1 = '255.255.255.255' + firewall_rule_2 = 'rule2' + start_ip_address_2 = '123.123.123.123' + end_ip_address_2 = '123.123.123.124' + + # test firewall-rule create + self.cmd('{} server firewall-rule create -n {} -g {} -s {} ' + '--start-ip-address {} --end-ip-address {}' + .format(database_engine, firewall_rule_1, resource_group, server, + start_ip_address_1, end_ip_address_1), + checks=[ + JMESPathCheck('name', firewall_rule_1), + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('startIpAddress', start_ip_address_1), + JMESPathCheck('endIpAddress', end_ip_address_1)]) + + # test firewall-rule show + self.cmd('{} server firewall-rule show --name {} -g {} --server {}' + .format(database_engine, firewall_rule_1, resource_group, server), + checks=[ + JMESPathCheck('name', firewall_rule_1), + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('startIpAddress', start_ip_address_1), + JMESPathCheck('endIpAddress', end_ip_address_1)]) + + # test firewall-rule update + self.cmd('{} server firewall-rule update -n {} -g {} -s {} ' + '--start-ip-address {} --end-ip-address {}' + .format(database_engine, firewall_rule_1, resource_group, server, + start_ip_address_2, end_ip_address_2), + checks=[ + JMESPathCheck('name', firewall_rule_1), + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('startIpAddress', start_ip_address_2), + JMESPathCheck('endIpAddress', end_ip_address_2)]) + + self.cmd('{} server firewall-rule update --name {} -g {} --server {} ' + '--start-ip-address {}' + .format(database_engine, firewall_rule_1, resource_group, server, + start_ip_address_1), + checks=[ + JMESPathCheck('name', firewall_rule_1), + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('startIpAddress', start_ip_address_1), + JMESPathCheck('endIpAddress', end_ip_address_2)]) + + self.cmd('{} server firewall-rule update -n {} -g {} -s {} ' + '--end-ip-address {}' + .format(database_engine, firewall_rule_1, resource_group, server, + end_ip_address_1), + checks=[ + JMESPathCheck('name', firewall_rule_1), + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('startIpAddress', start_ip_address_1), + JMESPathCheck('endIpAddress', end_ip_address_1)]) + + # test firewall-rule create another rule + self.cmd('{} server firewall-rule create --name {} -g {} --server {} ' + '--start-ip-address {} --end-ip-address {}' + .format(database_engine, firewall_rule_2, resource_group, server, + start_ip_address_2, end_ip_address_2), + checks=[ + JMESPathCheck('name', firewall_rule_2), + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('startIpAddress', start_ip_address_2), + JMESPathCheck('endIpAddress', end_ip_address_2)]) + + # test firewall-rule list + self.cmd('{} server firewall-rule list -g {} -s {}' + .format(database_engine, resource_group, server), checks=[JMESPathCheck('length(@)', 2)]) + + self.cmd('{} server firewall-rule delete --name {} -g {} --server {} --yes' + .format(database_engine, firewall_rule_1, resource_group, server), checks=NoneCheck()) + self.cmd('{} server firewall-rule list -g {} --server {}' + .format(database_engine, resource_group, server), checks=[JMESPathCheck('length(@)', 1)]) + self.cmd('{} server firewall-rule delete -n {} -g {} -s {} --yes' + .format(database_engine, firewall_rule_2, resource_group, server), checks=NoneCheck()) + self.cmd('{} server firewall-rule list -g {} --server {}' + .format(database_engine, resource_group, server), checks=[NoneCheck()]) + + def _test_vnet_firewall_mgmt(self, resource_group, server, database_engine): + vnet_firewall_rule_1 = 'vnet_rule1' + vnet_firewall_rule_2 = 'vnet_rule2' + location = 'brazilsouth' + vnet_name = 'clitestvnet' + ignore_missing_endpoint = 'true' + address_prefix = '10.0.0.0/16' + + subnet_name_1 = 'clitestsubnet1' + subnet_prefix_1 = '10.0.0.0/24' + + subnet_name_2 = 'clitestsubnet2' + subnet_prefix_2 = '10.0.1.0/24' + + # pre create the dependent resources here + # create vnet and subnet + execute(self.cli_ctx, 'az network vnet create -n {} -g {} -l {} ' + '--address-prefix {} --subnet-name {} --subnet-prefix {}'.format(vnet_name, resource_group, location, address_prefix, subnet_name_1, + subnet_prefix_1)) + # add one more subnet + execute(self.cli_ctx, 'az network vnet subnet create --vnet-name {} -g {} ' + '--address-prefix {} -n {}'.format(vnet_name, resource_group, subnet_prefix_2, subnet_name_2)) + # test vnet-rule create + self.cmd('{} server vnet-rule create -n {} -g {} -s {} ' + '--vnet-name {} --subnet {} --ignore-missing-endpoint {}' + .format(database_engine, vnet_firewall_rule_1, resource_group, server, + vnet_name, subnet_name_1, ignore_missing_endpoint), + checks=[ + JMESPathCheck('name', vnet_firewall_rule_1), + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('state', 'Ready')]) + + # test vnet-rule show + self.cmd('{} server vnet-rule show -n {} -g {} -s {}' + .format(database_engine, vnet_firewall_rule_1, resource_group, server), + checks=[ + JMESPathCheck('name', vnet_firewall_rule_1), + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('state', 'Ready')]) + + # test create one more vnet rule . + self.cmd('{} server vnet-rule create -n {} -g {} -s {} ' + '--vnet-name {} --subnet {} --ignore-missing-endpoint {}' + .format(database_engine, vnet_firewall_rule_2, resource_group, server, + vnet_name, subnet_name_2, ignore_missing_endpoint), + checks=[ + JMESPathCheck('name', vnet_firewall_rule_2), + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('state', 'Ready')]) + + # test vnet-rule list + self.cmd('{} server vnet-rule list -g {} -s {}' + .format(database_engine, resource_group, server), + checks=[JMESPathCheck('length(@)', 2)]) + + self.cmd('{} server vnet-rule delete --name {} -g {} --server {} --yes' + .format(database_engine, vnet_firewall_rule_1, resource_group, server), checks=NoneCheck()) + self.cmd('{} server vnet-rule list -g {} --server {}' + .format(database_engine, resource_group, server), checks=[JMESPathCheck('length(@)', 1)]) + self.cmd('{} server vnet-rule delete -n {} -g {} -s {} --yes' + .format(database_engine, vnet_firewall_rule_2, resource_group, server), checks=NoneCheck()) + self.cmd('{} server vnet-rule list -g {} --server {}' + .format(database_engine, resource_group, server), checks=[NoneCheck()]) + + def _test_db_mgmt(self, resource_group, server, database_engine): + self.cmd('{} db list -g {} -s {}'.format(database_engine, resource_group, server), + checks=JMESPathCheck('type(@)', 'array')) + + def _test_configuration_mgmt(self, resource_group, server, database_engine): + if database_engine == 'mysql': + config_name = 'log_slow_admin_statements' + default_value = 'OFF' + new_value = 'ON' + else: + config_name = 'array_nulls' + default_value = 'on' + new_value = 'off' + + # test show configuration + self.cmd('{} server configuration show --name {} -g {} --server {}' + .format(database_engine, config_name, resource_group, server), + checks=[ + JMESPathCheck('name', config_name), + JMESPathCheck('value', default_value), + JMESPathCheck('source', 'system-default')]) + + # test update configuration + self.cmd('{} server configuration set -n {} -g {} -s {} --value {}' + .format(database_engine, config_name, resource_group, server, new_value), + checks=[ + JMESPathCheck('name', config_name), + JMESPathCheck('value', new_value), + JMESPathCheck('source', 'user-override')]) + + self.cmd('{} server configuration set -n {} -g {} -s {}' + .format(database_engine, config_name, resource_group, server), + checks=[ + JMESPathCheck('name', config_name), + JMESPathCheck('value', default_value)]) + + # test list configurations + self.cmd('{} server configuration list -g {} -s {}' + .format(database_engine, resource_group, server), + checks=[JMESPathCheck('type(@)', 'array')]) + + def _test_log_file_mgmt(self, resource_group, server, database_engine): + if database_engine == 'mysql': + config_name = 'slow_query_log' + new_value = 'ON' + + # test update configuration + self.cmd('{} server configuration set -n {} -g {} -s {} --value {}' + .format(database_engine, config_name, resource_group, server, new_value), + checks=[ + JMESPathCheck('name', config_name), + JMESPathCheck('value', new_value)]) + + # test list log files + # ensure recording good for at least 5 years! + result = self.cmd('{} server-logs list -g {} -s {} --file-last-written 43800' + .format(database_engine, resource_group, server), + checks=[ + JMESPathCheck('length(@)', 1), + JMESPathCheck('type(@)', 'array')]).get_output_in_json() + + self.assertIsNotNone(result[0]['name']) diff --git a/src/rdbms_vnet/azext_rdbms_vnet/validators.py b/src/rdbms_vnet/azext_rdbms_vnet/validators.py new file mode 100644 index 00000000000..3ca02f533d3 --- /dev/null +++ b/src/rdbms_vnet/azext_rdbms_vnet/validators.py @@ -0,0 +1,47 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.prompting import prompt_pass, NoTTYException +from knack.util import CLIError + +from azure.cli.core.commands.validators import ( + get_default_location_from_resource_group, validate_tags) + + +def get_combined_validator(validators): + def _final_validator_impl(cmd, namespace): + # do additional creation validation + verbs = cmd.name.rsplit(' ', 2) + if verbs[1] == 'server' and verbs[2] == 'create': + storage_validator(namespace) + password_validator(namespace) + get_default_location_from_resource_group(cmd, namespace) + + validate_tags(namespace) + + for validator in validators: + validator(namespace) + + return _final_validator_impl + + +def configuration_value_validator(ns): + val = ns.value + if val is None or not val.strip(): + ns.value = None + ns.source = 'system-default' + + +def password_validator(ns): + if not ns.administrator_login_password: + try: + ns.administrator_login_password = prompt_pass(msg='Admin Password: ') + except NoTTYException: + raise CLIError('Please specify password in non-interactive mode.') + + +def storage_validator(ns): + if ns.storage_mb and ns.storage_mb > 1023 * 1024: + raise ValueError('The size of storage cannot exceed 1023GB.') diff --git a/src/rdbms_vnet/setup.cfg b/src/rdbms_vnet/setup.cfg new file mode 100644 index 00000000000..3480374bc2f --- /dev/null +++ b/src/rdbms_vnet/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 \ No newline at end of file diff --git a/src/rdbms_vnet/setup.py b/src/rdbms_vnet/setup.py new file mode 100644 index 00000000000..926bfabe6fa --- /dev/null +++ b/src/rdbms_vnet/setup.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from codecs import open +from setuptools import setup, find_packages + +VERSION = "10.0.0" + +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +setup( + name='rdbms-vnet', + version=VERSION, + description='Support for Virtual Network rules in Azure MySQL and Azure PostgreSQL resources', + long_description='Support for Virtual Network rules in Azure MySQL and Azure PostgreSQL resources', + license='MIT', + author='Rahul G S', + author_email='ragoutha@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions', + classifiers=CLASSIFIERS, + packages=find_packages(exclude=["tests"]), + install_requires=DEPENDENCIES +)