diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5c2cdbd0717..4729a8e3d39 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -24,8 +24,6 @@ /src/storage-preview/ @evelyn_ys @calvinhzy -/src/db-up/ @Juliehzl - /src/dev-spaces/ @amsoedal /src/devcenter/ @am-lim diff --git a/src/db-up/HISTORY.rst b/src/db-up/HISTORY.rst deleted file mode 100644 index 5ed5e47cf21..00000000000 --- a/src/db-up/HISTORY.rst +++ /dev/null @@ -1,119 +0,0 @@ -.. :changelog: - -Release History -=============== -1.0.0b4 -+++++++ -* Update deprecation doc - -1.0.0b3 -+++++++ -* Deprecate this extension - -1.0.0b2 -+++++++ -* Replace msrestazure with azure.core - -1.0.0b1 (2024-06-12) -++++++++++++++++++++ -* Fix typos in the examples of commands az mysql up, az postgres up, and az sql up - -0.2.9 (2023-08-01) -++++++++++++++++++ -* Bump `psycopg2-binary` to 2.9.6 to support Python 3.11 - -0.2.8 (2023-08-01) -++++++++++++++++++ -* Pin `pymssql` to `2.2.7` - -0.2.7 (2022-04-02) -++++++++++++++++++ -* Upgrade `pymssql` to support Python 3.10 - -0.2.6 (2021-09-08) -++++++++++++++++++ -* `az sql up`: Fix pymssql installation failure with Python 3.8/3.9 - -0.2.5 (2021-09-07) -++++++++++++++++++ -* Fix psycopg2 dependency issue - -0.2.4 (2021-07-12) -++++++++++++++++++ -* Fix issue with non-existing resource group -* Fix issue #3301: az postgres up fails unpleasantly when database name contains dash - -0.2.3 (2021-05-10) -++++++++++++++++++ -* Add compatible logic for the track 2 migration of resource dependence - -0.2.2 (2021-03-22) -++++++++++++++++++ -* Configure for custom cloud settings - -0.2.1 (2021-01-11) -++++++++++++++++++ -* Bump mysql-connector-python to 8.0.14 to fix CVE-2019-2435 - -0.2.0 (2020-7-29) -++++++++++++++++++ -* `az postgres down`: Add more arguments to fix issue #942 - -0.1.15 (2020-7-20) -++++++++++++++++++ -* `az mysql up`: Refine error message for error PasswordNotComplex - -0.1.14 (2020-5-9) -++++++++++++++++++ -* Bump Cython, psycopg2-binary -* `az postgres/mysql up`: Enable SSL enforcement by default. -* Fix bug in validator when using a different resource group - -0.1.10 (2019-3-22) -++++++++++++++++++ -* `az sql up/down/show-connection-string`. - -0.1.9 (2019-3-18) -++++++++++++++++++ -* `az postgres up`: add azure-access after firewall configurations due to service bug. - -0.1.8 (2019-3-15) -++++++++++++++++++ -* `az mysql/postgres up`: default sku to `GP_Gen5_2`. -* `az postgres up`: remove idle transaction session timout config. - -0.1.7 (2019-2-28) -++++++++++++++++++ -* `az mysql/postgres show-connection-string`: change format to output like `up` commands. - -0.1.6 (2019-2-26) -++++++++++++++++++ -* `az mysql/postgres show-connection-string` commands to show connection strings without server calls. - -0.1.5 (2019-2-1) -++++++++++++++++++ -* Added Spring JDBC connection string to output. -* Make resource group more apparent in logging. - -0.1.4 (2019-1-31) -++++++++++++++++++ -* Added `az postgres up` to simplify postgresql server/database creation and configuration -* Added commands: `az mysql/postgres down` to clean up resources and cached information - -0.1.3 (2019-1-28) -++++++++++++++++++ -* `az mysql up`- minor changes in output - -0.1.2 (2019-1-25) -++++++++++++++++++ -* `az mysql up`- add host, user and password to table output -* `az mysql up`- adjust connection strings - -0.1.1 (2019-1-24) -++++++++++++++++++ -* `az mysql up`- create a resource group if a name is provided that is not an existing one -* `az mysql up`- changes to output to only show connection details and enable table format - -0.1.0 (2019-1-23) -++++++++++++++++++ -* first release with initial `az mysql up` command \ No newline at end of file diff --git a/src/db-up/README.md b/src/db-up/README.md deleted file mode 100644 index 95a1d2bfd04..00000000000 --- a/src/db-up/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Azure CLI DB Up Extension # -'db-up' extension is now deprecated. - -This extension enables single commands to create Azure Database server instances with databases. It currently supports Azure Database for MySQL and PostgreSQL. - -### How to use ### -Install this extension using the below CLI command -``` -az extension add --name db-up -``` - -#### MySQL -Ensures an Azure Database for MySQL server instance is up and running and configured for immediate use with a single command. - -This command can be run without any parameters. This will create the resource group, MySQL server instance and a sample database using generated resource names. It will also configure firewall rules to allow IP addresses from Azure as well as your local dev box to access MySQL. Information generated from this command is saved, so that when used in the future, the existing resources will be detected. -``` -az mysql up -``` - -Avoid generated resource names if existing resources are detected or certain parameters are provided. -``` -az mysql up \ - -g groupName \ - -s serverName \ - -d databaseName \ - -u adminUsername \ - -p adminPassword -``` - -Clean up the cache and delete the server. Use the `--delete-group` parameter to also delete the resource group saved in the cache. -``` -az mysql down \ - --delete-group -``` - -Show the connection strings for a database without any server calls. -``` -az mysql show-connection-string \ - -s serverName \ - -d databaseName \ - -u adminUsername \ - -p adminPassword -``` - -#### PostgreSQL -Ensures an Azure Database for PostgreSQL server instance is up and running and configured for immediate use with a single command. - -This command can be run without any parameters. This will create the resource group, PostgreSQL server instance and a sample database using generated resource names. It will also configure firewall rules to allow IP addresses from Azure as well as your local dev box to access PostgreSQL. Information generated from this command is saved, so that when used in the future, the existing resources will be detected. -``` -az postgres up -``` - -Avoid generated resource names if existing resources are detected or certain parameters are provided. -``` -az postgres up \ - -g groupName \ - -s serverName \ - -d databaseName \ - -u adminUsername \ - -p adminPassword -``` - -Clean up the cache and delete the server. Use the `--delete-group` parameter to also delete the resource group saved in the cache. -``` -az postgres down \ - --delete-group -``` - -Show the connection strings for a database without any server calls. -``` -az postgres show-connection-string \ - -s serverName \ - -d databaseName \ - -u adminUsername \ - -p adminPassword -``` - -#### SQL -Ensures an Azure Database for SQL server instance is up and running and configured for immediate use with a single command. - -This command can be run without any parameters. This will create the resource group, SQL server instance and a sample database using generated resource names. It will also configure firewall rules to allow IP addresses from Azure as well as your local dev box to access SQL. Information generated from this command is saved, so that when used in the future, the existing resources will be detected. -``` -az sql up -``` - -Avoid generated resource names if existing resources are detected or certain parameters are provided. -``` -az sql up \ - -g groupName \ - -s serverName \ - -d databaseName \ - -u adminUsername \ - -p adminPassword -``` - -Clean up the cache and delete the server. Use the `--delete-group` parameter to also delete the resource group saved in the cache. -``` -az sql down \ - --delete-group -``` - -Show the connection strings for a database without any server calls. -``` -az sql show-connection-string \ - -s serverName \ - -d databaseName \ - -u adminUsername \ - -p adminPassword -``` diff --git a/src/db-up/azext_db_up/__init__.py b/src/db-up/azext_db_up/__init__.py deleted file mode 100644 index ebbf3426bf4..00000000000 --- a/src/db-up/azext_db_up/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 -# pylint: disable=unused-import -import azext_db_up._help - - -class DbUpCommandsLoader(AzCommandsLoader): - def __init__(self, cli_ctx=None): - from azure.cli.core.commands import CliCommandType - db_up_custom = CliCommandType( - operations_tmpl='azext_db_up.custom#{}') - super(DbUpCommandsLoader, self).__init__(cli_ctx=cli_ctx, - custom_command_type=db_up_custom) - - def load_command_table(self, args): - super(DbUpCommandsLoader, self).load_command_table(args) - from .commands import load_command_table - load_command_table(self, args) - return self.command_table - - def load_arguments(self, command): - super(DbUpCommandsLoader, self).load_arguments(command) - from ._params import load_arguments - load_arguments(self, command) - - -COMMAND_LOADER_CLS = DbUpCommandsLoader diff --git a/src/db-up/azext_db_up/_client_factory.py b/src/db-up/azext_db_up/_client_factory.py deleted file mode 100644 index b56ab02948b..00000000000 --- a/src/db-up/azext_db_up/_client_factory.py +++ /dev/null @@ -1,125 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -from os import getenv -from azure.cli.core.commands.client_factory import get_mgmt_service_client -from azure.cli.core.profiles import ResourceType - -# 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 azext_db_up.vendored_sdks.azure_mgmt_rdbms.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) - # Normal production scenario. - return get_mgmt_service_client(cli_ctx, MySQLManagementClient) - - -def get_postgresql_management_client(cli_ctx, **_): - from azext_db_up.vendored_sdks.azure_mgmt_rdbms.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) - # Normal production scenario. - return get_mgmt_service_client(cli_ctx, PostgreSQLManagementClient) - - -def get_sql_management_client(cli_ctx): - from azext_db_up.vendored_sdks.azure_mgmt_sql.sql import SqlManagementClient - - # Normal production scenario. - return get_mgmt_service_client(cli_ctx, SqlManagementClient) - - -def cf_mysql_servers(cli_ctx, _): - return get_mysql_management_client(cli_ctx).servers - - -def cf_postgres_servers(cli_ctx, _): - return get_postgresql_management_client(cli_ctx).servers - - -def cf_sql_servers(cli_ctx, _): - return get_sql_management_client(cli_ctx).servers - - -def cf_mysql_firewall_rules(cli_ctx, _): - return get_mysql_management_client(cli_ctx).firewall_rules - - -def cf_postgres_firewall_rules(cli_ctx, _): - return get_postgresql_management_client(cli_ctx).firewall_rules - - -def cf_sql_firewall_rules(cli_ctx, _): - return get_sql_management_client(cli_ctx).firewall_rules - - -def cf_mysql_config(cli_ctx, _): - return get_mysql_management_client(cli_ctx).configurations - - -def cf_postgres_config(cli_ctx, _): - return get_postgresql_management_client(cli_ctx).configurations - - -def cf_mysql_db(cli_ctx, _): - return get_mysql_management_client(cli_ctx).databases - - -def cf_postgres_db(cli_ctx, _): - return get_postgresql_management_client(cli_ctx).databases - - -def cf_sql_db(cli_ctx, _): - return get_sql_management_client(cli_ctx).databases - - -def resource_client_factory(cli_ctx, **_): - return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES) diff --git a/src/db-up/azext_db_up/_exception_handler.py b/src/db-up/azext_db_up/_exception_handler.py deleted file mode 100644 index 99a05411570..00000000000 --- a/src/db-up/azext_db_up/_exception_handler.py +++ /dev/null @@ -1,22 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - - -def password_handler(ex): - from azure.core.exceptions import HttpResponseError - if isinstance(ex, HttpResponseError): - if ex.error.error == "PasswordNotComplex": - raise HttpResponseError( - ex.response, - "{} Password must contain characters from at least three of the following categories: " - "English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters. " - "Your password cannot contain all or part of login name. Part of a login name is defined as three " - "or more consecutive alphanumeric characters.".format(ex.message)) - if ex.error.error == "PasswordTooShort": - raise HttpResponseError( - ex.response, - "{} Password must contain minimum 8 characters and maximum 128 characters.".format(ex.message)) - - raise ex diff --git a/src/db-up/azext_db_up/_help.py b/src/db-up/azext_db_up/_help.py deleted file mode 100644 index 0f3ab07531f..00000000000 --- a/src/db-up/azext_db_up/_help.py +++ /dev/null @@ -1,77 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 - - -helps['mysql up'] = """ - type: command - short-summary: Set up an Azure Database for MySQL server and configurations. - examples: - - name: Ensure that an Azure Database for MySQL server is up and running and configured for immediate use. - text: az mysql up - - name: To override default names, provide parameters indicating desired values/existing resources. - text: az mysql up -g MyResourceGroup -s MyServer -d MyDatabase -u MyUsername -p MyPassword -""" - -helps['postgres up'] = """ - type: command - short-summary: Set up an Azure Database for PostgreSQL server and configurations. - examples: - - name: Ensure that an Azure Database for PostgreSQL server is up and running and configured for immediate use. - text: az postgres up - - name: To override default names, provide parameters indicating desired values/existing resources. - text: az postgres up -g MyResourceGroup -s MyServer -d MyDatabase -u MyUsername -p MyPassword -""" - -helps['sql up'] = """ - type: command - short-summary: Set up an Azure Database for SQL server and configurations. - examples: - - name: Ensure that an Azure Database for SQL server is up and running and configured for immediate use. - text: az sql up - - name: To override default names, provide parameters indicating desired values/existing resources. - text: az sql up -g MyResourceGroup -s MyServer -d MyDatabase -u MyUsername -p MyPassword -""" - -helps['mysql down'] = """ - type: command - short-summary: Delete the MySQL server and its cached information. - examples: - - name: Delete the server and the cached data, aside from the resource group. - text: az mysql down - - name: Delete the resource group and the full cache. - text: az mysql down --delete-group -""" - -helps['postgres down'] = """ - type: command - short-summary: Delete the PostgreSQL server and its cached information. - examples: - - name: Delete the server and the cached data, aside from the resource group. - text: az postgres down - - name: Delete the resource group and the full cache. - text: az postgres down --delete-group -""" - -helps['sql down'] = """ - type: command - short-summary: Delete the SQL server and its cached information. - examples: - - name: Delete the server and the cached data, aside from the resource group. - text: az sql down - - name: Delete the resource group and the full cache. - text: az sql down --delete-group -""" - -helps['mysql show-connection-string'] = """ - type: command - short-summary: Show the connection strings for a MySQL server database. -""" - -helps['postgres show-connection-string'] = """ - type: command - short-summary: Show the connection strings for a PostgreSQL server database. -""" diff --git a/src/db-up/azext_db_up/_params.py b/src/db-up/azext_db_up/_params.py deleted file mode 100644 index ea92f2becfe..00000000000 --- a/src/db-up/azext_db_up/_params.py +++ /dev/null @@ -1,76 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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.parameters import tags_type, get_location_type, get_enum_type -from azure.cli.core.local_context import LocalContextAttribute, LocalContextAction -from azext_db_up.vendored_sdks.azure_mgmt_rdbms.mysql.models.my_sql_management_client_enums import ( - SslEnforcementEnum, GeoRedundantBackup -) - - -def load_arguments(self, _): # pylint: disable=too-many-locals, too-many-statements - for scope in ('mysql', 'postgres', 'sql'): - with self.argument_context('{} up'.format(scope)) as c: - c.argument('location', arg_type=get_location_type(self.cli_ctx)) - c.argument('server_name', options_list=['--server-name', '-s'], help='Name of the server.') - c.argument('administrator_login', options_list=['--admin-user', '-u'], arg_group='Authentication', - help='The login username of the administrator.') - c.argument('administrator_login_password', options_list=['--admin-password', '-p'], - arg_group='Authentication', - help='The login password of the administrator. Minimum 8 characters and maximum 128 characters. ' - 'Password must contain characters from three of the following categories: English uppercase ' - 'letters, English lowercase letters, numbers, and non-alphanumeric characters.' - 'Your password cannot contain all or part of the login name. Part of a login name is defined ' - 'as three or more consecutive alphanumeric characters.') - c.extra('generate_password', help='Generate a password.', arg_group='Authentication') - c.argument('database_name', options_list=['--database-name', '-d'], - help='The name of a database to initialize.') - c.argument('tags', tags_type) - - if scope != 'sql': # SQL alreaady has a core command for displaying connection strings - with self.argument_context('{} show-connection-string'.format(scope)) as c: - c.argument('server_name', options_list=['--server-name', '-s'], help='Name of the server.') - c.argument('database_name', options_list=['--database-name', '-d'], help='The name of a database.') - c.argument('administrator_login', options_list=['--admin-user', '-u'], - help='The login username of the administrator.') - c.argument('administrator_login_password', options_list=['--admin-password', '-p'], - help='The login password of the administrator.') - - with self.argument_context('{} down'.format(scope)) as c: - c.argument('server_name', options_list=['--server-name', '-s'], help='Name of the server.') - c.argument('delete_group', action='store_true', help="Delete the resource group.") - - for scope in ('mysql', 'postgres'): - with self.argument_context('{} up'.format(scope)) as c: - c.argument('sku_name', options_list=['--sku-name'], default='GP_Gen5_2', - help='The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.') - c.argument('backup_retention', type=int, help='The number of days a backup is retained.') - c.argument('geo_redundant_backup', arg_type=get_enum_type(GeoRedundantBackup), - default=GeoRedundantBackup.disabled.value, help='Enable Geo-redundant or not for server backup.') - c.argument('storage_mb', options_list=['--storage-size'], type=int, - help='The max storage size of the server. Unit is megabytes.') - c.argument('ssl_enforcement', arg_type=get_enum_type(SslEnforcementEnum), - default=SslEnforcementEnum.enabled.value, - help='Enable ssl enforcement or not when connect to server.') - - with self.argument_context('mysql up') as c: - c.argument('version', help='Server version', default='5.7') - - with self.argument_context('postgres up') as c: - c.argument('server_name', options_list=['--server-name', '-s'], help='Name of the server.', - local_context_attribute=LocalContextAttribute( - name='postgres_server_name', actions=[LocalContextAction.SET], scopes=['cupertino'])) - c.argument('administrator_login', options_list=['--admin-user', '-u'], arg_group='Authentication', - help='The login username of the administrator.', - local_context_attribute=LocalContextAttribute( - name='postgres_admin_user_name', actions=[LocalContextAction.SET], scopes=['cupertino'])) - c.argument('database_name', options_list=['--database-name', '-d'], - help='The name of a database to initialize.', - local_context_attribute=LocalContextAttribute( - name='postgres_database_name', actions=[LocalContextAction.SET], scopes=['cupertino'])) - c.argument('version', help='Server version', default='10') - - with self.argument_context('sql up') as c: - c.argument('version', help='Server version', default='12.0') diff --git a/src/db-up/azext_db_up/_transformers.py b/src/db-up/azext_db_up/_transformers.py deleted file mode 100644 index b6606856310..00000000000 --- a/src/db-up/azext_db_up/_transformers.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -from collections import OrderedDict - - -def table_transform_connection_string(result): - table_result = [] - for key in ('host', 'username', 'password'): - entry = OrderedDict() - entry['Property'] = key - entry['Value'] = result[key] - table_result.append(entry) - - connection_strings = result['connectionStrings'] - for key in sorted(connection_strings.keys()): - entry = OrderedDict() - entry['Property'] = key - entry['Value'] = connection_strings[key] - table_result.append(entry) - return table_result diff --git a/src/db-up/azext_db_up/_validators.py b/src/db-up/azext_db_up/_validators.py deleted file mode 100644 index 43b21a6f824..00000000000 --- a/src/db-up/azext_db_up/_validators.py +++ /dev/null @@ -1,126 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -# pylint: disable=import-error -import uuid -from six.moves import configparser -from azure.cli.core.commands.validators import get_default_location_from_resource_group -from azure.mgmt.resource.resources.models import ResourceGroup -from knack.log import get_logger -from knack.util import CLIError -from azext_db_up._client_factory import resource_client_factory -from azext_db_up.random_name.generate import generate_username -from azext_db_up.util import create_random_resource_name, get_config_value, set_config_value, remove_config_value - -logger = get_logger(__name__) - -DEFAULT_LOCATION = 'westus2' -DEFAULT_DATABASE_NAME = 'sampledb' - - -def db_up_namespace_processor(db_type): - return lambda cmd, namespace: _process_db_up_namespace(cmd, namespace, db_type=db_type) - - -def db_down_namespace_processor(db_type): - return lambda cmd, namespace: _process_db_down_namespace(namespace, db_type=db_type) - - -# pylint: disable=bare-except, broad-exception-caught -def _process_db_up_namespace(cmd, namespace, db_type=None): - # populate from cache if existing when no resource group name provided - resource_client = resource_client_factory(cmd.cli_ctx) - if namespace.resource_group_name is None: - _set_value(db_type, namespace, 'resource_group_name', 'group', cache=False) - try: - resource_client.resource_groups.get(namespace.resource_group_name) - except: # Clear resource group name information when it is invalid - namespace.resource_group_name = None - - # populate from cache if existing when no location provided - if namespace.location is None: - _set_value(db_type, namespace, 'location', 'location', cache=False) - # generate smart defaults when namespace.location is None - if _get_value(db_type, namespace, 'location', 'location') is None: - try: - get_default_location_from_resource_group(cmd, namespace) - except Exception: - namespace.location = 'eastus' - _set_value(db_type, namespace, 'location', 'location', default=namespace.location) - - # When resource group name in namespace is different from what in cache, reset it and create new server name - if namespace.resource_group_name != get_config_value(db_type, 'group', None): - set_config_value(db_type, 'group', namespace.resource_group_name) - if namespace.server_name is None: - namespace.server_name = create_random_resource_name('server') - set_config_value(db_type, 'server', namespace.server_name) - - # When no resource group name in namespace and cache, create new resource group with random name - create_resource_group = True - if namespace.resource_group_name is None: # No resource group provided and in cache - namespace.resource_group_name = create_random_resource_name('group') - else: - try: - resource_client.resource_groups.get(namespace.resource_group_name) - create_resource_group = False - except Exception: # throw exception when resource group name is invalid - pass - - if create_resource_group: - # create new resource group - params = ResourceGroup(location=namespace.location) - logger.warning('Creating Resource Group \'%s\'...', namespace.resource_group_name) - resource_client.resource_groups.create_or_update(namespace.resource_group_name, params) - _set_value(db_type, namespace, 'resource_group_name', 'group', default=namespace.resource_group_name) - - _set_value(db_type, namespace, 'server_name', 'server', default=create_random_resource_name('server')) - _set_value(db_type, namespace, 'administrator_login', 'login', default=generate_username()) - if namespace.generate_password: - namespace.administrator_login_password = str(uuid.uuid4()) - del namespace.generate_password - _set_value(db_type, namespace, 'database_name', 'database', default=DEFAULT_DATABASE_NAME) - - -# pylint: disable=duplicate-string-formatting-argument -def _process_db_down_namespace(namespace, db_type=None): - # populate from cache if existing - if namespace.resource_group_name is None: - namespace.resource_group_name = _get_value(db_type, namespace, 'resource_group_name', 'group') - remove_config_value(db_type, 'group') - if namespace.server_name is None and not namespace.delete_group: - namespace.server_name = _get_value(db_type, namespace, 'server_name', 'server') - remove_config_value(db_type, 'server') - remove_config_value(db_type, 'login') - remove_config_value(db_type, 'database') - remove_config_value(db_type, 'location') - - # put resource group info back in config if user does not want to delete it - if not namespace.delete_group and namespace.resource_group_name: - _set_value(db_type, namespace, 'resource_group_name', 'group') - - # error handling - if namespace.delete_group and not namespace.resource_group_name: - raise CLIError("Please specify the resource group name to delete.") - if not namespace.delete_group and not namespace.resource_group_name and not namespace.server_name: - raise CLIError("Please specify the {} server name to delete and its resource group name if you only want to " - "delete the specific {} server.".format(db_type, db_type)) - - -def _set_value(db_type, namespace, attribute, option, default=None, cache=True): - if getattr(namespace, attribute) is None: - try: - if get_config_value(db_type, option): - setattr(namespace, attribute, get_config_value(db_type, option)) - else: - setattr(namespace, attribute, default) - except (configparser.NoSectionError, configparser.NoOptionError): - if default is not None: - setattr(namespace, attribute, default) - if cache: - set_config_value(db_type, option, getattr(namespace, attribute)) - - -def _get_value(db_type, namespace, attribute, option): - return getattr(namespace, attribute, None) or get_config_value(db_type, option, None) diff --git a/src/db-up/azext_db_up/azext_metadata.json b/src/db-up/azext_db_up/azext_metadata.json deleted file mode 100644 index e0e4775ec61..00000000000 --- a/src/db-up/azext_db_up/azext_metadata.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "azext.minCliCoreVersion": "2.0.46" -} \ No newline at end of file diff --git a/src/db-up/azext_db_up/commands.py b/src/db-up/azext_db_up/commands.py deleted file mode 100644 index aaa8d06dc86..00000000000 --- a/src/db-up/azext_db_up/commands.py +++ /dev/null @@ -1,64 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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_db_up._client_factory import cf_mysql_servers, cf_postgres_servers, cf_sql_servers -from azext_db_up._validators import db_up_namespace_processor, db_down_namespace_processor -from azext_db_up._transformers import table_transform_connection_string - - -def _deprecation_message(self): # pylint: disable=unused-argument - msg = ("'db-up' extension will be retired on November 20, 2024, " - "please consider using the create command associated with the respective database") - return msg - - -def load_command_table(self, _): # pylint: disable=too-many-locals, too-many-statements - mysql_servers_sdk = CliCommandType( - operations_tmpl='azext_db_up.vendored_sdks.azure_mgmt_rdbms.mysql.operations.servers_operations' - '#ServersOperations.{}', - client_factory=cf_mysql_servers - ) - - postgres_servers_sdk = CliCommandType( - operations_tmpl='azext_db_up.vendored_sdks.azure_mgmt_rdbms.postgresql.operations.servers_operations' - '#ServersOperations.{}', - client_factory=cf_postgres_servers - ) - - sql_servers_sdk = CliCommandType( - operations_tmpl='azext_db_up.vendored_sdks.azure_mgmt_sql.sql.operations.servers_operations' - '#ServersOperations.{}', - client_factory=cf_sql_servers - ) - - with self.command_group('mysql', mysql_servers_sdk, client_factory=cf_mysql_servers) as g: - from ._exception_handler import password_handler - g.custom_command('up', 'mysql_up', validator=db_up_namespace_processor('mysql'), - table_transformer=table_transform_connection_string, - exception_handler=password_handler, - deprecate_info=g.deprecate(message_func=_deprecation_message)) - g.custom_command('down', 'server_down', validator=db_down_namespace_processor('mysql'), supports_no_wait=True, - confirmation=True, deprecate_info=g.deprecate(message_func=_deprecation_message)) - g.custom_command('show-connection-string', 'create_mysql_connection_string', - deprecate_info=g.deprecate(message_func=_deprecation_message)) - - with self.command_group('postgres', postgres_servers_sdk, client_factory=cf_postgres_servers) as g: - g.custom_command('up', 'postgres_up', validator=db_up_namespace_processor('postgres'), - table_transformer=table_transform_connection_string, - deprecate_info=g.deprecate(message_func=_deprecation_message)) - g.custom_command('down', 'server_down', validator=db_down_namespace_processor('postgres'), - supports_no_wait=True, confirmation=True, - deprecate_info=g.deprecate(message_func=_deprecation_message)) - g.custom_command('show-connection-string', 'create_postgresql_connection_string', - deprecate_info=g.deprecate(message_func=_deprecation_message)) - - with self.command_group('sql', sql_servers_sdk, client_factory=cf_sql_servers) as g: - g.custom_command('up', 'sql_up', validator=db_up_namespace_processor('sql'), - table_transformer=table_transform_connection_string, - deprecate_info=g.deprecate(message_func=_deprecation_message)) - g.custom_command('down', 'server_down', validator=db_down_namespace_processor('sql'), - supports_no_wait=True, confirmation=True, - deprecate_info=g.deprecate(message_func=_deprecation_message)) diff --git a/src/db-up/azext_db_up/custom.py b/src/db-up/azext_db_up/custom.py deleted file mode 100644 index dc61a63a4b1..00000000000 --- a/src/db-up/azext_db_up/custom.py +++ /dev/null @@ -1,648 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -# pylint: disable=import-error,too-many-locals -import os -import re -import sys -import uuid -from azure.core.exceptions import HttpResponseError -from knack.log import get_logger -from knack.util import CLIError -import mysql.connector as mysql_connector -import psycopg2 -from azext_db_up.vendored_sdks.azure_mgmt_rdbms import mysql, postgresql -from azext_db_up.vendored_sdks.azure_mgmt_sql import sql -from azext_db_up._client_factory import ( - cf_mysql_firewall_rules, cf_mysql_config, cf_mysql_db, - cf_postgres_firewall_rules, cf_postgres_config, cf_postgres_db, - cf_sql_firewall_rules, cf_sql_db, - resource_client_factory) -from azext_db_up.util import update_kwargs, resolve_poller - -logger = get_logger(__name__) - - -def mysql_up(cmd, client, resource_group_name=None, server_name=None, location=None, backup_retention=None, - sku_name=None, geo_redundant_backup=None, storage_mb=None, administrator_login=None, - administrator_login_password=None, version=None, ssl_enforcement=None, database_name=None, tags=None): - db_context = DbContext( - azure_sdk=mysql, cf_firewall=cf_mysql_firewall_rules, cf_db=cf_mysql_db, - cf_config=cf_mysql_config, logging_name='MySQL', connector=mysql_connector, command_group='mysql', - server_client=client) - - try: - server_result = client.get(resource_group_name, server_name) - logger.warning('Found existing MySQL Server \'%s\' in group \'%s\'', - server_name, resource_group_name) - # update server if needed - server_result = _update_server( - db_context, cmd, client, server_result, resource_group_name, server_name, backup_retention, - geo_redundant_backup, storage_mb, administrator_login_password, version, ssl_enforcement, tags) - except HttpResponseError: - # Create mysql server - if administrator_login_password is None: - administrator_login_password = str(uuid.uuid4()) - server_result = _create_server( - db_context, cmd, resource_group_name, server_name, location, backup_retention, - sku_name, geo_redundant_backup, storage_mb, administrator_login, administrator_login_password, version, - ssl_enforcement, tags) - - # Set timeout configuration - logger.warning('Configuring wait timeout to 8 hours...') - config_client = cf_mysql_config(cmd.cli_ctx, None) - resolve_poller( - config_client.create_or_update(resource_group_name, server_name, 'wait_timeout', '28800'), - cmd.cli_ctx, 'MySQL Configuration Update') - - # Create firewall rule to allow for Azure IPs - _create_azure_firewall_rule(db_context, cmd, resource_group_name, server_name) - - # Create mysql database if it does not exist - _create_database(db_context, cmd, resource_group_name, server_name, database_name) - - # check ip address(es) of the user and configure firewall rules - mysql_errors = (mysql_connector.errors.DatabaseError, mysql_connector.errors.InterfaceError) - host, user = _configure_firewall_rules( - db_context, mysql_errors, cmd, server_result, resource_group_name, server_name, administrator_login, - administrator_login_password, database_name) - - # connect to mysql and run some commands - if administrator_login_password is not None: - _run_mysql_commands(host, user, administrator_login_password, database_name) - - return { - 'connectionStrings': _create_mysql_connection_string( - host, user, administrator_login_password, database_name), - 'host': host, - 'username': user, - 'password': administrator_login_password if administrator_login_password is not None else '*****' - } - - -def postgres_up(cmd, client, resource_group_name=None, server_name=None, location=None, backup_retention=None, - sku_name=None, geo_redundant_backup=None, storage_mb=None, administrator_login=None, - administrator_login_password=None, version=None, ssl_enforcement=None, database_name=None, tags=None): - db_context = DbContext( - azure_sdk=postgresql, cf_firewall=cf_postgres_firewall_rules, cf_db=cf_postgres_db, - cf_config=cf_postgres_config, logging_name='PostgreSQL', connector=psycopg2, command_group='postgres', - server_client=client) - - try: - server_result = client.get(resource_group_name, server_name) - logger.warning('Found existing PostgreSQL Server \'%s\' in group \'%s\'', - server_name, resource_group_name) - # update server if needed - server_result = _update_server( - db_context, cmd, client, server_result, resource_group_name, server_name, backup_retention, - geo_redundant_backup, storage_mb, administrator_login_password, version, ssl_enforcement, tags) - except HttpResponseError: - # Create postgresql server - if administrator_login_password is None: - administrator_login_password = str(uuid.uuid4()) - server_result = _create_server( - db_context, cmd, resource_group_name, server_name, location, backup_retention, - sku_name, geo_redundant_backup, storage_mb, administrator_login, administrator_login_password, version, - ssl_enforcement, tags) - - # # Set timeout configuration - # logger.warning('Configuring wait timeout to 8 hours...') - # config_client = cf_postgres_config(cmd.cli_ctx, None) - # resolve_poller( - # config_client.create_or_update( - # resource_group_name, server_name, 'idle_in_transaction_session_timeout', '28800000'), - # cmd.cli_ctx, 'PostgreSQL Configuration Update') - - # Create postgresql database if it does not exist - _create_database(db_context, cmd, resource_group_name, server_name, database_name) - - # check ip address(es) of the user and configure firewall rules - postgres_errors = (psycopg2.OperationalError) - host, user = _configure_firewall_rules( - db_context, postgres_errors, cmd, server_result, resource_group_name, server_name, administrator_login, - administrator_login_password, database_name) - - # Create firewall rule to allow for Azure IPs - # - Moved here to run every time after other firewall rules are configured because - # bug on server disables this whenever other firewall rules are added. - _create_azure_firewall_rule(db_context, cmd, resource_group_name, server_name) - - # connect to postgresql and run some commands - if administrator_login_password is not None: - _run_postgresql_commands(host, user, administrator_login_password, database_name) - - return _form_response( - _create_postgresql_connection_string(host, user, administrator_login_password, database_name), - host, user, - administrator_login_password if administrator_login_password is not None else '*****' - ) - - -def sql_up(cmd, client, resource_group_name=None, server_name=None, location=None, administrator_login=None, - administrator_login_password=None, version=None, database_name=None, tags=None): - _ensure_pymssql() - import pymssql - db_context = DbContext( - azure_sdk=sql, cf_firewall=cf_sql_firewall_rules, cf_db=cf_sql_db, - logging_name='SQL', command_group='sql', server_client=client, connector=pymssql) - - try: - server_result = client.get(resource_group_name, server_name) - logger.warning('Found existing SQL Server \'%s\' in group \'%s\'', - server_name, resource_group_name) - # update server if needed - server_result = _update_sql_server( - db_context, cmd, client, server_result, resource_group_name, server_name, administrator_login_password, - version, tags) - except HttpResponseError: - # Create sql server - if administrator_login_password is None: - administrator_login_password = str(uuid.uuid4()) - server_result = _create_sql_server( - db_context, cmd, resource_group_name, server_name, location, administrator_login, - administrator_login_password, version, tags) - - # Create firewall rule to allow for Azure IPs - _create_azure_firewall_rule(db_context, cmd, resource_group_name, server_name) - - # Create sql database if it does not exist - _create_sql_database(db_context, cmd, resource_group_name, server_name, database_name, location) - - # check ip address(es) of the user and configure firewall rules - sql_errors = (pymssql.InterfaceError, pymssql.OperationalError) - host, user = _configure_firewall_rules( - db_context, sql_errors, cmd, server_result, resource_group_name, server_name, administrator_login, - administrator_login_password, database_name, {'tds_version': '7.0'}) - - user = '{}@{}'.format(administrator_login, server_name) - host = server_result.fully_qualified_domain_name - - # connect to sql server and run some commands - if administrator_login_password is not None: - _run_sql_commands(host, user, administrator_login_password, database_name) - - return _form_response( - _create_sql_connection_string(host, user, administrator_login_password, database_name), - host, user, - administrator_login_password if administrator_login_password is not None else '*****' - ) - - -def _ensure_pymssql(): - # we make sure "pymssql" get setup here, because on OSX, pymssql requires homebrew "FreeTDS", - # which pip is not able to handle. - try: - import pymssql # pylint: disable=unused-import,unused-variable - except ImportError: - import subprocess - logger.warning("Installing dependencies required to configure Azure SQL server...") - if sys.platform == 'darwin': - try: - subprocess.check_output(['brew', 'list', 'freetds'], stderr=subprocess.STDOUT) - except subprocess.CalledProcessError: - logger.warning(' Installing "freetds" through brew...') - subprocess.check_output(['brew', 'install', 'freetds']) - from azure.cli.core.extension import EXTENSIONS_DIR - db_up_ext_path = os.path.join(EXTENSIONS_DIR, 'db-up') - python_path = os.environ.get('PYTHONPATH', '') - os.environ['PYTHONPATH'] = python_path + ':' + db_up_ext_path if python_path else db_up_ext_path - cmd = [sys.executable, '-m', 'pip', 'install', '--target', db_up_ext_path, - 'pymssql==2.2.7', '-vv', '--disable-pip-version-check', '--no-cache-dir'] - logger.warning(' Installing "pymssql" pip packages') - with HomebrewPipPatch(): - subprocess.check_output(cmd, stderr=subprocess.STDOUT) - import pymssql # reload - - -def server_down(cmd, client, resource_group_name=None, server_name=None, delete_group=None): - if delete_group: - resource_client = resource_client_factory(cmd.cli_ctx) - if resource_group_name is None: - raise CLIError("Expected a a resource group name saved in cache.") - - # delete resource group - logger.warning('Deleting Resource Group \'%s\'...', resource_group_name) - return resource_client.resource_groups.begin_delete(resource_group_name) - logger.warning('Deleting server \'%s\'...', server_name) - return client.delete(resource_group_name, server_name) - - -def create_mysql_connection_string(cmd, server_name='{server}', database_name='{database}', - administrator_login='{login}', administrator_login_password='{password}'): - user = '{}@{}'.format(administrator_login, server_name) - host = server_name + cmd.cli_ctx.cloud.suffixes.mysql_server_endpoint - return _form_response( - _create_mysql_connection_string(host, user, administrator_login_password, database_name), - host, user, administrator_login_password - ) - - -def create_postgresql_connection_string(cmd, server_name='{server}', database_name='{database}', - administrator_login='{login}', administrator_login_password='{password}'): - user = '{}@{}'.format(administrator_login, server_name) - host = server_name + cmd.cli_ctx.cloud.suffixes.postgresql_server_endpoint - return _form_response( - _create_postgresql_connection_string(host, user, administrator_login_password, database_name), - host, user, administrator_login_password - ) - - -def create_sql_connection_string(cmd, server_name='{server}', database_name='{database}', administrator_login='{login}', - administrator_login_password='{password}'): - user = '{}@{}'.format(administrator_login, server_name) - host = server_name + cmd.cli_ctx.cloud.suffixes.sql_server_endpoint - return _form_response( - _create_sql_connection_string(host, user, administrator_login_password, database_name), - host, user, administrator_login_password - ) - - -def _form_response(connection_strings, host, username, password): - return { - 'connectionStrings': connection_strings, - 'host': host, - 'username': username, - 'password': password - } - - -def _create_mysql_connection_string(host, user, password, database): - result = { - 'mysql_cmd': "mysql {database} --host {host} --user {user} --password={password}", - 'ado.net': "Server={host}; Port=3306; Database={database}; Uid={user}; Pwd={password};", - 'jdbc': "jdbc:mysql://{host}:3306/{database}?user={user}&password={password}", - 'jdbc Spring': "spring.datasource.url=jdbc:mysql://{host}:3306/{database} " - "spring.datasource.username={user} " - "spring.datasource.password={password}", - 'node.js': "var conn = mysql.createConnection({{host: '{host}', user: '{user}', " - "password: {password}, database: {database}, port: 3306}});", - 'php': "host={host} port=5432 dbname={database} user={user} password={password}", - 'python': "cnx = mysql.connector.connect(user='{user}', password='{password}', host='{host}', " - "port=3306, database='{database}')", - 'ruby': "client = Mysql2::Client.new(username: '{user}', password: '{password}', " - "database: '{database}', host: '{host}', port: 3306)", - 'webapp': "Database={database}; Data Source={host}; User Id={user}; Password={password}" - } - - connection_kwargs = { - 'host': host, - 'user': user, - 'password': password if password is not None else '{password}', - 'database': database - } - - for k, v in result.items(): - result[k] = v.format(**connection_kwargs) - return result - - -def _create_postgresql_connection_string(host, user, password, database): - result = { - 'psql_cmd': "psql --host={host} --port=5432 --username={user} --dbname={database}", - 'ado.net': "Server={host};Database={database};Port=5432;User Id={user};Password={password};", - 'jdbc': "jdbc:postgresql://{host}:5432/{database}?user={user}&password={password}", - 'jdbc Spring': "spring.datasource.url=jdbc:postgresql://{host}:5432/{database} " - "spring.datasource.username={user} " - "spring.datasource.password={password}", - 'node.js': "var client = new pg.Client('postgres://{user}:{password}@{host}:5432/{database}');", - 'php': "host={host} port=5432 dbname={database} user={user} password={password}", - 'python': "cnx = psycopg2.connect(database='{database}', user='{user}', host='{host}', password='{password}', " - "port='5432')", - 'ruby': "cnx = PG::Connection.new(:host => '{host}', :user => '{user}', :dbname => '{database}', " - ":port => '5432', :password => '{password}')", - 'webapp': "Database={database}; Data Source={host}; User Id={user}; Password={password}" - } - - connection_kwargs = { - 'host': host, - 'user': user, - 'password': password if password is not None else '{password}', - 'database': database - } - - for k, v in result.items(): - result[k] = v.format(**connection_kwargs) - return result - - -def _create_sql_connection_string(host, user, password, database): - result = { - # https://docs.microsoft.com/azure/sql-database/sql-database-connect-query-nodejs - 'ado.net': "Server={host},1433;Initial Catalog={database};User ID={user};Password={password};", - 'jdbc': "jdbc:sqlserver://{host}:1433;database={database};user={user};password={password};", - 'odbc': "Driver={{ODBC Driver 13 for SQL Server}};Server={host},1433;Database={database};Uid={user};" - "Pwd={password};", - 'php': "$conn = new PDO('sqlsrv:server={host} ; Database = {database}', '{user}', '{password}');", - 'python': "pyodbc.connect('DRIVER={{ODBC Driver 17 for SQL Server}};SERVER={host};DATABASE={database};" - "UID={admin_login};PWD={password}')", - "node.js": "var conn = new require('tedious').Connection(" - "{{authentication: {{ options: {{ userName: '{user}', password: '{password}' }}, type: 'default'}}, " - "server: '{host}', options:{{ database: '{database}', encrypt: true }}}});", - 'jdbc Spring': "spring.datasource.url=jdbc:sqlserver://{host}:1433/sampledb spring.datasource.username={user} " - "spring.datasource.password={password}", - "ruby": "client = TinyTds::Client.new(username: {user}, password: {password}, host: {host}, port: 1433, " - "database: {database}, azure: true)", - } - - admin_login, _ = user.split('@') - connection_kwargs = { - 'host': host, - 'user': user, - 'password': password if password is not None else '{password}', - 'database': database, - 'admin_login': admin_login - } - - for k, v in result.items(): - result[k] = v.format(**connection_kwargs) - return result - - -def _run_mysql_commands(host, user, password, database): - # Connect to mysql and get cursor to run sql commands - connection = mysql_connector.connect(user=user, host=host, password=password, database=database) - logger.warning('Successfully Connected to MySQL.') - cursor = connection.cursor() - try: - db_password = _create_db_password(database) - cursor.execute("CREATE USER 'root' IDENTIFIED BY '{}'".format(db_password)) - logger.warning("Ran Database Query: `CREATE USER 'root' IDENTIFIED BY '%s'`", db_password) - except mysql_connector.errors.DatabaseError: - pass - cursor.execute("GRANT ALL PRIVILEGES ON {}.* TO 'root'".format(database)) - logger.warning("Ran Database Query: `GRANT ALL PRIVILEGES ON %s.* TO 'root'`", database) - - -def _run_postgresql_commands(host, user, password, database): - # Connect to postgresql and get cursor to run sql commands - connection = psycopg2.connect(user=user, host=host, password=password, database=database) - connection.set_session(autocommit=True) - logger.warning('Successfully Connected to PostgreSQL.') - cursor = connection.cursor() - try: - db_password = _create_db_password(database) - cursor.execute("CREATE USER root WITH ENCRYPTED PASSWORD '{}'".format(db_password)) - logger.warning("Ran Database Query: `CREATE USER root WITH ENCRYPTED PASSWORD '%s'`", db_password) - except psycopg2.ProgrammingError: - pass - cursor.execute('GRANT ALL PRIVILEGES ON DATABASE "{}" TO root'.format(database)) - logger.warning("Ran Database Query: `GRANT ALL PRIVILEGES ON DATABASE %s TO root`", database) - - -def _run_sql_commands(host, user, password, database): - # Connect to sql and get cursor to run sql commands - _ensure_pymssql() - import pymssql - with pymssql.connect(host, user, password, database, tds_version='7.0') as connection: - logger.warning('Successfully Connected to Azure SQL.') - with connection.cursor() as cursor: - try: - db_password = _create_db_password(database) - cursor.execute("CREATE USER root WITH PASSWORD = '{}'".format(db_password)) - logger.warning("Ran Database Query: `CREATE USER root WITH PASSWORD = '%s'`", db_password) - except pymssql.ProgrammingError: - pass - cursor.execute("Use {};".format(database)) - cursor.execute("GRANT ALL to root") - logger.warning("Ran Database Query: `GRANT ALL TO root`") - - -def _configure_firewall_rules( - db_context, connector_errors, cmd, server_result, resource_group_name, server_name, administrator_login, - administrator_login_password, database_name, extra_connector_args=None): - # unpack from context - connector, cf_firewall, command_group, logging_name = ( - db_context.connector, db_context.cf_firewall, db_context.command_group, db_context.logging_name) - - # Check for user's ip address(es) - user = '{}@{}'.format(administrator_login, server_name) - host = server_result.fully_qualified_domain_name - kwargs = {'user': user, 'host': host, 'database': database_name} - if administrator_login_password is not None: - kwargs['password'] = administrator_login_password - kwargs.update(extra_connector_args or {}) - addresses = set() - logger.warning('Checking your ip address...') - for _ in range(20): - try: - connection = connector.connect(**kwargs) - connection.close() - except connector_errors as ex: - pattern = re.compile(r'.*[\'"](?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)[\'"]') - try: - addresses.add(pattern.match(str(ex)).groupdict().get('ipAddress')) - except AttributeError: - pass - - # Create firewall rules for devbox if needed - firewall_client = cf_firewall(cmd.cli_ctx, None) - - if addresses and len(addresses) == 1: - ip_address = addresses.pop() - logger.warning('Configuring server firewall rule, \'devbox\', to allow for your ip address: %s', ip_address) - resolve_poller( - firewall_client.create_or_update(resource_group_name, server_name, 'devbox', ip_address, ip_address), - cmd.cli_ctx, '{} Firewall Rule Create/Update'.format(logging_name)) - elif addresses: - logger.warning('Detected dynamic IP address, configuring firewall rules for IP addresses encountered...') - logger.warning('IP Addresses: %s', ', '.join(list(addresses))) - firewall_results = [] - for i, ip_address in enumerate(addresses): - firewall_results.append(firewall_client.create_or_update( - resource_group_name, server_name, 'devbox' + str(i), ip_address, ip_address)) - for result in firewall_results: - resolve_poller(result, cmd.cli_ctx, '{} Firewall Rule Create/Update'.format(logging_name)) - logger.warning('If %s server declines your IP address, please create a new firewall rule using:', logging_name) - logger.warning(' `az %s server firewall-rule create -g %s -s %s -n {rule_name} ' - '--start-ip-address {ip_address} --end-ip-address {ip_address}`', - command_group, resource_group_name, server_name) - - return host, user - - -def _create_database(db_context, cmd, resource_group_name, server_name, database_name): - # check for existing database, create if not - cf_db, logging_name = db_context.cf_db, db_context.logging_name - database_client = cf_db(cmd.cli_ctx, None) - try: - database_client.get(resource_group_name, server_name, database_name) - except HttpResponseError: - logger.warning('Creating %s database \'%s\'...', logging_name, database_name) - resolve_poller( - database_client.create_or_update(resource_group_name, server_name, database_name), cmd.cli_ctx, - '{} Database Create/Update'.format(logging_name)) - - -def _create_sql_database(db_context, cmd, resource_group_name, server_name, database_name, location): - cf_db, logging_name, azure_sdk = db_context.cf_db, db_context.logging_name, db_context.azure_sdk - database_client = cf_db(cmd.cli_ctx, None) - try: - database_client.get(resource_group_name, server_name, database_name) - except HttpResponseError: - logger.warning('Creating %s database \'%s\'...', logging_name, database_name) - params = azure_sdk.models.Database(location=location) - resolve_poller( - database_client.create_or_update(resource_group_name, server_name, database_name, params), cmd.cli_ctx, - '{} Database Create/Update'.format(logging_name)) - - -def _create_azure_firewall_rule(db_context, cmd, resource_group_name, server_name): - # allow access to azure ip addresses - cf_firewall, logging_name = db_context.cf_firewall, db_context.logging_name - logger.warning('Configuring server firewall rule, \'azure-access\', to accept connections from all ' - 'Azure resources...') - firewall_client = cf_firewall(cmd.cli_ctx, None) - resolve_poller( - firewall_client.create_or_update(resource_group_name, server_name, 'azure-access', '0.0.0.0', '0.0.0.0'), - cmd.cli_ctx, '{} Firewall Rule Create/Update'.format(logging_name)) - - -def _create_server(db_context, cmd, resource_group_name, server_name, location, backup_retention, sku_name, - geo_redundant_backup, storage_mb, administrator_login, administrator_login_password, version, - ssl_enforcement, tags): - logging_name, azure_sdk, server_client = db_context.logging_name, db_context.azure_sdk, db_context.server_client - logger.warning('Creating %s Server \'%s\' in group \'%s\'...', logging_name, server_name, resource_group_name) - - parameters = azure_sdk.models.ServerForCreate( - sku=azure_sdk.models.Sku(name=sku_name), - properties=azure_sdk.models.ServerPropertiesForDefaultCreate( - administrator_login=administrator_login, - administrator_login_password=administrator_login_password, - version=version, - ssl_enforcement=ssl_enforcement, - storage_profile=azure_sdk.models.StorageProfile( - backup_retention_days=backup_retention, - geo_redundant_backup=geo_redundant_backup, - storage_mb=storage_mb)), - location=location, - tags=tags) - - return resolve_poller( - server_client.create(resource_group_name, server_name, parameters), cmd.cli_ctx, - '{} Server Create'.format(logging_name)) - - -def _create_sql_server(db_context, cmd, resource_group_name, server_name, location, administrator_login, - administrator_login_password, version, tags): - logging_name, azure_sdk, server_client = db_context.logging_name, db_context.azure_sdk, db_context.server_client - logger.warning('Creating %s Server \'%s\' in group \'%s\'...', logging_name, server_name, resource_group_name) - - parameters = azure_sdk.models.Server( - administrator_login=administrator_login, - administrator_login_password=administrator_login_password, - version=version, - location=location, - tags=tags) - - return resolve_poller( - server_client.create_or_update(resource_group_name, server_name, parameters), cmd.cli_ctx, - '{} Server Create'.format(logging_name)) - - -def _update_server(db_context, cmd, client, server_result, resource_group_name, server_name, backup_retention, - geo_redundant_backup, storage_mb, administrator_login_password, version, ssl_enforcement, tags): - # storage profile params - storage_profile_kwargs = {} - db_sdk, logging_name = db_context.azure_sdk, db_context.logging_name - if backup_retention != server_result.storage_profile.backup_retention_days: - update_kwargs(storage_profile_kwargs, 'backup_retention_days', backup_retention) - if geo_redundant_backup != server_result.storage_profile.geo_redundant_backup: - update_kwargs(storage_profile_kwargs, 'geo_redundant_backup', geo_redundant_backup) - if storage_mb != server_result.storage_profile.storage_mb: - update_kwargs(storage_profile_kwargs, 'storage_mb', storage_mb) - - # update params - server_update_kwargs = { - 'storage_profile': db_sdk.models.StorageProfile(**storage_profile_kwargs) - } if storage_profile_kwargs else {} - update_kwargs(server_update_kwargs, 'administrator_login_password', administrator_login_password) - if version != server_result.version: - update_kwargs(server_update_kwargs, 'version', version) - if ssl_enforcement != server_result.ssl_enforcement: - update_kwargs(server_update_kwargs, 'ssl_enforcement', ssl_enforcement) - update_kwargs(server_update_kwargs, 'tags', tags) - - if server_update_kwargs: - logger.warning('Updating existing %s Server \'%s\' with given arguments', logging_name, server_name) - params = db_sdk.models.ServerUpdateParameters(**server_update_kwargs) - return resolve_poller(client.update( - resource_group_name, server_name, params), cmd.cli_ctx, '{} Server Update'.format(logging_name)) - return server_result - - -def _update_sql_server(db_context, cmd, client, server_result, resource_group_name, server_name, - administrator_login_password, version, tags): - db_sdk, logging_name = db_context.azure_sdk, db_context.logging_name - - # update params - server_update_kwargs = {} - update_kwargs(server_update_kwargs, 'administrator_login_password', administrator_login_password) - if version != server_result.version: - update_kwargs(server_update_kwargs, 'version', version) - update_kwargs(server_update_kwargs, 'tags', tags) - - if server_update_kwargs: - logger.warning('Updating existing %s Server \'%s\' with given arguments', logging_name, server_name) - params = db_sdk.models.ServerUpdate(**server_update_kwargs) - return resolve_poller(client.update( - resource_group_name, server_name, params), cmd.cli_ctx, '{} Server Update'.format(logging_name)) - return server_result - - -def _create_db_password(database_name): - return '{}{}{}'.format(database_name[0].upper(), database_name[1:], '1') - - -# pylint: disable=too-many-instance-attributes,too-few-public-methods -class DbContext: - def __init__(self, azure_sdk=None, cf_firewall=None, cf_db=None, cf_config=None, logging_name=None, - connector=None, command_group=None, server_client=None): - self.azure_sdk = azure_sdk - self.cf_firewall = cf_firewall - self.cf_db = cf_db - self.cf_config = cf_config - self.logging_name = logging_name - self.connector = connector - self.command_group = command_group - self.server_client = server_client - - -def is_homebrew(): - HOMEBREW_CELLAR_PATH = '/usr/local/Cellar/azure-cli/' - return any((p.startswith(HOMEBREW_CELLAR_PATH) for p in sys.path)) - - -# port from azure.cli.core.extension -# A workaround for https://github.com/Azure/azure-cli/issues/4428 -class HomebrewPipPatch(object): # pylint: disable=too-few-public-methods, useless-object-inheritance - - CFG_FILE = os.path.expanduser(os.path.join('~', '.pydistutils.cfg')) - - def __init__(self): - self.our_cfg_file = False - - def __enter__(self): - if not is_homebrew(): - return - if os.path.isfile(HomebrewPipPatch.CFG_FILE): - logger.debug("Homebrew patch: The file %s already exists and we will not overwrite it. " - "If extension installation fails, temporarily rename this file and try again.", - HomebrewPipPatch.CFG_FILE) - logger.warning("Unable to apply Homebrew patch for extension installation. " - "Attempting to continue anyway...") - self.our_cfg_file = False - else: - logger.debug("Homebrew patch: Temporarily creating %s to support extension installation on Homebrew.", - HomebrewPipPatch.CFG_FILE) - with open(HomebrewPipPatch.CFG_FILE, "w") as f: - f.write("[install]\nprefix=") - self.our_cfg_file = True - - def __exit__(self, exc_type, exc_value, tb): - if not is_homebrew(): - return - if self.our_cfg_file and os.path.isfile(HomebrewPipPatch.CFG_FILE): - logger.debug("Homebrew patch: Deleting the temporarily created %s", HomebrewPipPatch.CFG_FILE) - os.remove(HomebrewPipPatch.CFG_FILE) diff --git a/src/db-up/azext_db_up/random_name/__init__.py b/src/db-up/azext_db_up/random_name/__init__.py deleted file mode 100644 index 34913fb394d..00000000000 --- a/src/db-up/azext_db_up/random_name/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- diff --git a/src/db-up/azext_db_up/random_name/adjectives.txt b/src/db-up/azext_db_up/random_name/adjectives.txt deleted file mode 100644 index cea08ef7973..00000000000 --- a/src/db-up/azext_db_up/random_name/adjectives.txt +++ /dev/null @@ -1,166 +0,0 @@ -aboard -acidic -admired -adoring -ajar -alert -amazed -amused -angry -annoyed -anxious -aquatic -ardent -ashamed -awed -best -bored -bossy -bouncy -bright -broken -bubbly -calm -cocky -cold -common -content -cranky -crass -cruel -crushed -curious -curly -cynical -dim -direful -dopey -dreary -eager -earthy -eatable -elastic -elderly -empty -enraged -entire -envious -excited -exotic -famous -fearful -fixed -fluid -formal -free -giddy -gleeful -gloomy -goofy -gross -grouchy -guilty -harsh -hateful -hopeful -hostile -hurt -impish -insane -irate -jealous -joyful -junior -kind -last -lazy -lethal -level -liquid -longing -loving -lowly -loyal -macho -mad -male -measly -medical -mellow -merry -mild -misty -moral -morbid -muddled -near -needful -needy -next -noted -obvious -overt -panicky -pensive -picky -pitiful -playful -pleased -private -prize -proud -prudent -puffy -puzzled -rabid -remote -rigid -rowdy -rundown -sad -sane -scared -seemly -selfish -serene -shocked -shoddy -shy -sincere -sinful -smug -solemn -somber -sorry -sour -speedy -starchy -stark -stingy -supreme -swanky -tenuous -third -trusty -typical -uneven -unhappy -unlined -unruly -untrue -upset -valid -venal -verdant -vibrant -violent -vulgar -wacky -weary -weekly -wistful -wornout -worried -yawning -zesty -zippy diff --git a/src/db-up/azext_db_up/random_name/generate.py b/src/db-up/azext_db_up/random_name/generate.py deleted file mode 100644 index 0f10f86ceb9..00000000000 --- a/src/db-up/azext_db_up/random_name/generate.py +++ /dev/null @@ -1,22 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import os -import random - - -def generate_username(): - directory_path = os.path.dirname(__file__) - adjectives, nouns = [], [] - with open(os.path.join(directory_path, 'adjectives.txt'), 'r') as file_adjective: - with open(os.path.join(directory_path, 'nouns.txt'), 'r') as file_noun: - for line in file_adjective: - adjectives.append(line.strip()) - for line in file_noun: - nouns.append(line.strip()) - adjective = random.choice(adjectives) - noun = random.choice(nouns).capitalize() - num = str(random.randrange(10)) - return adjective + noun + num diff --git a/src/db-up/azext_db_up/random_name/nouns.txt b/src/db-up/azext_db_up/random_name/nouns.txt deleted file mode 100644 index d5757d34507..00000000000 --- a/src/db-up/azext_db_up/random_name/nouns.txt +++ /dev/null @@ -1,138 +0,0 @@ -abalone -apple -auk -avocet -baboon -badger -bagels -basmati -beaver -bittern -boars -bobcat -bongo -buffalo -bustard -cake -camel -caribou -cattle -caviar -cheese -cheetah -chile -chowder -clam -cobra -coconut -cod -colt -coot -cordial -coyote -dingo -donkey -dunbird -dunnock -eagle -eggs -eland -elk -falcon -ferret -fish -garlic -gelding -gerbil -giraffe -gnat -goose -goshawk -granola -grouse -gull -hamster -hare -hawk -hinds -hoopoe -hornet -hound -hyena -ibexe -ibis -iguana -jay -jerky -kapi -kitten -lapwing -lard -linnet -lion -lizard -llama -lollies -macaw -magpie -mare -marten -mole -moth -muesli -oatmeal -oil -opossum -orange -ostrich -owl -ox -oxbird -paella -parrot -peacock -pear -penguin -pepper -pie -plover -polenta -poultry -pudding -quiche -raccoon -raisins -redwing -relish -rice -robin -roedeer -ruffs -salami -salt -sausage -seafowl -shads -shrimp -smelt -snail -snipe -sparrow -stoat -stork -syrup -tacos -tamarin -termite -thrushe -tomatoe -toucan -truffle -turtle -venison -vulture -walrus -wasp -widgeon -wigeon -wildcat diff --git a/src/db-up/azext_db_up/tests/__init__.py b/src/db-up/azext_db_up/tests/__init__.py deleted file mode 100644 index 34913fb394d..00000000000 --- a/src/db-up/azext_db_up/tests/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- diff --git a/src/db-up/azext_db_up/tests/latest/__init__.py b/src/db-up/azext_db_up/tests/latest/__init__.py deleted file mode 100644 index 34913fb394d..00000000000 --- a/src/db-up/azext_db_up/tests/latest/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- diff --git a/src/db-up/azext_db_up/tests/latest/recordings/test_mysql_flow.yaml b/src/db-up/azext_db_up/tests/latest/recordings/test_mysql_flow.yaml deleted file mode 100644 index 3b58c7e5ef6..00000000000 --- a/src/db-up/azext_db_up/tests/latest/recordings/test_mysql_flow.yaml +++ /dev/null @@ -1,1926 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group - ''group000001'' could not be found."}}' - headers: - cache-control: - - no-cache - content-length: - - '116' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:25:27 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group - ''group000001'' could not be found."}}' - headers: - cache-control: - - no-cache - content-length: - - '116' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:25:28 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: '{"location": "eastus"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - Content-Length: - - '22' - Content-Type: - - application/json - ParameterSetName: - - -g -s - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '245' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:25:30 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DBforMySQL/servers/server000002'' - under resource group ''group000001'' was not found. For more details please - go to https://aka.ms/ARMResourceNotFoundFix"}}' - headers: - cache-control: - - no-cache - content-length: - - '249' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:25:31 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: '{"sku": {"name": "GP_Gen5_2"}, "properties": {"version": "5.7", "sslEnforcement": - "Enabled", "storageProfile": {"geoRedundantBackup": "Disabled"}, "createMode": - "Default", "administratorLogin": "nearOwl7", "administratorLoginPassword": "acabc076-a0fa-4201-a5d0-a37cd8c0d726"}, - "location": "eastus"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - Content-Length: - - '298' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServer","startTime":"2021-07-12T07:25:37.477Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/acefd11d-2ddd-449b-b0ca-ba493de7871a?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '74' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:25:38 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/acefd11d-2ddd-449b-b0ca-ba493de7871a?api-version=2017-12-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/acefd11d-2ddd-449b-b0ca-ba493de7871a?api-version=2017-12-01 - response: - body: - string: '{"name":"acefd11d-2ddd-449b-b0ca-ba493de7871a","status":"InProgress","startTime":"2021-07-12T07:25:37.477Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:26: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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/acefd11d-2ddd-449b-b0ca-ba493de7871a?api-version=2017-12-01 - response: - body: - string: '{"name":"acefd11d-2ddd-449b-b0ca-ba493de7871a","status":"Succeeded","startTime":"2021-07-12T07:25:37.477Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:27: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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"nearOwl7","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.mysql.database.azure.com","earliestRestoreDate":"2021-07-12T07:35:37.803+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002","name":"server000002","type":"Microsoft.DBforMySQL/servers"}' - headers: - cache-control: - - no-cache - content-length: - - '948' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:27: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: '{"properties": {"value": "28800"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - Content-Length: - - '34' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/configurations/wait_timeout?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpdateElasticServerConfig","startTime":"2021-07-12T07:27:43.15Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/da46a4ee-7a85-4ace-8ea5-21bf7d6595af?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '79' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:27:43 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/da46a4ee-7a85-4ace-8ea5-21bf7d6595af?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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/da46a4ee-7a85-4ace-8ea5-21bf7d6595af?api-version=2017-12-01 - response: - body: - string: '{"name":"da46a4ee-7a85-4ace-8ea5-21bf7d6595af","status":"InProgress","startTime":"2021-07-12T07:27:43.15Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:27: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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/da46a4ee-7a85-4ace-8ea5-21bf7d6595af?api-version=2017-12-01 - response: - body: - string: '{"name":"da46a4ee-7a85-4ace-8ea5-21bf7d6595af","status":"InProgress","startTime":"2021-07-12T07:27:43.15Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:28: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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/da46a4ee-7a85-4ace-8ea5-21bf7d6595af?api-version=2017-12-01 - response: - body: - string: '{"name":"da46a4ee-7a85-4ace-8ea5-21bf7d6595af","status":"Succeeded","startTime":"2021-07-12T07:27:43.15Z"}' - headers: - cache-control: - - no-cache - content-length: - - '106' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:28:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/configurations/wait_timeout?api-version=2017-12-01 - response: - body: - string: '{"properties":{"value":"28800","description":"The number of seconds - the server waits for activity on a noninteractive connection before closing - it.","defaultValue":"180","dataType":"Integer","allowedValues":"1-2147483","source":"user-override","isConfigPendingRestart":"False","isDynamicConfig":"True"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/configurations/wait_timeout","name":"wait_timeout","type":"Microsoft.DBforMySQL/servers/configurations"}' - headers: - cache-control: - - no-cache - content-length: - - '569' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:28: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: '{"properties": {"startIpAddress": "0.0.0.0", "endIpAddress": "0.0.0.0"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - Content-Length: - - '72' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2021-07-12T07:28:33.987Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/3f70e5d7-1dbc-43e7-8b61-a5a34bda314a?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '87' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:28:34 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/3f70e5d7-1dbc-43e7-8b61-a5a34bda314a?api-version=2017-12-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/3f70e5d7-1dbc-43e7-8b61-a5a34bda314a?api-version=2017-12-01 - response: - body: - string: '{"name":"3f70e5d7-1dbc-43e7-8b61-a5a34bda314a","status":"Succeeded","startTime":"2021-07-12T07:28:33.987Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:28: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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"0.0.0.0"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/firewallRules/azure-access","name":"azure-access","type":"Microsoft.DBforMySQL/servers/firewallRules"}' - headers: - cache-control: - - no-cache - content-length: - - '332' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:28: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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"error":{"code":"ResourceNotFound","message":"The requested resource - of type ''Microsoft.DBforMySQL/servers/databases'' with name ''sampledb'' - was not found."}}' - headers: - cache-control: - - no-cache - content-length: - - '157' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:28:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 404 - message: Not Found -- request: - body: '{}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerDatabase","startTime":"2021-07-12T07:28:52.35Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/2f4d0286-720a-42ce-b630-1e2d47835f60?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:28:52 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/2f4d0286-720a-42ce-b630-1e2d47835f60?api-version=2017-12-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/2f4d0286-720a-42ce-b630-1e2d47835f60?api-version=2017-12-01 - response: - body: - string: '{"name":"2f4d0286-720a-42ce-b630-1e2d47835f60","status":"Succeeded","startTime":"2021-07-12T07:28:52.35Z"}' - headers: - cache-control: - - no-cache - content-length: - - '106' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:29: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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"properties":{"charset":"latin1","collation":"latin1_swedish_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforMySQL/servers/databases"}' - headers: - cache-control: - - no-cache - content-length: - - '315' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:29: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 up - Connection: - - keep-alive - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '245' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:29:09 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '245' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:29:09 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"nearOwl7","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.mysql.database.azure.com","earliestRestoreDate":"2021-07-12T07:35:37.803+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002","name":"server000002","type":"Microsoft.DBforMySQL/servers"}' - headers: - cache-control: - - no-cache - content-length: - - '948' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:29: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 up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"properties":{"charset":"latin1","collation":"latin1_swedish_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforMySQL/servers/databases"}' - headers: - cache-control: - - no-cache - content-length: - - '315' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:29: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 up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '245' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:29:11 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '245' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:29:12 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"nearOwl7","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.mysql.database.azure.com","earliestRestoreDate":"2021-07-12T07:35:37.803+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002","name":"server000002","type":"Microsoft.DBforMySQL/servers"}' - headers: - cache-control: - - no-cache - content-length: - - '948' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:29: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": {"administratorLoginPassword": "acabc076-a0fa-4201-a5d0-a37cd8c0d726"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql up - Connection: - - keep-alive - Content-Length: - - '86' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServer","startTime":"2021-07-12T07:29:13.803Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/3d06ff6c-edd8-4429-9f84-11dcdd1eb653?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '74' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:29:14 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/3d06ff6c-edd8-4429-9f84-11dcdd1eb653?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 up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/3d06ff6c-edd8-4429-9f84-11dcdd1eb653?api-version=2017-12-01 - response: - body: - string: '{"name":"3d06ff6c-edd8-4429-9f84-11dcdd1eb653","status":"Succeeded","startTime":"2021-07-12T07:29:13.803Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:30: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 up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"nearOwl7","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.mysql.database.azure.com","earliestRestoreDate":"2021-07-12T07:35:37.803+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002","name":"server000002","type":"Microsoft.DBforMySQL/servers"}' - headers: - cache-control: - - no-cache - content-length: - - '948' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:30: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 up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"properties":{"charset":"latin1","collation":"latin1_swedish_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforMySQL/servers/databases"}' - headers: - cache-control: - - no-cache - content-length: - - '315' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:30: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 db show - Connection: - - keep-alive - ParameterSetName: - - -n -g -s - User-Agent: - - AZURECLI/2.26.0 azsdk-python-mgmt-rdbms/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBForMySQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"properties":{"charset":"latin1","collation":"latin1_swedish_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforMySQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforMySQL/servers/databases"}' - headers: - cache-control: - - no-cache - content-length: - - '315' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:30: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 down - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:30:24 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:30:40 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:30:55 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:31:11 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:31:27 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:31:43 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:31:58 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:32:13 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - mysql down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUEY3T0VQN1lWQTJLNjJBRTc0VlotRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:32:29 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - group show - Connection: - - keep-alive - ParameterSetName: - - -n - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group - ''group000001'' could not be found."}}' - headers: - cache-control: - - no-cache - content-length: - - '116' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:32:30 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -version: 1 diff --git a/src/db-up/azext_db_up/tests/latest/recordings/test_postgres_flow.yaml b/src/db-up/azext_db_up/tests/latest/recordings/test_postgres_flow.yaml deleted file mode 100644 index b7273e52ca0..00000000000 --- a/src/db-up/azext_db_up/tests/latest/recordings/test_postgres_flow.yaml +++ /dev/null @@ -1,1945 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group - ''group000001'' could not be found."}}' - headers: - cache-control: - - no-cache - content-length: - - '116' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:14:29 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group - ''group000001'' could not be found."}}' - headers: - cache-control: - - no-cache - content-length: - - '116' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:14:29 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: '{"location": "eastus"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '22' - Content-Type: - - application/json - ParameterSetName: - - -g -s - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '245' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:14:31 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: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DBforPostgreSQL/servers/server000002'' - under resource group ''group000001'' was not found. For more details please - go to https://aka.ms/ARMResourceNotFoundFix"}}' - headers: - cache-control: - - no-cache - content-length: - - '254' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:14:31 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: '{"sku": {"name": "GP_Gen5_2"}, "properties": {"version": "10", "sslEnforcement": - "Enabled", "storageProfile": {"geoRedundantBackup": "Disabled"}, "createMode": - "Default", "administratorLogin": "unevenBasmati3", "administratorLoginPassword": - "73487fea-54f2-4bf8-9a88-e655e68a81d3"}, "location": "eastus"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '303' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServer","startTime":"2021-07-12T07:14:40.27Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/a99a9c83-8565-409c-9cc0-470d9fc39550?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:14:41 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/a99a9c83-8565-409c-9cc0-470d9fc39550?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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/a99a9c83-8565-409c-9cc0-470d9fc39550?api-version=2017-12-01 - response: - body: - string: '{"name":"a99a9c83-8565-409c-9cc0-470d9fc39550","status":"InProgress","startTime":"2021-07-12T07:14:40.27Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:15: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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/a99a9c83-8565-409c-9cc0-470d9fc39550?api-version=2017-12-01 - response: - body: - string: '{"name":"a99a9c83-8565-409c-9cc0-470d9fc39550","status":"Succeeded","startTime":"2021-07-12T07:14:40.27Z"}' - headers: - cache-control: - - no-cache - content-length: - - '106' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:16: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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"unevenBasmati3","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"10","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.postgres.database.azure.com","earliestRestoreDate":"2021-07-12T07:24:40.567+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002","name":"server000002","type":"Microsoft.DBforPostgreSQL/servers"}' - headers: - cache-control: - - no-cache - content-length: - - '966' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:16: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 up - Connection: - - keep-alive - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"error":{"code":"ResourceNotFound","message":"The requested resource - of type ''Microsoft.DBforPostgreSQL/servers/databases'' with name ''sampledb'' - was not found."}}' - headers: - cache-control: - - no-cache - content-length: - - '162' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:16:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 404 - message: Not Found -- request: - body: '{}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerDatabase","startTime":"2021-07-12T07:16:46.287Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/2488b9a8-f5c4-4987-8a5d-acc9f0ad9364?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '82' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:16:45 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/2488b9a8-f5c4-4987-8a5d-acc9f0ad9364?api-version=2017-12-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/2488b9a8-f5c4-4987-8a5d-acc9f0ad9364?api-version=2017-12-01 - response: - body: - string: '{"name":"2488b9a8-f5c4-4987-8a5d-acc9f0ad9364","status":"Succeeded","startTime":"2021-07-12T07:16:46.287Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07: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 up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"properties":{"charset":"UTF8","collation":"English_United States.1252"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforPostgreSQL/servers/databases"}' - headers: - cache-control: - - no-cache - content-length: - - '332' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07: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: '{"properties": {"startIpAddress": "0.0.0.0", "endIpAddress": "0.0.0.0"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '72' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2021-07-12T07:17:04.397Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/b9b1fdce-3051-4b42-b3ea-e2d811e73b2d?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '87' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:17:03 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/b9b1fdce-3051-4b42-b3ea-e2d811e73b2d?api-version=2017-12-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/b9b1fdce-3051-4b42-b3ea-e2d811e73b2d?api-version=2017-12-01 - response: - body: - string: '{"name":"b9b1fdce-3051-4b42-b3ea-e2d811e73b2d","status":"Succeeded","startTime":"2021-07-12T07:17:04.397Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07: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: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"0.0.0.0"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access","name":"azure-access","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}' - headers: - cache-control: - - no-cache - content-length: - - '342' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07: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: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '245' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:17:22 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '245' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:17:22 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"unevenBasmati3","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"10","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.postgres.database.azure.com","earliestRestoreDate":"2021-07-12T07:24:40.567+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002","name":"server000002","type":"Microsoft.DBforPostgreSQL/servers"}' - headers: - cache-control: - - no-cache - content-length: - - '966' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:17: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: - - postgres up - Connection: - - keep-alive - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"properties":{"charset":"UTF8","collation":"English_United States.1252"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforPostgreSQL/servers/databases"}' - headers: - cache-control: - - no-cache - content-length: - - '332' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07: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: '{"properties": {"startIpAddress": "0.0.0.0", "endIpAddress": "0.0.0.0"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '72' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2021-07-12T07:17:25.53Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/a8b1f904-16e8-4d95-9209-f4fc57efe646?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '86' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:17:24 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/a8b1f904-16e8-4d95-9209-f4fc57efe646?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 up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/a8b1f904-16e8-4d95-9209-f4fc57efe646?api-version=2017-12-01 - response: - body: - string: '{"name":"a8b1f904-16e8-4d95-9209-f4fc57efe646","status":"Succeeded","startTime":"2021-07-12T07:17:25.53Z"}' - headers: - cache-control: - - no-cache - content-length: - - '106' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:17: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 up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"0.0.0.0"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access","name":"azure-access","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}' - headers: - cache-control: - - no-cache - content-length: - - '342' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07: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 up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '245' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:17:43 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '245' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:17:43 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"unevenBasmati3","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"10","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.postgres.database.azure.com","earliestRestoreDate":"2021-07-12T07:24:40.567+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002","name":"server000002","type":"Microsoft.DBforPostgreSQL/servers"}' - headers: - cache-control: - - no-cache - content-length: - - '966' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07: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: '{"properties": {"administratorLoginPassword": "73487fea-54f2-4bf8-9a88-e655e68a81d3"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '86' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServer","startTime":"2021-07-12T07:17:44.92Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/ff0c72d2-481a-4689-b673-d1fecba6a8bb?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:17:45 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/ff0c72d2-481a-4689-b673-d1fecba6a8bb?api-version=2017-12-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/ff0c72d2-481a-4689-b673-d1fecba6a8bb?api-version=2017-12-01 - response: - body: - string: '{"name":"ff0c72d2-481a-4689-b673-d1fecba6a8bb","status":"Succeeded","startTime":"2021-07-12T07:17:44.92Z"}' - headers: - cache-control: - - no-cache - content-length: - - '106' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:18: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 up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002?api-version=2017-12-01 - response: - body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"unevenBasmati3","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"10","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server000002.postgres.database.azure.com","earliestRestoreDate":"2021-07-12T07:24:40.567+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002","name":"server000002","type":"Microsoft.DBforPostgreSQL/servers"}' - headers: - cache-control: - - no-cache - content-length: - - '966' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:18: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: - - postgres up - Connection: - - keep-alive - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"properties":{"charset":"UTF8","collation":"English_United States.1252"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforPostgreSQL/servers/databases"}' - headers: - cache-control: - - no-cache - content-length: - - '332' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:18: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: '{"properties": {"startIpAddress": "0.0.0.0", "endIpAddress": "0.0.0.0"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '72' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2021-07-12T07:18:50.14Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/52cb6445-f865-4985-bacc-2e277300dea6?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '86' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:18:50 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/52cb6445-f865-4985-bacc-2e277300dea6?api-version=2017-12-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/52cb6445-f865-4985-bacc-2e277300dea6?api-version=2017-12-01 - response: - body: - string: '{"name":"52cb6445-f865-4985-bacc-2e277300dea6","status":"Succeeded","startTime":"2021-07-12T07:18:50.14Z"}' - headers: - cache-control: - - no-cache - content-length: - - '106' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:19: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 up - Connection: - - keep-alive - ParameterSetName: - - -p - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"0.0.0.0"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/firewallRules/azure-access","name":"azure-access","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}' - headers: - cache-control: - - no-cache - content-length: - - '342' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:19: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 db show - Connection: - - keep-alive - ParameterSetName: - - -n -g -s - User-Agent: - - AZURECLI/2.26.0 azsdk-python-mgmt-rdbms/8.1.0b4 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBForPostgreSQL/servers/server000002/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"properties":{"charset":"UTF8","collation":"English_United States.1252"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001/providers/Microsoft.DBforPostgreSQL/servers/server000002/databases/sampledb","name":"sampledb","type":"Microsoft.DBforPostgreSQL/servers/databases"}' - headers: - cache-control: - - no-cache - content-length: - - '332' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:19: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: - - postgres down - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:19:15 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:19:30 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:19:46 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:20:01 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:20:17 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:20:32 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:20:48 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres down - Connection: - - keep-alive - ParameterSetName: - - -y --delete-group - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1HUk9VUFRIVjRCNTRMNEpCNVpKREY0WjItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2022-09-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Mon, 12 Jul 2021 07:21:03 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - group show - Connection: - - keep-alive - ParameterSetName: - - -n - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group - ''group000001'' could not be found."}}' - headers: - cache-control: - - no-cache - content-length: - - '116' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:21:04 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -version: 1 diff --git a/src/db-up/azext_db_up/tests/latest/recordings/test_postgres_up.yaml b/src/db-up/azext_db_up/tests/latest/recordings/test_postgres_up.yaml deleted file mode 100644 index 1cb18d9761f..00000000000 --- a/src/db-up/azext_db_up/tests/latest/recordings/test_postgres_up.yaml +++ /dev/null @@ -1,1546 +0,0 @@ -interactions: -- request: - body: '{"location": "eastus"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '22' - Content-Type: - - application/json - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group3055132766?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766","name":"group3055132766","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '227' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:37:54 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032?api-version=2017-12-01 - response: - body: - string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DBforPostgreSQL/servers/server861539032'' - under resource group ''group3055132766'' was not found. For more details please - go to https://aka.ms/ARMResourceNotFoundFix"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:37:55 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: '{"sku": {"name": "GP_Gen5_2"}, "properties": {"version": "10", "sslEnforcement": - "Enabled", "storageProfile": {"geoRedundantBackup": "Disabled"}, "createMode": - "Default", "administratorLogin": "calmLizard0", "administratorLoginPassword": - "c039c662-a579-4bf3-bb6e-cd9e5a10d5eb"}, "location": "eastus"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '300' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServer","startTime":"2021-07-13T07:38:01.563Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/7e178a87-6d13-4175-b130-dd0064a52a65?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '74' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:38:01 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/7e178a87-6d13-4175-b130-dd0064a52a65?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 up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/7e178a87-6d13-4175-b130-dd0064a52a65?api-version=2017-12-01 - response: - body: - string: '{"name":"7e178a87-6d13-4175-b130-dd0064a52a65","status":"InProgress","startTime":"2021-07-13T07:38:01.563Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:39:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/7e178a87-6d13-4175-b130-dd0064a52a65?api-version=2017-12-01 - response: - body: - string: '{"name":"7e178a87-6d13-4175-b130-dd0064a52a65","status":"Succeeded","startTime":"2021-07-13T07:38:01.563Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:40:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032?api-version=2017-12-01 - response: - body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"calmLizard0","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"10","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server861539032.postgres.database.azure.com","earliestRestoreDate":"2021-07-13T07:48:01.907+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032","name":"server861539032","type":"Microsoft.DBforPostgreSQL/servers"}' - headers: - cache-control: - - no-cache - content-length: - - '927' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:40: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 up - Connection: - - keep-alive - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"error":{"code":"ResourceNotFound","message":"The requested resource - of type ''Microsoft.DBforPostgreSQL/servers/databases'' with name ''sampledb'' - was not found."}}' - headers: - cache-control: - - no-cache - content-length: - - '162' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:40:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 404 - message: Not Found -- request: - body: '{}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerDatabase","startTime":"2021-07-13T07:40:07.047Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/45f7aa86-aeb3-441f-ac28-11c143d38313?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '82' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:40:06 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/45f7aa86-aeb3-441f-ac28-11c143d38313?api-version=2017-12-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/45f7aa86-aeb3-441f-ac28-11c143d38313?api-version=2017-12-01 - response: - body: - string: '{"name":"45f7aa86-aeb3-441f-ac28-11c143d38313","status":"Succeeded","startTime":"2021-07-13T07:40:07.047Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:40: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: - - postgres up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"properties":{"charset":"UTF8","collation":"English_United States.1252"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032/databases/sampledb","name":"sampledb","type":"Microsoft.DBforPostgreSQL/servers/databases"}' - headers: - cache-control: - - no-cache - content-length: - - '314' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:40: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: '{"properties": {"startIpAddress": "167.220.255.115", "endIpAddress": "167.220.255.115"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '88' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032/firewallRules/devbox?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2021-07-13T07:41:09.923Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/94908af7-0f21-47fc-8220-f5769c0bdbbf?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '87' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:41:09 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/94908af7-0f21-47fc-8220-f5769c0bdbbf?api-version=2017-12-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/94908af7-0f21-47fc-8220-f5769c0bdbbf?api-version=2017-12-01 - response: - body: - string: '{"name":"94908af7-0f21-47fc-8220-f5769c0bdbbf","status":"Succeeded","startTime":"2021-07-13T07:41:09.923Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:41: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: - - postgres up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032/firewallRules/devbox?api-version=2017-12-01 - response: - body: - string: '{"properties":{"startIpAddress":"167.220.255.115","endIpAddress":"167.220.255.115"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032/firewallRules/devbox","name":"devbox","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}' - headers: - cache-control: - - no-cache - content-length: - - '328' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:41: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": {"startIpAddress": "0.0.0.0", "endIpAddress": "0.0.0.0"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '72' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2021-07-13T07:41:27.993Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/381259c2-3136-43ba-a200-1935fa181ca1?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '87' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:41:27 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/381259c2-3136-43ba-a200-1935fa181ca1?api-version=2017-12-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/381259c2-3136-43ba-a200-1935fa181ca1?api-version=2017-12-01 - response: - body: - string: '{"name":"381259c2-3136-43ba-a200-1935fa181ca1","status":"Succeeded","startTime":"2021-07-13T07:41:27.993Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:41: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 up - Connection: - - keep-alive - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"0.0.0.0"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group3055132766/providers/Microsoft.DBforPostgreSQL/servers/server861539032/firewallRules/azure-access","name":"azure-access","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}' - headers: - cache-control: - - no-cache - content-length: - - '324' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:41: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 up - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/postgresup000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001","name":"postgresup000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-07-13T07:37:46Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '428' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:41:49 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952?api-version=2017-12-01 - response: - body: - string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DBforPostgreSQL/servers/server267793952'' - under resource group ''postgresup000001'' was not found. For more details - please go to https://aka.ms/ARMResourceNotFoundFix"}}' - headers: - cache-control: - - no-cache - content-length: - - '296' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:41:49 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: '{"sku": {"name": "GP_Gen5_2"}, "properties": {"version": "10", "sslEnforcement": - "Enabled", "storageProfile": {"geoRedundantBackup": "Disabled"}, "createMode": - "Default", "administratorLogin": "calmLizard0", "administratorLoginPassword": - "35a9ebc7-b7d7-4671-bed3-349b3a649bdf"}, "location": "eastus"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '300' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServer","startTime":"2021-07-13T07:41:54.967Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/2919c587-c910-46db-911d-42d2d3713e17?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '74' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:41:56 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/2919c587-c910-46db-911d-42d2d3713e17?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 up - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/2919c587-c910-46db-911d-42d2d3713e17?api-version=2017-12-01 - response: - body: - string: '{"name":"2919c587-c910-46db-911d-42d2d3713e17","status":"InProgress","startTime":"2021-07-13T07:41:54.967Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:42: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 up - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/2919c587-c910-46db-911d-42d2d3713e17?api-version=2017-12-01 - response: - body: - string: '{"name":"2919c587-c910-46db-911d-42d2d3713e17","status":"Succeeded","startTime":"2021-07-13T07:41:54.967Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:43: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 up - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952?api-version=2017-12-01 - response: - body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"calmLizard0","storageProfile":{"storageMB":5120,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"10","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"server267793952.postgres.database.azure.com","earliestRestoreDate":"2021-07-13T07:51:55.297+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952","name":"server267793952","type":"Microsoft.DBforPostgreSQL/servers"}' - headers: - cache-control: - - no-cache - content-length: - - '987' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:43: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 up - Connection: - - keep-alive - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"error":{"code":"ResourceNotFound","message":"The requested resource - of type ''Microsoft.DBforPostgreSQL/servers/databases'' with name ''sampledb'' - was not found."}}' - headers: - cache-control: - - no-cache - content-length: - - '162' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:44:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 404 - message: Not Found -- request: - body: '{}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerDatabase","startTime":"2021-07-13T07:44:01.86Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/94580f9b-9d29-4d0c-849f-32cbda4d4df7?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:44:01 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/94580f9b-9d29-4d0c-849f-32cbda4d4df7?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 up - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/94580f9b-9d29-4d0c-849f-32cbda4d4df7?api-version=2017-12-01 - response: - body: - string: '{"name":"94580f9b-9d29-4d0c-849f-32cbda4d4df7","status":"Succeeded","startTime":"2021-07-13T07:44:01.86Z"}' - headers: - cache-control: - - no-cache - content-length: - - '106' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07: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: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952/databases/sampledb?api-version=2017-12-01 - response: - body: - string: '{"properties":{"charset":"UTF8","collation":"English_United States.1252"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952/databases/sampledb","name":"sampledb","type":"Microsoft.DBforPostgreSQL/servers/databases"}' - headers: - cache-control: - - no-cache - content-length: - - '374' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:44: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: '{"properties": {"startIpAddress": "167.220.255.115", "endIpAddress": "167.220.255.115"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '88' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952/firewallRules/devbox?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2021-07-13T07:45:03.483Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/20d0a4c9-178d-4663-9dbd-4416336a419c?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '87' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:45:02 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/20d0a4c9-178d-4663-9dbd-4416336a419c?api-version=2017-12-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/20d0a4c9-178d-4663-9dbd-4416336a419c?api-version=2017-12-01 - response: - body: - string: '{"name":"20d0a4c9-178d-4663-9dbd-4416336a419c","status":"Succeeded","startTime":"2021-07-13T07:45:03.483Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07: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: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952/firewallRules/devbox?api-version=2017-12-01 - response: - body: - string: '{"properties":{"startIpAddress":"167.220.255.115","endIpAddress":"167.220.255.115"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952/firewallRules/devbox","name":"devbox","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}' - headers: - cache-control: - - no-cache - content-length: - - '388' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:45:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"properties": {"startIpAddress": "0.0.0.0", "endIpAddress": "0.0.0.0"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - postgres up - Connection: - - keep-alive - Content-Length: - - '72' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2021-07-13T07:45:21.963Z"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/61bcbc89-6925-4e15-9c14-db87feab547e?api-version=2017-12-01 - cache-control: - - no-cache - content-length: - - '87' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:45:21 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/61bcbc89-6925-4e15-9c14-db87feab547e?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 up - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/61bcbc89-6925-4e15-9c14-db87feab547e?api-version=2017-12-01 - response: - body: - string: '{"name":"61bcbc89-6925-4e15-9c14-db87feab547e","status":"Succeeded","startTime":"2021-07-13T07:45:21.963Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:45: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: - - postgres up - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-rdbms/2017-12-01 Azure-SDK-For-Python AZURECLI/2.26.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952/firewallRules/azure-access?api-version=2017-12-01 - response: - body: - string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"0.0.0.0"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresup000001/providers/Microsoft.DBforPostgreSQL/servers/server267793952/firewallRules/azure-access","name":"azure-access","type":"Microsoft.DBforPostgreSQL/servers/firewallRules"}' - headers: - cache-control: - - no-cache - content-length: - - '384' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 13 Jul 2021 07:45: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 -version: 1 diff --git a/src/db-up/azext_db_up/tests/latest/recordings/test_sql_flow.yaml b/src/db-up/azext_db_up/tests/latest/recordings/test_sql_flow.yaml deleted file mode 100644 index b0491f25263..00000000000 --- a/src/db-up/azext_db_up/tests/latest/recordings/test_sql_flow.yaml +++ /dev/null @@ -1,134 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - sql up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group - ''group000001'' could not be found."}}' - headers: - cache-control: - - no-cache - content-length: - - '116' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:41:42 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - sql up - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group - ''group000001'' could not be found."}}' - headers: - cache-control: - - no-cache - content-length: - - '116' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:41:42 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: '{"location": "eastus"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - sql up - Connection: - - keep-alive - Content-Length: - - '22' - Content-Type: - - application/json - ParameterSetName: - - -g -s - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group000001?api-version=2022-09-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group000001","name":"group000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '245' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 12 Jul 2021 07:41:44 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 -version: 1 diff --git a/src/db-up/azext_db_up/tests/latest/test_db_up_scenarios.py b/src/db-up/azext_db_up/tests/latest/test_db_up_scenarios.py deleted file mode 100644 index 2c25a68e985..00000000000 --- a/src/db-up/azext_db_up/tests/latest/test_db_up_scenarios.py +++ /dev/null @@ -1,119 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -from unittest import mock -import psycopg2 -import mysql.connector -from azure.cli.testsdk import (ScenarioTest, JMESPathCheck, ResourceGroupPreparer, - api_version_constraint, live_only) - - -class DbUpTests(ScenarioTest): - @live_only() - def test_mysql_flow(self): - group = self.create_random_name(prefix='group', length=24) - server = self.create_random_name(prefix='server', length=24) - - with mock.patch('azext_db_up.custom._run_mysql_commands'): - with mock.patch('mysql.connector.connect', side_effect=mysql.connector.errors.DatabaseError()): - output = self.cmd('mysql up -g {} -s {}'.format(group, server)).get_output_in_json() - user, server_name = output['username'].split('@') - password, database = output['password'], 'sampledb' - self.assertEqual(server, server_name) - - # test followup iterations of up - self.cmd('mysql up', checks=[JMESPathCheck('password', '*****')]) - self.cmd('mysql up -p {}'.format(password), checks=[JMESPathCheck('password', password)]) - - # check that db and server exist - self.cmd('mysql db show -n {} -g {} -s {}'.format(database, group, server)) - - # remove all resources used by up - self.cmd('mysql down -y --delete-group') - - # check group no longer exists - with self.assertRaises(SystemExit) as ex: - self.cmd('group show -n {}'.format(group)) - self.assertEqual(ex.exception.code, 3) - - # check that show-connection-string matches previous output - output_mirror = self.cmd('mysql show-connection-string -p {} -u {} -d {} -s {}'.format( - password, user, database, server)).get_output_in_json() - self.assertEqual(output, output_mirror) - - @live_only() - def test_postgres_flow(self): - group = self.create_random_name(prefix='group', length=24) - server = self.create_random_name(prefix='server', length=24) - - with mock.patch('azext_db_up.custom._run_postgresql_commands'): - with mock.patch('psycopg2.connect', side_effect=psycopg2.OperationalError()): - output = self.cmd('postgres up -g {} -s {}'.format(group, server)).get_output_in_json() - user, server_name = output['username'].split('@') - password, database = output['password'], 'sampledb' - self.assertEqual(server, server_name) - - # test followup iterations of up - self.cmd('postgres up', checks=[JMESPathCheck('password', '*****')]) - self.cmd('postgres up -p {}'.format(password), checks=[JMESPathCheck('password', password)]) - - # check that db and server exist - self.cmd('postgres db show -n {} -g {} -s {}'.format(database, group, server)) - - # remove all resources used by up - self.cmd('postgres down -y --delete-group') - - # check group no longer exists - with self.assertRaises(SystemExit) as ex: - self.cmd('group show -n {}'.format(group)) - self.assertEqual(ex.exception.code, 3) - - # check that show-connection-string matches previous output - output_mirror = self.cmd('postgres show-connection-string -p {} -u {} -d {} -s {}'.format( - password, user, database, server)).get_output_in_json() - self.assertEqual(output, output_mirror) - - @live_only() - @ResourceGroupPreparer(name_prefix='postgresup') - def test_postgres_up(self, resource_group): - from ...util import get_config_value, set_config_value - # Clear all config values - for item in ['location', 'group', 'server', 'login', 'database']: - set_config_value('postgres', item, '') - - self.cmd('postgres up') - rg1 = get_config_value('postgres', 'group') - server1 = get_config_value('postgres', 'server') - - self.cmd('postgres up -g {}'.format(resource_group)) - rg2 = get_config_value('postgres', 'group') - server2 = get_config_value('postgres', 'server') - assert(rg1 != rg2) - assert(server1 != server2) - - @live_only() # "sql up" can only run live as updating dependencies is done once during command execution - def test_sql_flow(self): - group = self.create_random_name(prefix='group', length=24) - server = self.create_random_name(prefix='server', length=24) - - output = self.cmd('sql up -g {} -s {}'.format(group, server)).get_output_in_json() - user, server_name = output['username'].split('@') - password, database = output['password'], 'sampledb' - self.assertEqual(server, server_name) - - # test followup iterations of up - self.cmd('sql up', checks=[JMESPathCheck('password', '*****')]) - self.cmd('sql up -p {}'.format(password), checks=[JMESPathCheck('password', password)]) - - # check that db and server exist - self.cmd('sql db show -n {} -g {} -s {}'.format(database, group, server)) - - # remove all resources used by up - self.cmd('sql down -y --delete-group') - - # check group no longer exists - with self.assertRaises(SystemExit) as ex: - self.cmd('group show -n {}'.format(group)) - self.assertEqual(ex.exception.code, 3) diff --git a/src/db-up/azext_db_up/util.py b/src/db-up/azext_db_up/util.py deleted file mode 100644 index 6c89a04d95e..00000000000 --- a/src/db-up/azext_db_up/util.py +++ /dev/null @@ -1,59 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import random -import os -from knack.config import CLIConfig -from azure.cli.core.commands import LongRunningOperation, _is_poller - -CONFIG_DIR = os.path.expanduser(os.path.join('~', '.azext_db_up')) -ENV_VAR_PREFIX = 'AZEXT' -MYSQL_CONFIG_SECTION = 'mysql_up' -POSTGRES_CONFIG_SECTION = 'postgres_up' -SQL_CONFIG_SECTION = 'sql_up' -CONFIG_MAP = { - 'mysql': MYSQL_CONFIG_SECTION, - 'postgres': POSTGRES_CONFIG_SECTION, - 'sql': SQL_CONFIG_SECTION -} -DB_CONFIG = CLIConfig(config_dir=CONFIG_DIR, config_env_var_prefix=ENV_VAR_PREFIX) - - -def create_random_resource_name(prefix='azure', length=15): - append_length = length - len(prefix) - digits = [str(random.randrange(10)) for i in range(append_length)] - return prefix + ''.join(digits) - - -def get_config_value(db_type, option, fallback='_fallback_none'): - config_section = CONFIG_MAP[db_type] - if fallback == '_fallback_none': - result = DB_CONFIG.get(config_section, option) - else: - result = DB_CONFIG.get(config_section, option, fallback=fallback) - if result: - return result - return None - - -def remove_config_value(db_type, option): - config_section = CONFIG_MAP[db_type] - DB_CONFIG.remove_option(config_section, option) - - -def set_config_value(db_type, option, value): - config_section = CONFIG_MAP[db_type] - DB_CONFIG.set_value(config_section, option, value) - - -def update_kwargs(kwargs, key, value): - if value is not None: - kwargs[key] = value - - -def resolve_poller(result, cli_ctx, name): - if _is_poller(result): - return LongRunningOperation(cli_ctx, 'Starting {}'.format(name))(result) - return result diff --git a/src/db-up/azext_db_up/vendored_sdks/__init__.py b/src/db-up/azext_db_up/vendored_sdks/__init__.py deleted file mode 100644 index a5b81f3bde4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -__import__('pkg_resources').declare_namespace(__name__) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/__init__.py deleted file mode 100644 index 64c9f558dd7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -__version__ = "0.0.1" diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/__init__.py deleted file mode 100644 index 9aa3b679e73..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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 .maria_db_management_client import MariaDBManagementClient -from .version import VERSION - -__all__ = ['MariaDBManagementClient'] - -__version__ = VERSION - diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/maria_db_management_client.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/maria_db_management_client.py deleted file mode 100644 index 0181f41782d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/maria_db_management_client.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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 SDKClient -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.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations.operations import Operations -from . import models - - -class MariaDBManagementClientConfiguration(AzureConfiguration): - """Configuration for MariaDBManagementClient - 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(MariaDBManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class MariaDBManagementClient(SDKClient): - """MariaDB Client - - :ivar config: Configuration for client. - :vartype config: MariaDBManagementClientConfiguration - - :ivar servers: Servers operations - :vartype servers: azure.mgmt.rdbms.mariadb.operations.ServersOperations - :ivar firewall_rules: FirewallRules operations - :vartype firewall_rules: azure.mgmt.rdbms.mariadb.operations.FirewallRulesOperations - :ivar virtual_network_rules: VirtualNetworkRules operations - :vartype virtual_network_rules: azure.mgmt.rdbms.mariadb.operations.VirtualNetworkRulesOperations - :ivar databases: Databases operations - :vartype databases: azure.mgmt.rdbms.mariadb.operations.DatabasesOperations - :ivar configurations: Configurations operations - :vartype configurations: azure.mgmt.rdbms.mariadb.operations.ConfigurationsOperations - :ivar log_files: LogFiles operations - :vartype log_files: azure.mgmt.rdbms.mariadb.operations.LogFilesOperations - :ivar location_based_performance_tier: LocationBasedPerformanceTier operations - :vartype location_based_performance_tier: azure.mgmt.rdbms.mariadb.operations.LocationBasedPerformanceTierOperations - :ivar check_name_availability: CheckNameAvailability operations - :vartype check_name_availability: azure.mgmt.rdbms.mariadb.operations.CheckNameAvailabilityOperations - :ivar server_security_alert_policies: ServerSecurityAlertPolicies operations - :vartype server_security_alert_policies: azure.mgmt.rdbms.mariadb.operations.ServerSecurityAlertPoliciesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.mariadb.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 = MariaDBManagementClientConfiguration(credentials, subscription_id, base_url) - super(MariaDBManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-06-01-preview' - 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.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/__init__.py deleted file mode 100644 index 5e35abaa775..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -try: - from .proxy_resource_py3 import ProxyResource - from .tracked_resource_py3 import TrackedResource - from .storage_profile_py3 import StorageProfile - from .server_properties_for_create_py3 import ServerPropertiesForCreate - from .server_properties_for_default_create_py3 import ServerPropertiesForDefaultCreate - from .server_properties_for_restore_py3 import ServerPropertiesForRestore - from .server_properties_for_geo_restore_py3 import ServerPropertiesForGeoRestore - from .sku_py3 import Sku - from .server_py3 import Server - from .server_for_create_py3 import ServerForCreate - from .server_update_parameters_py3 import ServerUpdateParameters - from .firewall_rule_py3 import FirewallRule - from .virtual_network_rule_py3 import VirtualNetworkRule - from .database_py3 import Database - from .configuration_py3 import Configuration - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .operation_list_result_py3 import OperationListResult - from .log_file_py3 import LogFile - from .performance_tier_service_level_objectives_py3 import PerformanceTierServiceLevelObjectives - from .performance_tier_properties_py3 import PerformanceTierProperties - from .name_availability_request_py3 import NameAvailabilityRequest - from .name_availability_py3 import NameAvailability - from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy -except (SyntaxError, ImportError): - 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_security_alert_policy import ServerSecurityAlertPolicy -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 .maria_db_management_client_enums import ( - ServerVersion, - SslEnforcementEnum, - ServerState, - GeoRedundantBackup, - SkuTier, - VirtualNetworkRuleState, - OperationOrigin, - ServerSecurityAlertPolicyState, -) - -__all__ = [ - 'ProxyResource', - 'TrackedResource', - 'StorageProfile', - 'ServerPropertiesForCreate', - 'ServerPropertiesForDefaultCreate', - 'ServerPropertiesForRestore', - 'ServerPropertiesForGeoRestore', - 'Sku', - 'Server', - 'ServerForCreate', - 'ServerUpdateParameters', - 'FirewallRule', - 'VirtualNetworkRule', - 'Database', - 'Configuration', - 'OperationDisplay', - 'Operation', - 'OperationListResult', - 'LogFile', - 'PerformanceTierServiceLevelObjectives', - 'PerformanceTierProperties', - 'NameAvailabilityRequest', - 'NameAvailability', - 'ServerSecurityAlertPolicy', - 'ServerPaged', - 'FirewallRulePaged', - 'VirtualNetworkRulePaged', - 'DatabasePaged', - 'ConfigurationPaged', - 'LogFilePaged', - 'PerformanceTierPropertiesPaged', - 'ServerVersion', - 'SslEnforcementEnum', - 'ServerState', - 'GeoRedundantBackup', - 'SkuTier', - 'VirtualNetworkRuleState', - 'OperationOrigin', - 'ServerSecurityAlertPolicyState', -] diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/configuration.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/configuration.py deleted file mode 100644 index 8d95fc4a0f2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/configuration.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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, **kwargs): - super(Configuration, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = kwargs.get('source', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/configuration_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/configuration_paged.py deleted file mode 100644 index c70c45f28d4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/configuration_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/configuration_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/configuration_py3.py deleted file mode 100644 index 59929c953a7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/configuration_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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_py3 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: str=None, source: str=None, **kwargs) -> None: - super(Configuration, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/database.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/database.py deleted file mode 100644 index f503efb9fa3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/database.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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, **kwargs): - super(Database, self).__init__(**kwargs) - self.charset = kwargs.get('charset', None) - self.collation = kwargs.get('collation', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/database_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/database_paged.py deleted file mode 100644 index 0085e88f5c4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/database_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/database_py3.py deleted file mode 100644 index af8b0ce61e7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/database_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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_py3 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: str=None, collation: str=None, **kwargs) -> None: - super(Database, self).__init__(**kwargs) - self.charset = charset - self.collation = collation diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/firewall_rule.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/firewall_rule.py deleted file mode 100644 index af9a04f835d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/firewall_rule.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. 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, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/firewall_rule_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/firewall_rule_paged.py deleted file mode 100644 index 8b2f2376820..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/firewall_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/firewall_rule_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/firewall_rule_py3.py deleted file mode 100644 index f5da7a6331e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/firewall_rule_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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_py3 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. 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: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/log_file.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/log_file.py deleted file mode 100644 index 557c79536e1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/log_file.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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 - :ivar url: The url to download the log file from. - :vartype url: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'url': {'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, **kwargs): - super(LogFile, self).__init__(**kwargs) - self.size_in_kb = kwargs.get('size_in_kb', None) - self.created_time = None - self.last_modified_time = None - self.log_file_type = kwargs.get('log_file_type', None) - self.url = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/log_file_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/log_file_paged.py deleted file mode 100644 index aaa67eb18dd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/log_file_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/log_file_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/log_file_py3.py deleted file mode 100644 index c5ff4ea6d34..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/log_file_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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_py3 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 - :ivar url: The url to download the log file from. - :vartype url: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'url': {'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: int=None, log_file_type: str=None, **kwargs) -> None: - super(LogFile, self).__init__(**kwargs) - 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 = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/maria_db_management_client_enums.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/maria_db_management_client_enums.py deleted file mode 100644 index 9ee8ed1ee78..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/maria_db_management_client_enums.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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(str, Enum): - - five_full_stop_six = "5.6" - five_full_stop_seven = "5.7" - - -class SslEnforcementEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class ServerState(str, Enum): - - ready = "Ready" - dropping = "Dropping" - disabled = "Disabled" - - -class GeoRedundantBackup(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class SkuTier(str, Enum): - - basic = "Basic" - general_purpose = "GeneralPurpose" - memory_optimized = "MemoryOptimized" - - -class VirtualNetworkRuleState(str, Enum): - - initializing = "Initializing" - in_progress = "InProgress" - ready = "Ready" - deleting = "Deleting" - unknown = "Unknown" - - -class OperationOrigin(str, Enum): - - not_specified = "NotSpecified" - user = "user" - system = "system" - - -class ServerSecurityAlertPolicyState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability.py deleted file mode 100644 index 327a74ca8a4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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, **kwargs): - super(NameAvailability, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability_py3.py deleted file mode 100644 index f7b52a09e29..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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: str=None, name_available: bool=None, reason: str=None, **kwargs) -> None: - super(NameAvailability, self).__init__(**kwargs) - self.message = message - self.name_available = name_available - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability_request.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability_request.py deleted file mode 100644 index 33cac8ab530..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability_request.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. 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, **kwargs): - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability_request_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability_request_py3.py deleted file mode 100644 index ec45bb2e473..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/name_availability_request_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. 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: str, type: str=None, **kwargs) -> None: - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation.py deleted file mode 100644 index a4d12d9c276..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.mariadb.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or ~azure.mgmt.rdbms.mariadb.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, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_display.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_display.py deleted file mode 100644 index 98314a2871d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_display.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_display_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_display_py3.py deleted file mode 100644 index 9b5a77c699a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_display_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_list_result.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_list_result.py deleted file mode 100644 index 5d6b31a6fe7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_list_result.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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.mariadb.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, **kwargs): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_list_result_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_list_result_py3.py deleted file mode 100644 index cff8b627ecd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_list_result_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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.mariadb.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(OperationListResult, self).__init__(**kwargs) - self.value = value diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_py3.py deleted file mode 100644 index fe3b01b0a8e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/operation_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.mariadb.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or ~azure.mgmt.rdbms.mariadb.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, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_properties.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_properties.py deleted file mode 100644 index c33af34599e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.mariadb.models.PerformanceTierServiceLevelObjectives] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, - } - - def __init__(self, **kwargs): - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.service_level_objectives = kwargs.get('service_level_objectives', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_properties_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_properties_paged.py deleted file mode 100644 index 17c6acdcff1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_properties_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_properties_py3.py deleted file mode 100644 index e2839d4114a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.mariadb.models.PerformanceTierServiceLevelObjectives] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, - } - - def __init__(self, *, id: str=None, service_level_objectives=None, **kwargs) -> None: - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = id - self.service_level_objectives = service_level_objectives diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_service_level_objectives.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_service_level_objectives.py deleted file mode 100644 index 4f653dc2834..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_service_level_objectives.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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, **kwargs): - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.edition = kwargs.get('edition', None) - self.v_core = kwargs.get('v_core', None) - self.hardware_generation = kwargs.get('hardware_generation', None) - self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) - self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) - self.max_storage_mb = kwargs.get('max_storage_mb', None) - self.min_storage_mb = kwargs.get('min_storage_mb', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_service_level_objectives_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_service_level_objectives_py3.py deleted file mode 100644 index 083e4720ab4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/performance_tier_service_level_objectives_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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: str=None, edition: str=None, v_core: int=None, hardware_generation: str=None, max_backup_retention_days: int=None, min_backup_retention_days: int=None, max_storage_mb: int=None, min_storage_mb: int=None, **kwargs) -> None: - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/proxy_resource.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/proxy_resource.py deleted file mode 100644 index 1223f4670fe..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/proxy_resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/proxy_resource_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/proxy_resource_py3.py deleted file mode 100644 index e0dde467e58..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/proxy_resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server.py deleted file mode 100644 index df51a63c87f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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.mariadb.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.mariadb.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.mariadb.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.mariadb.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.mariadb.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, **kwargs): - super(Server, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.user_visible_state = kwargs.get('user_visible_state', None) - self.fully_qualified_domain_name = kwargs.get('fully_qualified_domain_name', None) - self.earliest_restore_date = kwargs.get('earliest_restore_date', None) - self.storage_profile = kwargs.get('storage_profile', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_for_create.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_for_create.py deleted file mode 100644 index 50a281d34eb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_for_create.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param properties: Required. Properties of the server. - :type properties: - ~azure.mgmt.rdbms.mariadb.models.ServerPropertiesForCreate - :param location: Required. 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, **kwargs): - super(ServerForCreate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.properties = kwargs.get('properties', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_for_create_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_for_create_py3.py deleted file mode 100644 index ecc98cbe3e1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_for_create_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param properties: Required. Properties of the server. - :type properties: - ~azure.mgmt.rdbms.mariadb.models.ServerPropertiesForCreate - :param location: Required. 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: str, sku=None, tags=None, **kwargs) -> None: - super(ServerForCreate, self).__init__(**kwargs) - self.sku = sku - self.properties = properties - self.location = location - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_paged.py deleted file mode 100644 index 02a6b22a237..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_create.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_create.py deleted file mode 100644 index 5b6ce7ecf2a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_create.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.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.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. 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, **kwargs): - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.create_mode = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_create_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_create_py3.py deleted file mode 100644 index 840a39854ad..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_create_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.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.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. 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, **kwargs) -> None: - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = version - self.ssl_enforcement = ssl_enforcement - self.storage_profile = storage_profile - self.create_mode = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_default_create.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_default_create.py deleted file mode 100644 index 9f77a8e405b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_default_create.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.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.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. 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: Required. 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, **kwargs): - super(ServerPropertiesForDefaultCreate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.create_mode = 'Default' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_default_create_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_default_create_py3.py deleted file mode 100644 index f2f8089ff37..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_default_create_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): - """The properties used to create a new server. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.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.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. 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: Required. 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: str, administrator_login_password: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForDefaultCreate, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.create_mode = 'Default' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_geo_restore.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_geo_restore.py deleted file mode 100644 index deb90b6ffa9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_geo_restore.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.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.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. 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, **kwargs): - super(ServerPropertiesForGeoRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'GeoRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_geo_restore_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_geo_restore_py3.py deleted file mode 100644 index 33ebbba962d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_geo_restore_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring to a different - region from a geo replicated backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.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.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. 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: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForGeoRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'GeoRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_restore.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_restore.py deleted file mode 100644 index 620a7e7ba2c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_restore.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.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.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. 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, **kwargs): - super(ServerPropertiesForRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.create_mode = 'PointInTimeRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_restore_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_restore_py3.py deleted file mode 100644 index 7b6fa4702bb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_properties_for_restore_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring from a backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.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.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. 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: str, restore_point_in_time, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.restore_point_in_time = restore_point_in_time - self.create_mode = 'PointInTimeRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_py3.py deleted file mode 100644 index 0a2ec517b6c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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_py3 import TrackedResource - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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.mariadb.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.mariadb.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.mariadb.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.mariadb.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.mariadb.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: str, tags=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, **kwargs) -> None: - super(Server, self).__init__(location=location, tags=tags, **kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_security_alert_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_security_alert_policy.py deleted file mode 100644 index 5fa0f877316..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_security_alert_policy.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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 ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_security_alert_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_security_alert_policy_py3.py deleted file mode 100644 index 4a44fb64891..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_security_alert_policy_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_update_parameters.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_update_parameters.py deleted file mode 100644 index f9f703cf868..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_update_parameters.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.mariadb.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.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.mariadb.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.mariadb.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, **kwargs): - super(ServerUpdateParameters, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_update_parameters_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_update_parameters_py3.py deleted file mode 100644 index b4ebb57dce5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/server_update_parameters_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.mariadb.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.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.mariadb.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.mariadb.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: str=None, version=None, ssl_enforcement=None, tags=None, **kwargs) -> None: - super(ServerUpdateParameters, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/sku.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/sku.py deleted file mode 100644 index 3652595b01c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/sku.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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.mariadb.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, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/sku_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/sku_py3.py deleted file mode 100644 index 04332a36f92..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/sku_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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.mariadb.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: str=None, tier=None, capacity: int=None, size: str=None, family: str=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - self.size = size - self.family = family diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/storage_profile.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/storage_profile.py deleted file mode 100644 index 3af4d11079a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/storage_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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.mariadb.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, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = kwargs.get('backup_retention_days', None) - self.geo_redundant_backup = kwargs.get('geo_redundant_backup', None) - self.storage_mb = kwargs.get('storage_mb', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/storage_profile_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/storage_profile_py3.py deleted file mode 100644 index e231ef1873a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/storage_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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.mariadb.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: int=None, geo_redundant_backup=None, storage_mb: int=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = backup_retention_days - self.geo_redundant_backup = geo_redundant_backup - self.storage_mb = storage_mb diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/tracked_resource.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/tracked_resource.py deleted file mode 100644 index 67e93dd79e7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/tracked_resource_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/tracked_resource_py3.py deleted file mode 100644 index 0fbc3cc3edc..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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_py3 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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/virtual_network_rule.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/virtual_network_rule.py deleted file mode 100644 index 8746b864bbd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/virtual_network_rule.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. 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.mariadb.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, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/virtual_network_rule_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/virtual_network_rule_paged.py deleted file mode 100644 index c590c551ceb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/virtual_network_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/virtual_network_rule_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/virtual_network_rule_py3.py deleted file mode 100644 index 5cf92b6b292..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/models/virtual_network_rule_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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_py3 import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. 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.mariadb.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: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/__init__.py deleted file mode 100644 index 27ac2e7b90d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations import Operations - -__all__ = [ - 'ServersOperations', - 'FirewallRulesOperations', - 'VirtualNetworkRulesOperations', - 'DatabasesOperations', - 'ConfigurationsOperations', - 'LogFilesOperations', - 'LocationBasedPerformanceTierOperations', - 'CheckNameAvailabilityOperations', - 'ServerSecurityAlertPoliciesOperations', - 'Operations', -] diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/check_name_availability_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/check_name_availability_operations.py deleted file mode 100644 index 86103593a2e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/check_name_availability_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - 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.mariadb.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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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.DBforMariaDB/checkNameAvailability'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/configurations_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/configurations_operations.py deleted file mode 100644 index 7321c3ad897..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/configurations_operations.py +++ /dev/null @@ -1,290 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - 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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Configuration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.Configuration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.Configuration]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/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.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/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.mariadb.models.ConfigurationPaged[~azure.mgmt.rdbms.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/servers/{serverName}/configurations'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/databases_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/databases_operations.py deleted file mode 100644 index 5e1d7985f4b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/databases_operations.py +++ /dev/null @@ -1,377 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - 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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Database or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.Database] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.Database]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/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 = {} - 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, header_parameters) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/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.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/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.mariadb.models.DatabasePaged[~azure.mgmt.rdbms.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/servers/{serverName}/databases'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/firewall_rules_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/firewall_rules_operations.py deleted file mode 100644 index 7a411597b3b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/firewall_rules_operations.py +++ /dev/null @@ -1,379 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - 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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FirewallRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.FirewallRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.FirewallRule]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/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 = {} - 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, header_parameters) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/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.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/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.mariadb.models.FirewallRulePaged[~azure.mgmt.rdbms.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/servers/{serverName}/firewallRules'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/location_based_performance_tier_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/location_based_performance_tier_operations.py deleted file mode 100644 index bf20bf9e5f7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/location_based_performance_tier_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - 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.mariadb.models.PerformanceTierPropertiesPaged[~azure.mgmt.rdbms.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/locations/{locationName}/performanceTiers'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/log_files_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/log_files_operations.py deleted file mode 100644 index 936807aaecd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/log_files_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - 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.mariadb.models.LogFilePaged[~azure.mgmt.rdbms.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/servers/{serverName}/logFiles'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/operations.py deleted file mode 100644 index 2953ff26f77..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/operations.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - 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.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/operations'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/server_security_alert_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/server_security_alert_policies_operations.py deleted file mode 100644 index a2814dd51ff..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/server_security_alert_policies_operations.py +++ /dev/null @@ -1,212 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerSecurityAlertPoliciesOperations(object): - """ServerSecurityAlertPoliciesOperations 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 security_alert_policy_name: The name of the security alert policy. Constant value: "Default". - :ivar api_version: The API version to use for the request. Constant value: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.security_alert_policy_name = "Default" - self.api_version = "2018-06-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Get a server's security alert policy. - - :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: ServerSecurityAlertPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy 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'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_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['Accept'] = 'application/json' - 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, 'ServerSecurityAlertPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ServerSecurityAlertPolicy', 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, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a threat detection policy. - - :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 server security alert policy. - :type parameters: - ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerSecurityAlertPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/servers_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/servers_operations.py deleted file mode 100644 index 3d654d865f0..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/servers_operations.py +++ /dev/null @@ -1,528 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - 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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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.mariadb.models.ServerForCreate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.Server]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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.mariadb.models.ServerUpdateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.Server]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/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 = {} - 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, header_parameters) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/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.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/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.mariadb.models.ServerPaged[~azure.mgmt.rdbms.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/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.mariadb.models.ServerPaged[~azure.mgmt.rdbms.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/servers'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/virtual_network_rules_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/virtual_network_rules_operations.py deleted file mode 100644 index 39d78278bb8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/virtual_network_rules_operations.py +++ /dev/null @@ -1,382 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - 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.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualNetworkRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/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 = {} - 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, header_parameters) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/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.mariadb.models.VirtualNetworkRulePaged[~azure.mgmt.rdbms.mariadb.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DBforMariaDB/servers/{serverName}/virtualNetworkRules'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/version.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/version.py deleted file mode 100644 index fcb31ad1686..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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 = "2018-06-01-preview" - diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/__init__.py deleted file mode 100644 index 624450eee2f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/__init__.py deleted file mode 100644 index 7abae0f1efd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/__init__.py +++ /dev/null @@ -1,123 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -try: - from .proxy_resource_py3 import ProxyResource - from .tracked_resource_py3 import TrackedResource - from .storage_profile_py3 import StorageProfile - from .server_properties_for_create_py3 import ServerPropertiesForCreate - from .server_properties_for_default_create_py3 import ServerPropertiesForDefaultCreate - from .server_properties_for_restore_py3 import ServerPropertiesForRestore - from .server_properties_for_geo_restore_py3 import ServerPropertiesForGeoRestore - from .server_properties_for_replica_py3 import ServerPropertiesForReplica - from .sku_py3 import Sku - from .server_py3 import Server - from .server_for_create_py3 import ServerForCreate - from .server_update_parameters_py3 import ServerUpdateParameters - from .firewall_rule_py3 import FirewallRule - from .virtual_network_rule_py3 import VirtualNetworkRule - from .database_py3 import Database - from .configuration_py3 import Configuration - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .operation_list_result_py3 import OperationListResult - from .log_file_py3 import LogFile - from .performance_tier_service_level_objectives_py3 import PerformanceTierServiceLevelObjectives - from .performance_tier_properties_py3 import PerformanceTierProperties - from .name_availability_request_py3 import NameAvailabilityRequest - from .name_availability_py3 import NameAvailability - from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy -except (SyntaxError, ImportError): - 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 .server_properties_for_replica import ServerPropertiesForReplica - 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_security_alert_policy import ServerSecurityAlertPolicy -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, - ServerSecurityAlertPolicyState, -) - -__all__ = [ - 'ProxyResource', - 'TrackedResource', - 'StorageProfile', - 'ServerPropertiesForCreate', - 'ServerPropertiesForDefaultCreate', - 'ServerPropertiesForRestore', - 'ServerPropertiesForGeoRestore', - 'ServerPropertiesForReplica', - 'Sku', - 'Server', - 'ServerForCreate', - 'ServerUpdateParameters', - 'FirewallRule', - 'VirtualNetworkRule', - 'Database', - 'Configuration', - 'OperationDisplay', - 'Operation', - 'OperationListResult', - 'LogFile', - 'PerformanceTierServiceLevelObjectives', - 'PerformanceTierProperties', - 'NameAvailabilityRequest', - 'NameAvailability', - 'ServerSecurityAlertPolicy', - 'ServerPaged', - 'FirewallRulePaged', - 'VirtualNetworkRulePaged', - 'DatabasePaged', - 'ConfigurationPaged', - 'LogFilePaged', - 'PerformanceTierPropertiesPaged', - 'ServerVersion', - 'SslEnforcementEnum', - 'ServerState', - 'GeoRedundantBackup', - 'SkuTier', - 'VirtualNetworkRuleState', - 'OperationOrigin', - 'ServerSecurityAlertPolicyState', -] diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/configuration.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/configuration.py deleted file mode 100644 index 8d95fc4a0f2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/configuration.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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, **kwargs): - super(Configuration, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = kwargs.get('source', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/configuration_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/configuration_paged.py deleted file mode 100644 index dbf329cbf45..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/configuration_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/configuration_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/configuration_py3.py deleted file mode 100644 index 59929c953a7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/configuration_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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_py3 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: str=None, source: str=None, **kwargs) -> None: - super(Configuration, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/database.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/database.py deleted file mode 100644 index f503efb9fa3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/database.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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, **kwargs): - super(Database, self).__init__(**kwargs) - self.charset = kwargs.get('charset', None) - self.collation = kwargs.get('collation', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/database_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/database_paged.py deleted file mode 100644 index bf317192044..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/database_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/database_py3.py deleted file mode 100644 index af8b0ce61e7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/database_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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_py3 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: str=None, collation: str=None, **kwargs) -> None: - super(Database, self).__init__(**kwargs) - self.charset = charset - self.collation = collation diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/firewall_rule.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/firewall_rule.py deleted file mode 100644 index af9a04f835d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/firewall_rule.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. 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, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/firewall_rule_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/firewall_rule_paged.py deleted file mode 100644 index d58692c7a13..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/firewall_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/firewall_rule_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/firewall_rule_py3.py deleted file mode 100644 index f5da7a6331e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/firewall_rule_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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_py3 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. 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: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/log_file.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/log_file.py deleted file mode 100644 index 214dae4dbee..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/log_file.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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, **kwargs): - super(LogFile, self).__init__(**kwargs) - self.size_in_kb = kwargs.get('size_in_kb', None) - self.created_time = None - self.last_modified_time = None - self.log_file_type = kwargs.get('log_file_type', None) - self.url = kwargs.get('url', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/log_file_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/log_file_paged.py deleted file mode 100644 index e935cdd3bb0..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/log_file_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/log_file_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/log_file_py3.py deleted file mode 100644 index aa8edbe0ca9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/log_file_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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_py3 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: int=None, log_file_type: str=None, url: str=None, **kwargs) -> None: - super(LogFile, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/my_sql_management_client_enums.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/my_sql_management_client_enums.py deleted file mode 100644 index 9ee8ed1ee78..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/my_sql_management_client_enums.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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(str, Enum): - - five_full_stop_six = "5.6" - five_full_stop_seven = "5.7" - - -class SslEnforcementEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class ServerState(str, Enum): - - ready = "Ready" - dropping = "Dropping" - disabled = "Disabled" - - -class GeoRedundantBackup(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class SkuTier(str, Enum): - - basic = "Basic" - general_purpose = "GeneralPurpose" - memory_optimized = "MemoryOptimized" - - -class VirtualNetworkRuleState(str, Enum): - - initializing = "Initializing" - in_progress = "InProgress" - ready = "Ready" - deleting = "Deleting" - unknown = "Unknown" - - -class OperationOrigin(str, Enum): - - not_specified = "NotSpecified" - user = "user" - system = "system" - - -class ServerSecurityAlertPolicyState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability.py deleted file mode 100644 index 327a74ca8a4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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, **kwargs): - super(NameAvailability, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability_py3.py deleted file mode 100644 index f7b52a09e29..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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: str=None, name_available: bool=None, reason: str=None, **kwargs) -> None: - super(NameAvailability, self).__init__(**kwargs) - self.message = message - self.name_available = name_available - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability_request.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability_request.py deleted file mode 100644 index 33cac8ab530..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability_request.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. 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, **kwargs): - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability_request_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability_request_py3.py deleted file mode 100644 index ec45bb2e473..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/name_availability_request_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. 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: str, type: str=None, **kwargs) -> None: - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation.py deleted file mode 100644 index dfd48f5fa19..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_display.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_display.py deleted file mode 100644 index 98314a2871d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_display.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_display_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_display_py3.py deleted file mode 100644 index 9b5a77c699a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_display_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_list_result.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_list_result.py deleted file mode 100644 index a170a4afa8d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_list_result.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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, **kwargs): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_list_result_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_list_result_py3.py deleted file mode 100644 index d90867e62f9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_list_result_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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, **kwargs) -> None: - super(OperationListResult, self).__init__(**kwargs) - self.value = value diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_py3.py deleted file mode 100644 index 1bbddecaa32..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/operation_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_properties.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_properties.py deleted file mode 100644 index 5e3a3c8b174..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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, **kwargs): - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.service_level_objectives = kwargs.get('service_level_objectives', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_properties_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_properties_paged.py deleted file mode 100644 index 94fbd7b3ab9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_properties_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_properties_py3.py deleted file mode 100644 index b75517b4945..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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: str=None, service_level_objectives=None, **kwargs) -> None: - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = id - self.service_level_objectives = service_level_objectives diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_service_level_objectives.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_service_level_objectives.py deleted file mode 100644 index 4f653dc2834..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_service_level_objectives.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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, **kwargs): - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.edition = kwargs.get('edition', None) - self.v_core = kwargs.get('v_core', None) - self.hardware_generation = kwargs.get('hardware_generation', None) - self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) - self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) - self.max_storage_mb = kwargs.get('max_storage_mb', None) - self.min_storage_mb = kwargs.get('min_storage_mb', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_service_level_objectives_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_service_level_objectives_py3.py deleted file mode 100644 index 083e4720ab4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/performance_tier_service_level_objectives_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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: str=None, edition: str=None, v_core: int=None, hardware_generation: str=None, max_backup_retention_days: int=None, min_backup_retention_days: int=None, max_storage_mb: int=None, min_storage_mb: int=None, **kwargs) -> None: - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/proxy_resource.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/proxy_resource.py deleted file mode 100644 index 1223f4670fe..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/proxy_resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/proxy_resource_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/proxy_resource_py3.py deleted file mode 100644 index e0dde467e58..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/proxy_resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server.py deleted file mode 100644 index 03ac4096b90..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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 - :param replication_role: The replication role of the server. - :type replication_role: str - :param master_server_id: The master server id of a relica server. - :type master_server_id: str - :param replica_capacity: The maximum number of replicas that a master - server can have. - :type replica_capacity: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'replica_capacity': {'minimum': 0}, - } - - _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'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.user_visible_state = kwargs.get('user_visible_state', None) - self.fully_qualified_domain_name = kwargs.get('fully_qualified_domain_name', None) - self.earliest_restore_date = kwargs.get('earliest_restore_date', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.replication_role = kwargs.get('replication_role', None) - self.master_server_id = kwargs.get('master_server_id', None) - self.replica_capacity = kwargs.get('replica_capacity', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_for_create.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_for_create.py deleted file mode 100644 index 11c78dc85a9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_for_create.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.models.Sku - :param properties: Required. Properties of the server. - :type properties: ~azure.mgmt.rdbms.mysql.models.ServerPropertiesForCreate - :param location: Required. 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, **kwargs): - super(ServerForCreate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.properties = kwargs.get('properties', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_for_create_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_for_create_py3.py deleted file mode 100644 index 485e9433b9d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_for_create_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.models.Sku - :param properties: Required. Properties of the server. - :type properties: ~azure.mgmt.rdbms.mysql.models.ServerPropertiesForCreate - :param location: Required. 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: str, sku=None, tags=None, **kwargs) -> None: - super(ServerForCreate, self).__init__(**kwargs) - self.sku = sku - self.properties = properties - self.location = location - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_paged.py deleted file mode 100644 index b64a325011a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_create.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_create.py deleted file mode 100644 index 3c99ea2a4f9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_create.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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, - ServerPropertiesForReplica - - All required parameters must be populated in order to send to Azure. - - :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: Required. 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', 'Replica': 'ServerPropertiesForReplica'} - } - - def __init__(self, **kwargs): - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.create_mode = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_create_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_create_py3.py deleted file mode 100644 index 97ae29e318f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_create_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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, - ServerPropertiesForReplica - - All required parameters must be populated in order to send to Azure. - - :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: Required. 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', 'Replica': 'ServerPropertiesForReplica'} - } - - def __init__(self, *, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = version - self.ssl_enforcement = ssl_enforcement - self.storage_profile = storage_profile - self.create_mode = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_default_create.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_default_create.py deleted file mode 100644 index a144a3a7a8d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_default_create.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. 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: Required. 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, **kwargs): - super(ServerPropertiesForDefaultCreate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.create_mode = 'Default' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_default_create_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_default_create_py3.py deleted file mode 100644 index 68c237b8962..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_default_create_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): - """The properties used to create a new server. - - All required parameters must be populated in order to send to Azure. - - :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: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. 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: Required. 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: str, administrator_login_password: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForDefaultCreate, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.create_mode = 'Default' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_geo_restore.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_geo_restore.py deleted file mode 100644 index 23aa70dde80..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_geo_restore.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. 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, **kwargs): - super(ServerPropertiesForGeoRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'GeoRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_geo_restore_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_geo_restore_py3.py deleted file mode 100644 index 62965b21104..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_geo_restore_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring to a different - region from a geo replicated backup. - - All required parameters must be populated in order to send to Azure. - - :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: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. 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: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForGeoRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'GeoRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_replica.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_replica.py deleted file mode 100644 index 4af6fae1e5f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_replica.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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 ServerPropertiesForReplica(ServerPropertiesForCreate): - """The properties to create a new replica. - - All required parameters must be populated in order to send to Azure. - - :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: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The master server id to create replica - 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, **kwargs): - super(ServerPropertiesForReplica, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'Replica' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_replica_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_replica_py3.py deleted file mode 100644 index 0505acc6c8c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_replica_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForReplica(ServerPropertiesForCreate): - """The properties to create a new replica. - - All required parameters must be populated in order to send to Azure. - - :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: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The master server id to create replica - 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: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForReplica, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'Replica' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_restore.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_restore.py deleted file mode 100644 index fa08c9f36f5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_restore.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. 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, **kwargs): - super(ServerPropertiesForRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.create_mode = 'PointInTimeRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_restore_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_restore_py3.py deleted file mode 100644 index eeb71dab386..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_properties_for_restore_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring from a backup. - - All required parameters must be populated in order to send to Azure. - - :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: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. 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: str, restore_point_in_time, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.restore_point_in_time = restore_point_in_time - self.create_mode = 'PointInTimeRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_py3.py deleted file mode 100644 index 157822716bd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_py3.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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_py3 import TrackedResource - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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 - :param replication_role: The replication role of the server. - :type replication_role: str - :param master_server_id: The master server id of a relica server. - :type master_server_id: str - :param replica_capacity: The maximum number of replicas that a master - server can have. - :type replica_capacity: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'replica_capacity': {'minimum': 0}, - } - - _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'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, replication_role: str=None, master_server_id: str=None, replica_capacity: int=None, **kwargs) -> None: - super(Server, self).__init__(location=location, tags=tags, **kwargs) - 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 - self.replication_role = replication_role - self.master_server_id = master_server_id - self.replica_capacity = replica_capacity diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_security_alert_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_security_alert_policy.py deleted file mode 100644 index 7e18687ebbf..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_security_alert_policy.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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 ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_security_alert_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_security_alert_policy_py3.py deleted file mode 100644 index 7867dfa5fa4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_security_alert_policy_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_update_parameters.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_update_parameters.py deleted file mode 100644 index 222299107d6..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_update_parameters.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 replication_role: The replication role of the server. - :type replication_role: str - :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'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerUpdateParameters, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.replication_role = kwargs.get('replication_role', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_update_parameters_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_update_parameters_py3.py deleted file mode 100644 index 869a81a0767..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/server_update_parameters_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 replication_role: The replication role of the server. - :type replication_role: str - :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'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, storage_profile=None, administrator_login_password: str=None, version=None, ssl_enforcement=None, replication_role: str=None, tags=None, **kwargs) -> None: - super(ServerUpdateParameters, self).__init__(**kwargs) - self.sku = sku - self.storage_profile = storage_profile - self.administrator_login_password = administrator_login_password - self.version = version - self.ssl_enforcement = ssl_enforcement - self.replication_role = replication_role - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/sku.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/sku.py deleted file mode 100644 index 968ef19a2e2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/sku.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/sku_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/sku_py3.py deleted file mode 100644 index f7c0fbf90ed..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/sku_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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: str=None, tier=None, capacity: int=None, size: str=None, family: str=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - self.size = size - self.family = family diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/storage_profile.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/storage_profile.py deleted file mode 100644 index c40172fb058..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/storage_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = kwargs.get('backup_retention_days', None) - self.geo_redundant_backup = kwargs.get('geo_redundant_backup', None) - self.storage_mb = kwargs.get('storage_mb', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/storage_profile_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/storage_profile_py3.py deleted file mode 100644 index 8a50588949d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/storage_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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: int=None, geo_redundant_backup=None, storage_mb: int=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = backup_retention_days - self.geo_redundant_backup = geo_redundant_backup - self.storage_mb = storage_mb diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/tracked_resource.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/tracked_resource.py deleted file mode 100644 index 67e93dd79e7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/tracked_resource_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/tracked_resource_py3.py deleted file mode 100644 index 0fbc3cc3edc..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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_py3 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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/virtual_network_rule.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/virtual_network_rule.py deleted file mode 100644 index adde320b008..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/virtual_network_rule.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. 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, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/virtual_network_rule_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/virtual_network_rule_paged.py deleted file mode 100644 index a7eaf18d22b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/virtual_network_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/virtual_network_rule_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/virtual_network_rule_py3.py deleted file mode 100644 index c0068605e57..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/models/virtual_network_rule_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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_py3 import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. 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: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/my_sql_management_client.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/my_sql_management_client.py deleted file mode 100644 index fa95461b700..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/my_sql_management_client.py +++ /dev/null @@ -1,133 +0,0 @@ -# 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 SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.servers_operations import ServersOperations -from .operations.replicas_operations import ReplicasOperations -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.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -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-rdbms/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class MySQLManagementClient(SDKClient): - """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 replicas: Replicas operations - :vartype replicas: azure.mgmt.rdbms.mysql.operations.ReplicasOperations - :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 server_security_alert_policies: ServerSecurityAlertPolicies operations - :vartype server_security_alert_policies: azure.mgmt.rdbms.mysql.operations.ServerSecurityAlertPoliciesOperations - :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) - super(MySQLManagementClient, self).__init__(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.replicas = ReplicasOperations( - 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.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/__init__.py deleted file mode 100644 index ba9e371e6e7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/__init__.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 .replicas_operations import ReplicasOperations -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 .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations import Operations - -__all__ = [ - 'ServersOperations', - 'ReplicasOperations', - 'FirewallRulesOperations', - 'VirtualNetworkRulesOperations', - 'DatabasesOperations', - 'ConfigurationsOperations', - 'LogFilesOperations', - 'LocationBasedPerformanceTierOperations', - 'CheckNameAvailabilityOperations', - 'ServerSecurityAlertPoliciesOperations', - 'Operations', -] diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/check_name_availability_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/check_name_availability_operations.py deleted file mode 100644 index 0bff08df05c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/check_name_availability_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/configurations_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/configurations_operations.py deleted file mode 100644 index 46b0e660308..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/configurations_operations.py +++ /dev/null @@ -1,290 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Configuration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Configuration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.Configuration]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/databases_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/databases_operations.py deleted file mode 100644 index b1358b0f7ec..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/databases_operations.py +++ /dev/null @@ -1,377 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Database or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Database] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.Database]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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 = {} - 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, header_parameters) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/firewall_rules_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/firewall_rules_operations.py deleted file mode 100644 index ff2681b850e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/firewall_rules_operations.py +++ /dev/null @@ -1,379 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FirewallRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.FirewallRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.FirewallRule]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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 = {} - 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, header_parameters) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/location_based_performance_tier_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/location_based_performance_tier_operations.py deleted file mode 100644 index da49775ed0e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/location_based_performance_tier_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/log_files_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/log_files_operations.py deleted file mode 100644 index 3da6dbdeb0f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/log_files_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/operations.py deleted file mode 100644 index 57c38cf31a6..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/operations.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/replicas_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/replicas_operations.py deleted file mode 100644 index 17718800d84..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/replicas_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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 ReplicasOperations(object): - """ReplicasOperations 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 replicas for 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 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_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/replicas'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/server_security_alert_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/server_security_alert_policies_operations.py deleted file mode 100644 index 5c4b9e8bc39..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/server_security_alert_policies_operations.py +++ /dev/null @@ -1,212 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerSecurityAlertPoliciesOperations(object): - """ServerSecurityAlertPoliciesOperations 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 security_alert_policy_name: The name of the security alert policy. Constant value: "Default". - :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.security_alert_policy_name = "Default" - self.api_version = "2017-12-01" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Get a server's security alert policy. - - :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: ServerSecurityAlertPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy 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'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServerSecurityAlertPolicy', 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}/securityAlertPolicies/{securityAlertPolicyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_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['Accept'] = 'application/json' - 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, 'ServerSecurityAlertPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ServerSecurityAlertPolicy', 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, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a threat detection policy. - - :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 server security alert policy. - :type parameters: - ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerSecurityAlertPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/servers_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/servers_operations.py deleted file mode 100644 index 709564282c9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/servers_operations.py +++ /dev/null @@ -1,528 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.Server]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.Server]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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 = {} - 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, header_parameters) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/virtual_network_rules_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/virtual_network_rules_operations.py deleted file mode 100644 index 3f5f9b8a313..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/operations/virtual_network_rules_operations.py +++ /dev/null @@ -1,382 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualNetworkRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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 = {} - 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, header_parameters) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/version.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/version.py deleted file mode 100644 index e5978466adb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mysql/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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 = "2017-12-01" - diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/__init__.py deleted file mode 100644 index 41ac8ae569f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/__init__.py deleted file mode 100644 index 77b55e228bd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -try: - from .proxy_resource_py3 import ProxyResource - from .tracked_resource_py3 import TrackedResource - from .storage_profile_py3 import StorageProfile - from .server_properties_for_create_py3 import ServerPropertiesForCreate - from .server_properties_for_default_create_py3 import ServerPropertiesForDefaultCreate - from .server_properties_for_restore_py3 import ServerPropertiesForRestore - from .server_properties_for_geo_restore_py3 import ServerPropertiesForGeoRestore - from .sku_py3 import Sku - from .server_py3 import Server - from .server_for_create_py3 import ServerForCreate - from .server_update_parameters_py3 import ServerUpdateParameters - from .firewall_rule_py3 import FirewallRule - from .virtual_network_rule_py3 import VirtualNetworkRule - from .database_py3 import Database - from .configuration_py3 import Configuration - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .operation_list_result_py3 import OperationListResult - from .log_file_py3 import LogFile - from .performance_tier_service_level_objectives_py3 import PerformanceTierServiceLevelObjectives - from .performance_tier_properties_py3 import PerformanceTierProperties - from .name_availability_request_py3 import NameAvailabilityRequest - from .name_availability_py3 import NameAvailability - from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy -except (SyntaxError, ImportError): - 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_security_alert_policy import ServerSecurityAlertPolicy -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, - ServerSecurityAlertPolicyState, -) - -__all__ = [ - 'ProxyResource', - 'TrackedResource', - 'StorageProfile', - 'ServerPropertiesForCreate', - 'ServerPropertiesForDefaultCreate', - 'ServerPropertiesForRestore', - 'ServerPropertiesForGeoRestore', - 'Sku', - 'Server', - 'ServerForCreate', - 'ServerUpdateParameters', - 'FirewallRule', - 'VirtualNetworkRule', - 'Database', - 'Configuration', - 'OperationDisplay', - 'Operation', - 'OperationListResult', - 'LogFile', - 'PerformanceTierServiceLevelObjectives', - 'PerformanceTierProperties', - 'NameAvailabilityRequest', - 'NameAvailability', - 'ServerSecurityAlertPolicy', - 'ServerPaged', - 'FirewallRulePaged', - 'VirtualNetworkRulePaged', - 'DatabasePaged', - 'ConfigurationPaged', - 'LogFilePaged', - 'PerformanceTierPropertiesPaged', - 'ServerVersion', - 'SslEnforcementEnum', - 'ServerState', - 'GeoRedundantBackup', - 'SkuTier', - 'VirtualNetworkRuleState', - 'OperationOrigin', - 'ServerSecurityAlertPolicyState', -] diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/configuration.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/configuration.py deleted file mode 100644 index 8d95fc4a0f2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/configuration.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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, **kwargs): - super(Configuration, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = kwargs.get('source', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/configuration_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/configuration_paged.py deleted file mode 100644 index b861ae03fff..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/configuration_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/configuration_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/configuration_py3.py deleted file mode 100644 index 59929c953a7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/configuration_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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_py3 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: str=None, source: str=None, **kwargs) -> None: - super(Configuration, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/database.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/database.py deleted file mode 100644 index f503efb9fa3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/database.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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, **kwargs): - super(Database, self).__init__(**kwargs) - self.charset = kwargs.get('charset', None) - self.collation = kwargs.get('collation', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/database_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/database_paged.py deleted file mode 100644 index 2dc1e436779..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/database_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/database_py3.py deleted file mode 100644 index af8b0ce61e7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/database_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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_py3 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: str=None, collation: str=None, **kwargs) -> None: - super(Database, self).__init__(**kwargs) - self.charset = charset - self.collation = collation diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/firewall_rule.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/firewall_rule.py deleted file mode 100644 index af9a04f835d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/firewall_rule.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. 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, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/firewall_rule_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/firewall_rule_paged.py deleted file mode 100644 index a07ec3d0c92..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/firewall_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/firewall_rule_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/firewall_rule_py3.py deleted file mode 100644 index f5da7a6331e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/firewall_rule_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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_py3 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. 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: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/log_file.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/log_file.py deleted file mode 100644 index 214dae4dbee..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/log_file.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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, **kwargs): - super(LogFile, self).__init__(**kwargs) - self.size_in_kb = kwargs.get('size_in_kb', None) - self.created_time = None - self.last_modified_time = None - self.log_file_type = kwargs.get('log_file_type', None) - self.url = kwargs.get('url', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/log_file_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/log_file_paged.py deleted file mode 100644 index a666ecd9d39..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/log_file_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/log_file_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/log_file_py3.py deleted file mode 100644 index aa8edbe0ca9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/log_file_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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_py3 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: int=None, log_file_type: str=None, url: str=None, **kwargs) -> None: - super(LogFile, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability.py deleted file mode 100644 index 327a74ca8a4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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, **kwargs): - super(NameAvailability, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability_py3.py deleted file mode 100644 index f7b52a09e29..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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: str=None, name_available: bool=None, reason: str=None, **kwargs) -> None: - super(NameAvailability, self).__init__(**kwargs) - self.message = message - self.name_available = name_available - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability_request.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability_request.py deleted file mode 100644 index 33cac8ab530..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability_request.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. 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, **kwargs): - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability_request_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability_request_py3.py deleted file mode 100644 index ec45bb2e473..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/name_availability_request_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. 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: str, type: str=None, **kwargs) -> None: - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation.py deleted file mode 100644 index 6e54cd3c45b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_display.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_display.py deleted file mode 100644 index 98314a2871d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_display.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_display_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_display_py3.py deleted file mode 100644 index 9b5a77c699a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_display_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_list_result.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_list_result.py deleted file mode 100644 index 064d889c587..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_list_result.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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, **kwargs): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_list_result_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_list_result_py3.py deleted file mode 100644 index b20d89e4c6e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_list_result_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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, **kwargs) -> None: - super(OperationListResult, self).__init__(**kwargs) - self.value = value diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_py3.py deleted file mode 100644 index bb0791b4a59..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/operation_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_properties.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_properties.py deleted file mode 100644 index 97268d3f7c9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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, **kwargs): - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.service_level_objectives = kwargs.get('service_level_objectives', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_properties_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_properties_paged.py deleted file mode 100644 index e6fe88ac2fa..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_properties_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_properties_py3.py deleted file mode 100644 index 3d56f700d21..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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: str=None, service_level_objectives=None, **kwargs) -> None: - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = id - self.service_level_objectives = service_level_objectives diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_service_level_objectives.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_service_level_objectives.py deleted file mode 100644 index 4f653dc2834..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_service_level_objectives.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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, **kwargs): - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.edition = kwargs.get('edition', None) - self.v_core = kwargs.get('v_core', None) - self.hardware_generation = kwargs.get('hardware_generation', None) - self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) - self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) - self.max_storage_mb = kwargs.get('max_storage_mb', None) - self.min_storage_mb = kwargs.get('min_storage_mb', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_service_level_objectives_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_service_level_objectives_py3.py deleted file mode 100644 index 083e4720ab4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/performance_tier_service_level_objectives_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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: str=None, edition: str=None, v_core: int=None, hardware_generation: str=None, max_backup_retention_days: int=None, min_backup_retention_days: int=None, max_storage_mb: int=None, min_storage_mb: int=None, **kwargs) -> None: - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/postgre_sql_management_client_enums.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/postgre_sql_management_client_enums.py deleted file mode 100644 index 58b3c8ce4f2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/postgre_sql_management_client_enums.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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(str, Enum): - - nine_full_stop_five = "9.5" - nine_full_stop_six = "9.6" - one_zero = "10" - one_zero_full_stop_zero = "10.0" - one_zero_full_stop_two = "10.2" - - -class SslEnforcementEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class ServerState(str, Enum): - - ready = "Ready" - dropping = "Dropping" - disabled = "Disabled" - - -class GeoRedundantBackup(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class SkuTier(str, Enum): - - basic = "Basic" - general_purpose = "GeneralPurpose" - memory_optimized = "MemoryOptimized" - - -class VirtualNetworkRuleState(str, Enum): - - initializing = "Initializing" - in_progress = "InProgress" - ready = "Ready" - deleting = "Deleting" - unknown = "Unknown" - - -class OperationOrigin(str, Enum): - - not_specified = "NotSpecified" - user = "user" - system = "system" - - -class ServerSecurityAlertPolicyState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/proxy_resource.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/proxy_resource.py deleted file mode 100644 index 1223f4670fe..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/proxy_resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/proxy_resource_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/proxy_resource_py3.py deleted file mode 100644 index e0dde467e58..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/proxy_resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server.py deleted file mode 100644 index 4ba9b5b3df1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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', - '10', '10.0', '10.2' - :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, **kwargs): - super(Server, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.user_visible_state = kwargs.get('user_visible_state', None) - self.fully_qualified_domain_name = kwargs.get('fully_qualified_domain_name', None) - self.earliest_restore_date = kwargs.get('earliest_restore_date', None) - self.storage_profile = kwargs.get('storage_profile', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_for_create.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_for_create.py deleted file mode 100644 index f62cec52744..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_for_create.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku - :param properties: Required. Properties of the server. - :type properties: - ~azure.mgmt.rdbms.postgresql.models.ServerPropertiesForCreate - :param location: Required. 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, **kwargs): - super(ServerForCreate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.properties = kwargs.get('properties', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_for_create_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_for_create_py3.py deleted file mode 100644 index 4e686e7a266..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_for_create_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku - :param properties: Required. Properties of the server. - :type properties: - ~azure.mgmt.rdbms.postgresql.models.ServerPropertiesForCreate - :param location: Required. 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: str, sku=None, tags=None, **kwargs) -> None: - super(ServerForCreate, self).__init__(**kwargs) - self.sku = sku - self.properties = properties - self.location = location - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_paged.py deleted file mode 100644 index 140a01ce65b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_create.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_create.py deleted file mode 100644 index 5ab135d7a54..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_create.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2' - :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: Required. 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, **kwargs): - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.create_mode = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_create_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_create_py3.py deleted file mode 100644 index 24e5f64e651..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_create_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2' - :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: Required. 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, **kwargs) -> None: - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = version - self.ssl_enforcement = ssl_enforcement - self.storage_profile = storage_profile - self.create_mode = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_default_create.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_default_create.py deleted file mode 100644 index da6fd136fec..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_default_create.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2' - :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: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. 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: Required. 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, **kwargs): - super(ServerPropertiesForDefaultCreate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.create_mode = 'Default' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_default_create_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_default_create_py3.py deleted file mode 100644 index 3cef4094aa1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_default_create_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): - """The properties used to create a new server. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2' - :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: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. 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: Required. 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: str, administrator_login_password: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForDefaultCreate, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.create_mode = 'Default' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_geo_restore.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_geo_restore.py deleted file mode 100644 index 195d1fe26c0..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_geo_restore.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2' - :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: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. 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, **kwargs): - super(ServerPropertiesForGeoRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'GeoRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_geo_restore_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_geo_restore_py3.py deleted file mode 100644 index bc8ac2dd410..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_geo_restore_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring to a different - region from a geo replicated backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2' - :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: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. 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: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForGeoRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'GeoRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_restore.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_restore.py deleted file mode 100644 index 95559a5fe78..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_restore.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2' - :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: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. 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, **kwargs): - super(ServerPropertiesForRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.create_mode = 'PointInTimeRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_restore_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_restore_py3.py deleted file mode 100644 index 29afafba30c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_properties_for_restore_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring from a backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2' - :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: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. 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: str, restore_point_in_time, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.restore_point_in_time = restore_point_in_time - self.create_mode = 'PointInTimeRestore' diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_py3.py deleted file mode 100644 index 39e4dd24052..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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_py3 import TrackedResource - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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', - '10', '10.0', '10.2' - :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: str, tags=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, **kwargs) -> None: - super(Server, self).__init__(location=location, tags=tags, **kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_security_alert_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_security_alert_policy.py deleted file mode 100644 index 2e42bd22f18..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_security_alert_policy.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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 ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_security_alert_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_security_alert_policy_py3.py deleted file mode 100644 index 61795780430..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_security_alert_policy_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_update_parameters.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_update_parameters.py deleted file mode 100644 index 98fdfa2e6b7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_update_parameters.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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', '10', '10.0', '10.2' - :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, **kwargs): - super(ServerUpdateParameters, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_update_parameters_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_update_parameters_py3.py deleted file mode 100644 index cdcedce754c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/server_update_parameters_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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', '10', '10.0', '10.2' - :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: str=None, version=None, ssl_enforcement=None, tags=None, **kwargs) -> None: - super(ServerUpdateParameters, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/sku.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/sku.py deleted file mode 100644 index a2dfddd4078..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/sku.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/sku_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/sku_py3.py deleted file mode 100644 index 918f88853b4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/sku_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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: str=None, tier=None, capacity: int=None, size: str=None, family: str=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - self.size = size - self.family = family diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/storage_profile.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/storage_profile.py deleted file mode 100644 index 52d2ce839cd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/storage_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = kwargs.get('backup_retention_days', None) - self.geo_redundant_backup = kwargs.get('geo_redundant_backup', None) - self.storage_mb = kwargs.get('storage_mb', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/storage_profile_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/storage_profile_py3.py deleted file mode 100644 index bd6e048710a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/storage_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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: int=None, geo_redundant_backup=None, storage_mb: int=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = backup_retention_days - self.geo_redundant_backup = geo_redundant_backup - self.storage_mb = storage_mb diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/tracked_resource.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/tracked_resource.py deleted file mode 100644 index 67e93dd79e7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/tracked_resource_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/tracked_resource_py3.py deleted file mode 100644 index 0fbc3cc3edc..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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_py3 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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. 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: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/virtual_network_rule.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/virtual_network_rule.py deleted file mode 100644 index 4b8cc75b330..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/virtual_network_rule.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. 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, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/virtual_network_rule_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/virtual_network_rule_paged.py deleted file mode 100644 index df6f247ff1a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/virtual_network_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/virtual_network_rule_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/virtual_network_rule_py3.py deleted file mode 100644 index 1818cb580bf..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/models/virtual_network_rule_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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_py3 import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. 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: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/__init__.py deleted file mode 100644 index 27ac2e7b90d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations import Operations - -__all__ = [ - 'ServersOperations', - 'FirewallRulesOperations', - 'VirtualNetworkRulesOperations', - 'DatabasesOperations', - 'ConfigurationsOperations', - 'LogFilesOperations', - 'LocationBasedPerformanceTierOperations', - 'CheckNameAvailabilityOperations', - 'ServerSecurityAlertPoliciesOperations', - 'Operations', -] diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/check_name_availability_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/check_name_availability_operations.py deleted file mode 100644 index 18904a3d002..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/check_name_availability_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/configurations_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/configurations_operations.py deleted file mode 100644 index a89d8b4a16a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/configurations_operations.py +++ /dev/null @@ -1,291 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Configuration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Configuration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.Configuration]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/databases_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/databases_operations.py deleted file mode 100644 index 3cc265baa3a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/databases_operations.py +++ /dev/null @@ -1,379 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Database or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Database] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.Database]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/firewall_rules_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/firewall_rules_operations.py deleted file mode 100644 index 1af3188087c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/firewall_rules_operations.py +++ /dev/null @@ -1,381 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FirewallRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.FirewallRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.FirewallRule]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/location_based_performance_tier_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/location_based_performance_tier_operations.py deleted file mode 100644 index 6ec7e16a894..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/location_based_performance_tier_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/log_files_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/log_files_operations.py deleted file mode 100644 index b1eb3b583f8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/log_files_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/operations.py deleted file mode 100644 index 0f99df04b8b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/operations.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/server_security_alert_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/server_security_alert_policies_operations.py deleted file mode 100644 index 249d0f9b35e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/server_security_alert_policies_operations.py +++ /dev/null @@ -1,212 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerSecurityAlertPoliciesOperations(object): - """ServerSecurityAlertPoliciesOperations 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 security_alert_policy_name: The name of the security alert policy. Constant value: "Default". - :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.security_alert_policy_name = "Default" - self.api_version = "2017-12-01" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Get a server's security alert policy. - - :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: ServerSecurityAlertPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy - 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'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_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.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('ServerSecurityAlertPolicy', 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}/securityAlertPolicies/{securityAlertPolicyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_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 body - body_content = self._serialize.body(parameters, 'ServerSecurityAlertPolicy') - - # 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('ServerSecurityAlertPolicy', 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, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a threat detection policy. - - :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 server security alert policy. - :type parameters: - ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerSecurityAlertPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/servers_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/servers_operations.py deleted file mode 100644 index 4228e0f25cd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/servers_operations.py +++ /dev/null @@ -1,530 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.Server]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.Server]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/virtual_network_rules_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/virtual_network_rules_operations.py deleted file mode 100644 index 8a92b6a15a4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/operations/virtual_network_rules_operations.py +++ /dev/null @@ -1,384 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualNetworkRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/postgre_sql_management_client.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/postgre_sql_management_client.py deleted file mode 100644 index a19f2cc96a9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/postgre_sql_management_client.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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 SDKClient -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.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -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-rdbms/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class PostgreSQLManagementClient(SDKClient): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, 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 server_security_alert_policies: ServerSecurityAlertPolicies operations - :vartype server_security_alert_policies: azure.mgmt.rdbms.postgresql.operations.ServerSecurityAlertPoliciesOperations - :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) - super(PostgreSQLManagementClient, self).__init__(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.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/version.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/version.py deleted file mode 100644 index e5978466adb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/postgresql/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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 = "2017-12-01" - diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/version.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/version.py deleted file mode 100644 index a4fc40fc904..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/version.py +++ /dev/null @@ -1,9 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -VERSION = "1.5.0" - diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/__init__.py deleted file mode 100644 index 34913fb394d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/__init__.py deleted file mode 100644 index 33b83233be3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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 .sql_management_client import SqlManagementClient -from .version import VERSION - -__all__ = ['SqlManagementClient'] - -__version__ = VERSION - diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/__init__.py deleted file mode 100644 index e8ceabbdc00..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/__init__.py +++ /dev/null @@ -1,708 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -try: - from .recoverable_database_py3 import RecoverableDatabase - from .restorable_dropped_database_py3 import RestorableDroppedDatabase - from .tracked_resource_py3 import TrackedResource - from .resource_py3 import Resource - from .proxy_resource_py3 import ProxyResource - from .check_name_availability_request_py3 import CheckNameAvailabilityRequest - from .check_name_availability_response_py3 import CheckNameAvailabilityResponse - from .server_connection_policy_py3 import ServerConnectionPolicy - from .database_security_alert_policy_py3 import DatabaseSecurityAlertPolicy - from .data_masking_policy_py3 import DataMaskingPolicy - from .data_masking_rule_py3 import DataMaskingRule - from .firewall_rule_py3 import FirewallRule - from .geo_backup_policy_py3 import GeoBackupPolicy - from .import_extension_request_py3 import ImportExtensionRequest - from .import_export_response_py3 import ImportExportResponse - from .import_request_py3 import ImportRequest - from .export_request_py3 import ExportRequest - from .metric_value_py3 import MetricValue - from .metric_name_py3 import MetricName - from .metric_py3 import Metric - from .metric_availability_py3 import MetricAvailability - from .metric_definition_py3 import MetricDefinition - from .recommended_elastic_pool_metric_py3 import RecommendedElasticPoolMetric - from .recommended_elastic_pool_py3 import RecommendedElasticPool - from .replication_link_py3 import ReplicationLink - from .server_azure_ad_administrator_py3 import ServerAzureADAdministrator - from .server_communication_link_py3 import ServerCommunicationLink - from .service_objective_py3 import ServiceObjective - from .elastic_pool_activity_py3 import ElasticPoolActivity - from .elastic_pool_database_activity_py3 import ElasticPoolDatabaseActivity - from .operation_impact_py3 import OperationImpact - from .recommended_index_py3 import RecommendedIndex - from .transparent_data_encryption_py3 import TransparentDataEncryption - from .slo_usage_metric_py3 import SloUsageMetric - from .service_tier_advisor_py3 import ServiceTierAdvisor - from .transparent_data_encryption_activity_py3 import TransparentDataEncryptionActivity - from .server_usage_py3 import ServerUsage - from .database_usage_py3 import DatabaseUsage - from .automatic_tuning_options_py3 import AutomaticTuningOptions - from .database_automatic_tuning_py3 import DatabaseAutomaticTuning - from .encryption_protector_py3 import EncryptionProtector - from .failover_group_read_write_endpoint_py3 import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint_py3 import FailoverGroupReadOnlyEndpoint - from .partner_info_py3 import PartnerInfo - from .failover_group_py3 import FailoverGroup - from .failover_group_update_py3 import FailoverGroupUpdate - from .resource_identity_py3 import ResourceIdentity - from .sku_py3 import Sku - from .managed_instance_py3 import ManagedInstance - from .managed_instance_update_py3 import ManagedInstanceUpdate - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .server_key_py3 import ServerKey - from .server_py3 import Server - from .server_update_py3 import ServerUpdate - from .sync_agent_py3 import SyncAgent - from .sync_agent_key_properties_py3 import SyncAgentKeyProperties - from .sync_agent_linked_database_py3 import SyncAgentLinkedDatabase - from .sync_database_id_properties_py3 import SyncDatabaseIdProperties - from .sync_full_schema_table_column_py3 import SyncFullSchemaTableColumn - from .sync_full_schema_table_py3 import SyncFullSchemaTable - from .sync_full_schema_properties_py3 import SyncFullSchemaProperties - from .sync_group_log_properties_py3 import SyncGroupLogProperties - from .sync_group_schema_table_column_py3 import SyncGroupSchemaTableColumn - from .sync_group_schema_table_py3 import SyncGroupSchemaTable - from .sync_group_schema_py3 import SyncGroupSchema - from .sync_group_py3 import SyncGroup - from .sync_member_py3 import SyncMember - from .subscription_usage_py3 import SubscriptionUsage - from .virtual_network_rule_py3 import VirtualNetworkRule - from .extended_database_blob_auditing_policy_py3 import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy_py3 import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy_py3 import ServerBlobAuditingPolicy - from .database_blob_auditing_policy_py3 import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline_py3 import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties_py3 import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment_py3 import DatabaseVulnerabilityAssessment - from .job_agent_py3 import JobAgent - from .job_agent_update_py3 import JobAgentUpdate - from .job_credential_py3 import JobCredential - from .job_execution_target_py3 import JobExecutionTarget - from .job_execution_py3 import JobExecution - from .job_schedule_py3 import JobSchedule - from .job_py3 import Job - from .job_step_action_py3 import JobStepAction - from .job_step_output_py3 import JobStepOutput - from .job_step_execution_options_py3 import JobStepExecutionOptions - from .job_step_py3 import JobStep - from .job_target_py3 import JobTarget - from .job_target_group_py3 import JobTargetGroup - from .job_version_py3 import JobVersion - from .long_term_retention_backup_py3 import LongTermRetentionBackup - from .backup_long_term_retention_policy_py3 import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy_py3 import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition_py3 import CompleteDatabaseRestoreDefinition - from .managed_database_py3 import ManagedDatabase - from .managed_database_update_py3 import ManagedDatabaseUpdate - from .automatic_tuning_server_options_py3 import AutomaticTuningServerOptions - from .server_automatic_tuning_py3 import ServerAutomaticTuning - from .server_dns_alias_py3 import ServerDnsAlias - from .server_dns_alias_acquisition_py3 import ServerDnsAliasAcquisition - from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy - from .restore_point_py3 import RestorePoint - from .create_database_restore_point_definition_py3 import CreateDatabaseRestorePointDefinition - from .database_operation_py3 import DatabaseOperation - from .elastic_pool_operation_py3 import ElasticPoolOperation - from .max_size_capability_py3 import MaxSizeCapability - from .log_size_capability_py3 import LogSizeCapability - from .max_size_range_capability_py3 import MaxSizeRangeCapability - from .performance_level_capability_py3 import PerformanceLevelCapability - from .license_type_capability_py3 import LicenseTypeCapability - from .service_objective_capability_py3 import ServiceObjectiveCapability - from .edition_capability_py3 import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability_py3 import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability_py3 import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability_py3 import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability_py3 import ElasticPoolEditionCapability - from .server_version_capability_py3 import ServerVersionCapability - from .managed_instance_vcores_capability_py3 import ManagedInstanceVcoresCapability - from .managed_instance_family_capability_py3 import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability_py3 import ManagedInstanceEditionCapability - from .managed_instance_version_capability_py3 import ManagedInstanceVersionCapability - from .location_capabilities_py3 import LocationCapabilities - from .database_py3 import Database - from .database_update_py3 import DatabaseUpdate - from .resource_move_definition_py3 import ResourceMoveDefinition - from .elastic_pool_per_database_settings_py3 import ElasticPoolPerDatabaseSettings - from .elastic_pool_py3 import ElasticPool - from .elastic_pool_update_py3 import ElasticPoolUpdate - from .vulnerability_assessment_scan_error_py3 import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record_py3 import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export_py3 import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint_py3 import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint_py3 import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info_py3 import PartnerRegionInfo - from .managed_instance_pair_info_py3 import ManagedInstancePairInfo - from .instance_failover_group_py3 import InstanceFailoverGroup - from .backup_short_term_retention_policy_py3 import BackupShortTermRetentionPolicy - from .tde_certificate_py3 import TdeCertificate - from .managed_instance_key_py3 import ManagedInstanceKey - from .managed_instance_encryption_protector_py3 import ManagedInstanceEncryptionProtector -except (SyntaxError, ImportError): - from .recoverable_database import RecoverableDatabase - from .restorable_dropped_database import RestorableDroppedDatabase - from .tracked_resource import TrackedResource - from .resource import Resource - from .proxy_resource import ProxyResource - from .check_name_availability_request import CheckNameAvailabilityRequest - from .check_name_availability_response import CheckNameAvailabilityResponse - from .server_connection_policy import ServerConnectionPolicy - from .database_security_alert_policy import DatabaseSecurityAlertPolicy - from .data_masking_policy import DataMaskingPolicy - from .data_masking_rule import DataMaskingRule - from .firewall_rule import FirewallRule - from .geo_backup_policy import GeoBackupPolicy - from .import_extension_request import ImportExtensionRequest - from .import_export_response import ImportExportResponse - from .import_request import ImportRequest - from .export_request import ExportRequest - from .metric_value import MetricValue - from .metric_name import MetricName - from .metric import Metric - from .metric_availability import MetricAvailability - from .metric_definition import MetricDefinition - from .recommended_elastic_pool_metric import RecommendedElasticPoolMetric - from .recommended_elastic_pool import RecommendedElasticPool - from .replication_link import ReplicationLink - from .server_azure_ad_administrator import ServerAzureADAdministrator - from .server_communication_link import ServerCommunicationLink - from .service_objective import ServiceObjective - from .elastic_pool_activity import ElasticPoolActivity - from .elastic_pool_database_activity import ElasticPoolDatabaseActivity - from .operation_impact import OperationImpact - from .recommended_index import RecommendedIndex - from .transparent_data_encryption import TransparentDataEncryption - from .slo_usage_metric import SloUsageMetric - from .service_tier_advisor import ServiceTierAdvisor - from .transparent_data_encryption_activity import TransparentDataEncryptionActivity - from .server_usage import ServerUsage - from .database_usage import DatabaseUsage - from .automatic_tuning_options import AutomaticTuningOptions - from .database_automatic_tuning import DatabaseAutomaticTuning - from .encryption_protector import EncryptionProtector - from .failover_group_read_write_endpoint import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint import FailoverGroupReadOnlyEndpoint - from .partner_info import PartnerInfo - from .failover_group import FailoverGroup - from .failover_group_update import FailoverGroupUpdate - from .resource_identity import ResourceIdentity - from .sku import Sku - from .managed_instance import ManagedInstance - from .managed_instance_update import ManagedInstanceUpdate - from .operation_display import OperationDisplay - from .operation import Operation - from .server_key import ServerKey - from .server import Server - from .server_update import ServerUpdate - from .sync_agent import SyncAgent - from .sync_agent_key_properties import SyncAgentKeyProperties - from .sync_agent_linked_database import SyncAgentLinkedDatabase - from .sync_database_id_properties import SyncDatabaseIdProperties - from .sync_full_schema_table_column import SyncFullSchemaTableColumn - from .sync_full_schema_table import SyncFullSchemaTable - from .sync_full_schema_properties import SyncFullSchemaProperties - from .sync_group_log_properties import SyncGroupLogProperties - from .sync_group_schema_table_column import SyncGroupSchemaTableColumn - from .sync_group_schema_table import SyncGroupSchemaTable - from .sync_group_schema import SyncGroupSchema - from .sync_group import SyncGroup - from .sync_member import SyncMember - from .subscription_usage import SubscriptionUsage - from .virtual_network_rule import VirtualNetworkRule - from .extended_database_blob_auditing_policy import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy import ServerBlobAuditingPolicy - from .database_blob_auditing_policy import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment import DatabaseVulnerabilityAssessment - from .job_agent import JobAgent - from .job_agent_update import JobAgentUpdate - from .job_credential import JobCredential - from .job_execution_target import JobExecutionTarget - from .job_execution import JobExecution - from .job_schedule import JobSchedule - from .job import Job - from .job_step_action import JobStepAction - from .job_step_output import JobStepOutput - from .job_step_execution_options import JobStepExecutionOptions - from .job_step import JobStep - from .job_target import JobTarget - from .job_target_group import JobTargetGroup - from .job_version import JobVersion - from .long_term_retention_backup import LongTermRetentionBackup - from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition import CompleteDatabaseRestoreDefinition - from .managed_database import ManagedDatabase - from .managed_database_update import ManagedDatabaseUpdate - from .automatic_tuning_server_options import AutomaticTuningServerOptions - from .server_automatic_tuning import ServerAutomaticTuning - from .server_dns_alias import ServerDnsAlias - from .server_dns_alias_acquisition import ServerDnsAliasAcquisition - from .server_security_alert_policy import ServerSecurityAlertPolicy - from .restore_point import RestorePoint - from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition - from .database_operation import DatabaseOperation - from .elastic_pool_operation import ElasticPoolOperation - from .max_size_capability import MaxSizeCapability - from .log_size_capability import LogSizeCapability - from .max_size_range_capability import MaxSizeRangeCapability - from .performance_level_capability import PerformanceLevelCapability - from .license_type_capability import LicenseTypeCapability - from .service_objective_capability import ServiceObjectiveCapability - from .edition_capability import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability import ElasticPoolEditionCapability - from .server_version_capability import ServerVersionCapability - from .managed_instance_vcores_capability import ManagedInstanceVcoresCapability - from .managed_instance_family_capability import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability import ManagedInstanceEditionCapability - from .managed_instance_version_capability import ManagedInstanceVersionCapability - from .location_capabilities import LocationCapabilities - from .database import Database - from .database_update import DatabaseUpdate - from .resource_move_definition import ResourceMoveDefinition - from .elastic_pool_per_database_settings import ElasticPoolPerDatabaseSettings - from .elastic_pool import ElasticPool - from .elastic_pool_update import ElasticPoolUpdate - from .vulnerability_assessment_scan_error import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info import PartnerRegionInfo - from .managed_instance_pair_info import ManagedInstancePairInfo - from .instance_failover_group import InstanceFailoverGroup - from .backup_short_term_retention_policy import BackupShortTermRetentionPolicy - from .tde_certificate import TdeCertificate - from .managed_instance_key import ManagedInstanceKey - from .managed_instance_encryption_protector import ManagedInstanceEncryptionProtector -from .recoverable_database_paged import RecoverableDatabasePaged -from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged -from .server_paged import ServerPaged -from .data_masking_rule_paged import DataMaskingRulePaged -from .firewall_rule_paged import FirewallRulePaged -from .geo_backup_policy_paged import GeoBackupPolicyPaged -from .metric_paged import MetricPaged -from .metric_definition_paged import MetricDefinitionPaged -from .database_paged import DatabasePaged -from .elastic_pool_paged import ElasticPoolPaged -from .recommended_elastic_pool_paged import RecommendedElasticPoolPaged -from .recommended_elastic_pool_metric_paged import RecommendedElasticPoolMetricPaged -from .replication_link_paged import ReplicationLinkPaged -from .server_azure_ad_administrator_paged import ServerAzureADAdministratorPaged -from .server_communication_link_paged import ServerCommunicationLinkPaged -from .service_objective_paged import ServiceObjectivePaged -from .elastic_pool_activity_paged import ElasticPoolActivityPaged -from .elastic_pool_database_activity_paged import ElasticPoolDatabaseActivityPaged -from .service_tier_advisor_paged import ServiceTierAdvisorPaged -from .transparent_data_encryption_activity_paged import TransparentDataEncryptionActivityPaged -from .server_usage_paged import ServerUsagePaged -from .database_usage_paged import DatabaseUsagePaged -from .encryption_protector_paged import EncryptionProtectorPaged -from .failover_group_paged import FailoverGroupPaged -from .managed_instance_paged import ManagedInstancePaged -from .operation_paged import OperationPaged -from .server_key_paged import ServerKeyPaged -from .sync_agent_paged import SyncAgentPaged -from .sync_agent_linked_database_paged import SyncAgentLinkedDatabasePaged -from .sync_database_id_properties_paged import SyncDatabaseIdPropertiesPaged -from .sync_full_schema_properties_paged import SyncFullSchemaPropertiesPaged -from .sync_group_log_properties_paged import SyncGroupLogPropertiesPaged -from .sync_group_paged import SyncGroupPaged -from .sync_member_paged import SyncMemberPaged -from .subscription_usage_paged import SubscriptionUsagePaged -from .virtual_network_rule_paged import VirtualNetworkRulePaged -from .database_vulnerability_assessment_paged import DatabaseVulnerabilityAssessmentPaged -from .job_agent_paged import JobAgentPaged -from .job_credential_paged import JobCredentialPaged -from .job_execution_paged import JobExecutionPaged -from .job_paged import JobPaged -from .job_step_paged import JobStepPaged -from .job_target_group_paged import JobTargetGroupPaged -from .job_version_paged import JobVersionPaged -from .long_term_retention_backup_paged import LongTermRetentionBackupPaged -from .managed_backup_short_term_retention_policy_paged import ManagedBackupShortTermRetentionPolicyPaged -from .managed_database_paged import ManagedDatabasePaged -from .server_dns_alias_paged import ServerDnsAliasPaged -from .restore_point_paged import RestorePointPaged -from .database_operation_paged import DatabaseOperationPaged -from .elastic_pool_operation_paged import ElasticPoolOperationPaged -from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged -from .instance_failover_group_paged import InstanceFailoverGroupPaged -from .backup_short_term_retention_policy_paged import BackupShortTermRetentionPolicyPaged -from .managed_instance_key_paged import ManagedInstanceKeyPaged -from .managed_instance_encryption_protector_paged import ManagedInstanceEncryptionProtectorPaged -from .sql_management_client_enums import ( - CheckNameAvailabilityReason, - ServerConnectionType, - SecurityAlertPolicyState, - SecurityAlertPolicyEmailAccountAdmins, - SecurityAlertPolicyUseServerDefault, - DataMaskingState, - DataMaskingRuleState, - DataMaskingFunction, - GeoBackupPolicyState, - DatabaseEdition, - ServiceObjectiveName, - StorageKeyType, - AuthenticationType, - UnitType, - PrimaryAggregationType, - UnitDefinitionType, - ElasticPoolEdition, - ReplicationRole, - ReplicationState, - RecommendedIndexAction, - RecommendedIndexState, - RecommendedIndexType, - TransparentDataEncryptionStatus, - TransparentDataEncryptionActivityStatus, - AutomaticTuningMode, - AutomaticTuningOptionModeDesired, - AutomaticTuningOptionModeActual, - AutomaticTuningDisabledReason, - ServerKeyType, - ReadWriteEndpointFailoverPolicy, - ReadOnlyEndpointFailoverPolicy, - FailoverGroupReplicationRole, - IdentityType, - OperationOrigin, - SyncAgentState, - SyncMemberDbType, - SyncGroupLogType, - SyncConflictResolutionPolicy, - SyncGroupState, - SyncDirection, - SyncMemberState, - VirtualNetworkRuleState, - BlobAuditingPolicyState, - JobAgentState, - JobExecutionLifecycle, - ProvisioningState, - JobTargetType, - JobScheduleType, - JobStepActionType, - JobStepActionSource, - JobStepOutputType, - JobTargetGroupMembershipType, - ManagedDatabaseStatus, - CatalogCollationType, - ManagedDatabaseCreateMode, - AutomaticTuningServerMode, - AutomaticTuningServerReason, - RestorePointType, - ManagementOperationState, - MaxSizeUnit, - LogSizeUnit, - CapabilityStatus, - PerformanceLevelUnit, - CreateMode, - SampleName, - DatabaseStatus, - DatabaseLicenseType, - DatabaseReadScale, - ElasticPoolState, - ElasticPoolLicenseType, - VulnerabilityAssessmentScanTriggerType, - VulnerabilityAssessmentScanState, - InstanceFailoverGroupReplicationRole, - LongTermRetentionDatabaseState, - VulnerabilityAssessmentPolicyBaselineName, - CapabilityGroup, -) - -__all__ = [ - 'RecoverableDatabase', - 'RestorableDroppedDatabase', - 'TrackedResource', - 'Resource', - 'ProxyResource', - 'CheckNameAvailabilityRequest', - 'CheckNameAvailabilityResponse', - 'ServerConnectionPolicy', - 'DatabaseSecurityAlertPolicy', - 'DataMaskingPolicy', - 'DataMaskingRule', - 'FirewallRule', - 'GeoBackupPolicy', - 'ImportExtensionRequest', - 'ImportExportResponse', - 'ImportRequest', - 'ExportRequest', - 'MetricValue', - 'MetricName', - 'Metric', - 'MetricAvailability', - 'MetricDefinition', - 'RecommendedElasticPoolMetric', - 'RecommendedElasticPool', - 'ReplicationLink', - 'ServerAzureADAdministrator', - 'ServerCommunicationLink', - 'ServiceObjective', - 'ElasticPoolActivity', - 'ElasticPoolDatabaseActivity', - 'OperationImpact', - 'RecommendedIndex', - 'TransparentDataEncryption', - 'SloUsageMetric', - 'ServiceTierAdvisor', - 'TransparentDataEncryptionActivity', - 'ServerUsage', - 'DatabaseUsage', - 'AutomaticTuningOptions', - 'DatabaseAutomaticTuning', - 'EncryptionProtector', - 'FailoverGroupReadWriteEndpoint', - 'FailoverGroupReadOnlyEndpoint', - 'PartnerInfo', - 'FailoverGroup', - 'FailoverGroupUpdate', - 'ResourceIdentity', - 'Sku', - 'ManagedInstance', - 'ManagedInstanceUpdate', - 'OperationDisplay', - 'Operation', - 'ServerKey', - 'Server', - 'ServerUpdate', - 'SyncAgent', - 'SyncAgentKeyProperties', - 'SyncAgentLinkedDatabase', - 'SyncDatabaseIdProperties', - 'SyncFullSchemaTableColumn', - 'SyncFullSchemaTable', - 'SyncFullSchemaProperties', - 'SyncGroupLogProperties', - 'SyncGroupSchemaTableColumn', - 'SyncGroupSchemaTable', - 'SyncGroupSchema', - 'SyncGroup', - 'SyncMember', - 'SubscriptionUsage', - 'VirtualNetworkRule', - 'ExtendedDatabaseBlobAuditingPolicy', - 'ExtendedServerBlobAuditingPolicy', - 'ServerBlobAuditingPolicy', - 'DatabaseBlobAuditingPolicy', - 'DatabaseVulnerabilityAssessmentRuleBaselineItem', - 'DatabaseVulnerabilityAssessmentRuleBaseline', - 'VulnerabilityAssessmentRecurringScansProperties', - 'DatabaseVulnerabilityAssessment', - 'JobAgent', - 'JobAgentUpdate', - 'JobCredential', - 'JobExecutionTarget', - 'JobExecution', - 'JobSchedule', - 'Job', - 'JobStepAction', - 'JobStepOutput', - 'JobStepExecutionOptions', - 'JobStep', - 'JobTarget', - 'JobTargetGroup', - 'JobVersion', - 'LongTermRetentionBackup', - 'BackupLongTermRetentionPolicy', - 'ManagedBackupShortTermRetentionPolicy', - 'CompleteDatabaseRestoreDefinition', - 'ManagedDatabase', - 'ManagedDatabaseUpdate', - 'AutomaticTuningServerOptions', - 'ServerAutomaticTuning', - 'ServerDnsAlias', - 'ServerDnsAliasAcquisition', - 'ServerSecurityAlertPolicy', - 'RestorePoint', - 'CreateDatabaseRestorePointDefinition', - 'DatabaseOperation', - 'ElasticPoolOperation', - 'MaxSizeCapability', - 'LogSizeCapability', - 'MaxSizeRangeCapability', - 'PerformanceLevelCapability', - 'LicenseTypeCapability', - 'ServiceObjectiveCapability', - 'EditionCapability', - 'ElasticPoolPerDatabaseMinPerformanceLevelCapability', - 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability', - 'ElasticPoolPerformanceLevelCapability', - 'ElasticPoolEditionCapability', - 'ServerVersionCapability', - 'ManagedInstanceVcoresCapability', - 'ManagedInstanceFamilyCapability', - 'ManagedInstanceEditionCapability', - 'ManagedInstanceVersionCapability', - 'LocationCapabilities', - 'Database', - 'DatabaseUpdate', - 'ResourceMoveDefinition', - 'ElasticPoolPerDatabaseSettings', - 'ElasticPool', - 'ElasticPoolUpdate', - 'VulnerabilityAssessmentScanError', - 'VulnerabilityAssessmentScanRecord', - 'DatabaseVulnerabilityAssessmentScansExport', - 'InstanceFailoverGroupReadWriteEndpoint', - 'InstanceFailoverGroupReadOnlyEndpoint', - 'PartnerRegionInfo', - 'ManagedInstancePairInfo', - 'InstanceFailoverGroup', - 'BackupShortTermRetentionPolicy', - 'TdeCertificate', - 'ManagedInstanceKey', - 'ManagedInstanceEncryptionProtector', - 'RecoverableDatabasePaged', - 'RestorableDroppedDatabasePaged', - 'ServerPaged', - 'DataMaskingRulePaged', - 'FirewallRulePaged', - 'GeoBackupPolicyPaged', - 'MetricPaged', - 'MetricDefinitionPaged', - 'DatabasePaged', - 'ElasticPoolPaged', - 'RecommendedElasticPoolPaged', - 'RecommendedElasticPoolMetricPaged', - 'ReplicationLinkPaged', - 'ServerAzureADAdministratorPaged', - 'ServerCommunicationLinkPaged', - 'ServiceObjectivePaged', - 'ElasticPoolActivityPaged', - 'ElasticPoolDatabaseActivityPaged', - 'ServiceTierAdvisorPaged', - 'TransparentDataEncryptionActivityPaged', - 'ServerUsagePaged', - 'DatabaseUsagePaged', - 'EncryptionProtectorPaged', - 'FailoverGroupPaged', - 'ManagedInstancePaged', - 'OperationPaged', - 'ServerKeyPaged', - 'SyncAgentPaged', - 'SyncAgentLinkedDatabasePaged', - 'SyncDatabaseIdPropertiesPaged', - 'SyncFullSchemaPropertiesPaged', - 'SyncGroupLogPropertiesPaged', - 'SyncGroupPaged', - 'SyncMemberPaged', - 'SubscriptionUsagePaged', - 'VirtualNetworkRulePaged', - 'DatabaseVulnerabilityAssessmentPaged', - 'JobAgentPaged', - 'JobCredentialPaged', - 'JobExecutionPaged', - 'JobPaged', - 'JobStepPaged', - 'JobTargetGroupPaged', - 'JobVersionPaged', - 'LongTermRetentionBackupPaged', - 'ManagedBackupShortTermRetentionPolicyPaged', - 'ManagedDatabasePaged', - 'ServerDnsAliasPaged', - 'RestorePointPaged', - 'DatabaseOperationPaged', - 'ElasticPoolOperationPaged', - 'VulnerabilityAssessmentScanRecordPaged', - 'InstanceFailoverGroupPaged', - 'BackupShortTermRetentionPolicyPaged', - 'ManagedInstanceKeyPaged', - 'ManagedInstanceEncryptionProtectorPaged', - 'CheckNameAvailabilityReason', - 'ServerConnectionType', - 'SecurityAlertPolicyState', - 'SecurityAlertPolicyEmailAccountAdmins', - 'SecurityAlertPolicyUseServerDefault', - 'DataMaskingState', - 'DataMaskingRuleState', - 'DataMaskingFunction', - 'GeoBackupPolicyState', - 'DatabaseEdition', - 'ServiceObjectiveName', - 'StorageKeyType', - 'AuthenticationType', - 'UnitType', - 'PrimaryAggregationType', - 'UnitDefinitionType', - 'ElasticPoolEdition', - 'ReplicationRole', - 'ReplicationState', - 'RecommendedIndexAction', - 'RecommendedIndexState', - 'RecommendedIndexType', - 'TransparentDataEncryptionStatus', - 'TransparentDataEncryptionActivityStatus', - 'AutomaticTuningMode', - 'AutomaticTuningOptionModeDesired', - 'AutomaticTuningOptionModeActual', - 'AutomaticTuningDisabledReason', - 'ServerKeyType', - 'ReadWriteEndpointFailoverPolicy', - 'ReadOnlyEndpointFailoverPolicy', - 'FailoverGroupReplicationRole', - 'IdentityType', - 'OperationOrigin', - 'SyncAgentState', - 'SyncMemberDbType', - 'SyncGroupLogType', - 'SyncConflictResolutionPolicy', - 'SyncGroupState', - 'SyncDirection', - 'SyncMemberState', - 'VirtualNetworkRuleState', - 'BlobAuditingPolicyState', - 'JobAgentState', - 'JobExecutionLifecycle', - 'ProvisioningState', - 'JobTargetType', - 'JobScheduleType', - 'JobStepActionType', - 'JobStepActionSource', - 'JobStepOutputType', - 'JobTargetGroupMembershipType', - 'ManagedDatabaseStatus', - 'CatalogCollationType', - 'ManagedDatabaseCreateMode', - 'AutomaticTuningServerMode', - 'AutomaticTuningServerReason', - 'RestorePointType', - 'ManagementOperationState', - 'MaxSizeUnit', - 'LogSizeUnit', - 'CapabilityStatus', - 'PerformanceLevelUnit', - 'CreateMode', - 'SampleName', - 'DatabaseStatus', - 'DatabaseLicenseType', - 'DatabaseReadScale', - 'ElasticPoolState', - 'ElasticPoolLicenseType', - 'VulnerabilityAssessmentScanTriggerType', - 'VulnerabilityAssessmentScanState', - 'InstanceFailoverGroupReplicationRole', - 'LongTermRetentionDatabaseState', - 'VulnerabilityAssessmentPolicyBaselineName', - 'CapabilityGroup', -] diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_options.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_options.py deleted file mode 100644 index 42c5aa7ac8a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_options.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_options_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_options_py3.py deleted file mode 100644 index b55fd35d815..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_options_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_server_options.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_server_options.py deleted file mode 100644 index ef7fbcc75e4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_server_options.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_server_options_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_server_options_py3.py deleted file mode 100644 index 28e5fc0873a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/automatic_tuning_server_options_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_long_term_retention_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_long_term_retention_policy.py deleted file mode 100644 index 544110988a8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_long_term_retention_policy.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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 BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - 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 weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = kwargs.get('weekly_retention', None) - self.monthly_retention = kwargs.get('monthly_retention', None) - self.yearly_retention = kwargs.get('yearly_retention', None) - self.week_of_year = kwargs.get('week_of_year', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_long_term_retention_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_long_term_retention_policy_py3.py deleted file mode 100644 index 6e7cb8ace39..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_long_term_retention_policy_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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_py3 import ProxyResource - - -class BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - 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 weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None: - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = weekly_retention - self.monthly_retention = monthly_retention - self.yearly_retention = yearly_retention - self.week_of_year = week_of_year diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_short_term_retention_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_short_term_retention_policy.py deleted file mode 100644 index 1d4fba2cfff..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - 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 retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_short_term_retention_policy_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_short_term_retention_policy_paged.py deleted file mode 100644 index 16d31e34179..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 BackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_short_term_retention_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_short_term_retention_policy_py3.py deleted file mode 100644 index 9df25577baf..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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_py3 import ProxyResource - - -class BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - 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 retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_request.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_request.py deleted file mode 100644 index 345059f6dd4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_request.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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 CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, **kwargs): - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_request_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_request_py3.py deleted file mode 100644 index 5399ec3a7ff..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_request_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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 CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, *, name: str, **kwargs) -> None: - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_response.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_response.py deleted file mode 100644 index 40f429db82d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_response_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_response_py3.py deleted file mode 100644 index 613c8fd4166..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/check_name_availability_response_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs) -> None: - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/complete_database_restore_definition.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/complete_database_restore_definition.py deleted file mode 100644 index 926012a21f0..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/complete_database_restore_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = kwargs.get('last_backup_name', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/complete_database_restore_definition_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/complete_database_restore_definition_py3.py deleted file mode 100644 index 8b3c7f3da1f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/complete_database_restore_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, *, last_backup_name: str, **kwargs) -> None: - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = last_backup_name diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/create_database_restore_point_definition.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/create_database_restore_point_definition.py deleted file mode 100644 index 34ae6626306..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/create_database_restore_point_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = kwargs.get('restore_point_label', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/create_database_restore_point_definition_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/create_database_restore_point_definition_py3.py deleted file mode 100644 index 7200fc8c236..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/create_database_restore_point_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, *, restore_point_label: str, **kwargs) -> None: - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = restore_point_label diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_policy.py deleted file mode 100644 index a872d3af967..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_policy.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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 DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = kwargs.get('data_masking_state', None) - self.exempt_principals = kwargs.get('exempt_principals', None) - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_policy_py3.py deleted file mode 100644 index c2227aeb60d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_policy_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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_py3 import ProxyResource - - -class DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = data_masking_state - self.exempt_principals = exempt_principals - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_rule.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_rule.py deleted file mode 100644 index 9c31fca591b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_rule.py +++ /dev/null @@ -1,129 +0,0 @@ -# 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 DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = kwargs.get('alias_name', None) - self.rule_state = kwargs.get('rule_state', None) - self.schema_name = kwargs.get('schema_name', None) - self.table_name = kwargs.get('table_name', None) - self.column_name = kwargs.get('column_name', None) - self.masking_function = kwargs.get('masking_function', None) - self.number_from = kwargs.get('number_from', None) - self.number_to = kwargs.get('number_to', None) - self.prefix_size = kwargs.get('prefix_size', None) - self.suffix_size = kwargs.get('suffix_size', None) - self.replacement_string = kwargs.get('replacement_string', None) - self.location = None - self.kind = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_rule_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_rule_paged.py deleted file mode 100644 index 4e1eed7b9f5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 DataMaskingRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`DataMaskingRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} - } - - def __init__(self, *args, **kwargs): - - super(DataMaskingRulePaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_rule_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_rule_py3.py deleted file mode 100644 index 775fd78a2d6..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/data_masking_rule_py3.py +++ /dev/null @@ -1,129 +0,0 @@ -# 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_py3 import ProxyResource - - -class DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = alias_name - self.rule_state = rule_state - self.schema_name = schema_name - self.table_name = table_name - self.column_name = column_name - self.masking_function = masking_function - self.number_from = number_from - self.number_to = number_to - self.prefix_size = prefix_size - self.suffix_size = suffix_size - self.replacement_string = replacement_string - self.location = None - self.kind = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database.py deleted file mode 100644 index f3f66d024a7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database.py +++ /dev/null @@ -1,237 +0,0 @@ -# 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 Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(Database, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.managed_by = None - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_automatic_tuning.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_automatic_tuning.py deleted file mode 100644 index eca56cffda2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_automatic_tuning.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - 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 desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, **kwargs): - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_automatic_tuning_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_automatic_tuning_py3.py deleted file mode 100644 index 86bb068ce54..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_automatic_tuning_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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_py3 import ProxyResource - - -class DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - 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 desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_blob_auditing_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_blob_auditing_policy.py deleted file mode 100644 index ee47f66e7ac..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# 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 DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_blob_auditing_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_blob_auditing_policy_py3.py deleted file mode 100644 index a31dbf3981f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# 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_py3 import ProxyResource - - -class DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_operation.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_operation.py deleted file mode 100644 index fec6e0e19b6..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_operation.py +++ /dev/null @@ -1,115 +0,0 @@ -# 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 DatabaseOperation(ProxyResource): - """A database operation. - - 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 - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_operation_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_operation_paged.py deleted file mode 100644 index 4c22372df87..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 DatabaseOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseOperationPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_operation_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_operation_py3.py deleted file mode 100644 index 66fb0bb0c60..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_operation_py3.py +++ /dev/null @@ -1,115 +0,0 @@ -# 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_py3 import ProxyResource - - -class DatabaseOperation(ProxyResource): - """A database operation. - - 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 - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_paged.py deleted file mode 100644 index bc3842934a3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_py3.py deleted file mode 100644 index 9cfb4d07a7e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_py3.py +++ /dev/null @@ -1,237 +0,0 @@ -# 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_py3 import TrackedResource - - -class Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, **kwargs) -> None: - super(Database, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.managed_by = None - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_security_alert_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_security_alert_policy.py deleted file mode 100644 index c425573a5a9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_security_alert_policy.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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 DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, **kwargs): - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.kind = None - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.use_server_default = kwargs.get('use_server_default', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_security_alert_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_security_alert_policy_py3.py deleted file mode 100644 index 3d85e01a663..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_security_alert_policy_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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_py3 import ProxyResource - - -class DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, *, state, location: str=None, disabled_alerts: str=None, email_addresses: str=None, email_account_admins=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, use_server_default=None, **kwargs) -> None: - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = location - self.kind = None - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.use_server_default = use_server_default diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_update.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_update.py deleted file mode 100644 index d4d4cbdf427..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_update.py +++ /dev/null @@ -1,209 +0,0 @@ -# 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 DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_update_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_update_py3.py deleted file mode 100644 index 5a9a6f3b742..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_update_py3.py +++ /dev/null @@ -1,209 +0,0 @@ -# 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 DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, tags=None, **kwargs) -> None: - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = sku - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_usage.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_usage.py deleted file mode 100644 index 948942f5612..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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 DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_usage_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_usage_paged.py deleted file mode 100644 index 9641161225d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 DatabaseUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseUsagePaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_usage_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_usage_py3.py deleted file mode 100644 index 46a0f5ca4ba..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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 DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment.py deleted file mode 100644 index b4fbd42f864..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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 DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - 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 storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_paged.py deleted file mode 100644 index 8ec2fe4eae5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 DatabaseVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_py3.py deleted file mode 100644 index e0d54f6105f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - 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 storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline.py deleted file mode 100644 index 66881dfb9b5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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 DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = kwargs.get('baseline_results', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline_item.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline_item.py deleted file mode 100644 index 4bd7d0e16f5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline_item.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = kwargs.get('result', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py deleted file mode 100644 index 9378a89cc0f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, *, result, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = result diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline_py3.py deleted file mode 100644 index 4997c258c47..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_rule_baseline_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, *, baseline_results, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = baseline_results diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_scans_export.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_scans_export.py deleted file mode 100644 index 4d088fd265c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_scans_export.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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 DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - 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 - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_scans_export_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_scans_export_py3.py deleted file mode 100644 index 7e925fb428c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/database_vulnerability_assessment_scans_export_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - 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 - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/edition_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/edition_capability.py deleted file mode 100644 index e2b212e365b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/edition_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/edition_capability_py3.py deleted file mode 100644 index e2eaad22c5d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool.py deleted file mode 100644 index 10a28ea0f6e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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 ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPool, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_activity.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_activity.py deleted file mode 100644 index 30c56a11077..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_activity.py +++ /dev/null @@ -1,151 +0,0 @@ -# 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 ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - 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 geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_activity_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_activity_paged.py deleted file mode 100644 index 729a44a94bb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ElasticPoolActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolActivityPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_activity_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_activity_py3.py deleted file mode 100644 index 5d8d4f61727..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_activity_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# 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_py3 import ProxyResource - - -class ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - 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 geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = location - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_database_activity.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_database_activity.py deleted file mode 100644 index 9427b6973ff..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_database_activity.py +++ /dev/null @@ -1,125 +0,0 @@ -# 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 ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - 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 geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_database_activity_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_database_activity_paged.py deleted file mode 100644 index e4d12fc20b4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_database_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ElasticPoolDatabaseActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolDatabaseActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolDatabaseActivityPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_database_activity_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_database_activity_py3.py deleted file mode 100644 index 2e2818eee69..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_database_activity_py3.py +++ /dev/null @@ -1,125 +0,0 @@ -# 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_py3 import ProxyResource - - -class ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - 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 geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = location - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_edition_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_edition_capability.py deleted file mode 100644 index f870c33b614..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_edition_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_edition_capability_py3.py deleted file mode 100644 index 54af1f63906..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_operation.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_operation.py deleted file mode 100644 index 7f01bbf3f1a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_operation.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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 ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - 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 - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_operation_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_operation_paged.py deleted file mode 100644 index 530637e1479..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ElasticPoolOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_operation_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_operation_py3.py deleted file mode 100644 index c214b66532a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_operation_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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_py3 import ProxyResource - - -class ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - 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 - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_paged.py deleted file mode 100644 index 4c391860ee2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_max_performance_level_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_max_performance_level_capability.py deleted file mode 100644 index 1f99b527f96..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_max_performance_level_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py deleted file mode 100644 index 7e80c9d6cd5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_min_performance_level_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_min_performance_level_capability.py deleted file mode 100644 index 52306e685c4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_min_performance_level_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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 ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py deleted file mode 100644 index d1dceda281f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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 ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_settings.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_settings.py deleted file mode 100644 index 5c7951cd9c4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = kwargs.get('min_capacity', None) - self.max_capacity = kwargs.get('max_capacity', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_settings_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_settings_py3.py deleted file mode 100644 index 64ab19c4217..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_per_database_settings_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, *, min_capacity: float=None, max_capacity: float=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = min_capacity - self.max_capacity = max_capacity diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_performance_level_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_performance_level_capability.py deleted file mode 100644 index 8d5de8c9e0d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_performance_level_capability.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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 ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_performance_level_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_performance_level_capability_py3.py deleted file mode 100644 index 6842c7fed8b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_performance_level_capability_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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 ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_py3.py deleted file mode 100644 index eb092529ac3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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_py3 import TrackedResource - - -class ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: - super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_update.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_update.py deleted file mode 100644 index ce71dfa7257..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_update.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_update_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_update_py3.py deleted file mode 100644 index d51753795c8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/elastic_pool_update_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, tags=None, **kwargs) -> None: - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = sku - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/encryption_protector.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/encryption_protector.py deleted file mode 100644 index f6fe4ba3732..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/encryption_protector.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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 EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/encryption_protector_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/encryption_protector_paged.py deleted file mode 100644 index afb09656156..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 EncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`EncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/encryption_protector_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/encryption_protector_py3.py deleted file mode 100644 index 6dd4bad3cfb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/encryption_protector_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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_py3 import ProxyResource - - -class EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, kind: str=None, server_key_name: str=None, **kwargs) -> None: - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/export_request.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/export_request.py deleted file mode 100644 index c0eb27d9829..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/export_request.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, **kwargs): - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/export_request_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/export_request_py3.py deleted file mode 100644 index 1cb99a5fe8f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/export_request_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_database_blob_auditing_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_database_blob_auditing_policy.py deleted file mode 100644 index e99476542aa..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# 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 ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_database_blob_auditing_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_database_blob_auditing_policy_py3.py deleted file mode 100644 index 5956eb88257..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# 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_py3 import ProxyResource - - -class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_server_blob_auditing_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_server_blob_auditing_policy.py deleted file mode 100644 index 215afb252f4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_server_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# 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 ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_server_blob_auditing_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_server_blob_auditing_policy_py3.py deleted file mode 100644 index c164628b769..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/extended_server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# 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_py3 import ProxyResource - - -class ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group.py deleted file mode 100644 index 1fd973aae6f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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 FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'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}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = kwargs.get('tags', None) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_servers = kwargs.get('partner_servers', None) - self.databases = kwargs.get('databases', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_paged.py deleted file mode 100644 index 5bdb8723cdc..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 FailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`FailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(FailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_py3.py deleted file mode 100644 index 4b179cf5b45..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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_py3 import ProxyResource - - -class FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'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}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, *, read_write_endpoint, partner_servers, tags=None, read_only_endpoint=None, databases=None, **kwargs) -> None: - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = tags - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_servers = partner_servers - self.databases = databases diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_only_endpoint.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_only_endpoint.py deleted file mode 100644 index c64da55dfec..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_only_endpoint_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_only_endpoint_py3.py deleted file mode 100644 index aa923c8b0ce..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_write_endpoint.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_write_endpoint.py deleted file mode 100644 index 8eb4368fe7b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_write_endpoint_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_write_endpoint_py3.py deleted file mode 100644 index f9ffb4558eb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_update.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_update.py deleted file mode 100644 index e491b250f0d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_update.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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 FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.databases = kwargs.get('databases', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_update_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_update_py3.py deleted file mode 100644 index 3aee1ee5c78..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/failover_group_update_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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 FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None, **kwargs) -> None: - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.databases = databases - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/firewall_rule.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/firewall_rule.py deleted file mode 100644 index 48004048c43..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/firewall_rule.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/firewall_rule_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/firewall_rule_paged.py deleted file mode 100644 index 07586a09287..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/firewall_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/firewall_rule_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/firewall_rule_py3.py deleted file mode 100644 index c292730d965..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/firewall_rule_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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_py3 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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/geo_backup_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/geo_backup_policy.py deleted file mode 100644 index 3d820307561..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/geo_backup_policy.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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 GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_type = None - self.kind = None - self.location = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/geo_backup_policy_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/geo_backup_policy_paged.py deleted file mode 100644 index 7a207daa100..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/geo_backup_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 GeoBackupPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoBackupPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/geo_backup_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/geo_backup_policy_py3.py deleted file mode 100644 index 23941df5ee4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/geo_backup_policy_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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_py3 import ProxyResource - - -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, state, **kwargs) -> None: - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = state - self.storage_type = None - self.kind = None - self.location = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_export_response.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_export_response.py deleted file mode 100644 index 5cfb638398f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_export_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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 ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - 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 - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_export_response_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_export_response_py3.py deleted file mode 100644 index a344fc99266..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_export_response_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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_py3 import ProxyResource - - -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - 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 - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_extension_request.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_extension_request.py deleted file mode 100644 index 3eba93dcec8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_extension_request.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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 ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, **kwargs): - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_extension_request_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_extension_request_py3.py deleted file mode 100644 index 0486f0a68db..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_extension_request_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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 ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_request.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_request.py deleted file mode 100644 index a1683ffad9b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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 .export_request import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportRequest, self).__init__(**kwargs) - self.database_name = kwargs.get('database_name', None) - self.edition = kwargs.get('edition', None) - self.service_objective_name = kwargs.get('service_objective_name', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_request_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_request_py3.py deleted file mode 100644 index 68b97ae814a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/import_request_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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 .export_request_py3 import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: - super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) - self.database_name = database_name - self.edition = edition - self.service_objective_name = service_objective_name - self.max_size_bytes = max_size_bytes diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group.py deleted file mode 100644 index f360ffbfed5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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 InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_regions = kwargs.get('partner_regions', None) - self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_paged.py deleted file mode 100644 index c67eaf2ef67..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 InstanceFailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_py3.py deleted file mode 100644 index 8959f26c9f6..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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_py3 import ProxyResource - - -class InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_regions = partner_regions - self.managed_instance_pairs = managed_instance_pairs diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_only_endpoint.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_only_endpoint.py deleted file mode 100644 index 2a9857817ae..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_only_endpoint_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_only_endpoint_py3.py deleted file mode 100644 index 71c9f180cdf..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_write_endpoint.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_write_endpoint.py deleted file mode 100644 index 89a86899e50..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_write_endpoint_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_write_endpoint_py3.py deleted file mode 100644 index 7fdc047ba37..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/instance_failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job.py deleted file mode 100644 index 6b2c60fd1d4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 Job(ProxyResource): - """A job. - - 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 description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, **kwargs): - super(Job, self).__init__(**kwargs) - self.description = kwargs.get('description', "") - self.version = None - self.schedule = kwargs.get('schedule', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent.py deleted file mode 100644 index 48d42c28260..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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 JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobAgent, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.database_id = kwargs.get('database_id', None) - self.state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_paged.py deleted file mode 100644 index 25dd750b9d1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 JobAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(JobAgentPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_py3.py deleted file mode 100644 index 936d87932eb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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_py3 import TrackedResource - - -class JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: - super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.database_id = database_id - self.state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_update.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_update.py deleted file mode 100644 index af781de91cb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_update.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_update_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_update_py3.py deleted file mode 100644 index ab5e71f7b1d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_agent_update_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_credential.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_credential.py deleted file mode 100644 index 807d3497511..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_credential.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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 JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobCredential, self).__init__(**kwargs) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_credential_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_credential_paged.py deleted file mode 100644 index 550108e41c9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_credential_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 JobCredentialPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobCredential ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobCredential]'} - } - - def __init__(self, *args, **kwargs): - - super(JobCredentialPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_credential_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_credential_py3.py deleted file mode 100644 index 5158010b9c7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_credential_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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_py3 import ProxyResource - - -class JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, *, username: str, password: str, **kwargs) -> None: - super(JobCredential, self).__init__(**kwargs) - self.username = username - self.password = password diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution.py deleted file mode 100644 index 92744fb7c75..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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 JobExecution(ProxyResource): - """An execution of a job. - - 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 - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, **kwargs): - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = kwargs.get('current_attempts', None) - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_paged.py deleted file mode 100644 index bfcdb03ea9a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 JobExecutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobExecution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobExecution]'} - } - - def __init__(self, *args, **kwargs): - - super(JobExecutionPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_py3.py deleted file mode 100644 index b7fdaba7c14..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_py3.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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_py3 import ProxyResource - - -class JobExecution(ProxyResource): - """An execution of a job. - - 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 - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, *, current_attempts: int=None, **kwargs) -> None: - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = current_attempts - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_target.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_target.py deleted file mode 100644 index 50557aaf96d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_target.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_target_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_target_py3.py deleted file mode 100644 index 551716c3cd3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_execution_target_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_paged.py deleted file mode 100644 index 3b85770570f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 JobPaged(Paged): - """ - A paging container for iterating over a list of :class:`Job ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Job]'} - } - - def __init__(self, *args, **kwargs): - - super(JobPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_py3.py deleted file mode 100644 index 5bfb9b53f03..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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_py3 import ProxyResource - - -class Job(ProxyResource): - """A job. - - 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 description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: - super(Job, self).__init__(**kwargs) - self.description = description - self.version = None - self.schedule = schedule diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_schedule.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_schedule.py deleted file mode 100644 index 7fab31ef7b8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_schedule.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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 JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - scheduletype is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobSchedule, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") - self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") - self.type = kwargs.get('type', "Once") - self.enabled = kwargs.get('enabled', None) - self.interval = kwargs.get('interval', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_schedule_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_schedule_py3.py deleted file mode 100644 index 8c0cd37ebef..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_schedule_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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 JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - scheduletype is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: - super(JobSchedule, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.type = type - self.enabled = enabled - self.interval = interval diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step.py deleted file mode 100644 index f032375dec3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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 JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, **kwargs): - super(JobStep, self).__init__(**kwargs) - self.step_id = kwargs.get('step_id', None) - self.target_group = kwargs.get('target_group', None) - self.credential = kwargs.get('credential', None) - self.action = kwargs.get('action', None) - self.output = kwargs.get('output', None) - self.execution_options = kwargs.get('execution_options', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_action.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_action.py deleted file mode 100644 index 68e55b1fa38..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_action.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepAction, self).__init__(**kwargs) - self.type = kwargs.get('type', "TSql") - self.source = kwargs.get('source', "Inline") - self.value = kwargs.get('value', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_action_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_action_py3.py deleted file mode 100644 index 4d8848c8eae..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_action_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: - super(JobStepAction, self).__init__(**kwargs) - self.type = type - self.source = source - self.value = value diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_execution_options.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_execution_options.py deleted file mode 100644 index 6a49f1d10f2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_execution_options.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = kwargs.get('timeout_seconds', 43200) - self.retry_attempts = kwargs.get('retry_attempts', 10) - self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) - self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) - self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_execution_options_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_execution_options_py3.py deleted file mode 100644 index 712f0e94743..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_execution_options_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = timeout_seconds - self.retry_attempts = retry_attempts - self.initial_retry_interval_seconds = initial_retry_interval_seconds - self.maximum_retry_interval_seconds = maximum_retry_interval_seconds - self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_output.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_output.py deleted file mode 100644 index 8a015a7505b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_output.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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 JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepOutput, self).__init__(**kwargs) - self.type = kwargs.get('type', "SqlDatabase") - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.schema_name = kwargs.get('schema_name', "dbo") - self.table_name = kwargs.get('table_name', None) - self.credential = kwargs.get('credential', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_output_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_output_py3.py deleted file mode 100644 index d10ecbbd6f8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_output_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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 JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: - super(JobStepOutput, self).__init__(**kwargs) - self.type = type - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.server_name = server_name - self.database_name = database_name - self.schema_name = schema_name - self.table_name = table_name - self.credential = credential diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_paged.py deleted file mode 100644 index 1bda4f5adf6..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 JobStepPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobStep ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobStep]'} - } - - def __init__(self, *args, **kwargs): - - super(JobStepPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_py3.py deleted file mode 100644 index bd267f9fd9a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_step_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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_py3 import ProxyResource - - -class JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: - super(JobStep, self).__init__(**kwargs) - self.step_id = step_id - self.target_group = target_group - self.credential = credential - self.action = action - self.output = output - self.execution_options = execution_options diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target.py deleted file mode 100644 index a608d87c1af..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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 JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobTarget, self).__init__(**kwargs) - self.membership_type = kwargs.get('membership_type', "Include") - self.type = kwargs.get('type', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.elastic_pool_name = kwargs.get('elastic_pool_name', None) - self.shard_map_name = kwargs.get('shard_map_name', None) - self.refresh_credential = kwargs.get('refresh_credential', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_group.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_group.py deleted file mode 100644 index 38148fb244c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_group.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, **kwargs): - super(JobTargetGroup, self).__init__(**kwargs) - self.members = kwargs.get('members', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_group_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_group_paged.py deleted file mode 100644 index cd466e5afa8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 JobTargetGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobTargetGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(JobTargetGroupPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_group_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_group_py3.py deleted file mode 100644 index a9582212ff8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_group_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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_py3 import ProxyResource - - -class JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, *, members, **kwargs) -> None: - super(JobTargetGroup, self).__init__(**kwargs) - self.members = members diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_py3.py deleted file mode 100644 index 281eb7598f1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_target_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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 JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: - super(JobTarget, self).__init__(**kwargs) - self.membership_type = membership_type - self.type = type - self.server_name = server_name - self.database_name = database_name - self.elastic_pool_name = elastic_pool_name - self.shard_map_name = shard_map_name - self.refresh_credential = refresh_credential diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_version.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_version.py deleted file mode 100644 index 3c480e73960..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_version.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 JobVersion(ProxyResource): - """A job version. - - 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, **kwargs): - super(JobVersion, self).__init__(**kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_version_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_version_paged.py deleted file mode 100644 index 162e4d8cfb5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_version_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 JobVersionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobVersion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobVersion]'} - } - - def __init__(self, *args, **kwargs): - - super(JobVersionPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_version_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_version_py3.py deleted file mode 100644 index 16a8798c594..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/job_version_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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_py3 import ProxyResource - - -class JobVersion(ProxyResource): - """A job version. - - 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, **kwargs) -> None: - super(JobVersion, self).__init__(**kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/license_type_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/license_type_capability.py deleted file mode 100644 index f40ad624e1c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/license_type_capability.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/license_type_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/license_type_capability_py3.py deleted file mode 100644 index ecfa1918210..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/license_type_capability_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/location_capabilities.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/location_capabilities.py deleted file mode 100644 index b7e7f098083..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/location_capabilities.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/location_capabilities_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/location_capabilities_py3.py deleted file mode 100644 index 69b257f605a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/location_capabilities_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/log_size_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/log_size_capability.py deleted file mode 100644 index ad86f97123c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/log_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/log_size_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/log_size_capability_py3.py deleted file mode 100644 index 787e781b302..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/log_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/long_term_retention_backup.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/long_term_retention_backup.py deleted file mode 100644 index 288ac55f501..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/long_term_retention_backup.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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 LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - 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 - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/long_term_retention_backup_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/long_term_retention_backup_paged.py deleted file mode 100644 index 15e32283bbd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/long_term_retention_backup_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 LongTermRetentionBackupPaged(Paged): - """ - A paging container for iterating over a list of :class:`LongTermRetentionBackup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LongTermRetentionBackup]'} - } - - def __init__(self, *args, **kwargs): - - super(LongTermRetentionBackupPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/long_term_retention_backup_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/long_term_retention_backup_py3.py deleted file mode 100644 index eb1372180fb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/long_term_retention_backup_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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_py3 import ProxyResource - - -class LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - 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 - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_backup_short_term_retention_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_backup_short_term_retention_policy.py deleted file mode 100644 index 4cab44ce75c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - 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 retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_backup_short_term_retention_policy_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_backup_short_term_retention_policy_paged.py deleted file mode 100644 index 17bcf3e363f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ManagedBackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_backup_short_term_retention_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_backup_short_term_retention_policy_py3.py deleted file mode 100644 index 46a3fafddee..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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_py3 import ProxyResource - - -class ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - 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 retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database.py deleted file mode 100644 index 92d1c06510f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database.py +++ /dev/null @@ -1,123 +0,0 @@ -# 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 ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status for the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Possible values include: - 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabase, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_paged.py deleted file mode 100644 index e15d9d532b5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_py3.py deleted file mode 100644 index 4470afe5bb7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_py3.py +++ /dev/null @@ -1,123 +0,0 @@ -# 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_py3 import TrackedResource - - -class ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status for the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Possible values include: - 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, storage_container_sas_token: str=None, **kwargs) -> None: - super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_update.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_update.py deleted file mode 100644 index 4335e9b19df..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_update.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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 ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status for the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Possible values include: - 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_update_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_update_py3.py deleted file mode 100644 index 668eec38f38..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_database_update_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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 ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status for the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Possible values include: - 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, storage_container_sas_token: str=None, tags=None, **kwargs) -> None: - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance.py deleted file mode 100644 index 17714b680f6..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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 ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstance, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_edition_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_edition_capability.py deleted file mode 100644 index adeab90a354..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_edition_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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 ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_edition_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_edition_capability_py3.py deleted file mode 100644 index 1627f4652fe..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_edition_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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 ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_encryption_protector.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_encryption_protector.py deleted file mode 100644 index 87ffcbf35af..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_encryption_protector.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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 ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_encryption_protector_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_encryption_protector_paged.py deleted file mode 100644 index 39ba69c33e1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ManagedInstanceEncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_encryption_protector_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_encryption_protector_py3.py deleted file mode 100644 index 4d45efcf8c5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_encryption_protector_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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_py3 import ProxyResource - - -class ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_family_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_family_capability.py deleted file mode 100644 index df08ea8764c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_family_capability.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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 ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_family_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_family_capability_py3.py deleted file mode 100644 index 5ea36be729d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_family_capability_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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 ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_key.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_key.py deleted file mode 100644 index 5a7ee9724f9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_key.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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 ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = None - self.creation_date = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_key_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_key_paged.py deleted file mode 100644 index 8c730f73a38..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ManagedInstanceKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_key_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_key_py3.py deleted file mode 100644 index f00bafa838f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_key_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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_py3 import ProxyResource - - -class ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = None - self.creation_date = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_paged.py deleted file mode 100644 index c39881da9f3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ManagedInstancePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_pair_info.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_pair_info.py deleted file mode 100644 index ee49c1db0c6..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_pair_info.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) - self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_pair_info_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_pair_info_py3.py deleted file mode 100644 index 49f52752b43..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_pair_info_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = primary_managed_instance_id - self.partner_managed_instance_id = partner_managed_instance_id diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_py3.py deleted file mode 100644 index 604927b6d83..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_py3.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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_py3 import TrackedResource - - -class ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, **kwargs) -> None: - super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_update.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_update.py deleted file mode 100644 index f9b8ab34889..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_update.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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 ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_update_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_update_py3.py deleted file mode 100644 index 5445bbd5f9c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_update_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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 ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, tags=None, **kwargs) -> None: - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_vcores_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_vcores_capability.py deleted file mode 100644 index 29503dd20ae..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_vcores_capability.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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 ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_vcores_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_vcores_capability_py3.py deleted file mode 100644 index 23d3bb49d4e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_vcores_capability_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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 ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_version_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_version_capability.py deleted file mode 100644 index 949b1fcf4ad..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_version_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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 ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_version_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_version_capability_py3.py deleted file mode 100644 index 6d078061def..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/managed_instance_version_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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 ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_capability.py deleted file mode 100644 index d103c6f969f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_capability_py3.py deleted file mode 100644 index 54bd7cb0017..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_range_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_range_capability.py deleted file mode 100644 index 3ec6c663b55..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_range_capability.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_range_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_range_capability_py3.py deleted file mode 100644 index f0f95ebd7f3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/max_size_range_capability_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric.py deleted file mode 100644 index 3d3b4b8df15..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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 Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs): - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_availability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_availability.py deleted file mode 100644 index ef43027b61b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_availability.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_availability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_availability_py3.py deleted file mode 100644 index 6e47c8134a3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_availability_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_definition.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_definition.py deleted file mode 100644 index 2ecb95dae8a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_definition.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabities for - the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs): - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_definition_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_definition_paged.py deleted file mode 100644 index 95a01ebf4e8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 MetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`MetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_definition_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_definition_py3.py deleted file mode 100644 index 09e77729c41..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_definition_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabities for - the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_name.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_name.py deleted file mode 100644 index 10643031ce5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_name.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_name_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_name_py3.py deleted file mode 100644 index 67551bc7aed..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_name_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_paged.py deleted file mode 100644 index 61aa43a2fce..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 MetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`Metric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Metric]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_py3.py deleted file mode 100644 index 5eae901bca7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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 Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs) -> None: - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_value.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_value.py deleted file mode 100644 index a506295d5bf..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_value_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_value_py3.py deleted file mode 100644 index a1b027d6286..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/metric_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation.py deleted file mode 100644 index 09138c4b908..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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): - """SQL 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 / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.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, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_display.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_display.py deleted file mode 100644 index dfbc4a6fcff..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_display.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :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, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_display_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_display_py3.py deleted file mode 100644 index 0541321c178..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_display_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :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, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_impact.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_impact.py deleted file mode 100644 index 6b69a122de4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_impact.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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 OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_impact_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_impact_py3.py deleted file mode 100644 index f53b9445f99..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_impact_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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 OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_paged.py deleted file mode 100644 index ec8c4dc4c1c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_py3.py deleted file mode 100644 index 4968981d185..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/operation_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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): - """SQL 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 / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.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, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_info.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_info.py deleted file mode 100644 index de30bd259f7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_info.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.location = None - self.replication_role = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_info_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_info_py3.py deleted file mode 100644 index 0edede88118..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_info_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(PartnerInfo, self).__init__(**kwargs) - self.id = id - self.location = None - self.replication_role = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_region_info.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_region_info.py deleted file mode 100644 index 4d8e2688acb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_region_info.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.replication_role = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_region_info_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_region_info_py3.py deleted file mode 100644 index 76c52b49c0b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/partner_region_info_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = location - self.replication_role = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/performance_level_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/performance_level_capability.py deleted file mode 100644 index 2463e181871..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/performance_level_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/performance_level_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/performance_level_capability_py3.py deleted file mode 100644 index 96119e14568..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/performance_level_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/proxy_resource.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/proxy_resource.py deleted file mode 100644 index 21fea4f2436..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/proxy_resource.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 .resource import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - 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, **kwargs): - super(ProxyResource, self).__init__(**kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/proxy_resource_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/proxy_resource_py3.py deleted file mode 100644 index 707323dfc13..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/proxy_resource_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 .resource_py3 import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - 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, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool.py deleted file mode 100644 index 93ab96c4e2b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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 RecommendedElasticPool(ProxyResource): - """Represents a recommented elastic pool. - - 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 - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = kwargs.get('dtu', None) - self.database_dtu_min = kwargs.get('database_dtu_min', None) - self.database_dtu_max = kwargs.get('database_dtu_max', None) - self.storage_mb = kwargs.get('storage_mb', None) - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_metric.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_metric.py deleted file mode 100644 index 9ed07ced53d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_metric.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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 RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = kwargs.get('date_time_property', None) - self.dtu = kwargs.get('dtu', None) - self.size_gb = kwargs.get('size_gb', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_metric_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_metric_paged.py deleted file mode 100644 index a5106f98953..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 RecommendedElasticPoolMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPoolMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPoolMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolMetricPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_metric_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_metric_py3.py deleted file mode 100644 index d33210bf6e5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_metric_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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 RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, *, date_time_property=None, dtu: float=None, size_gb: float=None, **kwargs) -> None: - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = date_time_property - self.dtu = dtu - self.size_gb = size_gb diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_paged.py deleted file mode 100644 index ceb235126fb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 RecommendedElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_py3.py deleted file mode 100644 index ee13abf5d23..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_elastic_pool_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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_py3 import ProxyResource - - -class RecommendedElasticPool(ProxyResource): - """Represents a recommented elastic pool. - - 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 - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, *, dtu: float=None, database_dtu_min: float=None, database_dtu_max: float=None, storage_mb: float=None, **kwargs) -> None: - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = dtu - self.database_dtu_min = database_dtu_min - self.database_dtu_max = database_dtu_max - self.storage_mb = storage_mb - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_index.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_index.py deleted file mode 100644 index df1eba91f84..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_index.py +++ /dev/null @@ -1,112 +0,0 @@ -# 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 RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - 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 - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs): - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_index_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_index_py3.py deleted file mode 100644 index 5aea5620371..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recommended_index_py3.py +++ /dev/null @@ -1,112 +0,0 @@ -# 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_py3 import ProxyResource - - -class RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - 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 - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs) -> None: - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recoverable_database.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recoverable_database.py deleted file mode 100644 index 0d3b630ce18..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recoverable_database.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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 RecoverableDatabase(ProxyResource): - """A recoverable 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 - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recoverable_database_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recoverable_database_paged.py deleted file mode 100644 index cf4cde8ae7e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recoverable_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 RecoverableDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RecoverableDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecoverableDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RecoverableDatabasePaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recoverable_database_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recoverable_database_py3.py deleted file mode 100644 index 8eb9d551068..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/recoverable_database_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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_py3 import ProxyResource - - -class RecoverableDatabase(ProxyResource): - """A recoverable 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 - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/replication_link.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/replication_link.py deleted file mode 100644 index 450161ab6c9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/replication_link.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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 ReplicationLink(ProxyResource): - """Represents a database replication link. - - 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 - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/replication_link_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/replication_link_paged.py deleted file mode 100644 index 18b96c9e0e3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/replication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ReplicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReplicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReplicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ReplicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/replication_link_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/replication_link_py3.py deleted file mode 100644 index 740748f154b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/replication_link_py3.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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_py3 import ProxyResource - - -class ReplicationLink(ProxyResource): - """Represents a database replication link. - - 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 - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource.py deleted file mode 100644 index fc92549d32e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 Resource(Model): - """ARM resource. - - 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, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_identity.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_identity.py deleted file mode 100644 index 57a9e4b4a16..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_identity.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = kwargs.get('type', None) - self.tenant_id = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_identity_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_identity_py3.py deleted file mode 100644 index 3b1d8d90f10..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_identity_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = type - self.tenant_id = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_move_definition.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_move_definition.py deleted file mode 100644 index 2c933120d7c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_move_definition.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_move_definition_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_move_definition_py3.py deleted file mode 100644 index f6ce2ac0f62..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_move_definition_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = id diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_py3.py deleted file mode 100644 index aedc5cfaf0b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 Resource(Model): - """ARM resource. - - 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, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restorable_dropped_database.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restorable_dropped_database.py deleted file mode 100644 index 8e419fb0b50..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restorable_dropped_database.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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 RestorableDroppedDatabase(ProxyResource): - """A restorable dropped 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 - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restorable_dropped_database_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restorable_dropped_database_paged.py deleted file mode 100644 index b0eb9301094..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restorable_dropped_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 RestorableDroppedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDroppedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDroppedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDroppedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restorable_dropped_database_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restorable_dropped_database_py3.py deleted file mode 100644 index 0e4a5f45ec8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restorable_dropped_database_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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_py3 import ProxyResource - - -class RestorableDroppedDatabase(ProxyResource): - """A restorable dropped 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 - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restore_point.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restore_point.py deleted file mode 100644 index 86cf0382ffc..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restore_point.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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 RestorePoint(ProxyResource): - """Database restore points. - - 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 - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restore_point_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restore_point_paged.py deleted file mode 100644 index b77cde666dd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restore_point_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 RestorePointPaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorePoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorePoint]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorePointPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restore_point_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restore_point_py3.py deleted file mode 100644 index 886f576a457..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/restore_point_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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_py3 import ProxyResource - - -class RestorePoint(ProxyResource): - """Database restore points. - - 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 - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server.py deleted file mode 100644 index 1c399fadb35..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_automatic_tuning.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_automatic_tuning.py deleted file mode 100644 index 583c0b843c1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_automatic_tuning.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - 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 desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, **kwargs): - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_automatic_tuning_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_automatic_tuning_py3.py deleted file mode 100644 index fb8fb480461..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_automatic_tuning_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - 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 desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_azure_ad_administrator.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_azure_ad_administrator.py deleted file mode 100644 index ef037e8a9dc..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_azure_ad_administrator.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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 ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, **kwargs): - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = kwargs.get('login', None) - self.sid = kwargs.get('sid', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_azure_ad_administrator_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_azure_ad_administrator_paged.py deleted file mode 100644 index 519adc22638..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_azure_ad_administrator_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ServerAzureADAdministratorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_azure_ad_administrator_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_azure_ad_administrator_py3.py deleted file mode 100644 index 3dfeb71123c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_azure_ad_administrator_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = login - self.sid = sid - self.tenant_id = tenant_id diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_blob_auditing_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_blob_auditing_policy.py deleted file mode 100644 index 6b3e1b2af25..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_blob_auditing_policy.py +++ /dev/null @@ -1,160 +0,0 @@ -# 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 ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_blob_auditing_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_blob_auditing_policy_py3.py deleted file mode 100644 index 4b065e8dc73..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,160 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_communication_link.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_communication_link.py deleted file mode 100644 index 88fef4fa788..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_communication_link.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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 ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = kwargs.get('partner_server', None) - self.location = None - self.kind = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_communication_link_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_communication_link_paged.py deleted file mode 100644 index 6e2fef5d7ce..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_communication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ServerCommunicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerCommunicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerCommunicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerCommunicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_communication_link_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_communication_link_py3.py deleted file mode 100644 index 6a32069ca06..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_communication_link_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, partner_server: str, **kwargs) -> None: - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = partner_server - self.location = None - self.kind = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_connection_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_connection_policy.py deleted file mode 100644 index dd009723555..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_connection_policy.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, **kwargs): - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = kwargs.get('connection_type', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_connection_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_connection_policy_py3.py deleted file mode 100644 index 10bd8105230..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_connection_policy_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, *, connection_type, **kwargs) -> None: - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = connection_type diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias.py deleted file mode 100644 index 691db960c1a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 ServerDnsAlias(ProxyResource): - """A server DNS alias. - - 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 - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_acquisition.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_acquisition.py deleted file mode 100644 index 2f7757f5daf..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_acquisition.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = kwargs.get('old_server_dns_alias_id', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_acquisition_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_acquisition_py3.py deleted file mode 100644 index 93cf9e0027c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_acquisition_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, *, old_server_dns_alias_id: str=None, **kwargs) -> None: - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = old_server_dns_alias_id diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_paged.py deleted file mode 100644 index 2fdd93879f3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ServerDnsAliasPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerDnsAlias ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerDnsAlias]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerDnsAliasPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_py3.py deleted file mode 100644 index c57df1a85f0..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_dns_alias_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServerDnsAlias(ProxyResource): - """A server DNS alias. - - 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 - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_key.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_key.py deleted file mode 100644 index 1258d1e0da7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_key.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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 ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerKey, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.creation_date = kwargs.get('creation_date', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_key_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_key_paged.py deleted file mode 100644 index 1d5e262c9c8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ServerKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerKeyPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_key_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_key_py3.py deleted file mode 100644 index 41ef40ab165..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_key_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, kind: str=None, uri: str=None, thumbprint: str=None, creation_date=None, **kwargs) -> None: - super(ServerKey, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = thumbprint - self.creation_date = creation_date diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_paged.py deleted file mode 100644 index 2d6e6fe0e11..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_py3.py deleted file mode 100644 index 625c4d0aea4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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_py3 import TrackedResource - - -class Server(TrackedResource): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: - super(Server, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.kind = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_security_alert_policy.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_security_alert_policy.py deleted file mode 100644 index 04e3ddc4486..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_security_alert_policy.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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 ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_security_alert_policy_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_security_alert_policy_py3.py deleted file mode 100644 index 5ae9c099f3d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_security_alert_policy_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_update.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_update.py deleted file mode 100644 index d39d49bea95..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_update.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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 ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_update_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_update_py3.py deleted file mode 100644 index 863f2b52fa0..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_update_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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 ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, administrator_login: str=None, administrator_login_password: str=None, version: str=None, tags=None, **kwargs) -> None: - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_usage.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_usage.py deleted file mode 100644 index e04fb8c60a8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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 ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_usage_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_usage_paged.py deleted file mode 100644 index 688d3b40838..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ServerUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerUsagePaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_usage_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_usage_py3.py deleted file mode 100644 index 3a6feaecdc8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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 ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_version_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_version_capability.py deleted file mode 100644 index 811e93df8aa..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_version_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_version_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_version_capability_py3.py deleted file mode 100644 index 66a1a0251ed..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/server_version_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective.py deleted file mode 100644 index 71133da2f55..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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 ServiceObjective(ProxyResource): - """Represents a database service objective. - - 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 - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_capability.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_capability.py deleted file mode 100644 index 1e6c2158be9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_capability.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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 ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_capability_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_capability_py3.py deleted file mode 100644 index f777ffd74f9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_capability_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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 ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = reason diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_paged.py deleted file mode 100644 index 7afe16629d1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ServiceObjectivePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceObjective ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceObjective]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceObjectivePaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_py3.py deleted file mode 100644 index 2fc00134e6e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServiceObjective(ProxyResource): - """Represents a database service objective. - - 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 - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_tier_advisor.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_tier_advisor.py deleted file mode 100644 index cb8974906ee..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_tier_advisor.py +++ /dev/null @@ -1,157 +0,0 @@ -# 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 ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - 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 - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_tier_advisor_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_tier_advisor_paged.py deleted file mode 100644 index 8275906eb63..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_tier_advisor_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ServiceTierAdvisorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceTierAdvisor ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceTierAdvisor]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceTierAdvisorPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_tier_advisor_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_tier_advisor_py3.py deleted file mode 100644 index 04f5dceca1c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_tier_advisor_py3.py +++ /dev/null @@ -1,157 +0,0 @@ -# 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_py3 import ProxyResource - - -class ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - 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 - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sku.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sku.py deleted file mode 100644 index e37091dc4e2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sku.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sku_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sku_py3.py deleted file mode 100644 index a6f04765e87..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sku_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, *, name: str, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/slo_usage_metric.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/slo_usage_metric.py deleted file mode 100644 index 262017a0b87..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/slo_usage_metric.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/slo_usage_metric_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/slo_usage_metric_py3.py deleted file mode 100644 index 6b221a8eb36..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/slo_usage_metric_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sql_management_client_enums.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sql_management_client_enums.py deleted file mode 100644 index 90b01d12207..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sql_management_client_enums.py +++ /dev/null @@ -1,670 +0,0 @@ -# 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 CheckNameAvailabilityReason(str, Enum): - - invalid = "Invalid" - already_exists = "AlreadyExists" - - -class ServerConnectionType(str, Enum): - - default = "Default" - proxy = "Proxy" - redirect = "Redirect" - - -class SecurityAlertPolicyState(str, Enum): - - new = "New" - enabled = "Enabled" - disabled = "Disabled" - - -class SecurityAlertPolicyEmailAccountAdmins(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class SecurityAlertPolicyUseServerDefault(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class DataMaskingState(str, Enum): - - disabled = "Disabled" - enabled = "Enabled" - - -class DataMaskingRuleState(str, Enum): - - disabled = "Disabled" - enabled = "Enabled" - - -class DataMaskingFunction(str, Enum): - - default = "Default" - ccn = "CCN" - email = "Email" - number = "Number" - ssn = "SSN" - text = "Text" - - -class GeoBackupPolicyState(str, Enum): - - disabled = "Disabled" - enabled = "Enabled" - - -class DatabaseEdition(str, Enum): - - web = "Web" - business = "Business" - basic = "Basic" - standard = "Standard" - premium = "Premium" - premium_rs = "PremiumRS" - free = "Free" - stretch = "Stretch" - data_warehouse = "DataWarehouse" - system = "System" - system2 = "System2" - - -class ServiceObjectiveName(str, Enum): - - system = "System" - system0 = "System0" - system1 = "System1" - system2 = "System2" - system3 = "System3" - system4 = "System4" - system2_l = "System2L" - system3_l = "System3L" - system4_l = "System4L" - free = "Free" - basic = "Basic" - s0 = "S0" - s1 = "S1" - s2 = "S2" - s3 = "S3" - s4 = "S4" - s6 = "S6" - s7 = "S7" - s9 = "S9" - s12 = "S12" - p1 = "P1" - p2 = "P2" - p3 = "P3" - p4 = "P4" - p6 = "P6" - p11 = "P11" - p15 = "P15" - prs1 = "PRS1" - prs2 = "PRS2" - prs4 = "PRS4" - prs6 = "PRS6" - dw100 = "DW100" - dw200 = "DW200" - dw300 = "DW300" - dw400 = "DW400" - dw500 = "DW500" - dw600 = "DW600" - dw1000 = "DW1000" - dw1200 = "DW1200" - dw1000c = "DW1000c" - dw1500 = "DW1500" - dw1500c = "DW1500c" - dw2000 = "DW2000" - dw2000c = "DW2000c" - dw3000 = "DW3000" - dw2500c = "DW2500c" - dw3000c = "DW3000c" - dw6000 = "DW6000" - dw5000c = "DW5000c" - dw6000c = "DW6000c" - dw7500c = "DW7500c" - dw10000c = "DW10000c" - dw15000c = "DW15000c" - dw30000c = "DW30000c" - ds100 = "DS100" - ds200 = "DS200" - ds300 = "DS300" - ds400 = "DS400" - ds500 = "DS500" - ds600 = "DS600" - ds1000 = "DS1000" - ds1200 = "DS1200" - ds1500 = "DS1500" - ds2000 = "DS2000" - elastic_pool = "ElasticPool" - - -class StorageKeyType(str, Enum): - - storage_access_key = "StorageAccessKey" - shared_access_key = "SharedAccessKey" - - -class AuthenticationType(str, Enum): - - sql = "SQL" - ad_password = "ADPassword" - - -class UnitType(str, Enum): - - count = "count" - bytes = "bytes" - seconds = "seconds" - percent = "percent" - count_per_second = "countPerSecond" - bytes_per_second = "bytesPerSecond" - - -class PrimaryAggregationType(str, Enum): - - none = "None" - average = "Average" - count = "Count" - minimum = "Minimum" - maximum = "Maximum" - total = "Total" - - -class UnitDefinitionType(str, Enum): - - count = "Count" - bytes = "Bytes" - seconds = "Seconds" - percent = "Percent" - count_per_second = "CountPerSecond" - bytes_per_second = "BytesPerSecond" - - -class ElasticPoolEdition(str, Enum): - - basic = "Basic" - standard = "Standard" - premium = "Premium" - - -class ReplicationRole(str, Enum): - - primary = "Primary" - secondary = "Secondary" - non_readable_secondary = "NonReadableSecondary" - source = "Source" - copy = "Copy" - - -class ReplicationState(str, Enum): - - pending = "PENDING" - seeding = "SEEDING" - catch_up = "CATCH_UP" - suspended = "SUSPENDED" - - -class RecommendedIndexAction(str, Enum): - - create = "Create" - drop = "Drop" - rebuild = "Rebuild" - - -class RecommendedIndexState(str, Enum): - - active = "Active" - pending = "Pending" - executing = "Executing" - verifying = "Verifying" - pending_revert = "Pending Revert" - reverting = "Reverting" - reverted = "Reverted" - ignored = "Ignored" - expired = "Expired" - blocked = "Blocked" - success = "Success" - - -class RecommendedIndexType(str, Enum): - - clustered = "CLUSTERED" - nonclustered = "NONCLUSTERED" - columnstore = "COLUMNSTORE" - clusteredcolumnstore = "CLUSTERED COLUMNSTORE" - - -class TransparentDataEncryptionStatus(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class TransparentDataEncryptionActivityStatus(str, Enum): - - encrypting = "Encrypting" - decrypting = "Decrypting" - - -class AutomaticTuningMode(str, Enum): - - inherit = "Inherit" - custom = "Custom" - auto = "Auto" - unspecified = "Unspecified" - - -class AutomaticTuningOptionModeDesired(str, Enum): - - off = "Off" - on = "On" - default = "Default" - - -class AutomaticTuningOptionModeActual(str, Enum): - - off = "Off" - on = "On" - - -class AutomaticTuningDisabledReason(str, Enum): - - default = "Default" - disabled = "Disabled" - auto_configured = "AutoConfigured" - inherited_from_server = "InheritedFromServer" - query_store_off = "QueryStoreOff" - query_store_read_only = "QueryStoreReadOnly" - not_supported = "NotSupported" - - -class ServerKeyType(str, Enum): - - service_managed = "ServiceManaged" - azure_key_vault = "AzureKeyVault" - - -class ReadWriteEndpointFailoverPolicy(str, Enum): - - manual = "Manual" - automatic = "Automatic" - - -class ReadOnlyEndpointFailoverPolicy(str, Enum): - - disabled = "Disabled" - enabled = "Enabled" - - -class FailoverGroupReplicationRole(str, Enum): - - primary = "Primary" - secondary = "Secondary" - - -class IdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class OperationOrigin(str, Enum): - - user = "user" - system = "system" - - -class SyncAgentState(str, Enum): - - online = "Online" - offline = "Offline" - never_connected = "NeverConnected" - - -class SyncMemberDbType(str, Enum): - - azure_sql_database = "AzureSqlDatabase" - sql_server_database = "SqlServerDatabase" - - -class SyncGroupLogType(str, Enum): - - all = "All" - error = "Error" - warning = "Warning" - success = "Success" - - -class SyncConflictResolutionPolicy(str, Enum): - - hub_win = "HubWin" - member_win = "MemberWin" - - -class SyncGroupState(str, Enum): - - not_ready = "NotReady" - error = "Error" - warning = "Warning" - progressing = "Progressing" - good = "Good" - - -class SyncDirection(str, Enum): - - bidirectional = "Bidirectional" - one_way_member_to_hub = "OneWayMemberToHub" - one_way_hub_to_member = "OneWayHubToMember" - - -class SyncMemberState(str, Enum): - - sync_in_progress = "SyncInProgress" - sync_succeeded = "SyncSucceeded" - sync_failed = "SyncFailed" - disabled_tombstone_cleanup = "DisabledTombstoneCleanup" - disabled_backup_restore = "DisabledBackupRestore" - sync_succeeded_with_warnings = "SyncSucceededWithWarnings" - sync_cancelling = "SyncCancelling" - sync_cancelled = "SyncCancelled" - un_provisioned = "UnProvisioned" - provisioning = "Provisioning" - provisioned = "Provisioned" - provision_failed = "ProvisionFailed" - de_provisioning = "DeProvisioning" - de_provisioned = "DeProvisioned" - de_provision_failed = "DeProvisionFailed" - reprovisioning = "Reprovisioning" - reprovision_failed = "ReprovisionFailed" - un_reprovisioned = "UnReprovisioned" - - -class VirtualNetworkRuleState(str, Enum): - - initializing = "Initializing" - in_progress = "InProgress" - ready = "Ready" - deleting = "Deleting" - unknown = "Unknown" - - -class BlobAuditingPolicyState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class JobAgentState(str, Enum): - - creating = "Creating" - ready = "Ready" - updating = "Updating" - deleting = "Deleting" - disabled = "Disabled" - - -class JobExecutionLifecycle(str, Enum): - - created = "Created" - in_progress = "InProgress" - waiting_for_child_job_executions = "WaitingForChildJobExecutions" - waiting_for_retry = "WaitingForRetry" - succeeded = "Succeeded" - succeeded_with_skipped = "SucceededWithSkipped" - failed = "Failed" - timed_out = "TimedOut" - canceled = "Canceled" - skipped = "Skipped" - - -class ProvisioningState(str, Enum): - - created = "Created" - in_progress = "InProgress" - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - - -class JobTargetType(str, Enum): - - target_group = "TargetGroup" - sql_database = "SqlDatabase" - sql_elastic_pool = "SqlElasticPool" - sql_shard_map = "SqlShardMap" - sql_server = "SqlServer" - - -class JobScheduleType(str, Enum): - - once = "Once" - recurring = "Recurring" - - -class JobStepActionType(str, Enum): - - tsql = "TSql" - - -class JobStepActionSource(str, Enum): - - inline = "Inline" - - -class JobStepOutputType(str, Enum): - - sql_database = "SqlDatabase" - - -class JobTargetGroupMembershipType(str, Enum): - - include = "Include" - exclude = "Exclude" - - -class ManagedDatabaseStatus(str, Enum): - - online = "Online" - offline = "Offline" - shutdown = "Shutdown" - creating = "Creating" - inaccessible = "Inaccessible" - - -class CatalogCollationType(str, Enum): - - database_default = "DATABASE_DEFAULT" - sql_latin1_general_cp1_ci_as = "SQL_Latin1_General_CP1_CI_AS" - - -class ManagedDatabaseCreateMode(str, Enum): - - default = "Default" - restore_external_backup = "RestoreExternalBackup" - point_in_time_restore = "PointInTimeRestore" - - -class AutomaticTuningServerMode(str, Enum): - - custom = "Custom" - auto = "Auto" - unspecified = "Unspecified" - - -class AutomaticTuningServerReason(str, Enum): - - default = "Default" - disabled = "Disabled" - auto_configured = "AutoConfigured" - - -class RestorePointType(str, Enum): - - continuous = "CONTINUOUS" - discrete = "DISCRETE" - - -class ManagementOperationState(str, Enum): - - pending = "Pending" - in_progress = "InProgress" - succeeded = "Succeeded" - failed = "Failed" - cancel_in_progress = "CancelInProgress" - cancelled = "Cancelled" - - -class MaxSizeUnit(str, Enum): - - megabytes = "Megabytes" - gigabytes = "Gigabytes" - terabytes = "Terabytes" - petabytes = "Petabytes" - - -class LogSizeUnit(str, Enum): - - megabytes = "Megabytes" - gigabytes = "Gigabytes" - terabytes = "Terabytes" - petabytes = "Petabytes" - percent = "Percent" - - -class CapabilityStatus(str, Enum): - - visible = "Visible" - available = "Available" - default = "Default" - disabled = "Disabled" - - -class PerformanceLevelUnit(str, Enum): - - dtu = "DTU" - vcores = "VCores" - - -class CreateMode(str, Enum): - - default = "Default" - copy = "Copy" - secondary = "Secondary" - point_in_time_restore = "PointInTimeRestore" - restore = "Restore" - recovery = "Recovery" - restore_external_backup = "RestoreExternalBackup" - restore_external_backup_secondary = "RestoreExternalBackupSecondary" - restore_long_term_retention_backup = "RestoreLongTermRetentionBackup" - online_secondary = "OnlineSecondary" - - -class SampleName(str, Enum): - - adventure_works_lt = "AdventureWorksLT" - wide_world_importers_std = "WideWorldImportersStd" - wide_world_importers_full = "WideWorldImportersFull" - - -class DatabaseStatus(str, Enum): - - online = "Online" - restoring = "Restoring" - recovery_pending = "RecoveryPending" - recovering = "Recovering" - suspect = "Suspect" - offline = "Offline" - standby = "Standby" - shutdown = "Shutdown" - emergency_mode = "EmergencyMode" - auto_closed = "AutoClosed" - copying = "Copying" - creating = "Creating" - inaccessible = "Inaccessible" - offline_secondary = "OfflineSecondary" - pausing = "Pausing" - paused = "Paused" - resuming = "Resuming" - scaling = "Scaling" - - -class DatabaseLicenseType(str, Enum): - - license_included = "LicenseIncluded" - base_price = "BasePrice" - - -class DatabaseReadScale(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class ElasticPoolState(str, Enum): - - creating = "Creating" - ready = "Ready" - disabled = "Disabled" - - -class ElasticPoolLicenseType(str, Enum): - - license_included = "LicenseIncluded" - base_price = "BasePrice" - - -class VulnerabilityAssessmentScanTriggerType(str, Enum): - - on_demand = "OnDemand" - recurring = "Recurring" - - -class VulnerabilityAssessmentScanState(str, Enum): - - passed = "Passed" - failed = "Failed" - failed_to_run = "FailedToRun" - in_progress = "InProgress" - - -class InstanceFailoverGroupReplicationRole(str, Enum): - - primary = "Primary" - secondary = "Secondary" - - -class LongTermRetentionDatabaseState(str, Enum): - - all = "All" - live = "Live" - deleted = "Deleted" - - -class VulnerabilityAssessmentPolicyBaselineName(str, Enum): - - master = "master" - default = "default" - - -class CapabilityGroup(str, Enum): - - supported_editions = "supportedEditions" - supported_elastic_pool_editions = "supportedElasticPoolEditions" - supported_managed_instance_versions = "supportedManagedInstanceVersions" diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/subscription_usage.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/subscription_usage.py deleted file mode 100644 index 5fe0b0fe90a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/subscription_usage.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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 SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - 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 - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/subscription_usage_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/subscription_usage_paged.py deleted file mode 100644 index 14875f12bfe..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/subscription_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 SubscriptionUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`SubscriptionUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SubscriptionUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(SubscriptionUsagePaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/subscription_usage_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/subscription_usage_py3.py deleted file mode 100644 index d55e3275a74..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/subscription_usage_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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_py3 import ProxyResource - - -class SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - 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 - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent.py deleted file mode 100644 index c617de5bdf2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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 SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - 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 - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = kwargs.get('sync_database_id', None) - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_key_properties.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_key_properties.py deleted file mode 100644 index da65194bc61..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_key_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_key_properties_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_key_properties_py3.py deleted file mode 100644 index 4230f4d9571..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_key_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_linked_database.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_linked_database.py deleted file mode 100644 index 597c51388f4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_linked_database.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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 SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked 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 - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_linked_database_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_linked_database_paged.py deleted file mode 100644 index 6c0fad6ae74..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_linked_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 SyncAgentLinkedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgentLinkedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentLinkedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_linked_database_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_linked_database_py3.py deleted file mode 100644 index 7d92287e1a3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_linked_database_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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_py3 import ProxyResource - - -class SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked 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 - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_paged.py deleted file mode 100644 index 116fc542dbb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 SyncAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_py3.py deleted file mode 100644 index f0764975045..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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_py3 import ProxyResource - - -class SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - 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 - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, *, sync_database_id: str=None, **kwargs) -> None: - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = sync_database_id - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_database_id_properties.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_database_id_properties.py deleted file mode 100644 index 6dd5a323fd6..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_database_id_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_database_id_properties_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_database_id_properties_paged.py deleted file mode 100644 index 2f70734f930..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_database_id_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 SyncDatabaseIdPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncDatabaseIdPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_database_id_properties_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_database_id_properties_py3.py deleted file mode 100644 index cdb7ce89c43..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_database_id_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_properties.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_properties.py deleted file mode 100644 index 984d4c7a5d5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_properties_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_properties_paged.py deleted file mode 100644 index 20c3b2df16d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 SyncFullSchemaPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncFullSchemaProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncFullSchemaProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncFullSchemaPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_properties_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_properties_py3.py deleted file mode 100644 index b3d4a75c65b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table.py deleted file mode 100644 index dcec31c48f1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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 SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table_column.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table_column.py deleted file mode 100644 index 8eaa3659873..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table_column.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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 SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table_column_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table_column_py3.py deleted file mode 100644 index 33df54b37b5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table_column_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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 SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table_py3.py deleted file mode 100644 index 194f5082687..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_full_schema_table_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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 SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group.py deleted file mode 100644 index 5a252358a34..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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 SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - 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 interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, **kwargs): - super(SyncGroup, self).__init__(**kwargs) - self.interval = kwargs.get('interval', None) - self.last_sync_time = None - self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) - self.sync_database_id = kwargs.get('sync_database_id', None) - self.hub_database_user_name = kwargs.get('hub_database_user_name', None) - self.hub_database_password = kwargs.get('hub_database_password', None) - self.sync_state = None - self.schema = kwargs.get('schema', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_log_properties.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_log_properties.py deleted file mode 100644 index 22cb584b67b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_log_properties.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_log_properties_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_log_properties_paged.py deleted file mode 100644 index bc7e0c3e775..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_log_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 SyncGroupLogPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroupLogProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroupLogProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupLogPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_log_properties_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_log_properties_py3.py deleted file mode 100644 index 067424b4023..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_log_properties_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_paged.py deleted file mode 100644 index b20ca4d8e09..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 SyncGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_py3.py deleted file mode 100644 index 1654af79245..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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_py3 import ProxyResource - - -class SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - 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 interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, *, interval: int=None, conflict_resolution_policy=None, sync_database_id: str=None, hub_database_user_name: str=None, hub_database_password: str=None, schema=None, **kwargs) -> None: - super(SyncGroup, self).__init__(**kwargs) - self.interval = interval - self.last_sync_time = None - self.conflict_resolution_policy = conflict_resolution_policy - self.sync_database_id = sync_database_id - self.hub_database_user_name = hub_database_user_name - self.hub_database_password = hub_database_password - self.sync_state = None - self.schema = schema diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema.py deleted file mode 100644 index ece05d7301d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = kwargs.get('tables', None) - self.master_sync_member_name = kwargs.get('master_sync_member_name', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_py3.py deleted file mode 100644 index b26d4b1b791..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, *, tables=None, master_sync_member_name: str=None, **kwargs) -> None: - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = tables - self.master_sync_member_name = master_sync_member_name diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table.py deleted file mode 100644 index cf83bba5825..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = kwargs.get('columns', None) - self.quoted_name = kwargs.get('quoted_name', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table_column.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table_column.py deleted file mode 100644 index 705810d1d2a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table_column.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = kwargs.get('quoted_name', None) - self.data_size = kwargs.get('data_size', None) - self.data_type = kwargs.get('data_type', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table_column_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table_column_py3.py deleted file mode 100644 index bb8cce2d8c3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table_column_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, *, quoted_name: str=None, data_size: str=None, data_type: str=None, **kwargs) -> None: - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = quoted_name - self.data_size = data_size - self.data_type = data_type diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table_py3.py deleted file mode 100644 index ecbbd26a576..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_group_schema_table_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, *, columns=None, quoted_name: str=None, **kwargs) -> None: - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = columns - self.quoted_name = quoted_name diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_member.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_member.py deleted file mode 100644 index 1474c6320dc..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_member.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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 SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - 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 database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncMember, self).__init__(**kwargs) - self.database_type = kwargs.get('database_type', None) - self.sync_agent_id = kwargs.get('sync_agent_id', None) - self.sql_server_database_id = kwargs.get('sql_server_database_id', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.sync_direction = kwargs.get('sync_direction', None) - self.sync_state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_member_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_member_paged.py deleted file mode 100644 index 68bddeeeec1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_member_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 SyncMemberPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncMember ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncMember]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncMemberPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_member_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_member_py3.py deleted file mode 100644 index 50cf8fe2d65..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_member_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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_py3 import ProxyResource - - -class SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - 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 database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, *, database_type=None, sync_agent_id: str=None, sql_server_database_id: str=None, server_name: str=None, database_name: str=None, user_name: str=None, password: str=None, sync_direction=None, **kwargs) -> None: - super(SyncMember, self).__init__(**kwargs) - self.database_type = database_type - self.sync_agent_id = sync_agent_id - self.sql_server_database_id = sql_server_database_id - self.server_name = server_name - self.database_name = database_name - self.user_name = user_name - self.password = password - self.sync_direction = sync_direction - self.sync_state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tde_certificate.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tde_certificate.py deleted file mode 100644 index 1171ee8adf9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tde_certificate.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = kwargs.get('private_blob', None) - self.cert_password = kwargs.get('cert_password', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tde_certificate_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tde_certificate_py3.py deleted file mode 100644 index b4e54453cae..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tde_certificate_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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_py3 import ProxyResource - - -class TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, *, private_blob: str, cert_password: str=None, **kwargs) -> None: - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = private_blob - self.cert_password = cert_password diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tracked_resource.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tracked_resource.py deleted file mode 100644 index dc99e096cf1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 .resource import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :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, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tracked_resource_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tracked_resource_py3.py deleted file mode 100644 index 5edf04ac0a7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 .resource_py3 import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :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: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption.py deleted file mode 100644 index 4270fa860c1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption 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 - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = kwargs.get('status', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_activity.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_activity.py deleted file mode 100644 index 60e9505eba4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_activity.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - 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 - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_activity_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_activity_paged.py deleted file mode 100644 index b86dce24923..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 TransparentDataEncryptionActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`TransparentDataEncryptionActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(TransparentDataEncryptionActivityPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_activity_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_activity_py3.py deleted file mode 100644 index 9bf146137c2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_activity_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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_py3 import ProxyResource - - -class TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - 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 - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_py3.py deleted file mode 100644 index db2b2096f79..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/transparent_data_encryption_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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_py3 import ProxyResource - - -class TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption 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 - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, *, status=None, **kwargs) -> None: - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = status diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/virtual_network_rule.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/virtual_network_rule.py deleted file mode 100644 index 0960e4289c6..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/virtual_network_rule.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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. - - All required parameters must be populated in order to send to Azure. - - :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: Required. 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.sql.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, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/virtual_network_rule_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/virtual_network_rule_paged.py deleted file mode 100644 index 1cc23039a55..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/virtual_network_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/virtual_network_rule_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/virtual_network_rule_py3.py deleted file mode 100644 index 19e6bd30ff5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/virtual_network_rule_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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_py3 import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. 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.sql.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: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - 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/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_recurring_scans_properties.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_recurring_scans_properties.py deleted file mode 100644 index e7d424543f2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_recurring_scans_properties.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = kwargs.get('is_enabled', None) - self.email_subscription_admins = kwargs.get('email_subscription_admins', True) - self.emails = kwargs.get('emails', None) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py deleted file mode 100644 index 3a55afaa0a5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = is_enabled - self.email_subscription_admins = email_subscription_admins - self.emails = emails diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_error.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_error.py deleted file mode 100644 index 1d465691ba6..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_error.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_error_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_error_py3.py deleted file mode 100644 index 93c13998eb2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_error_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_record.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_record.py deleted file mode 100644 index 67a6d163f90..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_record.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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 VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - 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 - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_record_paged.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_record_paged.py deleted file mode 100644 index 7076acc9290..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_record_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 VulnerabilityAssessmentScanRecordPaged(Paged): - """ - A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} - } - - def __init__(self, *args, **kwargs): - - super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_record_py3.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_record_py3.py deleted file mode 100644 index e31d141065a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/vulnerability_assessment_scan_record_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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_py3 import ProxyResource - - -class VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - 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 - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/__init__.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/__init__.py deleted file mode 100644 index f3a922e1722..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# 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 .recoverable_databases_operations import RecoverableDatabasesOperations -from .restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .servers_operations import ServersOperations -from .server_connection_policies_operations import ServerConnectionPoliciesOperations -from .database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .data_masking_policies_operations import DataMaskingPoliciesOperations -from .data_masking_rules_operations import DataMaskingRulesOperations -from .firewall_rules_operations import FirewallRulesOperations -from .geo_backup_policies_operations import GeoBackupPoliciesOperations -from .databases_operations import DatabasesOperations -from .elastic_pools_operations import ElasticPoolsOperations -from .recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .replication_links_operations import ReplicationLinksOperations -from .server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .server_communication_links_operations import ServerCommunicationLinksOperations -from .service_objectives_operations import ServiceObjectivesOperations -from .elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .server_usages_operations import ServerUsagesOperations -from .database_usages_operations import DatabaseUsagesOperations -from .database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .encryption_protectors_operations import EncryptionProtectorsOperations -from .failover_groups_operations import FailoverGroupsOperations -from .managed_instances_operations import ManagedInstancesOperations -from .operations import Operations -from .server_keys_operations import ServerKeysOperations -from .sync_agents_operations import SyncAgentsOperations -from .sync_groups_operations import SyncGroupsOperations -from .sync_members_operations import SyncMembersOperations -from .subscription_usages_operations import SubscriptionUsagesOperations -from .virtual_network_rules_operations import VirtualNetworkRulesOperations -from .extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .job_agents_operations import JobAgentsOperations -from .job_credentials_operations import JobCredentialsOperations -from .job_executions_operations import JobExecutionsOperations -from .jobs_operations import JobsOperations -from .job_step_executions_operations import JobStepExecutionsOperations -from .job_steps_operations import JobStepsOperations -from .job_target_executions_operations import JobTargetExecutionsOperations -from .job_target_groups_operations import JobTargetGroupsOperations -from .job_versions_operations import JobVersionsOperations -from .long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .managed_databases_operations import ManagedDatabasesOperations -from .server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .server_dns_aliases_operations import ServerDnsAliasesOperations -from .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .restore_points_operations import RestorePointsOperations -from .database_operations import DatabaseOperations -from .elastic_pool_operations import ElasticPoolOperations -from .capabilities_operations import CapabilitiesOperations -from .database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .tde_certificates_operations import TdeCertificatesOperations -from .managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .managed_instance_keys_operations import ManagedInstanceKeysOperations -from .managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations - -__all__ = [ - 'RecoverableDatabasesOperations', - 'RestorableDroppedDatabasesOperations', - 'ServersOperations', - 'ServerConnectionPoliciesOperations', - 'DatabaseThreatDetectionPoliciesOperations', - 'DataMaskingPoliciesOperations', - 'DataMaskingRulesOperations', - 'FirewallRulesOperations', - 'GeoBackupPoliciesOperations', - 'DatabasesOperations', - 'ElasticPoolsOperations', - 'RecommendedElasticPoolsOperations', - 'ReplicationLinksOperations', - 'ServerAzureADAdministratorsOperations', - 'ServerCommunicationLinksOperations', - 'ServiceObjectivesOperations', - 'ElasticPoolActivitiesOperations', - 'ElasticPoolDatabaseActivitiesOperations', - 'ServiceTierAdvisorsOperations', - 'TransparentDataEncryptionsOperations', - 'TransparentDataEncryptionActivitiesOperations', - 'ServerUsagesOperations', - 'DatabaseUsagesOperations', - 'DatabaseAutomaticTuningOperations', - 'EncryptionProtectorsOperations', - 'FailoverGroupsOperations', - 'ManagedInstancesOperations', - 'Operations', - 'ServerKeysOperations', - 'SyncAgentsOperations', - 'SyncGroupsOperations', - 'SyncMembersOperations', - 'SubscriptionUsagesOperations', - 'VirtualNetworkRulesOperations', - 'ExtendedDatabaseBlobAuditingPoliciesOperations', - 'ExtendedServerBlobAuditingPoliciesOperations', - 'ServerBlobAuditingPoliciesOperations', - 'DatabaseBlobAuditingPoliciesOperations', - 'DatabaseVulnerabilityAssessmentRuleBaselinesOperations', - 'DatabaseVulnerabilityAssessmentsOperations', - 'JobAgentsOperations', - 'JobCredentialsOperations', - 'JobExecutionsOperations', - 'JobsOperations', - 'JobStepExecutionsOperations', - 'JobStepsOperations', - 'JobTargetExecutionsOperations', - 'JobTargetGroupsOperations', - 'JobVersionsOperations', - 'LongTermRetentionBackupsOperations', - 'BackupLongTermRetentionPoliciesOperations', - 'ManagedBackupShortTermRetentionPoliciesOperations', - 'ManagedDatabasesOperations', - 'ServerAutomaticTuningOperations', - 'ServerDnsAliasesOperations', - 'ServerSecurityAlertPoliciesOperations', - 'RestorePointsOperations', - 'DatabaseOperations', - 'ElasticPoolOperations', - 'CapabilitiesOperations', - 'DatabaseVulnerabilityAssessmentScansOperations', - 'ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations', - 'ManagedDatabaseVulnerabilityAssessmentScansOperations', - 'ManagedDatabaseVulnerabilityAssessmentsOperations', - 'InstanceFailoverGroupsOperations', - 'BackupShortTermRetentionPoliciesOperations', - 'TdeCertificatesOperations', - 'ManagedInstanceTdeCertificatesOperations', - 'ManagedInstanceKeysOperations', - 'ManagedInstanceEncryptionProtectorsOperations', -] diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/backup_long_term_retention_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/backup_long_term_retention_policies_operations.py deleted file mode 100644 index c42ba1ab812..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/backup_long_term_retention_policies_operations.py +++ /dev/null @@ -1,287 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class BackupLongTermRetentionPoliciesOperations(object): - """BackupLongTermRetentionPoliciesOperations 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 policy_name: The policy name. Should always be Default. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.policy_name = "default" - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a database's long term retention policy. - - :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: BackupLongTermRetentionPolicy or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.BackupLongTermRetentionPolicy 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'policyName': self._serialize.url("self.policy_name", self.policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('BackupLongTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'policyName': self._serialize.url("self.policy_name", self.policy_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['Accept'] = 'application/json' - 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, 'BackupLongTermRetentionPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('BackupLongTermRetentionPolicy', 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, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Sets a database's long term retention policy. - - :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 parameters: The long term retention policy info. - :type parameters: ~azure.mgmt.sql.models.BackupLongTermRetentionPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - BackupLongTermRetentionPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.BackupLongTermRetentionPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.BackupLongTermRetentionPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('BackupLongTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}'} - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a database's long term retention policy. - - :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: BackupLongTermRetentionPolicy or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.BackupLongTermRetentionPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_by_database.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'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('BackupLongTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/backup_short_term_retention_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/backup_short_term_retention_policies_operations.py deleted file mode 100644 index c7957810c28..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/backup_short_term_retention_policies_operations.py +++ /dev/null @@ -1,408 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class BackupShortTermRetentionPoliciesOperations(object): - """BackupShortTermRetentionPoliciesOperations 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 policy_name: The policy name. Should always be "default". Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.policy_name = "default" - self.api_version = "2017-10-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a database's short term retention policy. - - :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: BackupShortTermRetentionPolicy or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.BackupShortTermRetentionPolicy 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'policyName': self._serialize.url("self.policy_name", self.policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('BackupShortTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config): - parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days) - - # 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'policyName': self._serialize.url("self.policy_name", self.policy_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['Accept'] = 'application/json' - 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, 'BackupShortTermRetentionPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('BackupShortTermRetentionPolicy', 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, retention_days=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a database's short term retention policy. - - :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 retention_days: The backup retention period in days. This is - how many days Point-in-Time Restore will be supported. - :type retention_days: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - BackupShortTermRetentionPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - retention_days=retention_days, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} - - - def _update_initial( - self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config): - parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days) - - # Construct URL - url = self.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'policyName': self._serialize.url("self.policy_name", self.policy_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['Accept'] = 'application/json' - 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, 'BackupShortTermRetentionPolicy') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('BackupShortTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a database's short term retention policy. - - :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 retention_days: The backup retention period in days. This is - how many days Point-in-Time Restore will be supported. - :type retention_days: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - BackupShortTermRetentionPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - retention_days=retention_days, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a database's short term retention policy. - - :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: An iterator like instance of BackupShortTermRetentionPolicy - :rtype: - ~azure.mgmt.sql.models.BackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.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'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/capabilities_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/capabilities_operations.py deleted file mode 100644 index a873a3a87f9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/capabilities_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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 CapabilitiesOperations(object): - """CapabilitiesOperations 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-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-10-01-preview" - - self.config = config - - def list_by_location( - self, location_name, include=None, custom_headers=None, raw=False, **operation_config): - """Gets the subscription capabilities available for the specified - location. - - :param location_name: The location name whose capabilities are - retrieved. - :type location_name: str - :param include: If specified, restricts the response to only include - the selected item. Possible values include: 'supportedEditions', - 'supportedElasticPoolEditions', 'supportedManagedInstanceVersions' - :type include: str or ~azure.mgmt.sql.models.CapabilityGroup - :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: LocationCapabilities or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.LocationCapabilities or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_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 = {} - if include is not None: - query_parameters['include'] = self._serialize.query("include", include, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('LocationCapabilities', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/capabilities'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/data_masking_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/data_masking_policies_operations.py deleted file mode 100644 index 2d1099c8be0..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/data_masking_policies_operations.py +++ /dev/null @@ -1,191 +0,0 @@ -# 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 DataMaskingPoliciesOperations(object): - """DataMaskingPoliciesOperations 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: "2014-04-01". - :ivar data_masking_policy_name: The name of the database for which the data masking rule applies. Constant value: "Default". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - self.data_masking_policy_name = "Default" - - self.config = config - - def create_or_update( - self, resource_group_name, server_name, database_name, data_masking_state, exempt_principals=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a database data masking policy. - - :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 data_masking_state: The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or - ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies - the semicolon-separated list of database users for which the data - masking policy does not apply. The specified users receive data - results without masking for all of the database queries. - :type exempt_principals: 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: DataMaskingPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.DataMaskingPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.DataMaskingPolicy(data_masking_state=data_masking_state, exempt_principals=exempt_principals) - - # 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'), - 'dataMaskingPolicyName': self._serialize.url("self.data_masking_policy_name", self.data_masking_policy_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['Accept'] = 'application/json' - 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, 'DataMaskingPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('DataMaskingPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}'} - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a database data masking policy. - - :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: DataMaskingPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.DataMaskingPolicy 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'), - 'dataMaskingPolicyName': self._serialize.url("self.data_masking_policy_name", self.data_masking_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('DataMaskingPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/data_masking_rules_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/data_masking_rules_operations.py deleted file mode 100644 index c5fd4c63ab4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/data_masking_rules_operations.py +++ /dev/null @@ -1,196 +0,0 @@ -# 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 DataMaskingRulesOperations(object): - """DataMaskingRulesOperations 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: "2014-04-01". - :ivar data_masking_policy_name: The name of the database for which the data masking rule applies. Constant value: "Default". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - self.data_masking_policy_name = "Default" - - self.config = config - - def create_or_update( - self, resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates a database data masking 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 database_name: The name of the database. - :type database_name: str - :param data_masking_rule_name: The name of the data masking rule. - :type data_masking_rule_name: str - :param parameters: The required parameters for creating or updating a - data masking rule. - :type parameters: ~azure.mgmt.sql.models.DataMaskingRule - :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: DataMaskingRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.DataMaskingRule or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'dataMaskingPolicyName': self._serialize.url("self.data_masking_policy_name", self.data_masking_policy_name, 'str'), - 'dataMaskingRuleName': self._serialize.url("data_masking_rule_name", data_masking_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['Accept'] = 'application/json' - 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, 'DataMaskingRule') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('DataMaskingRule', response) - if response.status_code == 201: - deserialized = self._deserialize('DataMaskingRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}'} - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of database data masking rules. - - :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: An iterator like instance of DataMaskingRule - :rtype: - ~azure.mgmt.sql.models.DataMaskingRulePaged[~azure.mgmt.sql.models.DataMaskingRule] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.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'), - 'dataMaskingPolicyName': self._serialize.url("self.data_masking_policy_name", self.data_masking_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_automatic_tuning_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_automatic_tuning_operations.py deleted file mode 100644 index 7a94b97b954..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_automatic_tuning_operations.py +++ /dev/null @@ -1,184 +0,0 @@ -# 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 DatabaseAutomaticTuningOperations(object): - """DatabaseAutomaticTuningOperations 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: "2015-05-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a database's automatic tuning. - - :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: DatabaseAutomaticTuning or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.DatabaseAutomaticTuning 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'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('DatabaseAutomaticTuning', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current'} - - def update( - self, resource_group_name, server_name, database_name, desired_state=None, options=None, custom_headers=None, raw=False, **operation_config): - """Update automatic tuning properties for target 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 desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningOptions] - :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: DatabaseAutomaticTuning or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.DatabaseAutomaticTuning or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.DatabaseAutomaticTuning(desired_state=desired_state, options=options) - - # Construct URL - url = self.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'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, 'DatabaseAutomaticTuning') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('DatabaseAutomaticTuning', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_blob_auditing_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_blob_auditing_policies_operations.py deleted file mode 100644 index a0c09cfd8f0..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_blob_auditing_policies_operations.py +++ /dev/null @@ -1,184 +0,0 @@ -# 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 DatabaseBlobAuditingPoliciesOperations(object): - """DatabaseBlobAuditingPoliciesOperations 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 blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.blob_auditing_policy_name = "default" - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a database's blob auditing policy. - - :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: DatabaseBlobAuditingPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.DatabaseBlobAuditingPolicy 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('DatabaseBlobAuditingPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}'} - - def create_or_update( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates a database's blob auditing policy. - - :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 parameters: The database blob auditing policy. - :type parameters: ~azure.mgmt.sql.models.DatabaseBlobAuditingPolicy - :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: DatabaseBlobAuditingPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.DatabaseBlobAuditingPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_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['Accept'] = 'application/json' - 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, 'DatabaseBlobAuditingPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('DatabaseBlobAuditingPolicy', response) - if response.status_code == 201: - deserialized = self._deserialize('DatabaseBlobAuditingPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_operations.py deleted file mode 100644 index 8d482411f19..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_operations.py +++ /dev/null @@ -1,174 +0,0 @@ -# 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 DatabaseOperations(object): - """DatabaseOperations 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-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-10-01-preview" - - self.config = config - - def cancel( - self, resource_group_name, server_name, database_name, operation_id, custom_headers=None, raw=False, **operation_config): - """Cancels the asynchronous operation on the 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 operation_id: The operation identifier. - :type operation_id: 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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.cancel.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, '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 = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel'} - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of operations performed on the 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: An iterator like instance of DatabaseOperation - :rtype: - ~azure.mgmt.sql.models.DatabaseOperationPaged[~azure.mgmt.sql.models.DatabaseOperation] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.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'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_threat_detection_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_threat_detection_policies_operations.py deleted file mode 100644 index 38501854c42..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_threat_detection_policies_operations.py +++ /dev/null @@ -1,186 +0,0 @@ -# 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 DatabaseThreatDetectionPoliciesOperations(object): - """DatabaseThreatDetectionPoliciesOperations 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 security_alert_policy_name: The name of the security alert policy. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.security_alert_policy_name = "default" - self.api_version = "2014-04-01" - - self.config = config - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a database's threat detection policy. - - :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 for which database - Threat Detection policy is defined. - :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: DatabaseSecurityAlertPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.DatabaseSecurityAlertPolicy 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'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('DatabaseSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}'} - - def create_or_update( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates a database's threat detection policy. - - :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 for which database - Threat Detection policy is defined. - :type database_name: str - :param parameters: The database Threat Detection policy. - :type parameters: ~azure.mgmt.sql.models.DatabaseSecurityAlertPolicy - :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: DatabaseSecurityAlertPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.DatabaseSecurityAlertPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_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['Accept'] = 'application/json' - 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, 'DatabaseSecurityAlertPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('DatabaseSecurityAlertPolicy', response) - if response.status_code == 201: - deserialized = self._deserialize('DatabaseSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_usages_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_usages_operations.py deleted file mode 100644 index 543a8ba6f50..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_usages_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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 DatabaseUsagesOperations(object): - """DatabaseUsagesOperations 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Returns database usages. - - :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: An iterator like instance of DatabaseUsage - :rtype: - ~azure.mgmt.sql.models.DatabaseUsagePaged[~azure.mgmt.sql.models.DatabaseUsage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.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') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py deleted file mode 100644 index 9dba003a5ff..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py +++ /dev/null @@ -1,281 +0,0 @@ -# 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 DatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): - """DatabaseVulnerabilityAssessmentRuleBaselinesOperations 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 vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.vulnerability_assessment_name = "default" - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers=None, raw=False, **operation_config): - """Gets a database's vulnerability assessment rule baseline. - - :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 for which the - vulnerability assessment rule baseline is defined. - :type database_name: str - :param rule_id: The vulnerability assessment rule ID. - :type rule_id: str - :param baseline_name: The name of the vulnerability assessment rule - baseline (default implies a baseline on a database level rule and - master for server level rule). Possible values include: 'master', - 'default' - :type baseline_name: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentPolicyBaselineName - :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: DatabaseVulnerabilityAssessmentRuleBaseline or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaseline 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), - 'baselineName': self._serialize.url("baseline_name", baseline_name, 'VulnerabilityAssessmentPolicyBaselineName'), - '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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('DatabaseVulnerabilityAssessmentRuleBaseline', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} - - def create_or_update( - self, resource_group_name, server_name, database_name, rule_id, baseline_name, baseline_results, custom_headers=None, raw=False, **operation_config): - """Creates or updates a database's vulnerability assessment rule baseline. - - :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 for which the - vulnerability assessment rule baseline is defined. - :type database_name: str - :param rule_id: The vulnerability assessment rule ID. - :type rule_id: str - :param baseline_name: The name of the vulnerability assessment rule - baseline (default implies a baseline on a database level rule and - master for server level rule). Possible values include: 'master', - 'default' - :type baseline_name: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentPolicyBaselineName - :param baseline_results: The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - :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: DatabaseVulnerabilityAssessmentRuleBaseline or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaseline or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.DatabaseVulnerabilityAssessmentRuleBaseline(baseline_results=baseline_results) - - # 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), - 'baselineName': self._serialize.url("baseline_name", baseline_name, 'VulnerabilityAssessmentPolicyBaselineName'), - '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['Accept'] = 'application/json' - 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, 'DatabaseVulnerabilityAssessmentRuleBaseline') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('DatabaseVulnerabilityAssessmentRuleBaseline', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} - - def delete( - self, resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers=None, raw=False, **operation_config): - """Removes the database's vulnerability assessment rule baseline. - - :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 for which the - vulnerability assessment rule baseline is defined. - :type database_name: str - :param rule_id: The vulnerability assessment rule ID. - :type rule_id: str - :param baseline_name: The name of the vulnerability assessment rule - baseline (default implies a baseline on a database level rule and - master for server level rule). Possible values include: 'master', - 'default' - :type baseline_name: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentPolicyBaselineName - :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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), - 'baselineName': self._serialize.url("baseline_name", baseline_name, 'VulnerabilityAssessmentPolicyBaselineName'), - '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 = {} - 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, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_vulnerability_assessment_scans_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_vulnerability_assessment_scans_operations.py deleted file mode 100644 index 97725d782e9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_vulnerability_assessment_scans_operations.py +++ /dev/null @@ -1,359 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DatabaseVulnerabilityAssessmentScansOperations(object): - """DatabaseVulnerabilityAssessmentScansOperations 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 vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.vulnerability_assessment_name = "default" - self.api_version = "2017-10-01-preview" - - self.config = config - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Lists the vulnerability assessment scans of 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: An iterator like instance of - VulnerabilityAssessmentScanRecord - :rtype: - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} - - def get( - self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): - """Gets a vulnerability assessment scan record of 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 scan_id: The vulnerability assessment scan Id of the scan to - retrieve. - :type scan_id: 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: VulnerabilityAssessmentScanRecord or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'scanId': self._serialize.url("scan_id", scan_id, '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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('VulnerabilityAssessmentScanRecord', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}'} - - - def _initiate_scan_initial( - self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.initiate_scan.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'scanId': self._serialize.url("scan_id", scan_id, '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 = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def initiate_scan( - self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Executes a Vulnerability Assessment database scan. - - :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 scan_id: The vulnerability assessment scan Id of the scan to - retrieve. - :type scan_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._initiate_scan_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - scan_id=scan_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - initiate_scan.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan'} - - def export( - self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): - """Convert an existing scan result to a human readable format. If already - exists nothing happens. - - :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 scanned database. - :type database_name: str - :param scan_id: The vulnerability assessment scan Id. - :type scan_id: 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: DatabaseVulnerabilityAssessmentScansExport or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentScansExport or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.export.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'scanId': self._serialize.url("scan_id", scan_id, '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['Accept'] = 'application/json' - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('DatabaseVulnerabilityAssessmentScansExport', response) - if response.status_code == 201: - deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - export.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_vulnerability_assessments_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_vulnerability_assessments_operations.py deleted file mode 100644 index 5fa6a1ef7ad..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/database_vulnerability_assessments_operations.py +++ /dev/null @@ -1,325 +0,0 @@ -# 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 DatabaseVulnerabilityAssessmentsOperations(object): - """DatabaseVulnerabilityAssessmentsOperations 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 vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.vulnerability_assessment_name = "default" - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets the database's vulnerability assessment. - - :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 for which the - vulnerability assessment is defined. - :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: DatabaseVulnerabilityAssessment or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('DatabaseVulnerabilityAssessment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} - - def create_or_update( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates the database's vulnerability assessment. - - :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 for which the - vulnerability assessment is defined. - :type database_name: str - :param parameters: The requested resource. - :type parameters: - ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment - :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: DatabaseVulnerabilityAssessment or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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['Accept'] = 'application/json' - 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, 'DatabaseVulnerabilityAssessment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('DatabaseVulnerabilityAssessment', response) - if response.status_code == 201: - deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} - - def delete( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Removes the database's vulnerability assessment. - - :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 for which the - vulnerability assessment is defined. - :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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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 = {} - 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, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Lists the vulnerability assessment policies associated with 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 for which the - vulnerability assessment policies are defined. - :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: An iterator like instance of DatabaseVulnerabilityAssessment - :rtype: - ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.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'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/databases_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/databases_operations.py deleted file mode 100644 index 3b4e01e8a39..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/databases_operations.py +++ /dev/null @@ -1,1404 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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 extension_name: The name of the operation to perform. Constant value: "import". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.extension_name = "import" - - self.config = config - - - def _import_method_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2014-04-01" - - # Construct URL - url = self.import_method.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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, 'ImportRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def import_method( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Imports a bacpac into a new 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 parameters: The required parameters for importing a Bacpac into - a database. - :type parameters: ~azure.mgmt.sql.models.ImportRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ImportExportResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ImportExportResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ImportExportResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._import_method_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - import_method.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import'} - - - def _create_import_operation_initial( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2014-04-01" - - # Construct URL - url = self.create_import_operation.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'), - 'extensionName': self._serialize.url("self.extension_name", self.extension_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, 'ImportExtensionRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_import_operation( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates an import operation that imports a bacpac into an existing - database. The existing database must be empty. - - :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 to import into - :type database_name: str - :param parameters: The required parameters for importing a Bacpac into - a database. - :type parameters: ~azure.mgmt.sql.models.ImportExtensionRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ImportExportResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ImportExportResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ImportExportResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._create_import_operation_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_import_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}'} - - - def _export_initial( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2014-04-01" - - # Construct URL - url = self.export.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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, 'ExportRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Exports a database to a bacpac. - - :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 to be exported. - :type database_name: str - :param parameters: The required parameters for exporting a database. - :type parameters: ~azure.mgmt.sql.models.ExportRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ImportExportResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ImportExportResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ImportExportResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._export_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export'} - - def list_metrics( - self, resource_group_name, server_name, database_name, filter, custom_headers=None, raw=False, **operation_config): - """Returns database metrics. - - :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 filter: An OData filter expression that describes a subset of - metrics to return. - :type filter: 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 Metric - :rtype: - ~azure.mgmt.sql.models.MetricPaged[~azure.mgmt.sql.models.Metric] - :raises: :class:`CloudError` - """ - api_version = "2014-04-01" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_metrics.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("api_version", api_version, 'str') - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.MetricPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics'} - - def list_metric_definitions( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Returns database metric definitions. - - :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: An iterator like instance of MetricDefinition - :rtype: - ~azure.mgmt.sql.models.MetricDefinitionPaged[~azure.mgmt.sql.models.MetricDefinition] - :raises: :class:`CloudError` - """ - api_version = "2014-04-01" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_metric_definitions.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("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions'} - - - def _upgrade_data_warehouse_initial( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" - - # Construct URL - url = self.upgrade_data_warehouse.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'), - 'databaseName': self._serialize.url("database_name", database_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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def upgrade_data_warehouse( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrades a data warehouse. - - :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 to be upgraded. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._upgrade_data_warehouse_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_data_warehouse.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/upgradeDataWarehouse'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of databases. - - :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.sql.models.DatabasePaged[~azure.mgmt.sql.models.Database] - :raises: :class:`CloudError` - """ - api_version = "2017-10-01-preview" - - 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("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.Sql/servers/{serverName}/databases'} - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets 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.sql.models.Database or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2017-10-01-preview" - - # 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'), - 'databaseName': self._serialize.url("database_name", database_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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.Sql/servers/{serverName}/databases/{databaseName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" - - # 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'), - 'databaseName': self._serialize.url("database_name", database_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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, parameters, custom_headers=None, raw=False, polling=True, **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 parameters: The requested database resource state. - :type parameters: ~azure.mgmt.sql.models.Database - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Database or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.Database] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.Database]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}'} - - - def _delete_initial( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" - - # 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'), - 'databaseName': self._serialize.url("database_name", database_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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - 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, header_parameters) - response = self._client.send(request, 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, polling=True, **operation_config): - """Deletes the 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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}'} - - - def _update_initial( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" - - # Construct URL - url = self.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'), - 'databaseName': self._serialize.url("database_name", database_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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, 'DatabaseUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """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 parameters: The requested database resource state. - :type parameters: ~azure.mgmt.sql.models.DatabaseUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Database or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.Database] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.Database]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}'} - - def list_by_elastic_pool( - self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of databases in an elastic pool. - - :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 elastic_pool_name: The name of the elastic pool. - :type elastic_pool_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.sql.models.DatabasePaged[~azure.mgmt.sql.models.Database] - :raises: :class:`CloudError` - """ - api_version = "2017-10-01-preview" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_elastic_pool.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'), - 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_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("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases'} - - - def _pause_initial( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" - - # Construct URL - url = self.pause.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'), - 'databaseName': self._serialize.url("database_name", database_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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def pause( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Pauses 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 to be paused. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Database or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.Database] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.Database]] - :raises: :class:`CloudError` - """ - raw_result = self._pause_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - pause.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/pause'} - - - def _resume_initial( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" - - # Construct URL - url = self.resume.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'), - 'databaseName': self._serialize.url("database_name", database_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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def resume( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Resumes 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 to be resumed. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Database or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.Database] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.Database]] - :raises: :class:`CloudError` - """ - raw_result = self._resume_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/resume'} - - def rename( - self, resource_group_name, server_name, database_name, id, custom_headers=None, raw=False, **operation_config): - """Renames 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 to rename. - :type database_name: str - :param id: The target ID for the resource - :type id: 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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.ResourceMoveDefinition(id=id) - - api_version = "2017-10-01-preview" - - # Construct URL - url = self.rename.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'), - 'databaseName': self._serialize.url("database_name", database_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("api_version", 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, 'ResourceMoveDefinition') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - rename.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pool_activities_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pool_activities_operations.py deleted file mode 100644 index a2d2dc49c20..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pool_activities_operations.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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 ElasticPoolActivitiesOperations(object): - """ElasticPoolActivitiesOperations 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - def list_by_elastic_pool( - self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): - """Returns elastic pool activities. - - :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 elastic_pool_name: The name of the elastic pool for which to - get the current activity. - :type elastic_pool_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 ElasticPoolActivity - :rtype: - ~azure.mgmt.sql.models.ElasticPoolActivityPaged[~azure.mgmt.sql.models.ElasticPoolActivity] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_elastic_pool.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'), - 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pool_database_activities_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pool_database_activities_operations.py deleted file mode 100644 index 5ed1492b961..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pool_database_activities_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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 ElasticPoolDatabaseActivitiesOperations(object): - """ElasticPoolDatabaseActivitiesOperations 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - def list_by_elastic_pool( - self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): - """Returns activity on databases inside of an elastic pool. - - :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 elastic_pool_name: The name of the elastic pool. - :type elastic_pool_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 ElasticPoolDatabaseActivity - :rtype: - ~azure.mgmt.sql.models.ElasticPoolDatabaseActivityPaged[~azure.mgmt.sql.models.ElasticPoolDatabaseActivity] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_elastic_pool.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'), - 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pool_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pool_operations.py deleted file mode 100644 index eb71face0db..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pool_operations.py +++ /dev/null @@ -1,174 +0,0 @@ -# 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 ElasticPoolOperations(object): - """ElasticPoolOperations 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-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-10-01-preview" - - self.config = config - - def cancel( - self, resource_group_name, server_name, elastic_pool_name, operation_id, custom_headers=None, raw=False, **operation_config): - """Cancels the asynchronous operation on the elastic pool. - - :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 elastic_pool_name: - :type elastic_pool_name: str - :param operation_id: The operation identifier. - :type operation_id: 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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.cancel.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'), - 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, '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 = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations/{operationId}/cancel'} - - def list_by_elastic_pool( - self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of operations performed on the elastic pool. - - :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 elastic_pool_name: - :type elastic_pool_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 ElasticPoolOperation - :rtype: - ~azure.mgmt.sql.models.ElasticPoolOperationPaged[~azure.mgmt.sql.models.ElasticPoolOperation] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_elastic_pool.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'), - 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pools_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pools_operations.py deleted file mode 100644 index e7fba924b0c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/elastic_pools_operations.py +++ /dev/null @@ -1,648 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ElasticPoolsOperations(object): - """ElasticPoolsOperations 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. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def list_metrics( - self, resource_group_name, server_name, elastic_pool_name, filter, custom_headers=None, raw=False, **operation_config): - """Returns elastic pool metrics. - - :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 elastic_pool_name: The name of the elastic pool. - :type elastic_pool_name: str - :param filter: An OData filter expression that describes a subset of - metrics to return. - :type filter: 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 Metric - :rtype: - ~azure.mgmt.sql.models.MetricPaged[~azure.mgmt.sql.models.Metric] - :raises: :class:`CloudError` - """ - api_version = "2014-04-01" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_metrics.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'), - 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.MetricPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics'} - - def list_metric_definitions( - self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): - """Returns elastic pool metric definitions. - - :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 elastic_pool_name: The name of the elastic pool. - :type elastic_pool_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 MetricDefinition - :rtype: - ~azure.mgmt.sql.models.MetricDefinitionPaged[~azure.mgmt.sql.models.MetricDefinition] - :raises: :class:`CloudError` - """ - api_version = "2014-04-01" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_metric_definitions.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'), - 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions'} - - def list_by_server( - self, resource_group_name, server_name, skip=None, custom_headers=None, raw=False, **operation_config): - """Gets all elastic pools 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 skip: The number of elements in the collection to skip. - :type skip: int - :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 ElasticPool - :rtype: - ~azure.mgmt.sql.models.ElasticPoolPaged[~azure.mgmt.sql.models.ElasticPool] - :raises: :class:`CloudError` - """ - api_version = "2017-10-01-preview" - - 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 = {} - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ElasticPoolPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools'} - - def get( - self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets an elastic pool. - - :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 elastic_pool_name: The name of the elastic pool. - :type elastic_pool_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: ElasticPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ElasticPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2017-10-01-preview" - - # 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'), - 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ElasticPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, elastic_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" - - # 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'), - 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, 'ElasticPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ElasticPool', response) - if response.status_code == 201: - deserialized = self._deserialize('ElasticPool', 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, elastic_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an elastic pool. - - :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 elastic_pool_name: The name of the elastic pool. - :type elastic_pool_name: str - :param parameters: The elastic pool parameters. - :type parameters: ~azure.mgmt.sql.models.ElasticPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ElasticPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ElasticPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ElasticPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - elastic_pool_name=elastic_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ElasticPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}'} - - - def _delete_initial( - self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" - - # 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'), - 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - 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, header_parameters) - response = self._client.send(request, 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, elastic_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an elastic pool. - - :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 elastic_pool_name: The name of the elastic pool. - :type elastic_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - elastic_pool_name=elastic_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}'} - - - def _update_initial( - self, resource_group_name, server_name, elastic_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" - - # Construct URL - url = self.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'), - 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, 'ElasticPoolUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ElasticPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, elastic_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates an elastic pool. - - :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 elastic_pool_name: The name of the elastic pool. - :type elastic_pool_name: str - :param parameters: The elastic pool update parameters. - :type parameters: ~azure.mgmt.sql.models.ElasticPoolUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ElasticPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ElasticPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ElasticPool]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - elastic_pool_name=elastic_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ElasticPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/encryption_protectors_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/encryption_protectors_operations.py deleted file mode 100644 index d19233971f4..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/encryption_protectors_operations.py +++ /dev/null @@ -1,282 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class EncryptionProtectorsOperations(object): - """EncryptionProtectorsOperations 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: "2015-05-01-preview". - :ivar encryption_protector_name: The name of the encryption protector to be retrieved. Constant value: "current". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01-preview" - self.encryption_protector_name = "current" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of server encryption protectors. - - :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 EncryptionProtector - :rtype: - ~azure.mgmt.sql.models.EncryptionProtectorPaged[~azure.mgmt.sql.models.EncryptionProtector] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector'} - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a server encryption protector. - - :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: EncryptionProtector or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.EncryptionProtector 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'), - 'encryptionProtectorName': self._serialize.url("self.encryption_protector_name", self.encryption_protector_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('EncryptionProtector', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'encryptionProtectorName': self._serialize.url("self.encryption_protector_name", self.encryption_protector_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['Accept'] = 'application/json' - 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, 'EncryptionProtector') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('EncryptionProtector', 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, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates an existing encryption protector. - - :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 requested encryption protector resource state. - :type parameters: ~azure.mgmt.sql.models.EncryptionProtector - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns EncryptionProtector or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.EncryptionProtector] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.EncryptionProtector]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('EncryptionProtector', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/extended_database_blob_auditing_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/extended_database_blob_auditing_policies_operations.py deleted file mode 100644 index 38bdfb2a087..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/extended_database_blob_auditing_policies_operations.py +++ /dev/null @@ -1,187 +0,0 @@ -# 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 ExtendedDatabaseBlobAuditingPoliciesOperations(object): - """ExtendedDatabaseBlobAuditingPoliciesOperations 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 blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.blob_auditing_policy_name = "default" - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets an extended database's blob auditing policy. - - :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: ExtendedDatabaseBlobAuditingPolicy or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.ExtendedDatabaseBlobAuditingPolicy 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ExtendedDatabaseBlobAuditingPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}'} - - def create_or_update( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an extended database's blob auditing policy. - - :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 parameters: The extended database blob auditing policy. - :type parameters: - ~azure.mgmt.sql.models.ExtendedDatabaseBlobAuditingPolicy - :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: ExtendedDatabaseBlobAuditingPolicy or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.ExtendedDatabaseBlobAuditingPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_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['Accept'] = 'application/json' - 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, 'ExtendedDatabaseBlobAuditingPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('ExtendedDatabaseBlobAuditingPolicy', response) - if response.status_code == 201: - deserialized = self._deserialize('ExtendedDatabaseBlobAuditingPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/extended_server_blob_auditing_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/extended_server_blob_auditing_policies_operations.py deleted file mode 100644 index 64524eb42a1..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/extended_server_blob_auditing_policies_operations.py +++ /dev/null @@ -1,213 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ExtendedServerBlobAuditingPoliciesOperations(object): - """ExtendedServerBlobAuditingPoliciesOperations 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 blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.blob_auditing_policy_name = "default" - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets an extended server's blob auditing policy. - - :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: ExtendedServerBlobAuditingPolicy or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.ExtendedServerBlobAuditingPolicy 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'), - 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ExtendedServerBlobAuditingPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_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['Accept'] = 'application/json' - 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, 'ExtendedServerBlobAuditingPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ExtendedServerBlobAuditingPolicy', 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, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an extended server's blob auditing policy. - - :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: Properties of extended blob auditing policy - :type parameters: - ~azure.mgmt.sql.models.ExtendedServerBlobAuditingPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ExtendedServerBlobAuditingPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ExtendedServerBlobAuditingPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ExtendedServerBlobAuditingPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ExtendedServerBlobAuditingPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/failover_groups_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/failover_groups_operations.py deleted file mode 100644 index fb779255c2a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/failover_groups_operations.py +++ /dev/null @@ -1,684 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class FailoverGroupsOperations(object): - """FailoverGroupsOperations 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: "2015-05-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, failover_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a failover 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 server_name: The name of the server containing the failover - group. - :type server_name: str - :param failover_group_name: The name of the failover group. - :type failover_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: FailoverGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.FailoverGroup 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'), - 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('FailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, failover_group_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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['Accept'] = 'application/json' - 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, 'FailoverGroup') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('FailoverGroup', response) - if response.status_code == 201: - deserialized = self._deserialize('FailoverGroup', 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, failover_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a failover 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 server_name: The name of the server containing the failover - group. - :type server_name: str - :param failover_group_name: The name of the failover group. - :type failover_group_name: str - :param parameters: The failover group parameters. - :type parameters: ~azure.mgmt.sql.models.FailoverGroup - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FailoverGroup or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.FailoverGroup] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.FailoverGroup]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - failover_group_name=failover_group_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}'} - - - def _delete_initial( - self, resource_group_name, server_name, failover_group_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'), - 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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 = {} - 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, header_parameters) - response = self._client.send(request, 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, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a failover 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 server_name: The name of the server containing the failover - group. - :type server_name: str - :param failover_group_name: The name of the failover group. - :type failover_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - failover_group_name=failover_group_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}'} - - - def _update_initial( - self, resource_group_name, server_name, failover_group_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.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'), - 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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['Accept'] = 'application/json' - 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, 'FailoverGroupUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('FailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, failover_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a failover 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 server_name: The name of the server containing the failover - group. - :type server_name: str - :param failover_group_name: The name of the failover group. - :type failover_group_name: str - :param parameters: The failover group parameters. - :type parameters: ~azure.mgmt.sql.models.FailoverGroupUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FailoverGroup or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.FailoverGroup] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.FailoverGroup]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - failover_group_name=failover_group_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Lists the failover groups 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 containing the failover - group. - :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 FailoverGroup - :rtype: - ~azure.mgmt.sql.models.FailoverGroupPaged[~azure.mgmt.sql.models.FailoverGroup] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.FailoverGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups'} - - - def _failover_initial( - self, resource_group_name, server_name, failover_group_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.failover.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'), - 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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['Accept'] = 'application/json' - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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('FailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def failover( - self, resource_group_name, server_name, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Fails over from the current primary server to this 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 containing the failover - group. - :type server_name: str - :param failover_group_name: The name of the failover group. - :type failover_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FailoverGroup or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.FailoverGroup] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.FailoverGroup]] - :raises: :class:`CloudError` - """ - raw_result = self._failover_initial( - resource_group_name=resource_group_name, - server_name=server_name, - failover_group_name=failover_group_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/failover'} - - - def _force_failover_allow_data_loss_initial( - self, resource_group_name, server_name, failover_group_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.force_failover_allow_data_loss.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'), - 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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['Accept'] = 'application/json' - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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('FailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def force_failover_allow_data_loss( - self, resource_group_name, server_name, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Fails over from the current primary server to this server. This - operation might result in data loss. - - :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 containing the failover - group. - :type server_name: str - :param failover_group_name: The name of the failover group. - :type failover_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FailoverGroup or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.FailoverGroup] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.FailoverGroup]] - :raises: :class:`CloudError` - """ - raw_result = self._force_failover_allow_data_loss_initial( - resource_group_name=resource_group_name, - server_name=server_name, - failover_group_name=failover_group_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - force_failover_allow_data_loss.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/firewall_rules_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/firewall_rules_operations.py deleted file mode 100644 index 7f62a3fa081..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/firewall_rules_operations.py +++ /dev/null @@ -1,318 +0,0 @@ -# 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 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - 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 or updates a 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 firewall rule. - :type firewall_rule_name: str - :param start_ip_address: The start IP address of the firewall rule. - Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: The end IP address of the firewall rule. Must - be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :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 - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FirewallRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.FirewallRule or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - 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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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 - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}'} - - def delete( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - """Deletes a 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 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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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 = {} - 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, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 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 - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}'} - - def get( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - """Gets a 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 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.sql.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.Sql/servers/{serverName}/firewallRules/{firewallRuleName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Returns a list of firewall rules. - - :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.sql.models.FirewallRulePaged[~azure.mgmt.sql.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.Sql/servers/{serverName}/firewallRules'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/geo_backup_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/geo_backup_policies_operations.py deleted file mode 100644 index bd81aeca5fa..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/geo_backup_policies_operations.py +++ /dev/null @@ -1,262 +0,0 @@ -# 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 GeoBackupPoliciesOperations(object): - """GeoBackupPoliciesOperations 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: "2014-04-01". - :ivar geo_backup_policy_name: The name of the geo backup policy. Constant value: "Default". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - self.geo_backup_policy_name = "Default" - - self.config = config - - def create_or_update( - self, resource_group_name, server_name, database_name, state, custom_headers=None, raw=False, **operation_config): - """Updates a database geo backup policy. - - :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 state: The state of the geo backup policy. Possible values - include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :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: GeoBackupPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.GeoBackupPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.GeoBackupPolicy(state=state) - - # 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'), - 'geoBackupPolicyName': self._serialize.url("self.geo_backup_policy_name", self.geo_backup_policy_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['Accept'] = 'application/json' - 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, 'GeoBackupPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('GeoBackupPolicy', response) - if response.status_code == 201: - deserialized = self._deserialize('GeoBackupPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}'} - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a geo backup policy. - - :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: GeoBackupPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.GeoBackupPolicy 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'), - 'geoBackupPolicyName': self._serialize.url("self.geo_backup_policy_name", self.geo_backup_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('GeoBackupPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}'} - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Returns a list of geo backup policies. - - :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: An iterator like instance of GeoBackupPolicy - :rtype: - ~azure.mgmt.sql.models.GeoBackupPolicyPaged[~azure.mgmt.sql.models.GeoBackupPolicy] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.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') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/instance_failover_groups_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/instance_failover_groups_operations.py deleted file mode 100644 index 795d169692a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/instance_failover_groups_operations.py +++ /dev/null @@ -1,578 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class InstanceFailoverGroupsOperations(object): - """InstanceFailoverGroupsOperations 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-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-10-01-preview" - - self.config = config - - def get( - self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a failover 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 location_name: The name of the region where the resource is - located. - :type location_name: str - :param failover_group_name: The name of the failover group. - :type failover_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: InstanceFailoverGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.InstanceFailoverGroup 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'), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('InstanceFailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'} - - - def _create_or_update_initial( - self, resource_group_name, location_name, failover_group_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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['Accept'] = 'application/json' - 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, 'InstanceFailoverGroup') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('InstanceFailoverGroup', response) - if response.status_code == 201: - deserialized = self._deserialize('InstanceFailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, location_name, failover_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a failover 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 location_name: The name of the region where the resource is - located. - :type location_name: str - :param failover_group_name: The name of the failover group. - :type failover_group_name: str - :param parameters: The failover group parameters. - :type parameters: ~azure.mgmt.sql.models.InstanceFailoverGroup - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns InstanceFailoverGroup - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstanceFailoverGroup] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstanceFailoverGroup]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - location_name=location_name, - failover_group_name=failover_group_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('InstanceFailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'} - - - def _delete_initial( - self, resource_group_name, location_name, failover_group_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'), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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 = {} - 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, header_parameters) - response = self._client.send(request, 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, location_name, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a failover 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 location_name: The name of the region where the resource is - located. - :type location_name: str - :param failover_group_name: The name of the failover group. - :type failover_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - location_name=location_name, - failover_group_name=failover_group_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'} - - def list_by_location( - self, resource_group_name, location_name, custom_headers=None, raw=False, **operation_config): - """Lists the failover groups in a location. - - :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 location_name: The name of the region where the resource is - located. - :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 InstanceFailoverGroup - :rtype: - ~azure.mgmt.sql.models.InstanceFailoverGroupPaged[~azure.mgmt.sql.models.InstanceFailoverGroup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'locationName': self._serialize.url("location_name", location_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups'} - - - def _failover_initial( - self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.failover.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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['Accept'] = 'application/json' - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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('InstanceFailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def failover( - self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Fails over from the current primary managed instance to this managed - instance. - - :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 location_name: The name of the region where the resource is - located. - :type location_name: str - :param failover_group_name: The name of the failover group. - :type failover_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns InstanceFailoverGroup - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstanceFailoverGroup] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstanceFailoverGroup]] - :raises: :class:`CloudError` - """ - raw_result = self._failover_initial( - resource_group_name=resource_group_name, - location_name=location_name, - failover_group_name=failover_group_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('InstanceFailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover'} - - - def _force_failover_allow_data_loss_initial( - self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.force_failover_allow_data_loss.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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['Accept'] = 'application/json' - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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('InstanceFailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def force_failover_allow_data_loss( - self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Fails over from the current primary managed instance to this managed - instance. This operation might result in data loss. - - :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 location_name: The name of the region where the resource is - located. - :type location_name: str - :param failover_group_name: The name of the failover group. - :type failover_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns InstanceFailoverGroup - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstanceFailoverGroup] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstanceFailoverGroup]] - :raises: :class:`CloudError` - """ - raw_result = self._force_failover_allow_data_loss_initial( - resource_group_name=resource_group_name, - location_name=location_name, - failover_group_name=failover_group_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('InstanceFailoverGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - force_failover_allow_data_loss.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_agents_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_agents_operations.py deleted file mode 100644 index eaeb4480cab..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_agents_operations.py +++ /dev/null @@ -1,481 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class JobAgentsOperations(object): - """JobAgentsOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of job agents 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 JobAgent - :rtype: - ~azure.mgmt.sql.models.JobAgentPaged[~azure.mgmt.sql.models.JobAgent] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobAgentPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents'} - - def get( - self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): - """Gets a job agent. - - :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 job_agent_name: The name of the job agent to be retrieved. - :type job_agent_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: JobAgent or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobAgent 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('JobAgent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, job_agent_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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['Accept'] = 'application/json' - 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, 'JobAgent') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('JobAgent', response) - if response.status_code == 201: - deserialized = self._deserialize('JobAgent', 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, job_agent_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a job agent. - - :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 job_agent_name: The name of the job agent to be created or - updated. - :type job_agent_name: str - :param parameters: The requested job agent resource state. - :type parameters: ~azure.mgmt.sql.models.JobAgent - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns JobAgent or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobAgent] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobAgent]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - job_agent_name=job_agent_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('JobAgent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} - - - def _delete_initial( - self, resource_group_name, server_name, job_agent_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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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 = {} - 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, header_parameters) - response = self._client.send(request, 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, job_agent_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a job agent. - - :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 job_agent_name: The name of the job agent to be deleted. - :type job_agent_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - job_agent_name=job_agent_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} - - - def _update_initial( - self, resource_group_name, server_name, job_agent_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.JobAgentUpdate(tags=tags) - - # Construct URL - url = self.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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['Accept'] = 'application/json' - 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, 'JobAgentUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('JobAgent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, job_agent_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a job agent. - - :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 job_agent_name: The name of the job agent to be updated. - :type job_agent_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns JobAgent or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobAgent] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobAgent]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - job_agent_name=job_agent_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('JobAgent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_credentials_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_credentials_operations.py deleted file mode 100644 index 309d5212b81..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_credentials_operations.py +++ /dev/null @@ -1,326 +0,0 @@ -# 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 JobCredentialsOperations(object): - """JobCredentialsOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def list_by_agent( - self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of jobs credentials. - - :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 job_agent_name: The name of the job agent. - :type job_agent_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 JobCredential - :rtype: - ~azure.mgmt.sql.models.JobCredentialPaged[~azure.mgmt.sql.models.JobCredential] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_agent.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobCredentialPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials'} - - def get( - self, resource_group_name, server_name, job_agent_name, credential_name, custom_headers=None, raw=False, **operation_config): - """Gets a jobs credential. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param credential_name: The name of the credential. - :type credential_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: JobCredential or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobCredential 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'credentialName': self._serialize.url("credential_name", credential_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('JobCredential', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}'} - - def create_or_update( - self, resource_group_name, server_name, job_agent_name, credential_name, username, password, custom_headers=None, raw=False, **operation_config): - """Creates or updates a job credential. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param credential_name: The name of the credential. - :type credential_name: str - :param username: The credential user name. - :type username: str - :param password: The credential password. - :type password: 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: JobCredential or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobCredential or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.JobCredential(username=username, password=password) - - # 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'credentialName': self._serialize.url("credential_name", credential_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['Accept'] = 'application/json' - 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, 'JobCredential') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('JobCredential', response) - if response.status_code == 201: - deserialized = self._deserialize('JobCredential', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}'} - - def delete( - self, resource_group_name, server_name, job_agent_name, credential_name, custom_headers=None, raw=False, **operation_config): - """Deletes a job credential. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param credential_name: The name of the credential. - :type credential_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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'credentialName': self._serialize.url("credential_name", credential_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 = {} - 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, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 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 - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_executions_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_executions_operations.py deleted file mode 100644 index e883a1b6187..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_executions_operations.py +++ /dev/null @@ -1,609 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class JobExecutionsOperations(object): - """JobExecutionsOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def list_by_agent( - self, resource_group_name, server_name, job_agent_name, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): - """Lists all executions in a job agent. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param create_time_min: If specified, only job executions created at - or after the specified time are included. - :type create_time_min: datetime - :param create_time_max: If specified, only job executions created - before the specified time are included. - :type create_time_max: datetime - :param end_time_min: If specified, only job executions completed at or - after the specified time are included. - :type end_time_min: datetime - :param end_time_max: If specified, only job executions completed - before the specified time are included. - :type end_time_max: datetime - :param is_active: If specified, only active or only completed job - executions are included. - :type is_active: bool - :param skip: The number of elements in the collection to skip. - :type skip: int - :param top: The number of elements to return from the collection. - :type top: int - :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 JobExecution - :rtype: - ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_agent.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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 = {} - if create_time_min is not None: - query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') - if create_time_max is not None: - query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') - if end_time_min is not None: - query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') - if end_time_max is not None: - query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') - if is_active is not None: - query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions'} - - def cancel( - self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, **operation_config): - """Requests cancellation of a job execution. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job. - :type job_name: str - :param job_execution_id: The id of the job execution to cancel. - :type job_execution_id: 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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.cancel.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, '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 = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel'} - - - def _create_initial( - self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_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['Accept'] = 'application/json' - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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('JobExecution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts an elastic job execution. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns JobExecution or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobExecution] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobExecution]] - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - server_name=server_name, - job_agent_name=job_agent_name, - job_name=job_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('JobExecution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start'} - - def list_by_job( - self, resource_group_name, server_name, job_agent_name, job_name, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): - """Lists a job's executions. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_name: str - :param create_time_min: If specified, only job executions created at - or after the specified time are included. - :type create_time_min: datetime - :param create_time_max: If specified, only job executions created - before the specified time are included. - :type create_time_max: datetime - :param end_time_min: If specified, only job executions completed at or - after the specified time are included. - :type end_time_min: datetime - :param end_time_max: If specified, only job executions completed - before the specified time are included. - :type end_time_max: datetime - :param is_active: If specified, only active or only completed job - executions are included. - :type is_active: bool - :param skip: The number of elements in the collection to skip. - :type skip: int - :param top: The number of elements to return from the collection. - :type top: int - :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 JobExecution - :rtype: - ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_job.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_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 = {} - if create_time_min is not None: - query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') - if create_time_max is not None: - query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') - if end_time_min is not None: - query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') - if end_time_max is not None: - query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') - if is_active is not None: - query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions'} - - def get( - self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, **operation_config): - """Gets a job execution. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job. - :type job_name: str - :param job_execution_id: The id of the job execution - :type job_execution_id: 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: JobExecution or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobExecution 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, '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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('JobExecution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, **operation_config): - # 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, '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['Accept'] = 'application/json' - 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.put(url, query_parameters, header_parameters) - response = self._client.send(request, 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('JobExecution', response) - if response.status_code == 201: - deserialized = self._deserialize('JobExecution', 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, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updatess a job execution. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_name: str - :param job_execution_id: The job execution id to create the job - execution under. - :type job_execution_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns JobExecution or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobExecution] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobExecution]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - job_agent_name=job_agent_name, - job_name=job_name, - job_execution_id=job_execution_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('JobExecution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_step_executions_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_step_executions_operations.py deleted file mode 100644 index 92c6442fc7e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_step_executions_operations.py +++ /dev/null @@ -1,228 +0,0 @@ -# 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 JobStepExecutionsOperations(object): - """JobStepExecutionsOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def list_by_job_execution( - self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): - """Lists the step executions of a job execution. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_name: str - :param job_execution_id: The id of the job execution - :type job_execution_id: str - :param create_time_min: If specified, only job executions created at - or after the specified time are included. - :type create_time_min: datetime - :param create_time_max: If specified, only job executions created - before the specified time are included. - :type create_time_max: datetime - :param end_time_min: If specified, only job executions completed at or - after the specified time are included. - :type end_time_min: datetime - :param end_time_max: If specified, only job executions completed - before the specified time are included. - :type end_time_max: datetime - :param is_active: If specified, only active or only completed job - executions are included. - :type is_active: bool - :param skip: The number of elements in the collection to skip. - :type skip: int - :param top: The number of elements to return from the collection. - :type top: int - :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 JobExecution - :rtype: - ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_job_execution.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, '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 = {} - if create_time_min is not None: - query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') - if create_time_max is not None: - query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') - if end_time_min is not None: - query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') - if end_time_max is not None: - query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') - if is_active is not None: - query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps'} - - def get( - self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers=None, raw=False, **operation_config): - """Gets a step execution of a job execution. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_name: str - :param job_execution_id: The unique id of the job execution - :type job_execution_id: str - :param step_name: The name of the step. - :type step_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: JobExecution or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobExecution 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), - 'stepName': self._serialize.url("step_name", step_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('JobExecution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_steps_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_steps_operations.py deleted file mode 100644 index a37bfc3f447..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_steps_operations.py +++ /dev/null @@ -1,492 +0,0 @@ -# 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 JobStepsOperations(object): - """JobStepsOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def list_by_version( - self, resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers=None, raw=False, **operation_config): - """Gets all job steps in the specified job version. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_name: str - :param job_version: The version of the job to get. - :type job_version: int - :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 JobStep - :rtype: - ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_version.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'jobVersion': self._serialize.url("job_version", job_version, 'int'), - '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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobStepPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps'} - - def get_by_version( - self, resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers=None, raw=False, **operation_config): - """Gets the specified version of a job step. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job. - :type job_name: str - :param job_version: The version of the job to get. - :type job_version: int - :param step_name: The name of the job step. - :type step_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: JobStep or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobStep or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_by_version.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'jobVersion': self._serialize.url("job_version", job_version, 'int'), - 'stepName': self._serialize.url("step_name", step_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('JobStep', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}'} - - def list_by_job( - self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): - """Gets all job steps for a job's current version. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_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 JobStep - :rtype: - ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_job.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobStepPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps'} - - def get( - self, resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers=None, raw=False, **operation_config): - """Gets a job step in a job's current version. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job. - :type job_name: str - :param step_name: The name of the job step. - :type step_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: JobStep or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobStep 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'stepName': self._serialize.url("step_name", step_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('JobStep', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'} - - def create_or_update( - self, resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates a job step. This will implicitly create a new job - version. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job. - :type job_name: str - :param step_name: The name of the job step. - :type step_name: str - :param parameters: The requested state of the job step. - :type parameters: ~azure.mgmt.sql.models.JobStep - :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: JobStep or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobStep or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'stepName': self._serialize.url("step_name", step_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['Accept'] = 'application/json' - 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, 'JobStep') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('JobStep', response) - if response.status_code == 201: - deserialized = self._deserialize('JobStep', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'} - - def delete( - self, resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers=None, raw=False, **operation_config): - """Deletes a job step. This will implicitly create a new job version. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job. - :type job_name: str - :param step_name: The name of the job step to delete. - :type step_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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'stepName': self._serialize.url("step_name", step_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 = {} - 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, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 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 - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_target_executions_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_target_executions_operations.py deleted file mode 100644 index 6c664709c06..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_target_executions_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# 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 JobTargetExecutionsOperations(object): - """JobTargetExecutionsOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def list_by_job_execution( - self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): - """Lists target executions for all steps of a job execution. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_name: str - :param job_execution_id: The id of the job execution - :type job_execution_id: str - :param create_time_min: If specified, only job executions created at - or after the specified time are included. - :type create_time_min: datetime - :param create_time_max: If specified, only job executions created - before the specified time are included. - :type create_time_max: datetime - :param end_time_min: If specified, only job executions completed at or - after the specified time are included. - :type end_time_min: datetime - :param end_time_max: If specified, only job executions completed - before the specified time are included. - :type end_time_max: datetime - :param is_active: If specified, only active or only completed job - executions are included. - :type is_active: bool - :param skip: The number of elements in the collection to skip. - :type skip: int - :param top: The number of elements to return from the collection. - :type top: int - :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 JobExecution - :rtype: - ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_job_execution.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, '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 = {} - if create_time_min is not None: - query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') - if create_time_max is not None: - query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') - if end_time_min is not None: - query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') - if end_time_max is not None: - query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') - if is_active is not None: - query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets'} - - def list_by_step( - self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): - """Lists the target executions of a job step execution. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_name: str - :param job_execution_id: The id of the job execution - :type job_execution_id: str - :param step_name: The name of the step. - :type step_name: str - :param create_time_min: If specified, only job executions created at - or after the specified time are included. - :type create_time_min: datetime - :param create_time_max: If specified, only job executions created - before the specified time are included. - :type create_time_max: datetime - :param end_time_min: If specified, only job executions completed at or - after the specified time are included. - :type end_time_min: datetime - :param end_time_max: If specified, only job executions completed - before the specified time are included. - :type end_time_max: datetime - :param is_active: If specified, only active or only completed job - executions are included. - :type is_active: bool - :param skip: The number of elements in the collection to skip. - :type skip: int - :param top: The number of elements to return from the collection. - :type top: int - :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 JobExecution - :rtype: - ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_step.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), - 'stepName': self._serialize.url("step_name", step_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 = {} - if create_time_min is not None: - query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') - if create_time_max is not None: - query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') - if end_time_min is not None: - query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') - if end_time_max is not None: - query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') - if is_active is not None: - query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_step.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets'} - - def get( - self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, target_id, custom_headers=None, raw=False, **operation_config): - """Gets a target execution. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_name: str - :param job_execution_id: The unique id of the job execution - :type job_execution_id: str - :param step_name: The name of the step. - :type step_name: str - :param target_id: The target id. - :type target_id: 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: JobExecution or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobExecution 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), - 'stepName': self._serialize.url("step_name", step_name, 'str'), - 'targetId': self._serialize.url("target_id", target_id, '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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('JobExecution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_target_groups_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_target_groups_operations.py deleted file mode 100644 index 6a8bf6eed34..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_target_groups_operations.py +++ /dev/null @@ -1,324 +0,0 @@ -# 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 JobTargetGroupsOperations(object): - """JobTargetGroupsOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def list_by_agent( - self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): - """Gets all target groups in an agent. - - :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 job_agent_name: The name of the job agent. - :type job_agent_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 JobTargetGroup - :rtype: - ~azure.mgmt.sql.models.JobTargetGroupPaged[~azure.mgmt.sql.models.JobTargetGroup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_agent.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups'} - - def get( - self, resource_group_name, server_name, job_agent_name, target_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a target 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 server_name: The name of the server. - :type server_name: str - :param job_agent_name: The name of the job agent. - :type job_agent_name: str - :param target_group_name: The name of the target group. - :type target_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: JobTargetGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobTargetGroup 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'targetGroupName': self._serialize.url("target_group_name", target_group_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('JobTargetGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}'} - - def create_or_update( - self, resource_group_name, server_name, job_agent_name, target_group_name, members, custom_headers=None, raw=False, **operation_config): - """Creates or updates a target 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 server_name: The name of the server. - :type server_name: str - :param job_agent_name: The name of the job agent. - :type job_agent_name: str - :param target_group_name: The name of the target group. - :type target_group_name: str - :param members: Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - :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: JobTargetGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobTargetGroup or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.JobTargetGroup(members=members) - - # 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'targetGroupName': self._serialize.url("target_group_name", target_group_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['Accept'] = 'application/json' - 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, 'JobTargetGroup') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('JobTargetGroup', response) - if response.status_code == 201: - deserialized = self._deserialize('JobTargetGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}'} - - def delete( - self, resource_group_name, server_name, job_agent_name, target_group_name, custom_headers=None, raw=False, **operation_config): - """Deletes a target 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 server_name: The name of the server. - :type server_name: str - :param job_agent_name: The name of the job agent. - :type job_agent_name: str - :param target_group_name: The name of the target group. - :type target_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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'targetGroupName': self._serialize.url("target_group_name", target_group_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 = {} - 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, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 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 - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_versions_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_versions_operations.py deleted file mode 100644 index d03635534ff..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/job_versions_operations.py +++ /dev/null @@ -1,189 +0,0 @@ -# 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 JobVersionsOperations(object): - """JobVersionsOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def list_by_job( - self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): - """Gets all versions of a job. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_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 JobVersion - :rtype: - ~azure.mgmt.sql.models.JobVersionPaged[~azure.mgmt.sql.models.JobVersion] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_job.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobVersionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions'} - - def get( - self, resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers=None, raw=False, **operation_config): - """Gets a job version. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job. - :type job_name: str - :param job_version: The version of the job to get. - :type job_version: int - :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: JobVersion or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.JobVersion 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str'), - 'jobVersion': self._serialize.url("job_version", job_version, 'int'), - '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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('JobVersion', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/jobs_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/jobs_operations.py deleted file mode 100644 index 2545fc1514e..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/jobs_operations.py +++ /dev/null @@ -1,325 +0,0 @@ -# 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 JobsOperations(object): - """JobsOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def list_by_agent( - self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of jobs. - - :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 job_agent_name: The name of the job agent. - :type job_agent_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 Job - :rtype: ~azure.mgmt.sql.models.JobPaged[~azure.mgmt.sql.models.Job] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_agent.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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.JobPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs'} - - def get( - self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): - """Gets a job. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_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: Job or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.Job 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('Job', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}'} - - def create_or_update( - self, resource_group_name, server_name, job_agent_name, job_name, description="", schedule=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a job. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to get. - :type job_name: str - :param description: User-defined description of the job. - :type description: str - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - :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: Job or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.Job or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.Job(description=description, schedule=schedule) - - # 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_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['Accept'] = 'application/json' - 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, 'Job') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('Job', response) - if response.status_code == 201: - deserialized = self._deserialize('Job', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}'} - - def delete( - self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): - """Deletes a job. - - :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 job_agent_name: The name of the job agent. - :type job_agent_name: str - :param job_name: The name of the job to delete. - :type job_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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), - 'jobName': self._serialize.url("job_name", job_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 = {} - 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, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 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 - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/long_term_retention_backups_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/long_term_retention_backups_operations.py deleted file mode 100644 index 53882edcb02..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/long_term_retention_backups_operations.py +++ /dev/null @@ -1,441 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class LongTermRetentionBackupsOperations(object): - """LongTermRetentionBackupsOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - """Gets a long term retention backup. - - :param location_name: The location of the database. - :type location_name: str - :param long_term_retention_server_name: - :type long_term_retention_server_name: str - :param long_term_retention_database_name: - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('LongTermRetentionBackup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - - def _delete_initial( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_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 = {} - 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, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a long term retention backup. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: - :type long_term_retention_server_name: str - :param long_term_retention_database_name: - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - location_name=location_name, - long_term_retention_server_name=long_term_retention_server_name, - long_term_retention_database_name=long_term_retention_database_name, - backup_name=backup_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - def list_by_database( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists all long term retention backups for a database. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: - :type long_term_retention_server_name: str - :param long_term_retention_database_name: - :type long_term_retention_database_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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 LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_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 = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} - - def list_by_location( - self, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given location. - - :param location_name: The location of the database - :type location_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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 LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_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 = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} - - def list_by_server( - self, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given server. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: - :type long_term_retention_server_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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 LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :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 = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_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 = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_backup_short_term_retention_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_backup_short_term_retention_policies_operations.py deleted file mode 100644 index 8f50f44b535..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_backup_short_term_retention_policies_operations.py +++ /dev/null @@ -1,409 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedBackupShortTermRetentionPoliciesOperations(object): - """ManagedBackupShortTermRetentionPoliciesOperations 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 policy_name: The policy name. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.policy_name = "default" - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed database's short term retention policy. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_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: ManagedBackupShortTermRetentionPolicy or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy - 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'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'policyName': self._serialize.url("self.policy_name", self.policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ManagedBackupShortTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} - - - def _create_or_update_initial( - self, resource_group_name, managed_instance_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedBackupShortTermRetentionPolicy(retention_days=retention_days) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'policyName': self._serialize.url("self.policy_name", self.policy_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['Accept'] = 'application/json' - 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, 'ManagedBackupShortTermRetentionPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ManagedBackupShortTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, managed_instance_name, database_name, retention_days=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a managed database's short term retention policy. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database. - :type database_name: str - :param retention_days: The backup retention period in days. This is - how many days Point-in-Time Restore will be supported. - :type retention_days: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ManagedBackupShortTermRetentionPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - database_name=database_name, - retention_days=retention_days, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} - - - def _update_initial( - self, resource_group_name, managed_instance_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedBackupShortTermRetentionPolicy(retention_days=retention_days) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'policyName': self._serialize.url("self.policy_name", self.policy_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['Accept'] = 'application/json' - 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, 'ManagedBackupShortTermRetentionPolicy') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ManagedBackupShortTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, managed_instance_name, database_name, retention_days=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a managed database's short term retention policy. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database. - :type database_name: str - :param retention_days: The backup retention period in days. This is - how many days Point-in-Time Restore will be supported. - :type retention_days: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ManagedBackupShortTermRetentionPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - database_name=database_name, - retention_days=retention_days, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} - - def list_by_database( - self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed database's short term retention policy list. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_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: An iterator like instance of - ManagedBackupShortTermRetentionPolicy - :rtype: - ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py deleted file mode 100644 index bf5121b3707..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py +++ /dev/null @@ -1,281 +0,0 @@ -# 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 ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): - """ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations 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 vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.vulnerability_assessment_name = "default" - self.api_version = "2017-10-01-preview" - - self.config = config - - def get( - self, resource_group_name, managed_instance_name, database_name, rule_id, baseline_name, custom_headers=None, raw=False, **operation_config): - """Gets a database's vulnerability assessment rule baseline. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database for which the - vulnerability assessment rule baseline is defined. - :type database_name: str - :param rule_id: The vulnerability assessment rule ID. - :type rule_id: str - :param baseline_name: The name of the vulnerability assessment rule - baseline (default implies a baseline on a database level rule and - master for server level rule). Possible values include: 'master', - 'default' - :type baseline_name: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentPolicyBaselineName - :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: DatabaseVulnerabilityAssessmentRuleBaseline or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaseline 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'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), - 'baselineName': self._serialize.url("baseline_name", baseline_name, 'VulnerabilityAssessmentPolicyBaselineName'), - '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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('DatabaseVulnerabilityAssessmentRuleBaseline', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} - - def create_or_update( - self, resource_group_name, managed_instance_name, database_name, rule_id, baseline_name, baseline_results, custom_headers=None, raw=False, **operation_config): - """Creates or updates a database's vulnerability assessment rule baseline. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database for which the - vulnerability assessment rule baseline is defined. - :type database_name: str - :param rule_id: The vulnerability assessment rule ID. - :type rule_id: str - :param baseline_name: The name of the vulnerability assessment rule - baseline (default implies a baseline on a database level rule and - master for server level rule). Possible values include: 'master', - 'default' - :type baseline_name: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentPolicyBaselineName - :param baseline_results: The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - :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: DatabaseVulnerabilityAssessmentRuleBaseline or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaseline or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.DatabaseVulnerabilityAssessmentRuleBaseline(baseline_results=baseline_results) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), - 'baselineName': self._serialize.url("baseline_name", baseline_name, 'VulnerabilityAssessmentPolicyBaselineName'), - '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['Accept'] = 'application/json' - 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, 'DatabaseVulnerabilityAssessmentRuleBaseline') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('DatabaseVulnerabilityAssessmentRuleBaseline', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} - - def delete( - self, resource_group_name, managed_instance_name, database_name, rule_id, baseline_name, custom_headers=None, raw=False, **operation_config): - """Removes the database's vulnerability assessment rule baseline. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database for which the - vulnerability assessment rule baseline is defined. - :type database_name: str - :param rule_id: The vulnerability assessment rule ID. - :type rule_id: str - :param baseline_name: The name of the vulnerability assessment rule - baseline (default implies a baseline on a database level rule and - master for server level rule). Possible values include: 'master', - 'default' - :type baseline_name: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentPolicyBaselineName - :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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), - 'baselineName': self._serialize.url("baseline_name", baseline_name, 'VulnerabilityAssessmentPolicyBaselineName'), - '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 = {} - 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, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_database_vulnerability_assessment_scans_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_database_vulnerability_assessment_scans_operations.py deleted file mode 100644 index d45dc1beb3b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_database_vulnerability_assessment_scans_operations.py +++ /dev/null @@ -1,359 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedDatabaseVulnerabilityAssessmentScansOperations(object): - """ManagedDatabaseVulnerabilityAssessmentScansOperations 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 vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.vulnerability_assessment_name = "default" - self.api_version = "2017-10-01-preview" - - self.config = config - - def list_by_database( - self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, **operation_config): - """Lists the vulnerability assessment scans of 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 managed_instance_name: The name of the managed instance. - :type managed_instance_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: An iterator like instance of - VulnerabilityAssessmentScanRecord - :rtype: - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} - - def get( - self, resource_group_name, managed_instance_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): - """Gets a vulnerability assessment scan record of 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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database. - :type database_name: str - :param scan_id: The vulnerability assessment scan Id of the scan to - retrieve. - :type scan_id: 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: VulnerabilityAssessmentScanRecord or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord 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'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'scanId': self._serialize.url("scan_id", scan_id, '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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('VulnerabilityAssessmentScanRecord', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}'} - - - def _initiate_scan_initial( - self, resource_group_name, managed_instance_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.initiate_scan.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'scanId': self._serialize.url("scan_id", scan_id, '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 = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def initiate_scan( - self, resource_group_name, managed_instance_name, database_name, scan_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Executes a Vulnerability Assessment database scan. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database. - :type database_name: str - :param scan_id: The vulnerability assessment scan Id of the scan to - retrieve. - :type scan_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._initiate_scan_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - database_name=database_name, - scan_id=scan_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - initiate_scan.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan'} - - def export( - self, resource_group_name, managed_instance_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): - """Convert an existing scan result to a human readable format. If already - exists nothing happens. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the scanned database. - :type database_name: str - :param scan_id: The vulnerability assessment scan Id. - :type scan_id: 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: DatabaseVulnerabilityAssessmentScansExport or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentScansExport or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.export.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), - 'scanId': self._serialize.url("scan_id", scan_id, '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['Accept'] = 'application/json' - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('DatabaseVulnerabilityAssessmentScansExport', response) - if response.status_code == 201: - deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - export.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_database_vulnerability_assessments_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_database_vulnerability_assessments_operations.py deleted file mode 100644 index 6c224244c8f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_database_vulnerability_assessments_operations.py +++ /dev/null @@ -1,325 +0,0 @@ -# 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 ManagedDatabaseVulnerabilityAssessmentsOperations(object): - """ManagedDatabaseVulnerabilityAssessmentsOperations 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 vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.vulnerability_assessment_name = "default" - self.api_version = "2017-10-01-preview" - - self.config = config - - def get( - self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets the database's vulnerability assessment. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database for which the - vulnerability assessment is defined. - :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: DatabaseVulnerabilityAssessment or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment 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'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('DatabaseVulnerabilityAssessment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} - - def create_or_update( - self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates the database's vulnerability assessment. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database for which the - vulnerability assessment is defined. - :type database_name: str - :param parameters: The requested resource. - :type parameters: - ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment - :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: DatabaseVulnerabilityAssessment or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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['Accept'] = 'application/json' - 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, 'DatabaseVulnerabilityAssessment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('DatabaseVulnerabilityAssessment', response) - if response.status_code == 201: - deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} - - def delete( - self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, **operation_config): - """Removes the database's vulnerability assessment. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database for which the - vulnerability assessment is defined. - :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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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 = {} - 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, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} - - def list_by_database( - self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, **operation_config): - """Lists the vulnerability assessments of a managed 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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database for which the - vulnerability assessment is defined. - :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: An iterator like instance of DatabaseVulnerabilityAssessment - :rtype: - ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_databases_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_databases_operations.py deleted file mode 100644 index 8761e7adbc8..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_databases_operations.py +++ /dev/null @@ -1,568 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedDatabasesOperations(object): - """ManagedDatabasesOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - - def _complete_restore_initial( - self, location_name, operation_id, last_backup_name, custom_headers=None, raw=False, **operation_config): - parameters = models.CompleteDatabaseRestoreDefinition(last_backup_name=last_backup_name) - - # Construct URL - url = self.complete_restore.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, '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 body - body_content = self._serialize.body(parameters, 'CompleteDatabaseRestoreDefinition') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def complete_restore( - self, location_name, operation_id, last_backup_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Completes the restore operation on a managed database. - - :param location_name: The name of the region where the resource is - located. - :type location_name: str - :param operation_id: Management operation id that this request tries - to complete. - :type operation_id: str - :param last_backup_name: The last backup name to apply - :type last_backup_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._complete_restore_initial( - location_name=location_name, - operation_id=operation_id, - last_backup_name=last_backup_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - complete_restore.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseRestoreAzureAsyncOperation/{operationId}/completeRestore'} - - def list_by_instance( - self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed databases. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_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 ManagedDatabase - :rtype: - ~azure.mgmt.sql.models.ManagedDatabasePaged[~azure.mgmt.sql.models.ManagedDatabase] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_instance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases'} - - def get( - self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed 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 managed_instance_name: The name of the managed instance. - :type managed_instance_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: ManagedDatabase or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ManagedDatabase 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'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ManagedDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} - - - def _create_or_update_initial( - self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, 'ManagedDatabase') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ManagedDatabase', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database. - :type database_name: str - :param parameters: The requested database resource state. - :type parameters: ~azure.mgmt.sql.models.ManagedDatabase - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedDatabase or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedDatabase] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedDatabase]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - database_name=database_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} - - - def _delete_initial( - self, resource_group_name, managed_instance_name, database_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'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_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 = {} - 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, header_parameters) - response = self._client.send(request, 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, managed_instance_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the managed 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 managed_instance_name: The name of the managed instance. - :type managed_instance_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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} - - - def _update_initial( - self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, 'ManagedDatabaseUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ManagedDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param database_name: The name of the database. - :type database_name: str - :param parameters: The requested database resource state. - :type parameters: ~azure.mgmt.sql.models.ManagedDatabaseUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedDatabase or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedDatabase] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedDatabase]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - database_name=database_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instance_encryption_protectors_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instance_encryption_protectors_operations.py deleted file mode 100644 index 61ab8baa5d3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instance_encryption_protectors_operations.py +++ /dev/null @@ -1,292 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedInstanceEncryptionProtectorsOperations(object): - """ManagedInstanceEncryptionProtectorsOperations 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-10-01-preview". - :ivar encryption_protector_name: The name of the encryption protector to be retrieved. Constant value: "current". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-10-01-preview" - self.encryption_protector_name = "current" - - self.config = config - - def list_by_instance( - self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed instance encryption protectors. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_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 - ManagedInstanceEncryptionProtector - :rtype: - ~azure.mgmt.sql.models.ManagedInstanceEncryptionProtectorPaged[~azure.mgmt.sql.models.ManagedInstanceEncryptionProtector] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_instance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector'} - - def get( - self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed instance encryption protector. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_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: ManagedInstanceEncryptionProtector or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.ManagedInstanceEncryptionProtector 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'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'encryptionProtectorName': self._serialize.url("self.encryption_protector_name", self.encryption_protector_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ManagedInstanceEncryptionProtector', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}'} - - - def _create_or_update_initial( - self, resource_group_name, managed_instance_name, server_key_type, server_key_name=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedInstanceEncryptionProtector(server_key_name=server_key_name, server_key_type=server_key_type) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'encryptionProtectorName': self._serialize.url("self.encryption_protector_name", self.encryption_protector_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['Accept'] = 'application/json' - 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, 'ManagedInstanceEncryptionProtector') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ManagedInstanceEncryptionProtector', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, managed_instance_name, server_key_type, server_key_name=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates an existing encryption protector. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param server_key_type: The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ManagedInstanceEncryptionProtector or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstanceEncryptionProtector] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstanceEncryptionProtector]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - server_key_type=server_key_type, - server_key_name=server_key_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedInstanceEncryptionProtector', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instance_keys_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instance_keys_operations.py deleted file mode 100644 index adb5c4bfa0f..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instance_keys_operations.py +++ /dev/null @@ -1,386 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedInstanceKeysOperations(object): - """ManagedInstanceKeysOperations 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-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-10-01-preview" - - self.config = config - - def list_by_instance( - self, resource_group_name, managed_instance_name, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed instance keys. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param filter: An OData filter expression that filters elements in the - collection. - :type filter: 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 ManagedInstanceKey - :rtype: - ~azure.mgmt.sql.models.ManagedInstanceKeyPaged[~azure.mgmt.sql.models.ManagedInstanceKey] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_instance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys'} - - def get( - self, resource_group_name, managed_instance_name, key_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed instance key. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param key_name: The name of the managed instance key to be retrieved. - :type key_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: ManagedInstanceKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ManagedInstanceKey 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'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'keyName': self._serialize.url("key_name", key_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ManagedInstanceKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}'} - - - def _create_or_update_initial( - self, resource_group_name, managed_instance_name, key_name, server_key_type, uri=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedInstanceKey(server_key_type=server_key_type, uri=uri) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'keyName': self._serialize.url("key_name", key_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['Accept'] = 'application/json' - 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, 'ManagedInstanceKey') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ManagedInstanceKey', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedInstanceKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, managed_instance_name, key_name, server_key_type, uri=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed instance key. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param key_name: The name of the managed instance key to be operated - on (updated or created). - :type key_name: str - :param server_key_type: The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedInstanceKey or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstanceKey] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstanceKey]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - key_name=key_name, - server_key_type=server_key_type, - uri=uri, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedInstanceKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}'} - - - def _delete_initial( - self, resource_group_name, managed_instance_name, key_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'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'keyName': self._serialize.url("key_name", key_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 = {} - 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, header_parameters) - response = self._client.send(request, 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, managed_instance_name, key_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the managed instance key 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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param key_name: The name of the managed instance key to be deleted. - :type key_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - key_name=key_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instance_tde_certificates_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instance_tde_certificates_operations.py deleted file mode 100644 index be4ee1969fd..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instance_tde_certificates_operations.py +++ /dev/null @@ -1,133 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedInstanceTdeCertificatesOperations(object): - """ManagedInstanceTdeCertificatesOperations 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-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-10-01-preview" - - self.config = config - - - def _create_initial( - self, resource_group_name, managed_instance_name, private_blob, cert_password=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TdeCertificate(private_blob=private_blob, cert_password=cert_password) - - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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 body - body_content = self._serialize.body(parameters, 'TdeCertificate') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def create( - self, resource_group_name, managed_instance_name, private_blob, cert_password=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a TDE certificate for 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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param private_blob: The base64 encoded certificate private blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - private_blob=private_blob, - cert_password=cert_password, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instances_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instances_operations.py deleted file mode 100644 index 1fee247c7c9..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/managed_instances_operations.py +++ /dev/null @@ -1,524 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedInstancesOperations(object): - """ManagedInstancesOperations 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: "2015-05-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of all managed instances in the 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 ManagedInstance - :rtype: - ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed instances in a 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 ManagedInstance - :rtype: - ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] - :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 = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedInstancePaged(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.Sql/managedInstances'} - - def get( - self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed instance. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_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: ManagedInstance or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ManagedInstance 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'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ManagedInstance', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} - - - def _create_or_update_initial( - self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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['Accept'] = 'application/json' - 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, 'ManagedInstance') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ManagedInstance', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedInstance', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed instance. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param parameters: The requested managed instance resource state. - :type parameters: ~azure.mgmt.sql.models.ManagedInstance - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedInstance or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstance] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstance]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedInstance', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} - - - def _delete_initial( - self, resource_group_name, managed_instance_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'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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 = {} - 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, header_parameters) - response = self._client.send(request, 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, managed_instance_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed instance. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} - - - def _update_initial( - self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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['Accept'] = 'application/json' - 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, 'ManagedInstanceUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ManagedInstance', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a managed instance. - - :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 managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param parameters: The requested managed instance resource state. - :type parameters: ~azure.mgmt.sql.models.ManagedInstanceUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedInstance or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstance] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstance]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedInstance', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/operations.py deleted file mode 100644 index 5f8f397a39b..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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: "2015-05-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available SQL 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: An iterator like instance of Operation - :rtype: - ~azure.mgmt.sql.models.OperationPaged[~azure.mgmt.sql.models.Operation] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # 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') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Sql/operations'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/recommended_elastic_pools_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/recommended_elastic_pools_operations.py deleted file mode 100644 index c6d80bad021..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/recommended_elastic_pools_operations.py +++ /dev/null @@ -1,254 +0,0 @@ -# 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 RecommendedElasticPoolsOperations(object): - """RecommendedElasticPoolsOperations 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - def get( - self, resource_group_name, server_name, recommended_elastic_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets a recommented elastic pool. - - :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 recommended_elastic_pool_name: The name of the recommended - elastic pool to be retrieved. - :type recommended_elastic_pool_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: RecommendedElasticPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.RecommendedElasticPool 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'), - 'recommendedElasticPoolName': self._serialize.url("recommended_elastic_pool_name", recommended_elastic_pool_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('RecommendedElasticPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Returns recommended elastic pools. - - :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 RecommendedElasticPool - :rtype: - ~azure.mgmt.sql.models.RecommendedElasticPoolPaged[~azure.mgmt.sql.models.RecommendedElasticPool] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools'} - - def list_metrics( - self, resource_group_name, server_name, recommended_elastic_pool_name, custom_headers=None, raw=False, **operation_config): - """Returns recommented elastic pool metrics. - - :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 recommended_elastic_pool_name: The name of the recommended - elastic pool to be retrieved. - :type recommended_elastic_pool_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 RecommendedElasticPoolMetric - :rtype: - ~azure.mgmt.sql.models.RecommendedElasticPoolMetricPaged[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_metrics.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'), - 'recommendedElasticPoolName': self._serialize.url("recommended_elastic_pool_name", recommended_elastic_pool_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/metrics'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/recoverable_databases_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/recoverable_databases_operations.py deleted file mode 100644 index 87b5873c561..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/recoverable_databases_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# 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 RecoverableDatabasesOperations(object): - """RecoverableDatabasesOperations 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a recoverable database, which is a resource representing a - database's geo backup. - - :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: RecoverableDatabase or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.RecoverableDatabase 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('RecoverableDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of recoverable databases. - - :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 RecoverableDatabase - :rtype: - ~azure.mgmt.sql.models.RecoverableDatabasePaged[~azure.mgmt.sql.models.RecoverableDatabase] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/replication_links_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/replication_links_operations.py deleted file mode 100644 index d3d3cee8762..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/replication_links_operations.py +++ /dev/null @@ -1,429 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ReplicationLinksOperations(object): - """ReplicationLinksOperations 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - def delete( - self, resource_group_name, server_name, database_name, link_id, custom_headers=None, raw=False, **operation_config): - """Deletes a database replication link. Cannot be done during failover. - - :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 that has the - replication link to be dropped. - :type database_name: str - :param link_id: The ID of the replication link to be deleted. - :type link_id: 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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'linkId': self._serialize.url("link_id", link_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 = {} - 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, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 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 - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}'} - - def get( - self, resource_group_name, server_name, database_name, link_id, custom_headers=None, raw=False, **operation_config): - """Gets a database replication link. - - :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 to get the link for. - :type database_name: str - :param link_id: The replication link ID to be retrieved. - :type link_id: 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: ReplicationLink or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ReplicationLink 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'), - 'linkId': self._serialize.url("link_id", link_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ReplicationLink', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}'} - - - def _failover_initial( - self, resource_group_name, server_name, database_name, link_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.failover.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'), - 'linkId': self._serialize.url("link_id", link_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 = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [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 failover( - self, resource_group_name, server_name, database_name, link_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Sets which replica database is primary by failing over from the current - primary replica 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 that has the - replication link to be failed over. - :type database_name: str - :param link_id: The ID of the replication link to be failed over. - :type link_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._failover_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - link_id=link_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover'} - - - def _failover_allow_data_loss_initial( - self, resource_group_name, server_name, database_name, link_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.failover_allow_data_loss.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'), - 'linkId': self._serialize.url("link_id", link_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 = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [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 failover_allow_data_loss( - self, resource_group_name, server_name, database_name, link_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Sets which replica database is primary by failing over from the current - primary replica database. This operation might result in data loss. - - :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 that has the - replication link to be failed over. - :type database_name: str - :param link_id: The ID of the replication link to be failed over. - :type link_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._failover_allow_data_loss_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - link_id=link_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - failover_allow_data_loss.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss'} - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Lists a database's replication links. - - :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 to retrieve links for. - :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: An iterator like instance of ReplicationLink - :rtype: - ~azure.mgmt.sql.models.ReplicationLinkPaged[~azure.mgmt.sql.models.ReplicationLink] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.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') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/restorable_dropped_databases_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/restorable_dropped_databases_operations.py deleted file mode 100644 index 0dfb4989691..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/restorable_dropped_databases_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# 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 RestorableDroppedDatabasesOperations(object): - """RestorableDroppedDatabasesOperations 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - def get( - self, resource_group_name, server_name, restorable_droppeded_database_id, custom_headers=None, raw=False, **operation_config): - """Gets a deleted database that can be restored. - - :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 restorable_droppeded_database_id: The id of the deleted - database in the form of databaseName,deletionTimeInFileTimeFormat - :type restorable_droppeded_database_id: 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: RestorableDroppedDatabase or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.RestorableDroppedDatabase 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'), - 'restorableDroppededDatabaseId': self._serialize.url("restorable_droppeded_database_id", restorable_droppeded_database_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('RestorableDroppedDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppededDatabaseId}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of deleted databases that can be restored. - - :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 RestorableDroppedDatabase - :rtype: - ~azure.mgmt.sql.models.RestorableDroppedDatabasePaged[~azure.mgmt.sql.models.RestorableDroppedDatabase] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/restore_points_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/restore_points_operations.py deleted file mode 100644 index e5b49d9d1ed..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/restore_points_operations.py +++ /dev/null @@ -1,356 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class RestorePointsOperations(object): - """RestorePointsOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of database restore points. - - :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: An iterator like instance of RestorePoint - :rtype: - ~azure.mgmt.sql.models.RestorePointPaged[~azure.mgmt.sql.models.RestorePoint] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.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'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.RestorePointPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RestorePointPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints'} - - - def _create_initial( - self, resource_group_name, server_name, database_name, restore_point_label, custom_headers=None, raw=False, **operation_config): - parameters = models.CreateDatabaseRestorePointDefinition(restore_point_label=restore_point_label) - - # Construct URL - url = self.create.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'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, 'CreateDatabaseRestorePointDefinition') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('RestorePoint', response) - if response.status_code == 201: - deserialized = self._deserialize('RestorePoint', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, server_name, database_name, restore_point_label, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a restore point for a data warehouse. - - :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 restore_point_label: The restore point label to apply - :type restore_point_label: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RestorePoint or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.RestorePoint] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.RestorePoint]] - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - restore_point_label=restore_point_label, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RestorePoint', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints'} - - def get( - self, resource_group_name, server_name, database_name, restore_point_name, custom_headers=None, raw=False, **operation_config): - """Gets a restore point. - - :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 restore_point_name: The name of the restore point. - :type restore_point_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: RestorePoint or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.RestorePoint 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'restorePointName': self._serialize.url("restore_point_name", restore_point_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('RestorePoint', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}'} - - def delete( - self, resource_group_name, server_name, database_name, restore_point_name, custom_headers=None, raw=False, **operation_config): - """Deletes a restore point. - - :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 restore_point_name: The name of the restore point. - :type restore_point_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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'restorePointName': self._serialize.url("restore_point_name", restore_point_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 = {} - 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, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_automatic_tuning_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_automatic_tuning_operations.py deleted file mode 100644 index 675d886377c..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_automatic_tuning_operations.py +++ /dev/null @@ -1,179 +0,0 @@ -# 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 ServerAutomaticTuningOperations(object): - """ServerAutomaticTuningOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Retrieves server automatic tuning options. - - :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: ServerAutomaticTuning or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServerAutomaticTuning 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') - } - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServerAutomaticTuning', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current'} - - def update( - self, resource_group_name, server_name, desired_state=None, options=None, custom_headers=None, raw=False, **operation_config): - """Update automatic tuning options on 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 desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - :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: ServerAutomaticTuning or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServerAutomaticTuning or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.ServerAutomaticTuning(desired_state=desired_state, options=options) - - # Construct URL - url = self.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') - } - 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['Accept'] = 'application/json' - 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, 'ServerAutomaticTuning') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ServerAutomaticTuning', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_azure_ad_administrators_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_azure_ad_administrators_operations.py deleted file mode 100644 index c7a66d57ea0..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_azure_ad_administrators_operations.py +++ /dev/null @@ -1,390 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerAzureADAdministratorsOperations(object): - """ServerAzureADAdministratorsOperations 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: "2014-04-01". - :ivar administrator_name: Name of the server administrator resource. Constant value: "activeDirectory". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - self.administrator_name = "activeDirectory" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, properties, custom_headers=None, raw=False, **operation_config): - # 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'), - 'administratorName': self._serialize.url("self.administrator_name", self.administrator_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['Accept'] = 'application/json' - 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(properties, 'ServerAzureADAdministrator') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ServerAzureADAdministrator', response) - if response.status_code == 201: - deserialized = self._deserialize('ServerAzureADAdministrator', response) - if response.status_code == 202: - deserialized = self._deserialize('ServerAzureADAdministrator', 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, properties, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new Server Active Directory Administrator or updates an - existing server Active Directory Administrator. - - :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 properties: The required parameters for creating or updating an - Active Directory Administrator. - :type properties: ~azure.mgmt.sql.models.ServerAzureADAdministrator - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerAzureADAdministrator or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ServerAzureADAdministrator] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ServerAzureADAdministrator]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - properties=properties, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerAzureADAdministrator', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}'} - - - 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'), - 'administratorName': self._serialize.url("self.administrator_name", self.administrator_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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 - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServerAzureADAdministrator', response) - if response.status_code == 202: - deserialized = self._deserialize('ServerAzureADAdministrator', response) - if response.status_code == 204: - deserialized = self._deserialize('ServerAzureADAdministrator', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing server Active Directory Administrator. - - :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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerAzureADAdministrator or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ServerAzureADAdministrator] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ServerAzureADAdministrator]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerAzureADAdministrator', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}'} - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Returns an server Administrator. - - :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: ServerAzureADAdministrator or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServerAzureADAdministrator 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'), - 'administratorName': self._serialize.url("self.administrator_name", self.administrator_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServerAzureADAdministrator', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Returns a list of server Administrators. - - :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 ServerAzureADAdministrator - :rtype: - ~azure.mgmt.sql.models.ServerAzureADAdministratorPaged[~azure.mgmt.sql.models.ServerAzureADAdministrator] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_blob_auditing_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_blob_auditing_policies_operations.py deleted file mode 100644 index ac7c8ef280a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_blob_auditing_policies_operations.py +++ /dev/null @@ -1,211 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerBlobAuditingPoliciesOperations(object): - """ServerBlobAuditingPoliciesOperations 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 blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.blob_auditing_policy_name = "default" - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a server's blob auditing policy. - - :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: ServerBlobAuditingPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServerBlobAuditingPolicy 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'), - 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServerBlobAuditingPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_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['Accept'] = 'application/json' - 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, 'ServerBlobAuditingPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ServerBlobAuditingPolicy', 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, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a server's blob auditing policy. - - :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: Properties of blob auditing policy - :type parameters: ~azure.mgmt.sql.models.ServerBlobAuditingPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerBlobAuditingPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ServerBlobAuditingPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ServerBlobAuditingPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerBlobAuditingPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_communication_links_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_communication_links_operations.py deleted file mode 100644 index 2844c4068ea..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_communication_links_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerCommunicationLinksOperations(object): - """ServerCommunicationLinksOperations 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - def delete( - self, resource_group_name, server_name, communication_link_name, custom_headers=None, raw=False, **operation_config): - """Deletes a server communication link. - - :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 communication_link_name: The name of the server communication - link. - :type communication_link_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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # 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'), - 'communicationLinkName': self._serialize.url("communication_link_name", communication_link_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 = {} - 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, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}'} - - def get( - self, resource_group_name, server_name, communication_link_name, custom_headers=None, raw=False, **operation_config): - """Returns a server communication link. - - :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 communication_link_name: The name of the server communication - link. - :type communication_link_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: ServerCommunicationLink or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServerCommunicationLink 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'), - 'communicationLinkName': self._serialize.url("communication_link_name", communication_link_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServerCommunicationLink', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, communication_link_name, partner_server, custom_headers=None, raw=False, **operation_config): - parameters = models.ServerCommunicationLink(partner_server=partner_server) - - # 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'), - 'communicationLinkName': self._serialize.url("communication_link_name", communication_link_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['Accept'] = 'application/json' - 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, 'ServerCommunicationLink') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('ServerCommunicationLink', 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, communication_link_name, partner_server, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a server communication link. - - :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 communication_link_name: The name of the server communication - link. - :type communication_link_name: str - :param partner_server: The name of the partner server. - :type partner_server: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ServerCommunicationLink - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ServerCommunicationLink] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ServerCommunicationLink]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - communication_link_name=communication_link_name, - partner_server=partner_server, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerCommunicationLink', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of server communication links. - - :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 ServerCommunicationLink - :rtype: - ~azure.mgmt.sql.models.ServerCommunicationLinkPaged[~azure.mgmt.sql.models.ServerCommunicationLink] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_connection_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_connection_policies_operations.py deleted file mode 100644 index c1d5c68e7f7..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_connection_policies_operations.py +++ /dev/null @@ -1,182 +0,0 @@ -# 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 ServerConnectionPoliciesOperations(object): - """ServerConnectionPoliciesOperations 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: "2014-04-01". - :ivar connection_policy_name: The name of the connection policy. Constant value: "default". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - self.connection_policy_name = "default" - - self.config = config - - def create_or_update( - self, resource_group_name, server_name, connection_type, custom_headers=None, raw=False, **operation_config): - """Creates or updates the server's connection policy. - - :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 connection_type: The server connection type. Possible values - include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or - ~azure.mgmt.sql.models.ServerConnectionType - :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: ServerConnectionPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServerConnectionPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.ServerConnectionPolicy(connection_type=connection_type) - - # 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'), - 'connectionPolicyName': self._serialize.url("self.connection_policy_name", self.connection_policy_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['Accept'] = 'application/json' - 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, 'ServerConnectionPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('ServerConnectionPolicy', response) - if response.status_code == 201: - deserialized = self._deserialize('ServerConnectionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}'} - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets the server's secure connection policy. - - :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: ServerConnectionPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServerConnectionPolicy 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'), - 'connectionPolicyName': self._serialize.url("self.connection_policy_name", self.connection_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServerConnectionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_dns_aliases_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_dns_aliases_operations.py deleted file mode 100644 index a4f79dfce85..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_dns_aliases_operations.py +++ /dev/null @@ -1,465 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerDnsAliasesOperations(object): - """ServerDnsAliasesOperations 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-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, dns_alias_name, custom_headers=None, raw=False, **operation_config): - """Gets a server DNS alias. - - :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 that the alias is pointing - to. - :type server_name: str - :param dns_alias_name: The name of the server DNS alias. - :type dns_alias_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: ServerDnsAlias or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServerDnsAlias 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'), - 'dnsAliasName': self._serialize.url("dns_alias_name", dns_alias_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServerDnsAlias', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, dns_alias_name, custom_headers=None, raw=False, **operation_config): - # 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'), - 'dnsAliasName': self._serialize.url("dns_alias_name", dns_alias_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['Accept'] = 'application/json' - 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.put(url, query_parameters, header_parameters) - response = self._client.send(request, 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('ServerDnsAlias', response) - if response.status_code == 201: - deserialized = self._deserialize('ServerDnsAlias', 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, dns_alias_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a server dns alias. - - :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 that the alias is pointing - to. - :type server_name: str - :param dns_alias_name: The name of the server DNS alias. - :type dns_alias_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ServerDnsAlias or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ServerDnsAlias] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ServerDnsAlias]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - dns_alias_name=dns_alias_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerDnsAlias', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}'} - - - def _delete_initial( - self, resource_group_name, server_name, dns_alias_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'), - 'dnsAliasName': self._serialize.url("dns_alias_name", dns_alias_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 = {} - 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, header_parameters) - response = self._client.send(request, 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, dns_alias_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the server DNS alias 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 that the alias is pointing - to. - :type server_name: str - :param dns_alias_name: The name of the server DNS alias. - :type dns_alias_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - dns_alias_name=dns_alias_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of server DNS aliases for 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 that the alias is pointing - to. - :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 ServerDnsAlias - :rtype: - ~azure.mgmt.sql.models.ServerDnsAliasPaged[~azure.mgmt.sql.models.ServerDnsAlias] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases'} - - - def _acquire_initial( - self, resource_group_name, server_name, dns_alias_name, old_server_dns_alias_id=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ServerDnsAliasAcquisition(old_server_dns_alias_id=old_server_dns_alias_id) - - # Construct URL - url = self.acquire.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'), - 'dnsAliasName': self._serialize.url("dns_alias_name", dns_alias_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 body - body_content = self._serialize.body(parameters, 'ServerDnsAliasAcquisition') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def acquire( - self, resource_group_name, server_name, dns_alias_name, old_server_dns_alias_id=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Acquires server DNS alias from another 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 that the alias is pointing - to. - :type server_name: str - :param dns_alias_name: The name of the server dns alias. - :type dns_alias_name: str - :param old_server_dns_alias_id: The id of the server alias that will - be acquired to point to this server instead. - :type old_server_dns_alias_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._acquire_initial( - resource_group_name=resource_group_name, - server_name=server_name, - dns_alias_name=dns_alias_name, - old_server_dns_alias_id=old_server_dns_alias_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - acquire.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}/acquire'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_keys_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_keys_operations.py deleted file mode 100644 index e52b751d7eb..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_keys_operations.py +++ /dev/null @@ -1,377 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerKeysOperations(object): - """ServerKeysOperations 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: "2015-05-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01-preview" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of server keys. - - :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 ServerKey - :rtype: - ~azure.mgmt.sql.models.ServerKeyPaged[~azure.mgmt.sql.models.ServerKey] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ServerKeyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys'} - - def get( - self, resource_group_name, server_name, key_name, custom_headers=None, raw=False, **operation_config): - """Gets a server key. - - :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 key_name: The name of the server key to be retrieved. - :type key_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: ServerKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServerKey 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'), - 'keyName': self._serialize.url("key_name", key_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServerKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, key_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'keyName': self._serialize.url("key_name", key_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['Accept'] = 'application/json' - 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, 'ServerKey') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ServerKey', response) - if response.status_code == 201: - deserialized = self._deserialize('ServerKey', 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, key_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a server key. - - :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 key_name: The name of the server key to be operated on (updated - or created). The key name is required to be in the format of - 'vault_key_version'. For example, if the keyId is - https://YourVaultName.vault.azure.net/keys/YourKeyName/01234567890123456789012345678901, - then the server key name should be formatted as: - YourVaultName_YourKeyName_01234567890123456789012345678901 - :type key_name: str - :param parameters: The requested server key resource state. - :type parameters: ~azure.mgmt.sql.models.ServerKey - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ServerKey or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ServerKey] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ServerKey]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - key_name=key_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}'} - - - def _delete_initial( - self, resource_group_name, server_name, key_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'), - 'keyName': self._serialize.url("key_name", key_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 = {} - 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, header_parameters) - response = self._client.send(request, 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, key_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the server key 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 key_name: The name of the server key to be deleted. - :type key_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - key_name=key_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_security_alert_policies_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_security_alert_policies_operations.py deleted file mode 100644 index 878dff3ed28..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_security_alert_policies_operations.py +++ /dev/null @@ -1,211 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerSecurityAlertPoliciesOperations(object): - """ServerSecurityAlertPoliciesOperations 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 security_alert_policy_name: The name of the security alert policy. Constant value: "Default". - :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.security_alert_policy_name = "Default" - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Get a server's security alert policy. - - :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: ServerSecurityAlertPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServerSecurityAlertPolicy 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'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_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['Accept'] = 'application/json' - 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, 'ServerSecurityAlertPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('ServerSecurityAlertPolicy', 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, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a threat detection policy. - - :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 server security alert policy. - :type parameters: ~azure.mgmt.sql.models.ServerSecurityAlertPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerSecurityAlertPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ServerSecurityAlertPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ServerSecurityAlertPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_usages_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_usages_operations.py deleted file mode 100644 index 4d60726ff42..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/server_usages_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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 ServerUsagesOperations(object): - """ServerUsagesOperations 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Returns server usages. - - :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 ServerUsage - :rtype: - ~azure.mgmt.sql.models.ServerUsagePaged[~azure.mgmt.sql.models.ServerUsage] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ServerUsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/servers_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/servers_operations.py deleted file mode 100644 index 7abad672354..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/servers_operations.py +++ /dev/null @@ -1,601 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def check_name_availability( - self, name, custom_headers=None, raw=False, **operation_config): - """Determines whether a resource can be created with the specified name. - - :param name: The name whose availability is to be checked. - :type 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: CheckNameAvailabilityResponse or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.sql.models.CheckNameAvailabilityResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.CheckNameAvailabilityRequest(name=name) - - api_version = "2014-04-01" - - # Construct URL - url = self.check_name_availability.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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, 'CheckNameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('CheckNameAvailabilityResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of all servers in the 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.sql.models.ServerPaged[~azure.mgmt.sql.models.Server] - :raises: :class:`CloudError` - """ - api_version = "2015-05-01-preview" - - 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("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.Sql/servers'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of servers in a resource groups. - - :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.sql.models.ServerPaged[~azure.mgmt.sql.models.Server] - :raises: :class:`CloudError` - """ - api_version = "2015-05-01-preview" - - 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 = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_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("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.Sql/servers'} - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets 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.sql.models.Server or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2015-05-01-preview" - - # 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') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.Sql/servers/{serverName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2015-05-01-preview" - - # 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') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, 'Server') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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_or_update( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates 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 parameters: The requested server resource state. - :type parameters: ~azure.mgmt.sql.models.Server - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.Server]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}'} - - - def _delete_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - api_version = "2015-05-01-preview" - - # 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'), - '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("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - 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, header_parameters) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}'} - - - def _update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2015-05-01-preview" - - # Construct URL - url = self.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') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, 'ServerUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **operation_config): - """Updates 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 parameters: The requested server resource state. - :type parameters: ~azure.mgmt.sql.models.ServerUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.Server]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/service_objectives_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/service_objectives_operations.py deleted file mode 100644 index d4f53c7313a..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/service_objectives_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# 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 ServiceObjectivesOperations(object): - """ServiceObjectivesOperations 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - def get( - self, resource_group_name, server_name, service_objective_name, custom_headers=None, raw=False, **operation_config): - """Gets a database service objective. - - :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 service_objective_name: The name of the service objective to - retrieve. - :type service_objective_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: ServiceObjective or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServiceObjective 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'), - 'serviceObjectiveName': self._serialize.url("service_objective_name", service_objective_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServiceObjective', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives/{serviceObjectiveName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Returns database service objectives. - - :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 ServiceObjective - :rtype: - ~azure.mgmt.sql.models.ServiceObjectivePaged[~azure.mgmt.sql.models.ServiceObjective] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/service_tier_advisors_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/service_tier_advisors_operations.py deleted file mode 100644 index cc9ba091db2..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/service_tier_advisors_operations.py +++ /dev/null @@ -1,183 +0,0 @@ -# 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 ServiceTierAdvisorsOperations(object): - """ServiceTierAdvisorsOperations 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: "2014-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - - self.config = config - - def get( - self, resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers=None, raw=False, **operation_config): - """Gets a service tier advisor. - - :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 database. - :type database_name: str - :param service_tier_advisor_name: The name of service tier advisor. - :type service_tier_advisor_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: ServiceTierAdvisor or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.ServiceTierAdvisor 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'), - 'serviceTierAdvisorName': self._serialize.url("service_tier_advisor_name", service_tier_advisor_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('ServiceTierAdvisor', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors/{serviceTierAdvisorName}'} - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Returns service tier advisors for specified 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 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: An iterator like instance of ServiceTierAdvisor - :rtype: - ~azure.mgmt.sql.models.ServiceTierAdvisorPaged[~azure.mgmt.sql.models.ServiceTierAdvisor] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.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') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/subscription_usages_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/subscription_usages_operations.py deleted file mode 100644 index b70973ca790..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/subscription_usages_operations.py +++ /dev/null @@ -1,169 +0,0 @@ -# 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 SubscriptionUsagesOperations(object): - """SubscriptionUsagesOperations 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: "2015-05-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01-preview" - - self.config = config - - def list_by_location( - self, location_name, custom_headers=None, raw=False, **operation_config): - """Gets all subscription usage metrics in a given location. - - :param location_name: The name of the region where the resource is - located. - :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 SubscriptionUsage - :rtype: - ~azure.mgmt.sql.models.SubscriptionUsagePaged[~azure.mgmt.sql.models.SubscriptionUsage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages'} - - def get( - self, location_name, usage_name, custom_headers=None, raw=False, **operation_config): - """Gets a subscription usage metric. - - :param location_name: The name of the region where the resource is - located. - :type location_name: str - :param usage_name: Name of usage metric to return. - :type usage_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: SubscriptionUsage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.SubscriptionUsage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'usageName': self._serialize.url("usage_name", usage_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('SubscriptionUsage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/sync_agents_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/sync_agents_operations.py deleted file mode 100644 index 9ac0651a57d..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/sync_agents_operations.py +++ /dev/null @@ -1,523 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class SyncAgentsOperations(object): - """SyncAgentsOperations 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: "2015-05-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, sync_agent_name, custom_headers=None, raw=False, **operation_config): - """Gets a sync agent. - - :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 on which the sync agent is - hosted. - :type server_name: str - :param sync_agent_name: The name of the sync agent. - :type sync_agent_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: SyncAgent or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.SyncAgent 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'), - 'syncAgentName': self._serialize.url("sync_agent_name", sync_agent_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('SyncAgent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, sync_agent_name, sync_database_id=None, custom_headers=None, raw=False, **operation_config): - parameters = models.SyncAgent(sync_database_id=sync_database_id) - - # 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'), - 'syncAgentName': self._serialize.url("sync_agent_name", sync_agent_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['Accept'] = 'application/json' - 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, 'SyncAgent') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('SyncAgent', response) - if response.status_code == 201: - deserialized = self._deserialize('SyncAgent', 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, sync_agent_name, sync_database_id=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a sync agent. - - :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 on which the sync agent is - hosted. - :type server_name: str - :param sync_agent_name: The name of the sync agent. - :type sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the - sync agent. - :type sync_database_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SyncAgent or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.SyncAgent] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.SyncAgent]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - sync_agent_name=sync_agent_name, - sync_database_id=sync_database_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SyncAgent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}'} - - - def _delete_initial( - self, resource_group_name, server_name, sync_agent_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'), - 'syncAgentName': self._serialize.url("sync_agent_name", sync_agent_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 = {} - 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, header_parameters) - response = self._client.send(request, 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, sync_agent_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a sync agent. - - :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 on which the sync agent is - hosted. - :type server_name: str - :param sync_agent_name: The name of the sync agent. - :type sync_agent_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - sync_agent_name=sync_agent_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Lists sync agents 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 on which the sync agent is - hosted. - :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 SyncAgent - :rtype: - ~azure.mgmt.sql.models.SyncAgentPaged[~azure.mgmt.sql.models.SyncAgent] - :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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.SyncAgentPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents'} - - def generate_key( - self, resource_group_name, server_name, sync_agent_name, custom_headers=None, raw=False, **operation_config): - """Generates a sync agent key. - - :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 on which the sync agent is - hosted. - :type server_name: str - :param sync_agent_name: The name of the sync agent. - :type sync_agent_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: SyncAgentKeyProperties or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.SyncAgentKeyProperties or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generate_key.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'), - 'syncAgentName': self._serialize.url("sync_agent_name", sync_agent_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['Accept'] = 'application/json' - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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('SyncAgentKeyProperties', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - generate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/generateKey'} - - def list_linked_databases( - self, resource_group_name, server_name, sync_agent_name, custom_headers=None, raw=False, **operation_config): - """Lists databases linked to a sync agent. - - :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 on which the sync agent is - hosted. - :type server_name: str - :param sync_agent_name: The name of the sync agent. - :type sync_agent_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 SyncAgentLinkedDatabase - :rtype: - ~azure.mgmt.sql.models.SyncAgentLinkedDatabasePaged[~azure.mgmt.sql.models.SyncAgentLinkedDatabase] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_linked_databases.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'), - 'syncAgentName': self._serialize.url("sync_agent_name", sync_agent_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_linked_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/sync_groups_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/sync_groups_operations.py deleted file mode 100644 index 484f24f3378..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/sync_groups_operations.py +++ /dev/null @@ -1,955 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class SyncGroupsOperations(object): - """SyncGroupsOperations 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: "2015-05-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01-preview" - - self.config = config - - def list_sync_database_ids( - self, location_name, custom_headers=None, raw=False, **operation_config): - """Gets a collection of sync database ids. - - :param location_name: The name of the region where the resource is - located. - :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 SyncDatabaseIdProperties - :rtype: - ~azure.mgmt.sql.models.SyncDatabaseIdPropertiesPaged[~azure.mgmt.sql.models.SyncDatabaseIdProperties] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_sync_database_ids.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_sync_database_ids.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds'} - - - def _refresh_hub_schema_initial( - self, resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.refresh_hub_schema.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_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 = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def refresh_hub_schema( - self, resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Refreshes a hub database schema. - - :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 on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group. - :type sync_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._refresh_hub_schema_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - sync_group_name=sync_group_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - refresh_hub_schema.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema'} - - def list_hub_schemas( - self, resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a collection of hub database schemas. - - :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 on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group. - :type sync_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 SyncFullSchemaProperties - :rtype: - ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_hub_schemas.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_hub_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas'} - - def list_logs( - self, resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token=None, custom_headers=None, raw=False, **operation_config): - """Gets a collection of sync group logs. - - :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 on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group. - :type sync_group_name: str - :param start_time: Get logs generated after this time. - :type start_time: str - :param end_time: Get logs generated before this time. - :type end_time: str - :param type: The types of logs to retrieve. Possible values include: - 'All', 'Error', 'Warning', 'Success' - :type type: str - :param continuation_token: The continuation token for this operation. - :type continuation_token: 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 SyncGroupLogProperties - :rtype: - ~azure.mgmt.sql.models.SyncGroupLogPropertiesPaged[~azure.mgmt.sql.models.SyncGroupLogProperties] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_logs.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_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['startTime'] = self._serialize.query("start_time", start_time, 'str') - query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'str') - query_parameters['type'] = self._serialize.query("type", type, 'str') - if continuation_token is not None: - query_parameters['continuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str') - 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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs'} - - def cancel_sync( - self, resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config): - """Cancels a sync group synchronization. - - :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 on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group. - :type sync_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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.cancel_sync.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_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 = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - cancel_sync.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync'} - - def trigger_sync( - self, resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config): - """Triggers a sync group synchronization. - - :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 on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group. - :type sync_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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.trigger_sync.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_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 = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - trigger_sync.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync'} - - def get( - self, resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a sync 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 server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group. - :type sync_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: SyncGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.SyncGroup 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('SyncGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_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['Accept'] = 'application/json' - 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, 'SyncGroup') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('SyncGroup', response) - if response.status_code == 201: - deserialized = self._deserialize('SyncGroup', 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, sync_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a sync 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 server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group. - :type sync_group_name: str - :param parameters: The requested sync group resource state. - :type parameters: ~azure.mgmt.sql.models.SyncGroup - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SyncGroup or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.SyncGroup] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.SyncGroup]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - sync_group_name=sync_group_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SyncGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}'} - - - def _delete_initial( - self, resource_group_name, server_name, database_name, sync_group_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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_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 = {} - 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, header_parameters) - response = self._client.send(request, 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, sync_group_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a sync 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 server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group. - :type sync_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - sync_group_name=sync_group_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}'} - - - def _update_initial( - self, resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_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['Accept'] = 'application/json' - 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, 'SyncGroup') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('SyncGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a sync 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 server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group. - :type sync_group_name: str - :param parameters: The requested sync group resource state. - :type parameters: ~azure.mgmt.sql.models.SyncGroup - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SyncGroup or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.SyncGroup] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.SyncGroup]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - sync_group_name=sync_group_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SyncGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}'} - - def list_by_database( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Lists sync groups under a hub 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 on which the sync group - is hosted. - :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: An iterator like instance of SyncGroup - :rtype: - ~azure.mgmt.sql.models.SyncGroupPaged[~azure.mgmt.sql.models.SyncGroup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.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'), - 'databaseName': self._serialize.url("database_name", database_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.SyncGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/sync_members_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/sync_members_operations.py deleted file mode 100644 index 4eab11133d0..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/sync_members_operations.py +++ /dev/null @@ -1,701 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class SyncMembersOperations(object): - """SyncMembersOperations 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: "2015-05-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01-preview" - - self.config = config - - def get( - self, resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers=None, raw=False, **operation_config): - """Gets a sync member. - - :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 on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group on which the sync - member is hosted. - :type sync_group_name: str - :param sync_member_name: The name of the sync member. - :type sync_member_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: SyncMember or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.SyncMember 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), - 'syncMemberName': self._serialize.url("sync_member_name", sync_member_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('SyncMember', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers=None, raw=False, **operation_config): - # 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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), - 'syncMemberName': self._serialize.url("sync_member_name", sync_member_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['Accept'] = 'application/json' - 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, 'SyncMember') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('SyncMember', response) - if response.status_code == 201: - deserialized = self._deserialize('SyncMember', 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, sync_group_name, sync_member_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a sync member. - - :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 on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group on which the sync - member is hosted. - :type sync_group_name: str - :param sync_member_name: The name of the sync member. - :type sync_member_name: str - :param parameters: The requested sync member resource state. - :type parameters: ~azure.mgmt.sql.models.SyncMember - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SyncMember or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.SyncMember] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.SyncMember]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - sync_group_name=sync_group_name, - sync_member_name=sync_member_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SyncMember', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}'} - - - def _delete_initial( - self, resource_group_name, server_name, database_name, sync_group_name, sync_member_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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), - 'syncMemberName': self._serialize.url("sync_member_name", sync_member_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 = {} - 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, header_parameters) - response = self._client.send(request, 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, sync_group_name, sync_member_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a sync member. - - :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 on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group on which the sync - member is hosted. - :type sync_group_name: str - :param sync_member_name: The name of the sync member. - :type sync_member_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - sync_group_name=sync_group_name, - sync_member_name=sync_member_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}'} - - - def _update_initial( - self, resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), - 'syncMemberName': self._serialize.url("sync_member_name", sync_member_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['Accept'] = 'application/json' - 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, 'SyncMember') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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('SyncMember', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates an existing sync member. - - :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 on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group on which the sync - member is hosted. - :type sync_group_name: str - :param sync_member_name: The name of the sync member. - :type sync_member_name: str - :param parameters: The requested sync member resource state. - :type parameters: ~azure.mgmt.sql.models.SyncMember - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SyncMember or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.SyncMember] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.SyncMember]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - sync_group_name=sync_group_name, - sync_member_name=sync_member_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SyncMember', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}'} - - def list_by_sync_group( - self, resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config): - """Lists sync members in the given sync 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 server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group. - :type sync_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 SyncMember - :rtype: - ~azure.mgmt.sql.models.SyncMemberPaged[~azure.mgmt.sql.models.SyncMember] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_sync_group.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.SyncMemberPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_sync_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers'} - - def list_member_schemas( - self, resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers=None, raw=False, **operation_config): - """Gets a sync member database schema. - - :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 on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group on which the sync - member is hosted. - :type sync_group_name: str - :param sync_member_name: The name of the sync member. - :type sync_member_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 SyncFullSchemaProperties - :rtype: - ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_member_schemas.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), - 'syncMemberName': self._serialize.url("sync_member_name", sync_member_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_member_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas'} - - - def _refresh_member_schema_initial( - self, resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.refresh_member_schema.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'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), - 'syncMemberName': self._serialize.url("sync_member_name", sync_member_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 = {} - 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def refresh_member_schema( - self, resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Refreshes a sync member database schema. - - :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 on which the sync group - is hosted. - :type database_name: str - :param sync_group_name: The name of the sync group on which the sync - member is hosted. - :type sync_group_name: str - :param sync_member_name: The name of the sync member. - :type sync_member_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._refresh_member_schema_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - sync_group_name=sync_group_name, - sync_member_name=sync_member_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - refresh_member_schema.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/tde_certificates_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/tde_certificates_operations.py deleted file mode 100644 index bc529a38043..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/tde_certificates_operations.py +++ /dev/null @@ -1,133 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class TdeCertificatesOperations(object): - """TdeCertificatesOperations 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-10-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-10-01-preview" - - self.config = config - - - def _create_initial( - self, resource_group_name, server_name, private_blob, cert_password=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TdeCertificate(private_blob=private_blob, cert_password=cert_password) - - # Construct URL - url = self.create.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') - - # 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, 'TdeCertificate') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def create( - self, resource_group_name, server_name, private_blob, cert_password=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a TDE certificate for 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 private_blob: The base64 encoded certificate private blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - server_name=server_name, - private_blob=private_blob, - cert_password=cert_password, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/tdeCertificates'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/transparent_data_encryption_activities_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/transparent_data_encryption_activities_operations.py deleted file mode 100644 index ae930a40124..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/transparent_data_encryption_activities_operations.py +++ /dev/null @@ -1,118 +0,0 @@ -# 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 TransparentDataEncryptionActivitiesOperations(object): - """TransparentDataEncryptionActivitiesOperations 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: "2014-04-01". - :ivar transparent_data_encryption_name: The name of the transparent data encryption configuration. Constant value: "current". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - self.transparent_data_encryption_name = "current" - - self.config = config - - def list_by_configuration( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Returns a database's transparent data encryption operation result. - - :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 for which the - transparent data encryption applies. - :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: An iterator like instance of - TransparentDataEncryptionActivity - :rtype: - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityPaged[~azure.mgmt.sql.models.TransparentDataEncryptionActivity] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_configuration.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'), - 'transparentDataEncryptionName': self._serialize.url("self.transparent_data_encryption_name", self.transparent_data_encryption_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/transparent_data_encryptions_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/transparent_data_encryptions_operations.py deleted file mode 100644 index a0f3c8184f5..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/transparent_data_encryptions_operations.py +++ /dev/null @@ -1,191 +0,0 @@ -# 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 TransparentDataEncryptionsOperations(object): - """TransparentDataEncryptionsOperations 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: "2014-04-01". - :ivar transparent_data_encryption_name: The name of the transparent data encryption configuration. Constant value: "current". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2014-04-01" - self.transparent_data_encryption_name = "current" - - self.config = config - - def create_or_update( - self, resource_group_name, server_name, database_name, status=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a database's transparent data encryption - configuration. - - :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 for which setting the - transparent data encryption applies. - :type database_name: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - :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: TransparentDataEncryption or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.TransparentDataEncryption or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.TransparentDataEncryption(status=status) - - # 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'), - 'transparentDataEncryptionName': self._serialize.url("self.transparent_data_encryption_name", self.transparent_data_encryption_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['Accept'] = 'application/json' - 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, 'TransparentDataEncryption') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - 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('TransparentDataEncryption', response) - if response.status_code == 201: - deserialized = self._deserialize('TransparentDataEncryption', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}'} - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a database's transparent data encryption configuration. - - :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 for which the - transparent data encryption applies. - :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: TransparentDataEncryption or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.TransparentDataEncryption 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'), - 'transparentDataEncryptionName': self._serialize.url("self.transparent_data_encryption_name", self.transparent_data_encryption_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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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('TransparentDataEncryption', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/virtual_network_rules_operations.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/virtual_network_rules_operations.py deleted file mode 100644 index 01bc6f5bdf3..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/operations/virtual_network_rules_operations.py +++ /dev/null @@ -1,382 +0,0 @@ -# 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.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -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: "2015-05-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01-preview" - - 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.sql.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'), - '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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.Sql/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'), - '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['Accept'] = 'application/json' - 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, header_parameters, body_content) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualNetworkRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.VirtualNetworkRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.VirtualNetworkRule]] - :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 - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/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 = {} - 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, header_parameters) - response = self._client.send(request, 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, polling=True, **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: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :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 - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/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.sql.models.VirtualNetworkRulePaged[~azure.mgmt.sql.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['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, 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.Sql/servers/{serverName}/virtualNetworkRules'} diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/sql_management_client.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/sql_management_client.py deleted file mode 100644 index f34fc450d02..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/sql_management_client.py +++ /dev/null @@ -1,427 +0,0 @@ -# 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 SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.recoverable_databases_operations import RecoverableDatabasesOperations -from .operations.restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .operations.servers_operations import ServersOperations -from .operations.server_connection_policies_operations import ServerConnectionPoliciesOperations -from .operations.database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .operations.data_masking_policies_operations import DataMaskingPoliciesOperations -from .operations.data_masking_rules_operations import DataMaskingRulesOperations -from .operations.firewall_rules_operations import FirewallRulesOperations -from .operations.geo_backup_policies_operations import GeoBackupPoliciesOperations -from .operations.databases_operations import DatabasesOperations -from .operations.elastic_pools_operations import ElasticPoolsOperations -from .operations.recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .operations.replication_links_operations import ReplicationLinksOperations -from .operations.server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .operations.server_communication_links_operations import ServerCommunicationLinksOperations -from .operations.service_objectives_operations import ServiceObjectivesOperations -from .operations.elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .operations.elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .operations.service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .operations.transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .operations.transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .operations.server_usages_operations import ServerUsagesOperations -from .operations.database_usages_operations import DatabaseUsagesOperations -from .operations.database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .operations.encryption_protectors_operations import EncryptionProtectorsOperations -from .operations.failover_groups_operations import FailoverGroupsOperations -from .operations.managed_instances_operations import ManagedInstancesOperations -from .operations.operations import Operations -from .operations.server_keys_operations import ServerKeysOperations -from .operations.sync_agents_operations import SyncAgentsOperations -from .operations.sync_groups_operations import SyncGroupsOperations -from .operations.sync_members_operations import SyncMembersOperations -from .operations.subscription_usages_operations import SubscriptionUsagesOperations -from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations -from .operations.extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .operations.extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .operations.server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .operations.database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .operations.database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .operations.job_agents_operations import JobAgentsOperations -from .operations.job_credentials_operations import JobCredentialsOperations -from .operations.job_executions_operations import JobExecutionsOperations -from .operations.jobs_operations import JobsOperations -from .operations.job_step_executions_operations import JobStepExecutionsOperations -from .operations.job_steps_operations import JobStepsOperations -from .operations.job_target_executions_operations import JobTargetExecutionsOperations -from .operations.job_target_groups_operations import JobTargetGroupsOperations -from .operations.job_versions_operations import JobVersionsOperations -from .operations.long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .operations.backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .operations.managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .operations.managed_databases_operations import ManagedDatabasesOperations -from .operations.server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .operations.server_dns_aliases_operations import ServerDnsAliasesOperations -from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations.restore_points_operations import RestorePointsOperations -from .operations.database_operations import DatabaseOperations -from .operations.elastic_pool_operations import ElasticPoolOperations -from .operations.capabilities_operations import CapabilitiesOperations -from .operations.database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .operations.instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .operations.backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .operations.tde_certificates_operations import TdeCertificatesOperations -from .operations.managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .operations.managed_instance_keys_operations import ManagedInstanceKeysOperations -from .operations.managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations -from . import models - - -class SqlManagementClientConfiguration(AzureConfiguration): - """Configuration for SqlManagementClient - 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(SqlManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class SqlManagementClient(SDKClient): - """The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and delete databases. - - :ivar config: Configuration for client. - :vartype config: SqlManagementClientConfiguration - - :ivar recoverable_databases: RecoverableDatabases operations - :vartype recoverable_databases: azure.mgmt.sql.operations.RecoverableDatabasesOperations - :ivar restorable_dropped_databases: RestorableDroppedDatabases operations - :vartype restorable_dropped_databases: azure.mgmt.sql.operations.RestorableDroppedDatabasesOperations - :ivar servers: Servers operations - :vartype servers: azure.mgmt.sql.operations.ServersOperations - :ivar server_connection_policies: ServerConnectionPolicies operations - :vartype server_connection_policies: azure.mgmt.sql.operations.ServerConnectionPoliciesOperations - :ivar database_threat_detection_policies: DatabaseThreatDetectionPolicies operations - :vartype database_threat_detection_policies: azure.mgmt.sql.operations.DatabaseThreatDetectionPoliciesOperations - :ivar data_masking_policies: DataMaskingPolicies operations - :vartype data_masking_policies: azure.mgmt.sql.operations.DataMaskingPoliciesOperations - :ivar data_masking_rules: DataMaskingRules operations - :vartype data_masking_rules: azure.mgmt.sql.operations.DataMaskingRulesOperations - :ivar firewall_rules: FirewallRules operations - :vartype firewall_rules: azure.mgmt.sql.operations.FirewallRulesOperations - :ivar geo_backup_policies: GeoBackupPolicies operations - :vartype geo_backup_policies: azure.mgmt.sql.operations.GeoBackupPoliciesOperations - :ivar databases: Databases operations - :vartype databases: azure.mgmt.sql.operations.DatabasesOperations - :ivar elastic_pools: ElasticPools operations - :vartype elastic_pools: azure.mgmt.sql.operations.ElasticPoolsOperations - :ivar recommended_elastic_pools: RecommendedElasticPools operations - :vartype recommended_elastic_pools: azure.mgmt.sql.operations.RecommendedElasticPoolsOperations - :ivar replication_links: ReplicationLinks operations - :vartype replication_links: azure.mgmt.sql.operations.ReplicationLinksOperations - :ivar server_azure_ad_administrators: ServerAzureADAdministrators operations - :vartype server_azure_ad_administrators: azure.mgmt.sql.operations.ServerAzureADAdministratorsOperations - :ivar server_communication_links: ServerCommunicationLinks operations - :vartype server_communication_links: azure.mgmt.sql.operations.ServerCommunicationLinksOperations - :ivar service_objectives: ServiceObjectives operations - :vartype service_objectives: azure.mgmt.sql.operations.ServiceObjectivesOperations - :ivar elastic_pool_activities: ElasticPoolActivities operations - :vartype elastic_pool_activities: azure.mgmt.sql.operations.ElasticPoolActivitiesOperations - :ivar elastic_pool_database_activities: ElasticPoolDatabaseActivities operations - :vartype elastic_pool_database_activities: azure.mgmt.sql.operations.ElasticPoolDatabaseActivitiesOperations - :ivar service_tier_advisors: ServiceTierAdvisors operations - :vartype service_tier_advisors: azure.mgmt.sql.operations.ServiceTierAdvisorsOperations - :ivar transparent_data_encryptions: TransparentDataEncryptions operations - :vartype transparent_data_encryptions: azure.mgmt.sql.operations.TransparentDataEncryptionsOperations - :ivar transparent_data_encryption_activities: TransparentDataEncryptionActivities operations - :vartype transparent_data_encryption_activities: azure.mgmt.sql.operations.TransparentDataEncryptionActivitiesOperations - :ivar server_usages: ServerUsages operations - :vartype server_usages: azure.mgmt.sql.operations.ServerUsagesOperations - :ivar database_usages: DatabaseUsages operations - :vartype database_usages: azure.mgmt.sql.operations.DatabaseUsagesOperations - :ivar database_automatic_tuning: DatabaseAutomaticTuning operations - :vartype database_automatic_tuning: azure.mgmt.sql.operations.DatabaseAutomaticTuningOperations - :ivar encryption_protectors: EncryptionProtectors operations - :vartype encryption_protectors: azure.mgmt.sql.operations.EncryptionProtectorsOperations - :ivar failover_groups: FailoverGroups operations - :vartype failover_groups: azure.mgmt.sql.operations.FailoverGroupsOperations - :ivar managed_instances: ManagedInstances operations - :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.sql.operations.Operations - :ivar server_keys: ServerKeys operations - :vartype server_keys: azure.mgmt.sql.operations.ServerKeysOperations - :ivar sync_agents: SyncAgents operations - :vartype sync_agents: azure.mgmt.sql.operations.SyncAgentsOperations - :ivar sync_groups: SyncGroups operations - :vartype sync_groups: azure.mgmt.sql.operations.SyncGroupsOperations - :ivar sync_members: SyncMembers operations - :vartype sync_members: azure.mgmt.sql.operations.SyncMembersOperations - :ivar subscription_usages: SubscriptionUsages operations - :vartype subscription_usages: azure.mgmt.sql.operations.SubscriptionUsagesOperations - :ivar virtual_network_rules: VirtualNetworkRules operations - :vartype virtual_network_rules: azure.mgmt.sql.operations.VirtualNetworkRulesOperations - :ivar extended_database_blob_auditing_policies: ExtendedDatabaseBlobAuditingPolicies operations - :vartype extended_database_blob_auditing_policies: azure.mgmt.sql.operations.ExtendedDatabaseBlobAuditingPoliciesOperations - :ivar extended_server_blob_auditing_policies: ExtendedServerBlobAuditingPolicies operations - :vartype extended_server_blob_auditing_policies: azure.mgmt.sql.operations.ExtendedServerBlobAuditingPoliciesOperations - :ivar server_blob_auditing_policies: ServerBlobAuditingPolicies operations - :vartype server_blob_auditing_policies: azure.mgmt.sql.operations.ServerBlobAuditingPoliciesOperations - :ivar database_blob_auditing_policies: DatabaseBlobAuditingPolicies operations - :vartype database_blob_auditing_policies: azure.mgmt.sql.operations.DatabaseBlobAuditingPoliciesOperations - :ivar database_vulnerability_assessment_rule_baselines: DatabaseVulnerabilityAssessmentRuleBaselines operations - :vartype database_vulnerability_assessment_rule_baselines: azure.mgmt.sql.operations.DatabaseVulnerabilityAssessmentRuleBaselinesOperations - :ivar database_vulnerability_assessments: DatabaseVulnerabilityAssessments operations - :vartype database_vulnerability_assessments: azure.mgmt.sql.operations.DatabaseVulnerabilityAssessmentsOperations - :ivar job_agents: JobAgents operations - :vartype job_agents: azure.mgmt.sql.operations.JobAgentsOperations - :ivar job_credentials: JobCredentials operations - :vartype job_credentials: azure.mgmt.sql.operations.JobCredentialsOperations - :ivar job_executions: JobExecutions operations - :vartype job_executions: azure.mgmt.sql.operations.JobExecutionsOperations - :ivar jobs: Jobs operations - :vartype jobs: azure.mgmt.sql.operations.JobsOperations - :ivar job_step_executions: JobStepExecutions operations - :vartype job_step_executions: azure.mgmt.sql.operations.JobStepExecutionsOperations - :ivar job_steps: JobSteps operations - :vartype job_steps: azure.mgmt.sql.operations.JobStepsOperations - :ivar job_target_executions: JobTargetExecutions operations - :vartype job_target_executions: azure.mgmt.sql.operations.JobTargetExecutionsOperations - :ivar job_target_groups: JobTargetGroups operations - :vartype job_target_groups: azure.mgmt.sql.operations.JobTargetGroupsOperations - :ivar job_versions: JobVersions operations - :vartype job_versions: azure.mgmt.sql.operations.JobVersionsOperations - :ivar long_term_retention_backups: LongTermRetentionBackups operations - :vartype long_term_retention_backups: azure.mgmt.sql.operations.LongTermRetentionBackupsOperations - :ivar backup_long_term_retention_policies: BackupLongTermRetentionPolicies operations - :vartype backup_long_term_retention_policies: azure.mgmt.sql.operations.BackupLongTermRetentionPoliciesOperations - :ivar managed_backup_short_term_retention_policies: ManagedBackupShortTermRetentionPolicies operations - :vartype managed_backup_short_term_retention_policies: azure.mgmt.sql.operations.ManagedBackupShortTermRetentionPoliciesOperations - :ivar managed_databases: ManagedDatabases operations - :vartype managed_databases: azure.mgmt.sql.operations.ManagedDatabasesOperations - :ivar server_automatic_tuning: ServerAutomaticTuning operations - :vartype server_automatic_tuning: azure.mgmt.sql.operations.ServerAutomaticTuningOperations - :ivar server_dns_aliases: ServerDnsAliases operations - :vartype server_dns_aliases: azure.mgmt.sql.operations.ServerDnsAliasesOperations - :ivar server_security_alert_policies: ServerSecurityAlertPolicies operations - :vartype server_security_alert_policies: azure.mgmt.sql.operations.ServerSecurityAlertPoliciesOperations - :ivar restore_points: RestorePoints operations - :vartype restore_points: azure.mgmt.sql.operations.RestorePointsOperations - :ivar database_operations: DatabaseOperations operations - :vartype database_operations: azure.mgmt.sql.operations.DatabaseOperations - :ivar elastic_pool_operations: ElasticPoolOperations operations - :vartype elastic_pool_operations: azure.mgmt.sql.operations.ElasticPoolOperations - :ivar capabilities: Capabilities operations - :vartype capabilities: azure.mgmt.sql.operations.CapabilitiesOperations - :ivar database_vulnerability_assessment_scans: DatabaseVulnerabilityAssessmentScans operations - :vartype database_vulnerability_assessment_scans: azure.mgmt.sql.operations.DatabaseVulnerabilityAssessmentScansOperations - :ivar managed_database_vulnerability_assessment_rule_baselines: ManagedDatabaseVulnerabilityAssessmentRuleBaselines operations - :vartype managed_database_vulnerability_assessment_rule_baselines: azure.mgmt.sql.operations.ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations - :ivar managed_database_vulnerability_assessment_scans: ManagedDatabaseVulnerabilityAssessmentScans operations - :vartype managed_database_vulnerability_assessment_scans: azure.mgmt.sql.operations.ManagedDatabaseVulnerabilityAssessmentScansOperations - :ivar managed_database_vulnerability_assessments: ManagedDatabaseVulnerabilityAssessments operations - :vartype managed_database_vulnerability_assessments: azure.mgmt.sql.operations.ManagedDatabaseVulnerabilityAssessmentsOperations - :ivar instance_failover_groups: InstanceFailoverGroups operations - :vartype instance_failover_groups: azure.mgmt.sql.operations.InstanceFailoverGroupsOperations - :ivar backup_short_term_retention_policies: BackupShortTermRetentionPolicies operations - :vartype backup_short_term_retention_policies: azure.mgmt.sql.operations.BackupShortTermRetentionPoliciesOperations - :ivar tde_certificates: TdeCertificates operations - :vartype tde_certificates: azure.mgmt.sql.operations.TdeCertificatesOperations - :ivar managed_instance_tde_certificates: ManagedInstanceTdeCertificates operations - :vartype managed_instance_tde_certificates: azure.mgmt.sql.operations.ManagedInstanceTdeCertificatesOperations - :ivar managed_instance_keys: ManagedInstanceKeys operations - :vartype managed_instance_keys: azure.mgmt.sql.operations.ManagedInstanceKeysOperations - :ivar managed_instance_encryption_protectors: ManagedInstanceEncryptionProtectors operations - :vartype managed_instance_encryption_protectors: azure.mgmt.sql.operations.ManagedInstanceEncryptionProtectorsOperations - - :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 = SqlManagementClientConfiguration(credentials, subscription_id, base_url) - super(SqlManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.recoverable_databases = RecoverableDatabasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.restorable_dropped_databases = RestorableDroppedDatabasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.servers = ServersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_connection_policies = ServerConnectionPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.database_threat_detection_policies = DatabaseThreatDetectionPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.data_masking_policies = DataMaskingPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.data_masking_rules = DataMaskingRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.firewall_rules = FirewallRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.geo_backup_policies = GeoBackupPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.databases = DatabasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.elastic_pools = ElasticPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.recommended_elastic_pools = RecommendedElasticPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.replication_links = ReplicationLinksOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_azure_ad_administrators = ServerAzureADAdministratorsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_communication_links = ServerCommunicationLinksOperations( - self._client, self.config, self._serialize, self._deserialize) - self.service_objectives = ServiceObjectivesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.elastic_pool_activities = ElasticPoolActivitiesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.elastic_pool_database_activities = ElasticPoolDatabaseActivitiesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.service_tier_advisors = ServiceTierAdvisorsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.transparent_data_encryptions = TransparentDataEncryptionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.transparent_data_encryption_activities = TransparentDataEncryptionActivitiesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_usages = ServerUsagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.database_usages = DatabaseUsagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.database_automatic_tuning = DatabaseAutomaticTuningOperations( - self._client, self.config, self._serialize, self._deserialize) - self.encryption_protectors = EncryptionProtectorsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.failover_groups = FailoverGroupsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_instances = ManagedInstancesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.server_keys = ServerKeysOperations( - self._client, self.config, self._serialize, self._deserialize) - self.sync_agents = SyncAgentsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.sync_groups = SyncGroupsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.sync_members = SyncMembersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.subscription_usages = SubscriptionUsagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_network_rules = VirtualNetworkRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.extended_database_blob_auditing_policies = ExtendedDatabaseBlobAuditingPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.extended_server_blob_auditing_policies = ExtendedServerBlobAuditingPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_blob_auditing_policies = ServerBlobAuditingPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.database_blob_auditing_policies = DatabaseBlobAuditingPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.database_vulnerability_assessment_rule_baselines = DatabaseVulnerabilityAssessmentRuleBaselinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.database_vulnerability_assessments = DatabaseVulnerabilityAssessmentsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.job_agents = JobAgentsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.job_credentials = JobCredentialsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.job_executions = JobExecutionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.jobs = JobsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.job_step_executions = JobStepExecutionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.job_steps = JobStepsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.job_target_executions = JobTargetExecutionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.job_target_groups = JobTargetGroupsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.job_versions = JobVersionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.long_term_retention_backups = LongTermRetentionBackupsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.backup_long_term_retention_policies = BackupLongTermRetentionPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_backup_short_term_retention_policies = ManagedBackupShortTermRetentionPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_databases = ManagedDatabasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_automatic_tuning = ServerAutomaticTuningOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_dns_aliases = ServerDnsAliasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.restore_points = RestorePointsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.database_operations = DatabaseOperations( - self._client, self.config, self._serialize, self._deserialize) - self.elastic_pool_operations = ElasticPoolOperations( - self._client, self.config, self._serialize, self._deserialize) - self.capabilities = CapabilitiesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.database_vulnerability_assessment_scans = DatabaseVulnerabilityAssessmentScansOperations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_database_vulnerability_assessment_rule_baselines = ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_database_vulnerability_assessment_scans = ManagedDatabaseVulnerabilityAssessmentScansOperations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_database_vulnerability_assessments = ManagedDatabaseVulnerabilityAssessmentsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.instance_failover_groups = InstanceFailoverGroupsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.backup_short_term_retention_policies = BackupShortTermRetentionPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.tde_certificates = TdeCertificatesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_instance_tde_certificates = ManagedInstanceTdeCertificatesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_instance_keys = ManagedInstanceKeysOperations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_instance_encryption_protectors = ManagedInstanceEncryptionProtectorsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/version.py b/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/version.py deleted file mode 100644 index afa3d545c71..00000000000 --- a/src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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.11.0" - diff --git a/src/db-up/setup.cfg b/src/db-up/setup.cfg deleted file mode 100644 index 3c6e79cf31d..00000000000 --- a/src/db-up/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/src/db-up/setup.py b/src/db-up/setup.py deleted file mode 100644 index 65dbe2c9f9a..00000000000 --- a/src/db-up/setup.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/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. -# -------------------------------------------------------------------------------------------- - -import sys -from codecs import open -from setuptools import setup, find_packages - -VERSION = "1.0.0b4" - -CLASSIFIERS = [ - 'Development Status :: 4 - Beta', - 'Intended Audience :: Developers', - 'Intended Audience :: System Administrators', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'License :: OSI Approved :: MIT License', -] - -DEPENDENCIES = [ - 'Cython==0.29.17', - 'mysql-connector-python==8.0.14', - 'psycopg2-binary~=2.9.6' -] - -if sys.platform != 'darwin': - DEPENDENCIES.append('pymssql==2.2.7') - -setup( - name='db-up', - version=VERSION, - description='Additional commands to simplify Azure Database workflows.', - long_description='An Azure CLI Extension to provide additional DB commands.', - license='MIT', - author='Microsoft Corporation', - author_email='azpycli@microsoft.com', - url='https://github.com/Azure/azure-cli-extensions/tree/main/src/db-up', - classifiers=CLASSIFIERS, - package_data={'azext_db_up': ['azext_metadata.json', 'random_name/*']}, - packages=find_packages(exclude=["tests"]), - install_requires=DEPENDENCIES -) diff --git a/src/index.json b/src/index.json index 24faade7c45..4e14c0b4c48 100644 --- a/src/index.json +++ b/src/index.json @@ -46435,934 +46435,6 @@ "sha256Digest": "f1a801bd0c38eb2ebf9c2fb4e0b43a98470ae7b40bbcd05eb2aa596d69579c9e" } ], - "db-up": [ - { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/db_up-0.1.13-py2.py3-none-any.whl", - "filename": "db_up-0.1.13-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.6)", - "mysql-connector-python (==8.0.13)", - "psycopg2-binary (==2.7.7)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.1.13" - }, - "sha256Digest": "df397272396c684972d1185e16439159427795b305f67e47fc37447a0c4d1257" - }, - { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/db_up-0.1.14-py2.py3-none-any.whl", - "filename": "db_up-0.1.14-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.13)", - "psycopg2-binary (==2.8.5)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.1.14" - }, - "sha256Digest": "2f456a810be680ccc5dd7658b955410582063d56573ff3c38386d5ba2aacf7ee" - }, - { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/db_up-0.1.15-py2.py3-none-any.whl", - "filename": "db_up-0.1.15-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.13)", - "psycopg2-binary (==2.8.5)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.1.15" - }, - "sha256Digest": "7c8db14999b2b5a4d4b9ae870562505a120896f39c64c20501502f5fdd897911" - }, - { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/db_up-0.2.0-py2.py3-none-any.whl", - "filename": "db_up-0.2.0-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.13)", - "psycopg2-binary (==2.8.5)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.2.0" - }, - "sha256Digest": "3e5b22cfbe3a0ec63aba3040e541d6819dbb1fbdc5b49286edfd143c79a2b8cb" - }, - { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/db_up-0.2.1-py2.py3-none-any.whl", - "filename": "db_up-0.2.1-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.14)", - "psycopg2-binary (==2.8.5)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.2.1" - }, - "sha256Digest": "384b3806d49973cc91688ced691785d83cd7c3557016edc9161c151262ae2ab5" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-0.2.2-py2.py3-none-any.whl", - "filename": "db_up-0.2.2-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.14)", - "psycopg2-binary (==2.8.5)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.2.2" - }, - "sha256Digest": "1b5f67a7f0e0ed8e26fe86d226e697a4a5832fc9e7d72b19b9142cc06f6569c3" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-0.2.3-py2.py3-none-any.whl", - "filename": "db_up-0.2.3-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.14)", - "psycopg2-binary (==2.8.5)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.2.3" - }, - "sha256Digest": "127f777b123c5829e728aef0e4bb0998d680d37510a1b402fec8caa233e5fdd8" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-0.2.4-py2.py3-none-any.whl", - "filename": "db_up-0.2.4-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.14)", - "psycopg2-binary (==2.8.5)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.2.4" - }, - "sha256Digest": "7a891fe1ac06ac3df982a2b3cfd7be2ada8ac23e5a18763472d429c5f2c049a6" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-0.2.5-py2.py3-none-any.whl", - "filename": "db_up-0.2.5-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.14)", - "psycopg2-binary (==2.9.1)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.2.5" - }, - "sha256Digest": "ad178a11840ae7874bce84b3d55efda6c69325caeb6e86d0267d37fc8e56ab6e" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-0.2.6-py2.py3-none-any.whl", - "filename": "db_up-0.2.6-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.14)", - "psycopg2-binary (==2.9.1)", - "pymssql (==2.2.2)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.2.6" - }, - "sha256Digest": "d629a42206cc7bc436f8c1595058966fc50ad4d40bd9b818e8ef950d2ca7c205" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-0.2.7-py2.py3-none-any.whl", - "filename": "db_up-0.2.7-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.14)", - "psycopg2-binary (==2.9.1)", - "pymssql (~=2.2.4)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.2.7" - }, - "sha256Digest": "3a3fa10842fbc8fffe5d20bc2fd078e21020f814d22a1e5e67923088d6629837" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-0.2.8-py2.py3-none-any.whl", - "filename": "db_up-0.2.8-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.14)", - "psycopg2-binary (==2.9.1)", - "pymssql (==2.2.7)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.2.8" - }, - "sha256Digest": "c6be92c911449937f04a95d0f4619aa4b63b4d6f43bac87124a2671da74ff550" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-0.2.9-py2.py3-none-any.whl", - "filename": "db_up-0.2.9-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "mysql-connector-python (==8.0.14)", - "psycopg2-binary (~=2.9.6)", - "pymssql (==2.2.7)" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "0.2.9" - }, - "sha256Digest": "f700b75e4a127d6111134e7af5068a6d6c379c8e6ce591a1e20ae31adc766c36" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-1.0.0b1-py2.py3-none-any.whl", - "filename": "db_up-1.0.0b1-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "Cython==0.29.17", - "mysql-connector-python (==8.0.14)", - "mysql-connector-python==8.0.14", - "psycopg2-binary (~=2.9.6)", - "psycopg2-binary~=2.9.6", - "pymssql (==2.2.7)", - "pymssql==2.2.7" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "1.0.0b1" - }, - "sha256Digest": "162a88040f8361c787a84698b4eb3850c3b4262dd9053f8dfb6bf4636a870e46" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-1.0.0b2-py2.py3-none-any.whl", - "filename": "db_up-1.0.0b2-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "Cython==0.29.17", - "mysql-connector-python (==8.0.14)", - "mysql-connector-python==8.0.14", - "psycopg2-binary (~=2.9.6)", - "psycopg2-binary~=2.9.6", - "pymssql (==2.2.7)", - "pymssql==2.2.7" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "1.0.0b2" - }, - "sha256Digest": "3086dfa710fbb9c372148c1829cee0cdf47c89f4f1d9cd0e0d1f8c0b42e85646" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-1.0.0b3-py2.py3-none-any.whl", - "filename": "db_up-1.0.0b3-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "Cython==0.29.17", - "mysql-connector-python (==8.0.14)", - "mysql-connector-python==8.0.14", - "psycopg2-binary (~=2.9.6)", - "psycopg2-binary~=2.9.6", - "pymssql (==2.2.7)", - "pymssql==2.2.7" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "1.0.0b3" - }, - "sha256Digest": "4d660a65749c5db769a973aadd6b9a7b3e65c4472345357847a6b6a06fbf11ad" - }, - { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/db_up-1.0.0b4-py2.py3-none-any.whl", - "filename": "db_up-1.0.0b4-py2.py3-none-any.whl", - "metadata": { - "azext.minCliCoreVersion": "2.0.46", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/db-up" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "db-up", - "run_requires": [ - { - "requires": [ - "Cython (==0.29.17)", - "Cython==0.29.17", - "mysql-connector-python (==8.0.14)", - "mysql-connector-python==8.0.14", - "psycopg2-binary (~=2.9.6)", - "psycopg2-binary~=2.9.6", - "pymssql (==2.2.7)", - "pymssql==2.2.7" - ] - } - ], - "summary": "Additional commands to simplify Azure Database workflows.", - "version": "1.0.0b4" - }, - "sha256Digest": "1a18c78b29fc58a2f3ca537d16f213bd4a879df1c8689df439c8013bef453f73" - } - ], "deidservice": [ { "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/deidservice-1.0.0b1-py3-none-any.whl",