diff --git a/sdk/aks/azure-mgmt-devspaces/CHANGELOG.md b/sdk/aks/azure-mgmt-devspaces/CHANGELOG.md deleted file mode 100644 index 92924bf2235a..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/CHANGELOG.md +++ /dev/null @@ -1,20 +0,0 @@ -# Release History - -## 0.2.0 (2019-05-23) - -**Features** - - - Model ControllerUpdateParameters has a new parameter - target_container_host_credentials_base64 - - Added operation group ContainerHostMappingsOperations - -**Breaking changes** - - - Operation ControllersOperations.list_connection_details has a new - signature - - Operation ControllersOperations.update has a new signature - - Model ControllerConnectionDetails has a new signature - -## 0.1.0 (2018-07-12) - - - Initial Release diff --git a/sdk/aks/azure-mgmt-devspaces/MANIFEST.in b/sdk/aks/azure-mgmt-devspaces/MANIFEST.in deleted file mode 100644 index a3cb07df8765..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -recursive-include tests *.py *.yaml -include *.md -include azure/__init__.py -include azure/mgmt/__init__.py - diff --git a/sdk/aks/azure-mgmt-devspaces/README.md b/sdk/aks/azure-mgmt-devspaces/README.md deleted file mode 100644 index daf42028a3df..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/README.md +++ /dev/null @@ -1,29 +0,0 @@ -## Microsoft Azure SDK for Python - -This is the Microsoft Azure Dev Spaces Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. - -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. - -For a more complete set of Azure libraries, see the -[azure sdk python release](https://aka.ms/azsdk/python/all). - -## Usage - -For code examples, see [Dev -Spaces](https://docs.microsoft.com/python/api/overview/azure/) on -docs.microsoft.com. - -## Provide Feedback - -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) -section of the project. - -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-devspaces%2FREADME.png) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/__init__.py b/sdk/aks/azure-mgmt-devspaces/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/__init__.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/__init__.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/__init__.py deleted file mode 100644 index c7c15443cef0..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/__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 .dev_spaces_management_client import DevSpacesManagementClient -from .version import VERSION - -__all__ = ['DevSpacesManagementClient'] - -__version__ = VERSION - diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/dev_spaces_management_client.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/dev_spaces_management_client.py deleted file mode 100644 index 8fab3db5da41..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/dev_spaces_management_client.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.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.container_host_mappings_operations import ContainerHostMappingsOperations -from .operations.operations import Operations -from .operations.controllers_operations import ControllersOperations -from . import models - - -class DevSpacesManagementClientConfiguration(AzureConfiguration): - """Configuration for DevSpacesManagementClient - 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: Azure subscription ID. - :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(DevSpacesManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-devspaces/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DevSpacesManagementClient(SDKClient): - """Dev Spaces Client - - :ivar config: Configuration for client. - :vartype config: DevSpacesManagementClientConfiguration - - :ivar container_host_mappings: ContainerHostMappings operations - :vartype container_host_mappings: azure.mgmt.devspaces.operations.ContainerHostMappingsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.devspaces.operations.Operations - :ivar controllers: Controllers operations - :vartype controllers: azure.mgmt.devspaces.operations.ControllersOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DevSpacesManagementClientConfiguration(credentials, subscription_id, base_url) - super(DevSpacesManagementClient, 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 = '2019-04-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.container_host_mappings = ContainerHostMappingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.controllers = ControllersOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py deleted file mode 100644 index ec13a481a4b8..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.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. -# -------------------------------------------------------------------------- - -try: - from .container_host_mapping_py3 import ContainerHostMapping - from .tracked_resource_py3 import TrackedResource - from .resource_provider_operation_display_py3 import ResourceProviderOperationDisplay - from .resource_provider_operation_definition_py3 import ResourceProviderOperationDefinition - from .sku_py3 import Sku - from .controller_py3 import Controller - from .controller_update_parameters_py3 import ControllerUpdateParameters - from .list_connection_details_parameters_py3 import ListConnectionDetailsParameters - from .orchestrator_specific_connection_details_py3 import OrchestratorSpecificConnectionDetails - from .controller_connection_details_py3 import ControllerConnectionDetails - from .controller_connection_details_list_py3 import ControllerConnectionDetailsList - from .resource_py3 import Resource - from .kubernetes_connection_details_py3 import KubernetesConnectionDetails - from .error_details_py3 import ErrorDetails - from .dev_spaces_error_response_py3 import DevSpacesErrorResponse, DevSpacesErrorResponseException -except (SyntaxError, ImportError): - from .container_host_mapping import ContainerHostMapping - from .tracked_resource import TrackedResource - from .resource_provider_operation_display import ResourceProviderOperationDisplay - from .resource_provider_operation_definition import ResourceProviderOperationDefinition - from .sku import Sku - from .controller import Controller - from .controller_update_parameters import ControllerUpdateParameters - from .list_connection_details_parameters import ListConnectionDetailsParameters - from .orchestrator_specific_connection_details import OrchestratorSpecificConnectionDetails - from .controller_connection_details import ControllerConnectionDetails - from .controller_connection_details_list import ControllerConnectionDetailsList - from .resource import Resource - from .kubernetes_connection_details import KubernetesConnectionDetails - from .error_details import ErrorDetails - from .dev_spaces_error_response import DevSpacesErrorResponse, DevSpacesErrorResponseException -from .resource_provider_operation_definition_paged import ResourceProviderOperationDefinitionPaged -from .controller_paged import ControllerPaged -from .dev_spaces_management_client_enums import ( - ProvisioningState, - SkuTier, -) - -__all__ = [ - 'ContainerHostMapping', - 'TrackedResource', - 'ResourceProviderOperationDisplay', - 'ResourceProviderOperationDefinition', - 'Sku', - 'Controller', - 'ControllerUpdateParameters', - 'ListConnectionDetailsParameters', - 'OrchestratorSpecificConnectionDetails', - 'ControllerConnectionDetails', - 'ControllerConnectionDetailsList', - 'Resource', - 'KubernetesConnectionDetails', - 'ErrorDetails', - 'DevSpacesErrorResponse', 'DevSpacesErrorResponseException', - 'ResourceProviderOperationDefinitionPaged', - 'ControllerPaged', - 'ProvisioningState', - 'SkuTier', -] diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping.py deleted file mode 100644 index 893bc7f395cb..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping.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 ContainerHostMapping(Model): - """Container host mapping object specifying the Container host resource ID and - its associated Controller resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param container_host_resource_id: ARM ID of the Container Host resource - :type container_host_resource_id: str - :ivar mapped_controller_resource_id: ARM ID of the mapped Controller - resource - :vartype mapped_controller_resource_id: str - """ - - _validation = { - 'mapped_controller_resource_id': {'readonly': True}, - } - - _attribute_map = { - 'container_host_resource_id': {'key': 'containerHostResourceId', 'type': 'str'}, - 'mapped_controller_resource_id': {'key': 'mappedControllerResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerHostMapping, self).__init__(**kwargs) - self.container_host_resource_id = kwargs.get('container_host_resource_id', None) - self.mapped_controller_resource_id = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping_py3.py deleted file mode 100644 index d3dd56a2e029..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping_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 ContainerHostMapping(Model): - """Container host mapping object specifying the Container host resource ID and - its associated Controller resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param container_host_resource_id: ARM ID of the Container Host resource - :type container_host_resource_id: str - :ivar mapped_controller_resource_id: ARM ID of the mapped Controller - resource - :vartype mapped_controller_resource_id: str - """ - - _validation = { - 'mapped_controller_resource_id': {'readonly': True}, - } - - _attribute_map = { - 'container_host_resource_id': {'key': 'containerHostResourceId', 'type': 'str'}, - 'mapped_controller_resource_id': {'key': 'mappedControllerResourceId', 'type': 'str'}, - } - - def __init__(self, *, container_host_resource_id: str=None, **kwargs) -> None: - super(ContainerHostMapping, self).__init__(**kwargs) - self.container_host_resource_id = container_host_resource_id - self.mapped_controller_resource_id = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller.py deleted file mode 100644 index 87580d5b1d7e..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller.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 Controller(TrackedResource): - """Controller. - - 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: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param tags: Tags for the Azure resource. - :type tags: dict[str, str] - :param location: Region where the Azure resource is located. - :type location: str - :ivar provisioning_state: Provisioning state of the Azure Dev Spaces - Controller. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'Updating', 'Creating', 'Deleting', 'Deleted' - :vartype provisioning_state: str or - ~azure.mgmt.devspaces.models.ProvisioningState - :ivar host_suffix: DNS suffix for public endpoints running in the Azure - Dev Spaces Controller. - :vartype host_suffix: str - :ivar data_plane_fqdn: DNS name for accessing DataPlane services - :vartype data_plane_fqdn: str - :param target_container_host_resource_id: Required. Resource ID of the - target container host - :type target_container_host_resource_id: str - :param target_container_host_credentials_base64: Required. Credentials of - the target container host (base64). - :type target_container_host_credentials_base64: str - :param sku: Required. - :type sku: ~azure.mgmt.devspaces.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'host_suffix': {'readonly': True}, - 'data_plane_fqdn': {'readonly': True}, - 'target_container_host_resource_id': {'required': True}, - 'target_container_host_credentials_base64': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'host_suffix': {'key': 'properties.hostSuffix', 'type': 'str'}, - 'data_plane_fqdn': {'key': 'properties.dataPlaneFqdn', 'type': 'str'}, - 'target_container_host_resource_id': {'key': 'properties.targetContainerHostResourceId', 'type': 'str'}, - 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(Controller, self).__init__(**kwargs) - self.provisioning_state = None - self.host_suffix = None - self.data_plane_fqdn = None - self.target_container_host_resource_id = kwargs.get('target_container_host_resource_id', None) - self.target_container_host_credentials_base64 = kwargs.get('target_container_host_credentials_base64', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details.py deleted file mode 100644 index 9cede3fd6c76..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details.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 ControllerConnectionDetails(Model): - """ControllerConnectionDetails. - - :param orchestrator_specific_connection_details: - :type orchestrator_specific_connection_details: - ~azure.mgmt.devspaces.models.OrchestratorSpecificConnectionDetails - """ - - _attribute_map = { - 'orchestrator_specific_connection_details': {'key': 'orchestratorSpecificConnectionDetails', 'type': 'OrchestratorSpecificConnectionDetails'}, - } - - def __init__(self, **kwargs): - super(ControllerConnectionDetails, self).__init__(**kwargs) - self.orchestrator_specific_connection_details = kwargs.get('orchestrator_specific_connection_details', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list.py deleted file mode 100644 index 20080c760ab4..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list.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 ControllerConnectionDetailsList(Model): - """ControllerConnectionDetailsList. - - :param connection_details_list: List of Azure Dev Spaces Controller - connection details. - :type connection_details_list: - list[~azure.mgmt.devspaces.models.ControllerConnectionDetails] - """ - - _attribute_map = { - 'connection_details_list': {'key': 'connectionDetailsList', 'type': '[ControllerConnectionDetails]'}, - } - - def __init__(self, **kwargs): - super(ControllerConnectionDetailsList, self).__init__(**kwargs) - self.connection_details_list = kwargs.get('connection_details_list', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list_py3.py deleted file mode 100644 index 73f94653d0f7..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list_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 ControllerConnectionDetailsList(Model): - """ControllerConnectionDetailsList. - - :param connection_details_list: List of Azure Dev Spaces Controller - connection details. - :type connection_details_list: - list[~azure.mgmt.devspaces.models.ControllerConnectionDetails] - """ - - _attribute_map = { - 'connection_details_list': {'key': 'connectionDetailsList', 'type': '[ControllerConnectionDetails]'}, - } - - def __init__(self, *, connection_details_list=None, **kwargs) -> None: - super(ControllerConnectionDetailsList, self).__init__(**kwargs) - self.connection_details_list = connection_details_list diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_py3.py deleted file mode 100644 index c63644e8d743..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_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 ControllerConnectionDetails(Model): - """ControllerConnectionDetails. - - :param orchestrator_specific_connection_details: - :type orchestrator_specific_connection_details: - ~azure.mgmt.devspaces.models.OrchestratorSpecificConnectionDetails - """ - - _attribute_map = { - 'orchestrator_specific_connection_details': {'key': 'orchestratorSpecificConnectionDetails', 'type': 'OrchestratorSpecificConnectionDetails'}, - } - - def __init__(self, *, orchestrator_specific_connection_details=None, **kwargs) -> None: - super(ControllerConnectionDetails, self).__init__(**kwargs) - self.orchestrator_specific_connection_details = orchestrator_specific_connection_details diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_paged.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_paged.py deleted file mode 100644 index 538f662aaad1..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_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 ControllerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Controller ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Controller]'} - } - - def __init__(self, *args, **kwargs): - - super(ControllerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_py3.py deleted file mode 100644 index a24c6a8042dd..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_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 Controller(TrackedResource): - """Controller. - - 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: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param tags: Tags for the Azure resource. - :type tags: dict[str, str] - :param location: Region where the Azure resource is located. - :type location: str - :ivar provisioning_state: Provisioning state of the Azure Dev Spaces - Controller. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'Updating', 'Creating', 'Deleting', 'Deleted' - :vartype provisioning_state: str or - ~azure.mgmt.devspaces.models.ProvisioningState - :ivar host_suffix: DNS suffix for public endpoints running in the Azure - Dev Spaces Controller. - :vartype host_suffix: str - :ivar data_plane_fqdn: DNS name for accessing DataPlane services - :vartype data_plane_fqdn: str - :param target_container_host_resource_id: Required. Resource ID of the - target container host - :type target_container_host_resource_id: str - :param target_container_host_credentials_base64: Required. Credentials of - the target container host (base64). - :type target_container_host_credentials_base64: str - :param sku: Required. - :type sku: ~azure.mgmt.devspaces.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'host_suffix': {'readonly': True}, - 'data_plane_fqdn': {'readonly': True}, - 'target_container_host_resource_id': {'required': True}, - 'target_container_host_credentials_base64': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'host_suffix': {'key': 'properties.hostSuffix', 'type': 'str'}, - 'data_plane_fqdn': {'key': 'properties.dataPlaneFqdn', 'type': 'str'}, - 'target_container_host_resource_id': {'key': 'properties.targetContainerHostResourceId', 'type': 'str'}, - 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, target_container_host_resource_id: str, target_container_host_credentials_base64: str, sku, tags=None, location: str=None, **kwargs) -> None: - super(Controller, self).__init__(tags=tags, location=location, **kwargs) - self.provisioning_state = None - self.host_suffix = None - self.data_plane_fqdn = None - self.target_container_host_resource_id = target_container_host_resource_id - self.target_container_host_credentials_base64 = target_container_host_credentials_base64 - self.sku = sku diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters.py deleted file mode 100644 index 89c4af59b22b..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters.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 ControllerUpdateParameters(Model): - """Parameters for updating an Azure Dev Spaces Controller. - - :param tags: Tags for the Azure Dev Spaces Controller. - :type tags: dict[str, str] - :param target_container_host_credentials_base64: Credentials of the target - container host (base64). - :type target_container_host_credentials_base64: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ControllerUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.target_container_host_credentials_base64 = kwargs.get('target_container_host_credentials_base64', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters_py3.py deleted file mode 100644 index 59d0b1bb6749..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters_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 ControllerUpdateParameters(Model): - """Parameters for updating an Azure Dev Spaces Controller. - - :param tags: Tags for the Azure Dev Spaces Controller. - :type tags: dict[str, str] - :param target_container_host_credentials_base64: Credentials of the target - container host (base64). - :type target_container_host_credentials_base64: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, - } - - def __init__(self, *, tags=None, target_container_host_credentials_base64: str=None, **kwargs) -> None: - super(ControllerUpdateParameters, self).__init__(**kwargs) - self.tags = tags - self.target_container_host_credentials_base64 = target_container_host_credentials_base64 diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response.py deleted file mode 100644 index a73eee9a345b..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response.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 msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class DevSpacesErrorResponse(Model): - """Error response indicates that the service is not able to process the - incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.devspaces.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, **kwargs): - super(DevSpacesErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class DevSpacesErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DevSpacesErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DevSpacesErrorResponseException, self).__init__(deserialize, response, 'DevSpacesErrorResponse', *args) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response_py3.py deleted file mode 100644 index e5d4da727637..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response_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 msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class DevSpacesErrorResponse(Model): - """Error response indicates that the service is not able to process the - incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.devspaces.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(DevSpacesErrorResponse, self).__init__(**kwargs) - self.error = error - - -class DevSpacesErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DevSpacesErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DevSpacesErrorResponseException, self).__init__(deserialize, response, 'DevSpacesErrorResponse', *args) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_management_client_enums.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_management_client_enums.py deleted file mode 100644 index fba06f9ddbcf..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_management_client_enums.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 enum import Enum - - -class ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - updating = "Updating" - creating = "Creating" - deleting = "Deleting" - deleted = "Deleted" - - -class SkuTier(str, Enum): - - standard = "Standard" diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details.py deleted file mode 100644 index 9583fed7fc84..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details.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 ErrorDetails(Model): - """ErrorDetails. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Status code for the error. - :vartype code: str - :ivar message: Error message describing the error in detail. - :vartype message: str - :ivar target: The target of the particular error. - :vartype target: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details_py3.py deleted file mode 100644 index 8b8c7492d94a..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details_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 ErrorDetails(Model): - """ErrorDetails. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Status code for the error. - :vartype code: str - :ivar message: Error message describing the error in detail. - :vartype message: str - :ivar target: The target of the particular error. - :vartype target: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details.py deleted file mode 100644 index e7175c8c1ab3..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details.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 .orchestrator_specific_connection_details import OrchestratorSpecificConnectionDetails - - -class KubernetesConnectionDetails(OrchestratorSpecificConnectionDetails): - """Contains information used to connect to a Kubernetes cluster. - - All required parameters must be populated in order to send to Azure. - - :param instance_type: Required. Constant filled by server. - :type instance_type: str - :param kube_config: Gets the kubeconfig for the cluster. - :type kube_config: str - """ - - _validation = { - 'instance_type': {'required': True}, - } - - _attribute_map = { - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KubernetesConnectionDetails, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - self.instance_type = 'Kubernetes' diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details_py3.py deleted file mode 100644 index 143bb5a98963..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details_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 .orchestrator_specific_connection_details_py3 import OrchestratorSpecificConnectionDetails - - -class KubernetesConnectionDetails(OrchestratorSpecificConnectionDetails): - """Contains information used to connect to a Kubernetes cluster. - - All required parameters must be populated in order to send to Azure. - - :param instance_type: Required. Constant filled by server. - :type instance_type: str - :param kube_config: Gets the kubeconfig for the cluster. - :type kube_config: str - """ - - _validation = { - 'instance_type': {'required': True}, - } - - _attribute_map = { - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, - } - - def __init__(self, *, kube_config: str=None, **kwargs) -> None: - super(KubernetesConnectionDetails, self).__init__(**kwargs) - self.kube_config = kube_config - self.instance_type = 'Kubernetes' diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters.py deleted file mode 100644 index 8aa1a6556b5a..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters.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 ListConnectionDetailsParameters(Model): - """Parameters for listing connection details of an Azure Dev Spaces - Controller. - - All required parameters must be populated in order to send to Azure. - - :param target_container_host_resource_id: Required. Resource ID of the - target container host mapped to the Azure Dev Spaces Controller. - :type target_container_host_resource_id: str - """ - - _validation = { - 'target_container_host_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_container_host_resource_id': {'key': 'targetContainerHostResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ListConnectionDetailsParameters, self).__init__(**kwargs) - self.target_container_host_resource_id = kwargs.get('target_container_host_resource_id', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters_py3.py deleted file mode 100644 index 1ec148d8c07f..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters_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 ListConnectionDetailsParameters(Model): - """Parameters for listing connection details of an Azure Dev Spaces - Controller. - - All required parameters must be populated in order to send to Azure. - - :param target_container_host_resource_id: Required. Resource ID of the - target container host mapped to the Azure Dev Spaces Controller. - :type target_container_host_resource_id: str - """ - - _validation = { - 'target_container_host_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_container_host_resource_id': {'key': 'targetContainerHostResourceId', 'type': 'str'}, - } - - def __init__(self, *, target_container_host_resource_id: str, **kwargs) -> None: - super(ListConnectionDetailsParameters, self).__init__(**kwargs) - self.target_container_host_resource_id = target_container_host_resource_id diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details.py deleted file mode 100644 index cde860d75d2a..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details.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 msrest.serialization import Model - - -class OrchestratorSpecificConnectionDetails(Model): - """Base class for types that supply values used to connect to container - orchestrators. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: KubernetesConnectionDetails - - All required parameters must be populated in order to send to Azure. - - :param instance_type: Required. Constant filled by server. - :type instance_type: str - """ - - _validation = { - 'instance_type': {'required': True}, - } - - _attribute_map = { - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - } - - _subtype_map = { - 'instance_type': {'Kubernetes': 'KubernetesConnectionDetails'} - } - - def __init__(self, **kwargs): - super(OrchestratorSpecificConnectionDetails, self).__init__(**kwargs) - self.instance_type = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details_py3.py deleted file mode 100644 index c5a97af6956f..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details_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 msrest.serialization import Model - - -class OrchestratorSpecificConnectionDetails(Model): - """Base class for types that supply values used to connect to container - orchestrators. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: KubernetesConnectionDetails - - All required parameters must be populated in order to send to Azure. - - :param instance_type: Required. Constant filled by server. - :type instance_type: str - """ - - _validation = { - 'instance_type': {'required': True}, - } - - _attribute_map = { - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - } - - _subtype_map = { - 'instance_type': {'Kubernetes': 'KubernetesConnectionDetails'} - } - - def __init__(self, **kwargs) -> None: - super(OrchestratorSpecificConnectionDetails, self).__init__(**kwargs) - self.instance_type = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource.py deleted file mode 100644 index 89703dfa24af..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/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): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :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/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition.py deleted file mode 100644 index 2c1aead17da6..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition.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 ResourceProviderOperationDefinition(Model): - """ResourceProviderOperationDefinition. - - :param name: Resource provider operation name. - :type name: str - :param display: - :type display: - ~azure.mgmt.devspaces.models.ResourceProviderOperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, - } - - def __init__(self, **kwargs): - super(ResourceProviderOperationDefinition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition_paged.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition_paged.py deleted file mode 100644 index 4105598d2244..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_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 ResourceProviderOperationDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceProviderOperationDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceProviderOperationDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceProviderOperationDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition_py3.py deleted file mode 100644 index f7cb35aa755d..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition_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 ResourceProviderOperationDefinition(Model): - """ResourceProviderOperationDefinition. - - :param name: Resource provider operation name. - :type name: str - :param display: - :type display: - ~azure.mgmt.devspaces.models.ResourceProviderOperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(ResourceProviderOperationDefinition, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display.py deleted file mode 100644 index abc031417cda..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display.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 ResourceProviderOperationDisplay(Model): - """ResourceProviderOperationDisplay. - - :param provider: Name of the resource provider. - :type provider: str - :param resource: Name of the resource type. - :type resource: str - :param operation: Name of the resource provider operation. - :type operation: str - :param description: Description of the resource provider operation. - :type description: str - """ - - _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(ResourceProviderOperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display_py3.py deleted file mode 100644 index a188e3b0c709..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display_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 ResourceProviderOperationDisplay(Model): - """ResourceProviderOperationDisplay. - - :param provider: Name of the resource provider. - :type provider: str - :param resource: Name of the resource type. - :type resource: str - :param operation: Name of the resource provider operation. - :type operation: str - :param description: Description of the resource provider operation. - :type description: str - """ - - _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, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(ResourceProviderOperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_py3.py deleted file mode 100644 index 6ff792731c78..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/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): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :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/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku.py deleted file mode 100644 index 8757fdec65d6..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku.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 Sku(Model): - """Model representing SKU for Azure Dev Spaces Controller. - - 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 name: Required. The name of the SKU for Azure Dev Spaces Controller. - Default value: "S1" . - :vartype name: str - :param tier: The tier of the SKU for Azure Dev Spaces Controller. Possible - values include: 'Standard' - :type tier: str or ~azure.mgmt.devspaces.models.SkuTier - """ - - _validation = { - 'name': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - name = "S1" - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.tier = kwargs.get('tier', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku_py3.py deleted file mode 100644 index 5bcc74ff0d20..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku_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 Sku(Model): - """Model representing SKU for Azure Dev Spaces Controller. - - 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 name: Required. The name of the SKU for Azure Dev Spaces Controller. - Default value: "S1" . - :vartype name: str - :param tier: The tier of the SKU for Azure Dev Spaces Controller. Possible - values include: 'Standard' - :type tier: str or ~azure.mgmt.devspaces.models.SkuTier - """ - - _validation = { - 'name': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - name = "S1" - - def __init__(self, *, tier=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.tier = tier diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource.py deleted file mode 100644 index f91385972d44..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource.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 .resource import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param tags: Tags for the Azure resource. - :type tags: dict[str, str] - :param location: Region where the Azure resource is located. - :type location: 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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource_py3.py deleted file mode 100644 index bd99b6755608..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource_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 .resource_py3 import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param tags: Tags for the Azure resource. - :type tags: dict[str, str] - :param location: Region where the Azure resource is located. - :type location: 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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, tags=None, location: str=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/__init__.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/__init__.py deleted file mode 100644 index 166c97cda17e..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_host_mappings_operations import ContainerHostMappingsOperations -from .operations import Operations -from .controllers_operations import ControllersOperations - -__all__ = [ - 'ContainerHostMappingsOperations', - 'Operations', - 'ControllersOperations', -] diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/container_host_mappings_operations.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/container_host_mappings_operations.py deleted file mode 100644 index be50d5c6b29b..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/container_host_mappings_operations.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# 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 .. import models - - -class ContainerHostMappingsOperations(object): - """ContainerHostMappingsOperations 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: Client API version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def get_container_host_mapping( - self, resource_group_name, location, container_host_resource_id=None, custom_headers=None, raw=False, **operation_config): - """Returns container host mapping object for a container host resource ID - if an associated controller exists. - - :param resource_group_name: Resource group to which the resource - belongs. - :type resource_group_name: str - :param location: Location of the container host. - :type location: str - :param container_host_resource_id: ARM ID of the Container Host - resource - :type container_host_resource_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: ContainerHostMapping or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.devspaces.models.ContainerHostMapping or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DevSpacesErrorResponseException` - """ - container_host_mapping = models.ContainerHostMapping(container_host_resource_id=container_host_resource_id) - - # Construct URL - url = self.get_container_host_mapping.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', max_length=90, min_length=1), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.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(container_host_mapping, 'ContainerHostMapping') - - # 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, 204]: - raise models.DevSpacesErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ContainerHostMapping', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_host_mapping.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/locations/{location}/checkContainerHostMapping'} diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/controllers_operations.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/controllers_operations.py deleted file mode 100644 index bcd78880c41a..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/controllers_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 msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ControllersOperations(object): - """ControllersOperations 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: Client API version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets an Azure Dev Spaces Controller. - - Gets the properties for an Azure Dev Spaces Controller. - - :param resource_group_name: Resource group to which the resource - belongs. - :type resource_group_name: str - :param name: Name of the resource. - :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: Controller or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.devspaces.models.Controller or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DevSpacesErrorResponseException` - """ - # 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', max_length=90, min_length=1), - 'name': self._serialize.url("name", name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$') - } - url = self._client.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]: - raise models.DevSpacesErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Controller', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/controllers/{name}'} - - - def _create_initial( - self, resource_group_name, name, controller, 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', max_length=90, min_length=1), - 'name': self._serialize.url("name", name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$') - } - url = self._client.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(controller, 'Controller') - - # 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]: - raise models.DevSpacesErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Controller', response) - if response.status_code == 201: - deserialized = self._deserialize('Controller', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, name, controller, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates an Azure Dev Spaces Controller. - - Creates an Azure Dev Spaces Controller with the specified create - parameters. - - :param resource_group_name: Resource group to which the resource - belongs. - :type resource_group_name: str - :param name: Name of the resource. - :type name: str - :param controller: Controller create parameters. - :type controller: ~azure.mgmt.devspaces.models.Controller - :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 Controller or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devspaces.models.Controller] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devspaces.models.Controller]] - :raises: - :class:`DevSpacesErrorResponseException` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - name=name, - controller=controller, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Controller', 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.DevSpaces/controllers/{name}'} - - - def _delete_initial( - self, resource_group_name, 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', max_length=90, min_length=1), - 'name': self._serialize.url("name", name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$') - } - url = self._client.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]: - raise models.DevSpacesErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an Azure Dev Spaces Controller. - - Deletes an existing Azure Dev Spaces Controller. - - :param resource_group_name: Resource group to which the resource - belongs. - :type resource_group_name: str - :param name: Name of the resource. - :type 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:`DevSpacesErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - name=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.DevSpaces/controllers/{name}'} - - def update( - self, resource_group_name, name, tags=None, target_container_host_credentials_base64=None, custom_headers=None, raw=False, **operation_config): - """Updates an Azure Dev Spaces Controller. - - Updates the properties of an existing Azure Dev Spaces Controller with - the specified update parameters. - - :param resource_group_name: Resource group to which the resource - belongs. - :type resource_group_name: str - :param name: Name of the resource. - :type name: str - :param tags: Tags for the Azure Dev Spaces Controller. - :type tags: dict[str, str] - :param target_container_host_credentials_base64: Credentials of the - target container host (base64). - :type target_container_host_credentials_base64: 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: Controller or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.devspaces.models.Controller or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DevSpacesErrorResponseException` - """ - controller_update_parameters = models.ControllerUpdateParameters(tags=tags, target_container_host_credentials_base64=target_container_host_credentials_base64) - - # 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', max_length=90, min_length=1), - 'name': self._serialize.url("name", name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$') - } - url = self._client.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(controller_update_parameters, 'ControllerUpdateParameters') - - # 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, 201]: - raise models.DevSpacesErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Controller', response) - if response.status_code == 201: - deserialized = self._deserialize('Controller', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/controllers/{name}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists the Azure Dev Spaces Controllers in a resource group. - - Lists all the Azure Dev Spaces Controllers with their properties in the - specified resource group and subscription. - - :param resource_group_name: Resource group to which the resource - belongs. - :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 Controller - :rtype: - ~azure.mgmt.devspaces.models.ControllerPaged[~azure.mgmt.devspaces.models.Controller] - :raises: - :class:`DevSpacesErrorResponseException` - """ - 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', max_length=90, min_length=1) - } - url = self._client.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]: - raise models.DevSpacesErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ControllerPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ControllerPaged(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.DevSpaces/controllers'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists the Azure Dev Spaces Controllers in a subscription. - - Lists all the Azure Dev Spaces Controllers with their properties 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 Controller - :rtype: - ~azure.mgmt.devspaces.models.ControllerPaged[~azure.mgmt.devspaces.models.Controller] - :raises: - :class:`DevSpacesErrorResponseException` - """ - 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]: - raise models.DevSpacesErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ControllerPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ControllerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevSpaces/controllers'} - - def list_connection_details( - self, resource_group_name, name, target_container_host_resource_id, custom_headers=None, raw=False, **operation_config): - """Lists connection details for an Azure Dev Spaces Controller. - - Lists connection details for the underlying container resources of an - Azure Dev Spaces Controller. - - :param resource_group_name: Resource group to which the resource - belongs. - :type resource_group_name: str - :param name: Name of the resource. - :type name: str - :param target_container_host_resource_id: Resource ID of the target - container host mapped to the Azure Dev Spaces Controller. - :type target_container_host_resource_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: ControllerConnectionDetailsList or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.devspaces.models.ControllerConnectionDetailsList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DevSpacesErrorResponseException` - """ - list_connection_details_parameters = models.ListConnectionDetailsParameters(target_container_host_resource_id=target_container_host_resource_id) - - # Construct URL - url = self.list_connection_details.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', max_length=90, min_length=1), - 'name': self._serialize.url("name", name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$') - } - url = self._client.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(list_connection_details_parameters, 'ListConnectionDetailsParameters') - - # 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]: - raise models.DevSpacesErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ControllerConnectionDetailsList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/controllers/{name}/listConnectionDetails'} diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/operations.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/operations.py deleted file mode 100644 index 5e3a4646b0f3..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/operations.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. -# -------------------------------------------------------------------------- - -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: Client API version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists operations for the resource provider. - - Lists all the supported operations by the Microsoft.DevSpaces resource - provider along with their description. - - :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 - ResourceProviderOperationDefinition - :rtype: - ~azure.mgmt.devspaces.models.ResourceProviderOperationDefinitionPaged[~azure.mgmt.devspaces.models.ResourceProviderOperationDefinition] - :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.ResourceProviderOperationDefinitionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ResourceProviderOperationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.DevSpaces/operations'} diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/version.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/version.py deleted file mode 100644 index 9bd1dfac7ecb..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/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.2.0" - diff --git a/sdk/aks/azure-mgmt-devspaces/sdk_packaging.toml b/sdk/aks/azure-mgmt-devspaces/sdk_packaging.toml deleted file mode 100644 index 898d0bf27712..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/sdk_packaging.toml +++ /dev/null @@ -1,6 +0,0 @@ -[packaging] -package_name = "azure-mgmt-devspaces" -package_pprint_name = "Dev Spaces" -package_doc_id = "" -is_stable = false -is_arm = true diff --git a/sdk/aks/azure-mgmt-devspaces/setup.cfg b/sdk/aks/azure-mgmt-devspaces/setup.cfg deleted file mode 100644 index 3c6e79cf31da..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/sdk/aks/azure-mgmt-devspaces/setup.py b/sdk/aks/azure-mgmt-devspaces/setup.py deleted file mode 100644 index aebdbc0bd745..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/setup.py +++ /dev/null @@ -1,88 +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 re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-devspaces" -PACKAGE_PPRINT_NAME = "Dev Spaces" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.md', encoding='utf-8') as f: - readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - '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', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), - install_requires=[ - 'msrest>=0.5.0', - 'msrestazure>=0.4.32,<2.0.0', - 'azure-common~=1.1', - ], - extras_require={ - ":python_version<'3.0'": ['azure-mgmt-nspkg'], - } -) diff --git a/sdk/aks/ci.yml b/sdk/aks/ci.yml index daa50c5b9e72..adaa1e7a7606 100644 --- a/sdk/aks/ci.yml +++ b/sdk/aks/ci.yml @@ -30,5 +30,4 @@ extends: parameters: ServiceDirectory: aks Artifacts: - - name: azure-mgmt-devspaces - safeName: azuremgmtdevspaces + diff --git a/sdk/resources/azure-mgmt-msi/CHANGELOG.md b/sdk/resources/azure-mgmt-msi/CHANGELOG.md deleted file mode 100644 index 84d11ca62a1d..000000000000 --- a/sdk/resources/azure-mgmt-msi/CHANGELOG.md +++ /dev/null @@ -1,62 +0,0 @@ -# Release History - -## 1.0.0 (2019-05-16) - -**Note** - -This package is using the stable API version 2018-11-30 and doesn't -expose any API changes compared to 0.2.0. - -## 0.2.0 (2018-05-25) - -**Features** - - - Client class can be used as a context manager to keep the underlying - HTTP session open for performance - -**General Breaking changes** - -This version uses a next-generation code generator that *might* -introduce breaking changes. - - - Model signatures now use only keyword-argument syntax. All - positional arguments must be re-written as keyword-arguments. To - keep auto-completion in most cases, models are now generated for - Python 2 and Python 3. Python 3 uses the "*" syntax for - keyword-only arguments. - - Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to - improve the behavior when unrecognized enum values are encountered. - While this is not a breaking change, the distinctions are important, - and are documented here: - At a glance: - - "is" should not be used at all. - - "format" will return the string value, where "%s" string - formatting will return `NameOfEnum.stringvalue`. Format syntax - should be prefered. - - New Long Running Operation: - - Return type changes from - `msrestazure.azure_operation.AzureOperationPoller` to - `msrest.polling.LROPoller`. External API is the same. - - Return type is now **always** a `msrest.polling.LROPoller`, - regardless of the optional parameters used. - - The behavior has changed when using `raw=True`. Instead of - returning the initial call result as `ClientRawResponse`, - without polling, now this returns an LROPoller. After polling, - the final resource will be returned as a `ClientRawResponse`. - - New `polling` parameter. The default behavior is - `Polling=True` which will poll using ARM algorithm. When - `Polling=False`, the response of the initial call will be - returned without polling. - - `polling` parameter accepts instances of subclasses of - `msrest.polling.PollingMethod`. - - `add_done_callback` will no longer raise if called after - polling is finished, but will instead execute the callback right - away. - -**Bugfixes** - - - Compatibility of the sdist with wheel 0.31.0 - -## 0.1.0 (2017-12-13) - - - Initial Release diff --git a/sdk/resources/azure-mgmt-msi/MANIFEST.in b/sdk/resources/azure-mgmt-msi/MANIFEST.in deleted file mode 100644 index a3cb07df8765..000000000000 --- a/sdk/resources/azure-mgmt-msi/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -recursive-include tests *.py *.yaml -include *.md -include azure/__init__.py -include azure/mgmt/__init__.py - diff --git a/sdk/resources/azure-mgmt-msi/README.md b/sdk/resources/azure-mgmt-msi/README.md deleted file mode 100644 index 648fa28d70ca..000000000000 --- a/sdk/resources/azure-mgmt-msi/README.md +++ /dev/null @@ -1,29 +0,0 @@ -## Microsoft Azure SDK for Python - -This is the Microsoft Azure MSI Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. - -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. - -For a more complete set of Azure libraries, see the -[azure sdk python release](https://aka.ms/azsdk/python/all). - -## Usage - -For code examples, see [MSI -Management](https://docs.microsoft.com/python/api/overview/azure/activedirectory) -on docs.microsoft.com. - -## Provide Feedback - -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) -section of the project. - -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-msi%2FREADME.png) diff --git a/sdk/resources/azure-mgmt-msi/azure/__init__.py b/sdk/resources/azure-mgmt-msi/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/__init__.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/__init__.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/__init__.py deleted file mode 100644 index c3d2514a8885..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/__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 .managed_service_identity_client import ManagedServiceIdentityClient -from .version import VERSION - -__all__ = ['ManagedServiceIdentityClient'] - -__version__ = VERSION - diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/managed_service_identity_client.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/managed_service_identity_client.py deleted file mode 100644 index d128b05dac0d..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/managed_service_identity_client.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.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.user_assigned_identities_operations import UserAssignedIdentitiesOperations -from . import models - - -class ManagedServiceIdentityClientConfiguration(AzureConfiguration): - """Configuration for ManagedServiceIdentityClient - 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 Id of the Subscription to which the identity - belongs. - :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(ManagedServiceIdentityClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-msi/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ManagedServiceIdentityClient(SDKClient): - """The Managed Service Identity Client. - - :ivar config: Configuration for client. - :vartype config: ManagedServiceIdentityClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.msi.operations.Operations - :ivar user_assigned_identities: UserAssignedIdentities operations - :vartype user_assigned_identities: azure.mgmt.msi.operations.UserAssignedIdentitiesOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The Id of the Subscription to which the identity - belongs. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ManagedServiceIdentityClientConfiguration(credentials, subscription_id, base_url) - super(ManagedServiceIdentityClient, 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-11-30' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.user_assigned_identities = UserAssignedIdentitiesOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/__init__.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/__init__.py deleted file mode 100644 index 1bf860b5697d..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/__init__.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. -# -------------------------------------------------------------------------- - -try: - from .identity_py3 import Identity - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation -except (SyntaxError, ImportError): - from .identity import Identity - from .operation_display import OperationDisplay - from .operation import Operation -from .operation_paged import OperationPaged -from .identity_paged import IdentityPaged -from .managed_service_identity_client_enums import ( - UserAssignedIdentities, -) - -__all__ = [ - 'Identity', - 'OperationDisplay', - 'Operation', - 'OperationPaged', - 'IdentityPaged', - 'UserAssignedIdentities', -] diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/identity.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/identity.py deleted file mode 100644 index d3e39d6d9bab..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/identity.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 msrest.serialization import Model - - -class Identity(Model): - """Describes an identity resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The id of the created identity. - :vartype id: str - :ivar name: The name of the created identity. - :vartype name: str - :param location: The Azure region where the identity lives. - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar tenant_id: The id of the tenant which the identity belongs to. - :vartype tenant_id: str - :ivar principal_id: The id of the service principal object associated with - the created identity. - :vartype principal_id: str - :ivar client_id: The id of the app associated with the identity. This is a - random generated UUID by MSI. - :vartype client_id: str - :ivar client_secret_url: The ManagedServiceIdentity DataPlane URL that - can be queried to obtain the identity credentials. If identity is user - assigned, then the clientSecretUrl will not be present in the response, - otherwise it will be present. - :vartype client_secret_url: str - :ivar type: The type of resource i.e. - Microsoft.ManagedIdentity/userAssignedIdentities. Possible values include: - 'Microsoft.ManagedIdentity/userAssignedIdentities' - :vartype type: str or ~azure.mgmt.msi.models.UserAssignedIdentities - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - 'client_secret_url': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret_url': {'key': 'properties.clientSecretUrl', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Identity, self).__init__(**kwargs) - self.id = None - self.name = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.tenant_id = None - self.principal_id = None - self.client_id = None - self.client_secret_url = None - self.type = None diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/identity_paged.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/identity_paged.py deleted file mode 100644 index 98a4dfac9d0b..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/identity_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 IdentityPaged(Paged): - """ - A paging container for iterating over a list of :class:`Identity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Identity]'} - } - - def __init__(self, *args, **kwargs): - - super(IdentityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/identity_py3.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/identity_py3.py deleted file mode 100644 index a24c023ab4d7..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/identity_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 msrest.serialization import Model - - -class Identity(Model): - """Describes an identity resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The id of the created identity. - :vartype id: str - :ivar name: The name of the created identity. - :vartype name: str - :param location: The Azure region where the identity lives. - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar tenant_id: The id of the tenant which the identity belongs to. - :vartype tenant_id: str - :ivar principal_id: The id of the service principal object associated with - the created identity. - :vartype principal_id: str - :ivar client_id: The id of the app associated with the identity. This is a - random generated UUID by MSI. - :vartype client_id: str - :ivar client_secret_url: The ManagedServiceIdentity DataPlane URL that - can be queried to obtain the identity credentials. If identity is user - assigned, then the clientSecretUrl will not be present in the response, - otherwise it will be present. - :vartype client_secret_url: str - :ivar type: The type of resource i.e. - Microsoft.ManagedIdentity/userAssignedIdentities. Possible values include: - 'Microsoft.ManagedIdentity/userAssignedIdentities' - :vartype type: str or ~azure.mgmt.msi.models.UserAssignedIdentities - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - 'client_secret_url': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret_url': {'key': 'properties.clientSecretUrl', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Identity, self).__init__(**kwargs) - self.id = None - self.name = None - self.location = location - self.tags = tags - self.tenant_id = None - self.principal_id = None - self.client_id = None - self.client_secret_url = None - self.type = None diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/managed_service_identity_client_enums.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/managed_service_identity_client_enums.py deleted file mode 100644 index 1be9ca0449b3..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/managed_service_identity_client_enums.py +++ /dev/null @@ -1,17 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 UserAssignedIdentities(str, Enum): - - microsoft_managed_identityuser_assigned_identities = "Microsoft.ManagedIdentity/userAssignedIdentities" diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation.py deleted file mode 100644 index 3123b2729c32..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation.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 Operation(Model): - """Microsoft.ManagedIdentity Operation. - - Operation supported by the Microsoft.ManagedIdentity REST API. - - :param name: Operation Name. The name of the REST Operation. This is of - the format {provider}/{resource}/{operation}. - :type name: str - :param display: Operation Display. The object that describes the - operation. - :type display: ~azure.mgmt.msi.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation_display.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation_display.py deleted file mode 100644 index 9129b1f8145d..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation_display.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 OperationDisplay(Model): - """Operation Display. - - The object that describes the operation. - - :param provider: Resource Provider Name. Friendly name of the resource - provider. - :type provider: str - :param operation: Operation Type. The type of operation. For example: - read, write, delete. - :type operation: str - :param resource: Resource Type. The resource type on which the operation - is performed. - :type resource: str - :param description: Operation description. A description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.operation = kwargs.get('operation', None) - self.resource = kwargs.get('resource', None) - self.description = kwargs.get('description', None) diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation_display_py3.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation_display_py3.py deleted file mode 100644 index c0ce73c19513..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation_display_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 OperationDisplay(Model): - """Operation Display. - - The object that describes the operation. - - :param provider: Resource Provider Name. Friendly name of the resource - provider. - :type provider: str - :param operation: Operation Type. The type of operation. For example: - read, write, delete. - :type operation: str - :param resource: Resource Type. The resource type on which the operation - is performed. - :type resource: str - :param description: Operation description. A description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation_paged.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation_paged.py deleted file mode 100644 index 120a2229ce5f..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/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/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation_py3.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation_py3.py deleted file mode 100644 index f4aff37fc086..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/operation_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 Operation(Model): - """Microsoft.ManagedIdentity Operation. - - Operation supported by the Microsoft.ManagedIdentity REST API. - - :param name: Operation Name. The name of the REST Operation. This is of - the format {provider}/{resource}/{operation}. - :type name: str - :param display: Operation Display. The object that describes the - operation. - :type display: ~azure.mgmt.msi.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/__init__.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/__init__.py deleted file mode 100644 index 8539791da775..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/__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 .operations import Operations -from .user_assigned_identities_operations import UserAssignedIdentitiesOperations - -__all__ = [ - 'Operations', - 'UserAssignedIdentitiesOperations', -] diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/operations.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/operations.py deleted file mode 100644 index 495de7a8d83d..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/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: Version of API to invoke. Constant value: "2018-11-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-11-30" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists available operations for the Microsoft.ManagedIdentity provider. - - :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.msi.models.OperationPaged[~azure.mgmt.msi.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.ManagedIdentity/operations'} diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/user_assigned_identities_operations.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/user_assigned_identities_operations.py deleted file mode 100644 index 944d8cabf793..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/user_assigned_identities_operations.py +++ /dev/null @@ -1,438 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# 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 UserAssignedIdentitiesOperations(object): - """UserAssignedIdentitiesOperations 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: Version of API to invoke. Constant value: "2018-11-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-11-30" - - self.config = config - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the userAssignedIdentities available under the specified - 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 Identity - :rtype: - ~azure.mgmt.msi.models.IdentityPaged[~azure.mgmt.msi.models.Identity] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.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.IdentityPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IdentityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the userAssignedIdentities available under the specified - ResourceGroup. - - :param resource_group_name: The name of the Resource Group to which - the identity belongs. - :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 Identity - :rtype: - ~azure.mgmt.msi.models.IdentityPaged[~azure.mgmt.msi.models.Identity] - :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.IdentityPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IdentityPaged(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.ManagedIdentity/userAssignedIdentities'} - - def create_or_update( - self, resource_group_name, resource_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): - """Create or update an identity in the specified subscription and resource - group. - - :param resource_group_name: The name of the Resource Group to which - the identity belongs. - :type resource_group_name: str - :param resource_name: The name of the identity resource. - :type resource_name: str - :param location: The Azure region where the identity lives. - :type location: 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: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identity or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.msi.models.Identity or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.Identity(location=location, tags=tags) - - # 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'), - 'resourceName': self._serialize.url("resource_name", resource_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, 'Identity') - - # 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('Identity', response) - if response.status_code == 201: - deserialized = self._deserialize('Identity', 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.ManagedIdentity/userAssignedIdentities/{resourceName}'} - - def update( - self, resource_group_name, resource_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): - """Update an identity in the specified subscription and resource group. - - :param resource_group_name: The name of the Resource Group to which - the identity belongs. - :type resource_group_name: str - :param resource_name: The name of the identity resource. - :type resource_name: str - :param location: The Azure region where the identity lives. - :type location: 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: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identity or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.msi.models.Identity or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.Identity(location=location, tags=tags) - - # 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'), - 'resourceName': self._serialize.url("resource_name", resource_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, 'Identity') - - # 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('Identity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the identity. - - :param resource_group_name: The name of the Resource Group to which - the identity belongs. - :type resource_group_name: str - :param resource_name: The name of the identity resource. - :type resource_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: Identity or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.msi.models.Identity 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'), - 'resourceName': self._serialize.url("resource_name", resource_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('Identity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'} - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the identity. - - :param resource_group_name: The name of the Resource Group to which - the identity belongs. - :type resource_group_name: str - :param resource_name: The name of the identity resource. - :type resource_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'), - 'resourceName': self._serialize.url("resource_name", resource_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.ManagedIdentity/userAssignedIdentities/{resourceName}'} diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/version.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/version.py deleted file mode 100644 index a39916c162ce..000000000000 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/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 = "1.0.0" - diff --git a/sdk/resources/azure-mgmt-msi/dev_requirements.txt b/sdk/resources/azure-mgmt-msi/dev_requirements.txt deleted file mode 100644 index 1a1c8d8fc379..000000000000 --- a/sdk/resources/azure-mgmt-msi/dev_requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ --e ../../../tools/azure-sdk-tools --e ../../../tools/azure-devtools \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-msi/sdk_packaging.toml b/sdk/resources/azure-mgmt-msi/sdk_packaging.toml deleted file mode 100644 index e10e556882e3..000000000000 --- a/sdk/resources/azure-mgmt-msi/sdk_packaging.toml +++ /dev/null @@ -1,5 +0,0 @@ -[packaging] -package_name = "azure-mgmt-msi" -package_pprint_name = "MSI Management" -package_doc_id = "activedirectory" -is_stable = false diff --git a/sdk/resources/azure-mgmt-msi/setup.cfg b/sdk/resources/azure-mgmt-msi/setup.cfg deleted file mode 100644 index 3c6e79cf31da..000000000000 --- a/sdk/resources/azure-mgmt-msi/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/sdk/resources/azure-mgmt-msi/setup.py b/sdk/resources/azure-mgmt-msi/setup.py deleted file mode 100644 index ef6e308a61fa..000000000000 --- a/sdk/resources/azure-mgmt-msi/setup.py +++ /dev/null @@ -1,88 +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 re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-msi" -PACKAGE_PPRINT_NAME = "MSI Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.md', encoding='utf-8') as f: - readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - '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', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), - install_requires=[ - 'msrest>=0.5.0', - 'msrestazure>=0.4.32,<2.0.0', - 'azure-common~=1.1', - ], - extras_require={ - ":python_version<'3.0'": ['azure-mgmt-nspkg'], - } -) diff --git a/sdk/resources/azure-mgmt-msi/tests/recordings/test_cli_mgmt_msi.test_msi.yaml b/sdk/resources/azure-mgmt-msi/tests/recordings/test_cli_mgmt_msi.test_msi.yaml deleted file mode 100644 index 5b16014aed64..000000000000 --- a/sdk/resources/azure-mgmt-msi/tests/recordings/test_cli_mgmt_msi.test_msi.yaml +++ /dev/null @@ -1,190 +0,0 @@ -interactions: -- request: - body: '{"location": "eastus", "tags": {"key1": "value1", "key2": "value2"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '68' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-msi/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_msi_test_msi90900aaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/useridentityname?api-version=2018-11-30 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_msi_test_msi90900aaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/useridentityname","name":"useridentityname","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"eastus","tags":{"key1":"value1","key2":"value2"},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"bb2c2e04-e730-438f-a371-23c8e0ea9c0b","clientId":"4a32782b-afc7-4d3c-bd40-092ec0b2932f"}}' - headers: - cache-control: - - no-cache - content-length: - - '499' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 26 Feb 2020 09:22:33 GMT - expires: - - '-1' - location: - - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_msi_test_msi90900aaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/useridentityname - 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: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-msi/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_msi_test_msi90900aaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/useridentityname?api-version=2018-11-30 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_msi_test_msi90900aaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/useridentityname","name":"useridentityname","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"eastus","tags":{"key1":"value1","key2":"value2"},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"bb2c2e04-e730-438f-a371-23c8e0ea9c0b","clientId":"4a32782b-afc7-4d3c-bd40-092ec0b2932f"}}' - headers: - cache-control: - - no-cache - content-length: - - '499' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 26 Feb 2020 09:22:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "tags": {"key1": "value1", "key2": "value2"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '68' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-msi/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_msi_test_msi90900aaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/useridentityname?api-version=2018-11-30 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_msi_test_msi90900aaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/useridentityname","name":"useridentityname","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"eastus","tags":{"key1":"value1","key2":"value2"},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"bb2c2e04-e730-438f-a371-23c8e0ea9c0b","clientId":"4a32782b-afc7-4d3c-bd40-092ec0b2932f"}}' - headers: - cache-control: - - no-cache - content-length: - - '499' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 26 Feb 2020 09:22:42 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-msi/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_msi_test_msi90900aaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/useridentityname?api-version=2018-11-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 26 Feb 2020 09:22:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/resources/azure-mgmt-msi/tests/test_cli_mgmt_msi.py b/sdk/resources/azure-mgmt-msi/tests/test_cli_mgmt_msi.py deleted file mode 100644 index ca8507bcc11e..000000000000 --- a/sdk/resources/azure-mgmt-msi/tests/test_cli_mgmt_msi.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - - -# TEST SCENARIO COVERAGE -# ---------------------- -# Methods Total : 8 -# Methods Covered : 8 -# Examples Total : 8 -# Examples Tested : 8 -# Coverage % : 100 -# ---------------------- - -import unittest - -import azure.mgmt.msi -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - -AZURE_LOCATION = 'eastus' - -class MgmtManagedServiceIdentityClientTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtManagedServiceIdentityClientTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.msi.ManagedServiceIdentityClient - ) - - @ResourceGroupPreparer(location=AZURE_LOCATION) - def test_msi(self, resource_group): - - SERVICE_NAME = "myapimrndxyz" - USER_ASSIGNED_IDENTITY_NAME = "useridentityname" - IDENTITY_NAME = "identityname" - - # IdentityCreate[put] - # BODY = { - # "location": "eastus", - # "tags": { - # "key1": "value1", - # "key2": "value2" - # } - # } - LOCATION = "eastus" - TAGS = { - "key1": "value1", - "key2": "value2" - } - result = self.mgmt_client.user_assigned_identities.create_or_update(resource_group.name, USER_ASSIGNED_IDENTITY_NAME, LOCATION, TAGS) - - # IdentityGet[get] - result = self.mgmt_client.user_assigned_identities.get(resource_group.name, USER_ASSIGNED_IDENTITY_NAME) - - # IdentityListByResourceGroup[get] - result = self.mgmt_client.user_assigned_identities.list_by_resource_group(resource_group.name) - - # IdentityListBySubscription[get] - result = self.mgmt_client.user_assigned_identities.list_by_subscription() - - """ TODO: dont have system_assigned_identities module - # MsiOperationsList[get] - result = self.mgmt_client.system_assigned_identities.get_by_scope(IDENTITY_NAME) - - # MsiOperationsList[get] - result = self.mgmt_client.system_assigned_identities.get_by_scope(IDENTITY_NAME) - """ - - # IdentityUpdate[patch] - # BODY = { - # "location": "eastus", - # "tags": { - # "key1": "value1", - # "key2": "value2" - # } - # } - LOCATION = "eastus" - TAGS = { - "key1": "value1", - "key2": "value2" - } - result = self.mgmt_client.user_assigned_identities.update(resource_group.name, USER_ASSIGNED_IDENTITY_NAME, LOCATION, TAGS) - - # IdentityDelete[delete] - result = self.mgmt_client.user_assigned_identities.delete(resource_group.name, USER_ASSIGNED_IDENTITY_NAME) - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() diff --git a/sdk/resources/ci.yml b/sdk/resources/ci.yml index b6db26d72bde..567f7c38106c 100644 --- a/sdk/resources/ci.yml +++ b/sdk/resources/ci.yml @@ -30,8 +30,6 @@ extends: parameters: ServiceDirectory: resources Artifacts: - - name: azure-mgmt-msi - safeName: azuremgmtmsi - name: azure-mgmt-resource safeName: azuremgmtresource - name: azure-mgmt-resourcegraph diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/CHANGELOG.md b/sdk/sql/azure-mgmt-sqlvirtualmachine/CHANGELOG.md deleted file mode 100644 index 3dc5228933ab..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/CHANGELOG.md +++ /dev/null @@ -1,68 +0,0 @@ -# Release History - -## 0.5.0 (2019-11-27) - -**Features** - - - Model SqlVirtualMachine has a new parameter - storage_configuration_settings - - Added operation - SqlVirtualMachinesOperations.list_by_sql_vm_group - -## 0.4.0 (2019-07-04) - -**Features** - - - Model SqlVirtualMachine has a new parameter sql_management - -**General Breaking changes** - -This version uses a next-generation code generator that *might* -introduce breaking changes if from some import. In summary, some modules -were incorrectly visible/importable and have been renamed. This fixed -several issues caused by usage of classes that were not supposed to be -used in the first place. - - - SqlVirtualMachineManagementClient cannot be imported from - `azure.mgmt.sqlvirtualmachine.sql_virtual_machine_management_client` - anymore (import from `azure.mgmt.sqlvirtualmachine` works like - before) - - SqlVirtualMachineManagementClientConfiguration import has been moved - from - `azure.mgmt.sqlvirtualmachine.sql_virtual_machine_management_client` - to `azure.mgmt.sqlvirtualmachine` - - A model `MyClass` from a "models" sub-module cannot be imported - anymore using `azure.mgmt.sqlvirtualmachine.models.my_class` - (import from `azure.mgmt.sqlvirtualmachine.models` works like - before) - - An operation class `MyClassOperations` from an `operations` - sub-module cannot be imported anymore using - `azure.mgmt.sqlvirtualmachine.operations.my_class_operations` - (import from `azure.mgmt.sqlvirtualmachine.operations` works like - before) - -Last but not least, HTTP connection pooling is now enabled by default. -You should always use a client as a context manager, or call close(), or -use no more than one client per process. - -## 0.3.0 (2019-06-03) - -**Features** - - - sql_image_sku is now writable - -## 0.2.0 (2018-12-07) - -**Features** - - - Model SqlStorageUpdateSettings has a new parameter - starting_device_id - -**Breaking changes** - - - Model AdditionalFeaturesServerConfigurations no longer has parameter - backup_permissions_for_azure_backup_svc - -## 0.1.0 (2018-11-27) - - - Initial Release diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/MANIFEST.in b/sdk/sql/azure-mgmt-sqlvirtualmachine/MANIFEST.in deleted file mode 100644 index a3cb07df8765..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -recursive-include tests *.py *.yaml -include *.md -include azure/__init__.py -include azure/mgmt/__init__.py - diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/README.md b/sdk/sql/azure-mgmt-sqlvirtualmachine/README.md deleted file mode 100644 index 379efa4e6847..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Microsoft Azure SDK for Python - -This is the Microsoft Azure SQL Virtual Machine Management Client Library. -This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. -For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). - - -# Usage - -For code examples, see [SQL Virtual Machine Management](https://docs.microsoft.com/python/api/overview/azure/) -on docs.microsoft.com. - - -# Provide Feedback - -If you encounter any bugs or have suggestions, please file an issue in the -[Issues](https://github.com/Azure/azure-sdk-for-python/issues) -section of the project. - - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-sqlvirtualmachine%2FREADME.png) diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/__init__.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/__init__.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/__init__.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/__init__.py deleted file mode 100644 index 2e124d5bc2fb..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import SqlVirtualMachineManagementClientConfiguration -from ._sql_virtual_machine_management_client import SqlVirtualMachineManagementClient -__all__ = ['SqlVirtualMachineManagementClient', 'SqlVirtualMachineManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_configuration.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_configuration.py deleted file mode 100644 index add096f5a04b..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_configuration.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 msrestazure import AzureConfiguration - -from .version import VERSION - - -class SqlVirtualMachineManagementClientConfiguration(AzureConfiguration): - """Configuration for SqlVirtualMachineManagementClient - 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: 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(SqlVirtualMachineManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-sqlvirtualmachine/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_sql_virtual_machine_management_client.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_sql_virtual_machine_management_client.py deleted file mode 100644 index b21f268174ae..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_sql_virtual_machine_management_client.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.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import SqlVirtualMachineManagementClientConfiguration -from .operations import AvailabilityGroupListenersOperations -from .operations import Operations -from .operations import SqlVirtualMachineGroupsOperations -from .operations import SqlVirtualMachinesOperations -from . import models - - -class SqlVirtualMachineManagementClient(SDKClient): - """The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. - - :ivar config: Configuration for client. - :vartype config: SqlVirtualMachineManagementClientConfiguration - - :ivar availability_group_listeners: AvailabilityGroupListeners operations - :vartype availability_group_listeners: azure.mgmt.sqlvirtualmachine.operations.AvailabilityGroupListenersOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.sqlvirtualmachine.operations.Operations - :ivar sql_virtual_machine_groups: SqlVirtualMachineGroups operations - :vartype sql_virtual_machine_groups: azure.mgmt.sqlvirtualmachine.operations.SqlVirtualMachineGroupsOperations - :ivar sql_virtual_machines: SqlVirtualMachines operations - :vartype sql_virtual_machines: azure.mgmt.sqlvirtualmachine.operations.SqlVirtualMachinesOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: 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 = SqlVirtualMachineManagementClientConfiguration(credentials, subscription_id, base_url) - super(SqlVirtualMachineManagementClient, 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-03-01-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.availability_group_listeners = AvailabilityGroupListenersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.sql_virtual_machine_groups = SqlVirtualMachineGroupsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.sql_virtual_machines = SqlVirtualMachinesOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/__init__.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/__init__.py deleted file mode 100644 index fe4e3361895d..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/__init__.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. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AdditionalFeaturesServerConfigurations - from ._models_py3 import AutoBackupSettings - from ._models_py3 import AutoPatchingSettings - from ._models_py3 import AvailabilityGroupListener - from ._models_py3 import KeyVaultCredentialSettings - from ._models_py3 import LoadBalancerConfiguration - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import PrivateIPAddress - from ._models_py3 import ProxyResource - from ._models_py3 import Resource - from ._models_py3 import ResourceIdentity - from ._models_py3 import ServerConfigurationsManagementSettings - from ._models_py3 import SqlConnectivityUpdateSettings - from ._models_py3 import SQLStorageSettings - from ._models_py3 import SqlStorageUpdateSettings - from ._models_py3 import SqlVirtualMachine - from ._models_py3 import SqlVirtualMachineGroup - from ._models_py3 import SqlVirtualMachineGroupUpdate - from ._models_py3 import SqlVirtualMachineUpdate - from ._models_py3 import SqlWorkloadTypeUpdateSettings - from ._models_py3 import StorageConfigurationSettings - from ._models_py3 import TrackedResource - from ._models_py3 import WsfcDomainCredentials - from ._models_py3 import WsfcDomainProfile -except (SyntaxError, ImportError): - from ._models import AdditionalFeaturesServerConfigurations - from ._models import AutoBackupSettings - from ._models import AutoPatchingSettings - from ._models import AvailabilityGroupListener - from ._models import KeyVaultCredentialSettings - from ._models import LoadBalancerConfiguration - from ._models import Operation - from ._models import OperationDisplay - from ._models import PrivateIPAddress - from ._models import ProxyResource - from ._models import Resource - from ._models import ResourceIdentity - from ._models import ServerConfigurationsManagementSettings - from ._models import SqlConnectivityUpdateSettings - from ._models import SQLStorageSettings - from ._models import SqlStorageUpdateSettings - from ._models import SqlVirtualMachine - from ._models import SqlVirtualMachineGroup - from ._models import SqlVirtualMachineGroupUpdate - from ._models import SqlVirtualMachineUpdate - from ._models import SqlWorkloadTypeUpdateSettings - from ._models import StorageConfigurationSettings - from ._models import TrackedResource - from ._models import WsfcDomainCredentials - from ._models import WsfcDomainProfile -from ._paged_models import AvailabilityGroupListenerPaged -from ._paged_models import OperationPaged -from ._paged_models import SqlVirtualMachineGroupPaged -from ._paged_models import SqlVirtualMachinePaged -from ._sql_virtual_machine_management_client_enums import ( - OperationOrigin, - SqlVmGroupImageSku, - ScaleType, - ClusterManagerType, - ClusterConfiguration, - IdentityType, - SqlServerLicenseType, - SqlManagementMode, - SqlImageSku, - DayOfWeek, - BackupScheduleType, - FullBackupFrequencyType, - ConnectivityType, - SqlWorkloadType, - DiskConfigurationType, - StorageWorkloadType, -) - -__all__ = [ - 'AdditionalFeaturesServerConfigurations', - 'AutoBackupSettings', - 'AutoPatchingSettings', - 'AvailabilityGroupListener', - 'KeyVaultCredentialSettings', - 'LoadBalancerConfiguration', - 'Operation', - 'OperationDisplay', - 'PrivateIPAddress', - 'ProxyResource', - 'Resource', - 'ResourceIdentity', - 'ServerConfigurationsManagementSettings', - 'SqlConnectivityUpdateSettings', - 'SQLStorageSettings', - 'SqlStorageUpdateSettings', - 'SqlVirtualMachine', - 'SqlVirtualMachineGroup', - 'SqlVirtualMachineGroupUpdate', - 'SqlVirtualMachineUpdate', - 'SqlWorkloadTypeUpdateSettings', - 'StorageConfigurationSettings', - 'TrackedResource', - 'WsfcDomainCredentials', - 'WsfcDomainProfile', - 'AvailabilityGroupListenerPaged', - 'OperationPaged', - 'SqlVirtualMachineGroupPaged', - 'SqlVirtualMachinePaged', - 'OperationOrigin', - 'SqlVmGroupImageSku', - 'ScaleType', - 'ClusterManagerType', - 'ClusterConfiguration', - 'IdentityType', - 'SqlServerLicenseType', - 'SqlManagementMode', - 'SqlImageSku', - 'DayOfWeek', - 'BackupScheduleType', - 'FullBackupFrequencyType', - 'ConnectivityType', - 'SqlWorkloadType', - 'DiskConfigurationType', - 'StorageWorkloadType', -] diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_models.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_models.py deleted file mode 100644 index 3c9b2c110e72..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_models.py +++ /dev/null @@ -1,976 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 AdditionalFeaturesServerConfigurations(Model): - """Additional SQL Server feature settings. - - :param is_rservices_enabled: Enable or disable R services (SQL 2016 - onwards). - :type is_rservices_enabled: bool - """ - - _attribute_map = { - 'is_rservices_enabled': {'key': 'isRServicesEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AdditionalFeaturesServerConfigurations, self).__init__(**kwargs) - self.is_rservices_enabled = kwargs.get('is_rservices_enabled', None) - - -class AutoBackupSettings(Model): - """Configure backups for databases in your SQL virtual machine. - - :param enable: Enable or disable autobackup on SQL virtual machine. - :type enable: bool - :param enable_encryption: Enable or disable encryption for backup on SQL - virtual machine. - :type enable_encryption: bool - :param retention_period: Retention period of backup: 1-30 days. - :type retention_period: int - :param storage_account_url: Storage account url where backup will be taken - to. - :type storage_account_url: str - :param storage_access_key: Storage account key where backup will be taken - to. - :type storage_access_key: str - :param password: Password for encryption on backup. - :type password: str - :param backup_system_dbs: Include or exclude system databases from auto - backup. - :type backup_system_dbs: bool - :param backup_schedule_type: Backup schedule type. Possible values - include: 'Manual', 'Automated' - :type backup_schedule_type: str or - ~azure.mgmt.sqlvirtualmachine.models.BackupScheduleType - :param full_backup_frequency: Frequency of full backups. In both cases, - full backups begin during the next scheduled time window. Possible values - include: 'Daily', 'Weekly' - :type full_backup_frequency: str or - ~azure.mgmt.sqlvirtualmachine.models.FullBackupFrequencyType - :param full_backup_start_time: Start time of a given day during which full - backups can take place. 0-23 hours. - :type full_backup_start_time: int - :param full_backup_window_hours: Duration of the time window of a given - day during which full backups can take place. 1-23 hours. - :type full_backup_window_hours: int - :param log_backup_frequency: Frequency of log backups. 5-60 minutes. - :type log_backup_frequency: int - """ - - _attribute_map = { - 'enable': {'key': 'enable', 'type': 'bool'}, - 'enable_encryption': {'key': 'enableEncryption', 'type': 'bool'}, - 'retention_period': {'key': 'retentionPeriod', 'type': 'int'}, - 'storage_account_url': {'key': 'storageAccountUrl', 'type': 'str'}, - 'storage_access_key': {'key': 'storageAccessKey', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'backup_system_dbs': {'key': 'backupSystemDbs', 'type': 'bool'}, - 'backup_schedule_type': {'key': 'backupScheduleType', 'type': 'str'}, - 'full_backup_frequency': {'key': 'fullBackupFrequency', 'type': 'str'}, - 'full_backup_start_time': {'key': 'fullBackupStartTime', 'type': 'int'}, - 'full_backup_window_hours': {'key': 'fullBackupWindowHours', 'type': 'int'}, - 'log_backup_frequency': {'key': 'logBackupFrequency', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AutoBackupSettings, self).__init__(**kwargs) - self.enable = kwargs.get('enable', None) - self.enable_encryption = kwargs.get('enable_encryption', None) - self.retention_period = kwargs.get('retention_period', None) - self.storage_account_url = kwargs.get('storage_account_url', None) - self.storage_access_key = kwargs.get('storage_access_key', None) - self.password = kwargs.get('password', None) - self.backup_system_dbs = kwargs.get('backup_system_dbs', None) - self.backup_schedule_type = kwargs.get('backup_schedule_type', None) - self.full_backup_frequency = kwargs.get('full_backup_frequency', None) - self.full_backup_start_time = kwargs.get('full_backup_start_time', None) - self.full_backup_window_hours = kwargs.get('full_backup_window_hours', None) - self.log_backup_frequency = kwargs.get('log_backup_frequency', None) - - -class AutoPatchingSettings(Model): - """Set a patching window during which Windows and SQL patches will be applied. - - :param enable: Enable or disable autopatching on SQL virtual machine. - :type enable: bool - :param day_of_week: Day of week to apply the patch on. Possible values - include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', - 'Saturday', 'Sunday' - :type day_of_week: str or ~azure.mgmt.sqlvirtualmachine.models.DayOfWeek - :param maintenance_window_starting_hour: Hour of the day when patching is - initiated. Local VM time. - :type maintenance_window_starting_hour: int - :param maintenance_window_duration: Duration of patching. - :type maintenance_window_duration: int - """ - - _attribute_map = { - 'enable': {'key': 'enable', 'type': 'bool'}, - 'day_of_week': {'key': 'dayOfWeek', 'type': 'DayOfWeek'}, - 'maintenance_window_starting_hour': {'key': 'maintenanceWindowStartingHour', 'type': 'int'}, - 'maintenance_window_duration': {'key': 'maintenanceWindowDuration', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AutoPatchingSettings, self).__init__(**kwargs) - self.enable = kwargs.get('enable', None) - self.day_of_week = kwargs.get('day_of_week', None) - self.maintenance_window_starting_hour = kwargs.get('maintenance_window_starting_hour', None) - self.maintenance_window_duration = kwargs.get('maintenance_window_duration', None) - - -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 - - -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) - - -class AvailabilityGroupListener(ProxyResource): - """A SQL Server availability group listener. - - 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 provisioning_state: Provisioning state to track the async operation - status. - :vartype provisioning_state: str - :param availability_group_name: Name of the availability group. - :type availability_group_name: str - :param load_balancer_configurations: List of load balancer configurations - for an availability group listener. - :type load_balancer_configurations: - list[~azure.mgmt.sqlvirtualmachine.models.LoadBalancerConfiguration] - :param create_default_availability_group_if_not_exist: Create a default - availability group if it does not exist. - :type create_default_availability_group_if_not_exist: bool - :param port: Listener port. - :type port: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_group_name': {'key': 'properties.availabilityGroupName', 'type': 'str'}, - 'load_balancer_configurations': {'key': 'properties.loadBalancerConfigurations', 'type': '[LoadBalancerConfiguration]'}, - 'create_default_availability_group_if_not_exist': {'key': 'properties.createDefaultAvailabilityGroupIfNotExist', 'type': 'bool'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AvailabilityGroupListener, self).__init__(**kwargs) - self.provisioning_state = None - self.availability_group_name = kwargs.get('availability_group_name', None) - self.load_balancer_configurations = kwargs.get('load_balancer_configurations', None) - self.create_default_availability_group_if_not_exist = kwargs.get('create_default_availability_group_if_not_exist', None) - self.port = kwargs.get('port', None) - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class KeyVaultCredentialSettings(Model): - """Configure your SQL virtual machine to be able to connect to the Azure Key - Vault service. - - :param enable: Enable or disable key vault credential setting. - :type enable: bool - :param credential_name: Credential name. - :type credential_name: str - :param azure_key_vault_url: Azure Key Vault url. - :type azure_key_vault_url: str - :param service_principal_name: Service principal name to access key vault. - :type service_principal_name: str - :param service_principal_secret: Service principal name secret to access - key vault. - :type service_principal_secret: str - """ - - _attribute_map = { - 'enable': {'key': 'enable', 'type': 'bool'}, - 'credential_name': {'key': 'credentialName', 'type': 'str'}, - 'azure_key_vault_url': {'key': 'azureKeyVaultUrl', 'type': 'str'}, - 'service_principal_name': {'key': 'servicePrincipalName', 'type': 'str'}, - 'service_principal_secret': {'key': 'servicePrincipalSecret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultCredentialSettings, self).__init__(**kwargs) - self.enable = kwargs.get('enable', None) - self.credential_name = kwargs.get('credential_name', None) - self.azure_key_vault_url = kwargs.get('azure_key_vault_url', None) - self.service_principal_name = kwargs.get('service_principal_name', None) - self.service_principal_secret = kwargs.get('service_principal_secret', None) - - -class LoadBalancerConfiguration(Model): - """A load balancer configuration for an availability group listener. - - :param private_ip_address: Private IP address. - :type private_ip_address: - ~azure.mgmt.sqlvirtualmachine.models.PrivateIPAddress - :param public_ip_address_resource_id: Resource id of the public IP. - :type public_ip_address_resource_id: str - :param load_balancer_resource_id: Resource id of the load balancer. - :type load_balancer_resource_id: str - :param probe_port: Probe port. - :type probe_port: int - :param sql_virtual_machine_instances: List of the SQL virtual machine - instance resource id's that are enrolled into the availability group - listener. - :type sql_virtual_machine_instances: list[str] - """ - - _attribute_map = { - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'PrivateIPAddress'}, - 'public_ip_address_resource_id': {'key': 'publicIpAddressResourceId', 'type': 'str'}, - 'load_balancer_resource_id': {'key': 'loadBalancerResourceId', 'type': 'str'}, - 'probe_port': {'key': 'probePort', 'type': 'int'}, - 'sql_virtual_machine_instances': {'key': 'sqlVirtualMachineInstances', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(LoadBalancerConfiguration, self).__init__(**kwargs) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.public_ip_address_resource_id = kwargs.get('public_ip_address_resource_id', None) - self.load_balancer_resource_id = kwargs.get('load_balancer_resource_id', None) - self.probe_port = kwargs.get('probe_port', None) - self.sql_virtual_machine_instances = kwargs.get('sql_virtual_machine_instances', None) - - -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.sqlvirtualmachine.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or - ~azure.mgmt.sqlvirtualmachine.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 - - -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 - - -class PrivateIPAddress(Model): - """A private IP address bound to the availability group listener. - - :param ip_address: Private IP address bound to the availability group - listener. - :type ip_address: str - :param subnet_resource_id: Subnet used to include private IP. - :type subnet_resource_id: str - """ - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_resource_id': {'key': 'subnetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateIPAddress, self).__init__(**kwargs) - self.ip_address = kwargs.get('ip_address', None) - self.subnet_resource_id = kwargs.get('subnet_resource_id', None) - - -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.sqlvirtualmachine.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 - - -class ServerConfigurationsManagementSettings(Model): - """Set the connectivity, storage and workload settings. - - :param sql_connectivity_update_settings: SQL connectivity type settings. - :type sql_connectivity_update_settings: - ~azure.mgmt.sqlvirtualmachine.models.SqlConnectivityUpdateSettings - :param sql_workload_type_update_settings: SQL workload type settings. - :type sql_workload_type_update_settings: - ~azure.mgmt.sqlvirtualmachine.models.SqlWorkloadTypeUpdateSettings - :param sql_storage_update_settings: SQL storage update settings. - :type sql_storage_update_settings: - ~azure.mgmt.sqlvirtualmachine.models.SqlStorageUpdateSettings - :param additional_features_server_configurations: Additional SQL feature - settings. - :type additional_features_server_configurations: - ~azure.mgmt.sqlvirtualmachine.models.AdditionalFeaturesServerConfigurations - """ - - _attribute_map = { - 'sql_connectivity_update_settings': {'key': 'sqlConnectivityUpdateSettings', 'type': 'SqlConnectivityUpdateSettings'}, - 'sql_workload_type_update_settings': {'key': 'sqlWorkloadTypeUpdateSettings', 'type': 'SqlWorkloadTypeUpdateSettings'}, - 'sql_storage_update_settings': {'key': 'sqlStorageUpdateSettings', 'type': 'SqlStorageUpdateSettings'}, - 'additional_features_server_configurations': {'key': 'additionalFeaturesServerConfigurations', 'type': 'AdditionalFeaturesServerConfigurations'}, - } - - def __init__(self, **kwargs): - super(ServerConfigurationsManagementSettings, self).__init__(**kwargs) - self.sql_connectivity_update_settings = kwargs.get('sql_connectivity_update_settings', None) - self.sql_workload_type_update_settings = kwargs.get('sql_workload_type_update_settings', None) - self.sql_storage_update_settings = kwargs.get('sql_storage_update_settings', None) - self.additional_features_server_configurations = kwargs.get('additional_features_server_configurations', None) - - -class SqlConnectivityUpdateSettings(Model): - """Set the access level and network port settings for SQL Server. - - :param connectivity_type: SQL Server connectivity option. Possible values - include: 'LOCAL', 'PRIVATE', 'PUBLIC' - :type connectivity_type: str or - ~azure.mgmt.sqlvirtualmachine.models.ConnectivityType - :param port: SQL Server port. - :type port: int - :param sql_auth_update_user_name: SQL Server sysadmin login to create. - :type sql_auth_update_user_name: str - :param sql_auth_update_password: SQL Server sysadmin login password. - :type sql_auth_update_password: str - """ - - _attribute_map = { - 'connectivity_type': {'key': 'connectivityType', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'sql_auth_update_user_name': {'key': 'sqlAuthUpdateUserName', 'type': 'str'}, - 'sql_auth_update_password': {'key': 'sqlAuthUpdatePassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SqlConnectivityUpdateSettings, self).__init__(**kwargs) - self.connectivity_type = kwargs.get('connectivity_type', None) - self.port = kwargs.get('port', None) - self.sql_auth_update_user_name = kwargs.get('sql_auth_update_user_name', None) - self.sql_auth_update_password = kwargs.get('sql_auth_update_password', None) - - -class SQLStorageSettings(Model): - """Set disk storage settings for SQL Server. - - :param luns: Logical Unit Numbers for the disks. - :type luns: list[int] - :param default_file_path: SQL Server default file path - :type default_file_path: str - """ - - _attribute_map = { - 'luns': {'key': 'luns', 'type': '[int]'}, - 'default_file_path': {'key': 'defaultFilePath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SQLStorageSettings, self).__init__(**kwargs) - self.luns = kwargs.get('luns', None) - self.default_file_path = kwargs.get('default_file_path', None) - - -class SqlStorageUpdateSettings(Model): - """Set disk storage settings for SQL Server. - - :param disk_count: Virtual machine disk count. - :type disk_count: int - :param starting_device_id: Device id of the first disk to be updated. - :type starting_device_id: int - :param disk_configuration_type: Disk configuration to apply to SQL Server. - Possible values include: 'NEW', 'EXTEND', 'ADD' - :type disk_configuration_type: str or - ~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType - """ - - _attribute_map = { - 'disk_count': {'key': 'diskCount', 'type': 'int'}, - 'starting_device_id': {'key': 'startingDeviceId', 'type': 'int'}, - 'disk_configuration_type': {'key': 'diskConfigurationType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SqlStorageUpdateSettings, self).__init__(**kwargs) - self.disk_count = kwargs.get('disk_count', None) - self.starting_device_id = kwargs.get('starting_device_id', None) - self.disk_configuration_type = kwargs.get('disk_configuration_type', None) - - -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) - - -class SqlVirtualMachine(TrackedResource): - """A SQL virtual machine. - - 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: Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sqlvirtualmachine.models.ResourceIdentity - :param virtual_machine_resource_id: ARM Resource id of underlying virtual - machine created from SQL marketplace image. - :type virtual_machine_resource_id: str - :ivar provisioning_state: Provisioning state to track the async operation - status. - :vartype provisioning_state: str - :param sql_image_offer: SQL image offer. Examples include SQL2016-WS2016, - SQL2017-WS2016. - :type sql_image_offer: str - :param sql_server_license_type: SQL Server license type. Possible values - include: 'PAYG', 'AHUB', 'DR' - :type sql_server_license_type: str or - ~azure.mgmt.sqlvirtualmachine.models.SqlServerLicenseType - :param sql_management: SQL Server Management type. Possible values - include: 'Full', 'LightWeight', 'NoAgent' - :type sql_management: str or - ~azure.mgmt.sqlvirtualmachine.models.SqlManagementMode - :param sql_image_sku: SQL Server edition type. Possible values include: - 'Developer', 'Express', 'Standard', 'Enterprise', 'Web' - :type sql_image_sku: str or - ~azure.mgmt.sqlvirtualmachine.models.SqlImageSku - :param sql_virtual_machine_group_resource_id: ARM resource id of the SQL - virtual machine group this SQL virtual machine is or will be part of. - :type sql_virtual_machine_group_resource_id: str - :param wsfc_domain_credentials: Domain credentials for setting up Windows - Server Failover Cluster for SQL availability group. - :type wsfc_domain_credentials: - ~azure.mgmt.sqlvirtualmachine.models.WsfcDomainCredentials - :param auto_patching_settings: Auto patching settings for applying - critical security updates to SQL virtual machine. - :type auto_patching_settings: - ~azure.mgmt.sqlvirtualmachine.models.AutoPatchingSettings - :param auto_backup_settings: Auto backup settings for SQL Server. - :type auto_backup_settings: - ~azure.mgmt.sqlvirtualmachine.models.AutoBackupSettings - :param key_vault_credential_settings: Key vault credential settings. - :type key_vault_credential_settings: - ~azure.mgmt.sqlvirtualmachine.models.KeyVaultCredentialSettings - :param server_configurations_management_settings: SQL Server configuration - management settings. - :type server_configurations_management_settings: - ~azure.mgmt.sqlvirtualmachine.models.ServerConfigurationsManagementSettings - :param storage_configuration_settings: Storage Configuration Settings. - :type storage_configuration_settings: - ~azure.mgmt.sqlvirtualmachine.models.StorageConfigurationSettings - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_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}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'virtual_machine_resource_id': {'key': 'properties.virtualMachineResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'sql_image_offer': {'key': 'properties.sqlImageOffer', 'type': 'str'}, - 'sql_server_license_type': {'key': 'properties.sqlServerLicenseType', 'type': 'str'}, - 'sql_management': {'key': 'properties.sqlManagement', 'type': 'str'}, - 'sql_image_sku': {'key': 'properties.sqlImageSku', 'type': 'str'}, - 'sql_virtual_machine_group_resource_id': {'key': 'properties.sqlVirtualMachineGroupResourceId', 'type': 'str'}, - 'wsfc_domain_credentials': {'key': 'properties.wsfcDomainCredentials', 'type': 'WsfcDomainCredentials'}, - 'auto_patching_settings': {'key': 'properties.autoPatchingSettings', 'type': 'AutoPatchingSettings'}, - 'auto_backup_settings': {'key': 'properties.autoBackupSettings', 'type': 'AutoBackupSettings'}, - 'key_vault_credential_settings': {'key': 'properties.keyVaultCredentialSettings', 'type': 'KeyVaultCredentialSettings'}, - 'server_configurations_management_settings': {'key': 'properties.serverConfigurationsManagementSettings', 'type': 'ServerConfigurationsManagementSettings'}, - 'storage_configuration_settings': {'key': 'properties.storageConfigurationSettings', 'type': 'StorageConfigurationSettings'}, - } - - def __init__(self, **kwargs): - super(SqlVirtualMachine, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.virtual_machine_resource_id = kwargs.get('virtual_machine_resource_id', None) - self.provisioning_state = None - self.sql_image_offer = kwargs.get('sql_image_offer', None) - self.sql_server_license_type = kwargs.get('sql_server_license_type', None) - self.sql_management = kwargs.get('sql_management', None) - self.sql_image_sku = kwargs.get('sql_image_sku', None) - self.sql_virtual_machine_group_resource_id = kwargs.get('sql_virtual_machine_group_resource_id', None) - self.wsfc_domain_credentials = kwargs.get('wsfc_domain_credentials', None) - self.auto_patching_settings = kwargs.get('auto_patching_settings', None) - self.auto_backup_settings = kwargs.get('auto_backup_settings', None) - self.key_vault_credential_settings = kwargs.get('key_vault_credential_settings', None) - self.server_configurations_management_settings = kwargs.get('server_configurations_management_settings', None) - self.storage_configuration_settings = kwargs.get('storage_configuration_settings', None) - - -class SqlVirtualMachineGroup(TrackedResource): - """A SQL virtual machine 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 location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar provisioning_state: Provisioning state to track the async operation - status. - :vartype provisioning_state: str - :param sql_image_offer: SQL image offer. Examples may include - SQL2016-WS2016, SQL2017-WS2016. - :type sql_image_offer: str - :param sql_image_sku: SQL image sku. Possible values include: 'Developer', - 'Enterprise' - :type sql_image_sku: str or - ~azure.mgmt.sqlvirtualmachine.models.SqlVmGroupImageSku - :ivar scale_type: Scale type. Possible values include: 'HA' - :vartype scale_type: str or ~azure.mgmt.sqlvirtualmachine.models.ScaleType - :ivar cluster_manager_type: Type of cluster manager: Windows Server - Failover Cluster (WSFC), implied by the scale type of the group and the OS - type. Possible values include: 'WSFC' - :vartype cluster_manager_type: str or - ~azure.mgmt.sqlvirtualmachine.models.ClusterManagerType - :ivar cluster_configuration: Cluster type. Possible values include: - 'Domainful' - :vartype cluster_configuration: str or - ~azure.mgmt.sqlvirtualmachine.models.ClusterConfiguration - :param wsfc_domain_profile: Cluster Active Directory domain profile. - :type wsfc_domain_profile: - ~azure.mgmt.sqlvirtualmachine.models.WsfcDomainProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'scale_type': {'readonly': True}, - 'cluster_manager_type': {'readonly': True}, - 'cluster_configuration': {'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}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'sql_image_offer': {'key': 'properties.sqlImageOffer', 'type': 'str'}, - 'sql_image_sku': {'key': 'properties.sqlImageSku', 'type': 'str'}, - 'scale_type': {'key': 'properties.scaleType', 'type': 'str'}, - 'cluster_manager_type': {'key': 'properties.clusterManagerType', 'type': 'str'}, - 'cluster_configuration': {'key': 'properties.clusterConfiguration', 'type': 'str'}, - 'wsfc_domain_profile': {'key': 'properties.wsfcDomainProfile', 'type': 'WsfcDomainProfile'}, - } - - def __init__(self, **kwargs): - super(SqlVirtualMachineGroup, self).__init__(**kwargs) - self.provisioning_state = None - self.sql_image_offer = kwargs.get('sql_image_offer', None) - self.sql_image_sku = kwargs.get('sql_image_sku', None) - self.scale_type = None - self.cluster_manager_type = None - self.cluster_configuration = None - self.wsfc_domain_profile = kwargs.get('wsfc_domain_profile', None) - - -class SqlVirtualMachineGroupUpdate(Model): - """An update to a SQL virtual machine group. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(SqlVirtualMachineGroupUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class SqlVirtualMachineUpdate(Model): - """An update to a SQL virtual machine. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(SqlVirtualMachineUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class SqlWorkloadTypeUpdateSettings(Model): - """Set workload type to optimize storage for SQL Server. - - :param sql_workload_type: SQL Server workload type. Possible values - include: 'GENERAL', 'OLTP', 'DW' - :type sql_workload_type: str or - ~azure.mgmt.sqlvirtualmachine.models.SqlWorkloadType - """ - - _attribute_map = { - 'sql_workload_type': {'key': 'sqlWorkloadType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SqlWorkloadTypeUpdateSettings, self).__init__(**kwargs) - self.sql_workload_type = kwargs.get('sql_workload_type', None) - - -class StorageConfigurationSettings(Model): - """Storage Configurations for SQL Data, Log and TempDb. - - :param sql_data_settings: SQL Server Data Storage Settings. - :type sql_data_settings: - ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings - :param sql_log_settings: SQL Server Log Storage Settings. - :type sql_log_settings: - ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings - :param sql_temp_db_settings: SQL Server TempDb Storage Settings. - :type sql_temp_db_settings: - ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings - :param disk_configuration_type: Disk configuration to apply to SQL Server. - Possible values include: 'NEW', 'EXTEND', 'ADD' - :type disk_configuration_type: str or - ~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType - :param storage_workload_type: Storage workload type. Possible values - include: 'GENERAL', 'OLTP', 'DW' - :type storage_workload_type: str or - ~azure.mgmt.sqlvirtualmachine.models.StorageWorkloadType - """ - - _attribute_map = { - 'sql_data_settings': {'key': 'sqlDataSettings', 'type': 'SQLStorageSettings'}, - 'sql_log_settings': {'key': 'sqlLogSettings', 'type': 'SQLStorageSettings'}, - 'sql_temp_db_settings': {'key': 'sqlTempDbSettings', 'type': 'SQLStorageSettings'}, - 'disk_configuration_type': {'key': 'diskConfigurationType', 'type': 'str'}, - 'storage_workload_type': {'key': 'storageWorkloadType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageConfigurationSettings, self).__init__(**kwargs) - self.sql_data_settings = kwargs.get('sql_data_settings', None) - self.sql_log_settings = kwargs.get('sql_log_settings', None) - self.sql_temp_db_settings = kwargs.get('sql_temp_db_settings', None) - self.disk_configuration_type = kwargs.get('disk_configuration_type', None) - self.storage_workload_type = kwargs.get('storage_workload_type', None) - - -class WsfcDomainCredentials(Model): - """Domain credentials for setting up Windows Server Failover Cluster for SQL - availability group. - - :param cluster_bootstrap_account_password: Cluster bootstrap account - password. - :type cluster_bootstrap_account_password: str - :param cluster_operator_account_password: Cluster operator account - password. - :type cluster_operator_account_password: str - :param sql_service_account_password: SQL service account password. - :type sql_service_account_password: str - """ - - _attribute_map = { - 'cluster_bootstrap_account_password': {'key': 'clusterBootstrapAccountPassword', 'type': 'str'}, - 'cluster_operator_account_password': {'key': 'clusterOperatorAccountPassword', 'type': 'str'}, - 'sql_service_account_password': {'key': 'sqlServiceAccountPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WsfcDomainCredentials, self).__init__(**kwargs) - self.cluster_bootstrap_account_password = kwargs.get('cluster_bootstrap_account_password', None) - self.cluster_operator_account_password = kwargs.get('cluster_operator_account_password', None) - self.sql_service_account_password = kwargs.get('sql_service_account_password', None) - - -class WsfcDomainProfile(Model): - """Active Directory account details to operate Windows Server Failover - Cluster. - - :param domain_fqdn: Fully qualified name of the domain. - :type domain_fqdn: str - :param ou_path: Organizational Unit path in which the nodes and cluster - will be present. - :type ou_path: str - :param cluster_bootstrap_account: Account name used for creating cluster - (at minimum needs permissions to 'Create Computer Objects' in domain). - :type cluster_bootstrap_account: str - :param cluster_operator_account: Account name used for operating cluster - i.e. will be part of administrators group on all the participating virtual - machines in the cluster. - :type cluster_operator_account: str - :param sql_service_account: Account name under which SQL service will run - on all participating SQL virtual machines in the cluster. - :type sql_service_account: str - :param file_share_witness_path: Optional path for fileshare witness. - :type file_share_witness_path: str - :param storage_account_url: Fully qualified ARM resource id of the witness - storage account. - :type storage_account_url: str - :param storage_account_primary_key: Primary key of the witness storage - account. - :type storage_account_primary_key: str - """ - - _attribute_map = { - 'domain_fqdn': {'key': 'domainFqdn', 'type': 'str'}, - 'ou_path': {'key': 'ouPath', 'type': 'str'}, - 'cluster_bootstrap_account': {'key': 'clusterBootstrapAccount', 'type': 'str'}, - 'cluster_operator_account': {'key': 'clusterOperatorAccount', 'type': 'str'}, - 'sql_service_account': {'key': 'sqlServiceAccount', 'type': 'str'}, - 'file_share_witness_path': {'key': 'fileShareWitnessPath', 'type': 'str'}, - 'storage_account_url': {'key': 'storageAccountUrl', 'type': 'str'}, - 'storage_account_primary_key': {'key': 'storageAccountPrimaryKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WsfcDomainProfile, self).__init__(**kwargs) - self.domain_fqdn = kwargs.get('domain_fqdn', None) - self.ou_path = kwargs.get('ou_path', None) - self.cluster_bootstrap_account = kwargs.get('cluster_bootstrap_account', None) - self.cluster_operator_account = kwargs.get('cluster_operator_account', None) - self.sql_service_account = kwargs.get('sql_service_account', None) - self.file_share_witness_path = kwargs.get('file_share_witness_path', None) - self.storage_account_url = kwargs.get('storage_account_url', None) - self.storage_account_primary_key = kwargs.get('storage_account_primary_key', None) diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_models_py3.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_models_py3.py deleted file mode 100644 index 6803031084ea..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_models_py3.py +++ /dev/null @@ -1,976 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 AdditionalFeaturesServerConfigurations(Model): - """Additional SQL Server feature settings. - - :param is_rservices_enabled: Enable or disable R services (SQL 2016 - onwards). - :type is_rservices_enabled: bool - """ - - _attribute_map = { - 'is_rservices_enabled': {'key': 'isRServicesEnabled', 'type': 'bool'}, - } - - def __init__(self, *, is_rservices_enabled: bool=None, **kwargs) -> None: - super(AdditionalFeaturesServerConfigurations, self).__init__(**kwargs) - self.is_rservices_enabled = is_rservices_enabled - - -class AutoBackupSettings(Model): - """Configure backups for databases in your SQL virtual machine. - - :param enable: Enable or disable autobackup on SQL virtual machine. - :type enable: bool - :param enable_encryption: Enable or disable encryption for backup on SQL - virtual machine. - :type enable_encryption: bool - :param retention_period: Retention period of backup: 1-30 days. - :type retention_period: int - :param storage_account_url: Storage account url where backup will be taken - to. - :type storage_account_url: str - :param storage_access_key: Storage account key where backup will be taken - to. - :type storage_access_key: str - :param password: Password for encryption on backup. - :type password: str - :param backup_system_dbs: Include or exclude system databases from auto - backup. - :type backup_system_dbs: bool - :param backup_schedule_type: Backup schedule type. Possible values - include: 'Manual', 'Automated' - :type backup_schedule_type: str or - ~azure.mgmt.sqlvirtualmachine.models.BackupScheduleType - :param full_backup_frequency: Frequency of full backups. In both cases, - full backups begin during the next scheduled time window. Possible values - include: 'Daily', 'Weekly' - :type full_backup_frequency: str or - ~azure.mgmt.sqlvirtualmachine.models.FullBackupFrequencyType - :param full_backup_start_time: Start time of a given day during which full - backups can take place. 0-23 hours. - :type full_backup_start_time: int - :param full_backup_window_hours: Duration of the time window of a given - day during which full backups can take place. 1-23 hours. - :type full_backup_window_hours: int - :param log_backup_frequency: Frequency of log backups. 5-60 minutes. - :type log_backup_frequency: int - """ - - _attribute_map = { - 'enable': {'key': 'enable', 'type': 'bool'}, - 'enable_encryption': {'key': 'enableEncryption', 'type': 'bool'}, - 'retention_period': {'key': 'retentionPeriod', 'type': 'int'}, - 'storage_account_url': {'key': 'storageAccountUrl', 'type': 'str'}, - 'storage_access_key': {'key': 'storageAccessKey', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'backup_system_dbs': {'key': 'backupSystemDbs', 'type': 'bool'}, - 'backup_schedule_type': {'key': 'backupScheduleType', 'type': 'str'}, - 'full_backup_frequency': {'key': 'fullBackupFrequency', 'type': 'str'}, - 'full_backup_start_time': {'key': 'fullBackupStartTime', 'type': 'int'}, - 'full_backup_window_hours': {'key': 'fullBackupWindowHours', 'type': 'int'}, - 'log_backup_frequency': {'key': 'logBackupFrequency', 'type': 'int'}, - } - - def __init__(self, *, enable: bool=None, enable_encryption: bool=None, retention_period: int=None, storage_account_url: str=None, storage_access_key: str=None, password: str=None, backup_system_dbs: bool=None, backup_schedule_type=None, full_backup_frequency=None, full_backup_start_time: int=None, full_backup_window_hours: int=None, log_backup_frequency: int=None, **kwargs) -> None: - super(AutoBackupSettings, self).__init__(**kwargs) - self.enable = enable - self.enable_encryption = enable_encryption - self.retention_period = retention_period - self.storage_account_url = storage_account_url - self.storage_access_key = storage_access_key - self.password = password - self.backup_system_dbs = backup_system_dbs - self.backup_schedule_type = backup_schedule_type - self.full_backup_frequency = full_backup_frequency - self.full_backup_start_time = full_backup_start_time - self.full_backup_window_hours = full_backup_window_hours - self.log_backup_frequency = log_backup_frequency - - -class AutoPatchingSettings(Model): - """Set a patching window during which Windows and SQL patches will be applied. - - :param enable: Enable or disable autopatching on SQL virtual machine. - :type enable: bool - :param day_of_week: Day of week to apply the patch on. Possible values - include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', - 'Saturday', 'Sunday' - :type day_of_week: str or ~azure.mgmt.sqlvirtualmachine.models.DayOfWeek - :param maintenance_window_starting_hour: Hour of the day when patching is - initiated. Local VM time. - :type maintenance_window_starting_hour: int - :param maintenance_window_duration: Duration of patching. - :type maintenance_window_duration: int - """ - - _attribute_map = { - 'enable': {'key': 'enable', 'type': 'bool'}, - 'day_of_week': {'key': 'dayOfWeek', 'type': 'DayOfWeek'}, - 'maintenance_window_starting_hour': {'key': 'maintenanceWindowStartingHour', 'type': 'int'}, - 'maintenance_window_duration': {'key': 'maintenanceWindowDuration', 'type': 'int'}, - } - - def __init__(self, *, enable: bool=None, day_of_week=None, maintenance_window_starting_hour: int=None, maintenance_window_duration: int=None, **kwargs) -> None: - super(AutoPatchingSettings, self).__init__(**kwargs) - self.enable = enable - self.day_of_week = day_of_week - self.maintenance_window_starting_hour = maintenance_window_starting_hour - self.maintenance_window_duration = maintenance_window_duration - - -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 - - -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) - - -class AvailabilityGroupListener(ProxyResource): - """A SQL Server availability group listener. - - 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 provisioning_state: Provisioning state to track the async operation - status. - :vartype provisioning_state: str - :param availability_group_name: Name of the availability group. - :type availability_group_name: str - :param load_balancer_configurations: List of load balancer configurations - for an availability group listener. - :type load_balancer_configurations: - list[~azure.mgmt.sqlvirtualmachine.models.LoadBalancerConfiguration] - :param create_default_availability_group_if_not_exist: Create a default - availability group if it does not exist. - :type create_default_availability_group_if_not_exist: bool - :param port: Listener port. - :type port: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_group_name': {'key': 'properties.availabilityGroupName', 'type': 'str'}, - 'load_balancer_configurations': {'key': 'properties.loadBalancerConfigurations', 'type': '[LoadBalancerConfiguration]'}, - 'create_default_availability_group_if_not_exist': {'key': 'properties.createDefaultAvailabilityGroupIfNotExist', 'type': 'bool'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - } - - def __init__(self, *, availability_group_name: str=None, load_balancer_configurations=None, create_default_availability_group_if_not_exist: bool=None, port: int=None, **kwargs) -> None: - super(AvailabilityGroupListener, self).__init__(**kwargs) - self.provisioning_state = None - self.availability_group_name = availability_group_name - self.load_balancer_configurations = load_balancer_configurations - self.create_default_availability_group_if_not_exist = create_default_availability_group_if_not_exist - self.port = port - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class KeyVaultCredentialSettings(Model): - """Configure your SQL virtual machine to be able to connect to the Azure Key - Vault service. - - :param enable: Enable or disable key vault credential setting. - :type enable: bool - :param credential_name: Credential name. - :type credential_name: str - :param azure_key_vault_url: Azure Key Vault url. - :type azure_key_vault_url: str - :param service_principal_name: Service principal name to access key vault. - :type service_principal_name: str - :param service_principal_secret: Service principal name secret to access - key vault. - :type service_principal_secret: str - """ - - _attribute_map = { - 'enable': {'key': 'enable', 'type': 'bool'}, - 'credential_name': {'key': 'credentialName', 'type': 'str'}, - 'azure_key_vault_url': {'key': 'azureKeyVaultUrl', 'type': 'str'}, - 'service_principal_name': {'key': 'servicePrincipalName', 'type': 'str'}, - 'service_principal_secret': {'key': 'servicePrincipalSecret', 'type': 'str'}, - } - - def __init__(self, *, enable: bool=None, credential_name: str=None, azure_key_vault_url: str=None, service_principal_name: str=None, service_principal_secret: str=None, **kwargs) -> None: - super(KeyVaultCredentialSettings, self).__init__(**kwargs) - self.enable = enable - self.credential_name = credential_name - self.azure_key_vault_url = azure_key_vault_url - self.service_principal_name = service_principal_name - self.service_principal_secret = service_principal_secret - - -class LoadBalancerConfiguration(Model): - """A load balancer configuration for an availability group listener. - - :param private_ip_address: Private IP address. - :type private_ip_address: - ~azure.mgmt.sqlvirtualmachine.models.PrivateIPAddress - :param public_ip_address_resource_id: Resource id of the public IP. - :type public_ip_address_resource_id: str - :param load_balancer_resource_id: Resource id of the load balancer. - :type load_balancer_resource_id: str - :param probe_port: Probe port. - :type probe_port: int - :param sql_virtual_machine_instances: List of the SQL virtual machine - instance resource id's that are enrolled into the availability group - listener. - :type sql_virtual_machine_instances: list[str] - """ - - _attribute_map = { - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'PrivateIPAddress'}, - 'public_ip_address_resource_id': {'key': 'publicIpAddressResourceId', 'type': 'str'}, - 'load_balancer_resource_id': {'key': 'loadBalancerResourceId', 'type': 'str'}, - 'probe_port': {'key': 'probePort', 'type': 'int'}, - 'sql_virtual_machine_instances': {'key': 'sqlVirtualMachineInstances', 'type': '[str]'}, - } - - def __init__(self, *, private_ip_address=None, public_ip_address_resource_id: str=None, load_balancer_resource_id: str=None, probe_port: int=None, sql_virtual_machine_instances=None, **kwargs) -> None: - super(LoadBalancerConfiguration, self).__init__(**kwargs) - self.private_ip_address = private_ip_address - self.public_ip_address_resource_id = public_ip_address_resource_id - self.load_balancer_resource_id = load_balancer_resource_id - self.probe_port = probe_port - self.sql_virtual_machine_instances = sql_virtual_machine_instances - - -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.sqlvirtualmachine.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or - ~azure.mgmt.sqlvirtualmachine.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 - - -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 - - -class PrivateIPAddress(Model): - """A private IP address bound to the availability group listener. - - :param ip_address: Private IP address bound to the availability group - listener. - :type ip_address: str - :param subnet_resource_id: Subnet used to include private IP. - :type subnet_resource_id: str - """ - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_resource_id': {'key': 'subnetResourceId', 'type': 'str'}, - } - - def __init__(self, *, ip_address: str=None, subnet_resource_id: str=None, **kwargs) -> None: - super(PrivateIPAddress, self).__init__(**kwargs) - self.ip_address = ip_address - self.subnet_resource_id = subnet_resource_id - - -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.sqlvirtualmachine.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 - - -class ServerConfigurationsManagementSettings(Model): - """Set the connectivity, storage and workload settings. - - :param sql_connectivity_update_settings: SQL connectivity type settings. - :type sql_connectivity_update_settings: - ~azure.mgmt.sqlvirtualmachine.models.SqlConnectivityUpdateSettings - :param sql_workload_type_update_settings: SQL workload type settings. - :type sql_workload_type_update_settings: - ~azure.mgmt.sqlvirtualmachine.models.SqlWorkloadTypeUpdateSettings - :param sql_storage_update_settings: SQL storage update settings. - :type sql_storage_update_settings: - ~azure.mgmt.sqlvirtualmachine.models.SqlStorageUpdateSettings - :param additional_features_server_configurations: Additional SQL feature - settings. - :type additional_features_server_configurations: - ~azure.mgmt.sqlvirtualmachine.models.AdditionalFeaturesServerConfigurations - """ - - _attribute_map = { - 'sql_connectivity_update_settings': {'key': 'sqlConnectivityUpdateSettings', 'type': 'SqlConnectivityUpdateSettings'}, - 'sql_workload_type_update_settings': {'key': 'sqlWorkloadTypeUpdateSettings', 'type': 'SqlWorkloadTypeUpdateSettings'}, - 'sql_storage_update_settings': {'key': 'sqlStorageUpdateSettings', 'type': 'SqlStorageUpdateSettings'}, - 'additional_features_server_configurations': {'key': 'additionalFeaturesServerConfigurations', 'type': 'AdditionalFeaturesServerConfigurations'}, - } - - def __init__(self, *, sql_connectivity_update_settings=None, sql_workload_type_update_settings=None, sql_storage_update_settings=None, additional_features_server_configurations=None, **kwargs) -> None: - super(ServerConfigurationsManagementSettings, self).__init__(**kwargs) - self.sql_connectivity_update_settings = sql_connectivity_update_settings - self.sql_workload_type_update_settings = sql_workload_type_update_settings - self.sql_storage_update_settings = sql_storage_update_settings - self.additional_features_server_configurations = additional_features_server_configurations - - -class SqlConnectivityUpdateSettings(Model): - """Set the access level and network port settings for SQL Server. - - :param connectivity_type: SQL Server connectivity option. Possible values - include: 'LOCAL', 'PRIVATE', 'PUBLIC' - :type connectivity_type: str or - ~azure.mgmt.sqlvirtualmachine.models.ConnectivityType - :param port: SQL Server port. - :type port: int - :param sql_auth_update_user_name: SQL Server sysadmin login to create. - :type sql_auth_update_user_name: str - :param sql_auth_update_password: SQL Server sysadmin login password. - :type sql_auth_update_password: str - """ - - _attribute_map = { - 'connectivity_type': {'key': 'connectivityType', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'sql_auth_update_user_name': {'key': 'sqlAuthUpdateUserName', 'type': 'str'}, - 'sql_auth_update_password': {'key': 'sqlAuthUpdatePassword', 'type': 'str'}, - } - - def __init__(self, *, connectivity_type=None, port: int=None, sql_auth_update_user_name: str=None, sql_auth_update_password: str=None, **kwargs) -> None: - super(SqlConnectivityUpdateSettings, self).__init__(**kwargs) - self.connectivity_type = connectivity_type - self.port = port - self.sql_auth_update_user_name = sql_auth_update_user_name - self.sql_auth_update_password = sql_auth_update_password - - -class SQLStorageSettings(Model): - """Set disk storage settings for SQL Server. - - :param luns: Logical Unit Numbers for the disks. - :type luns: list[int] - :param default_file_path: SQL Server default file path - :type default_file_path: str - """ - - _attribute_map = { - 'luns': {'key': 'luns', 'type': '[int]'}, - 'default_file_path': {'key': 'defaultFilePath', 'type': 'str'}, - } - - def __init__(self, *, luns=None, default_file_path: str=None, **kwargs) -> None: - super(SQLStorageSettings, self).__init__(**kwargs) - self.luns = luns - self.default_file_path = default_file_path - - -class SqlStorageUpdateSettings(Model): - """Set disk storage settings for SQL Server. - - :param disk_count: Virtual machine disk count. - :type disk_count: int - :param starting_device_id: Device id of the first disk to be updated. - :type starting_device_id: int - :param disk_configuration_type: Disk configuration to apply to SQL Server. - Possible values include: 'NEW', 'EXTEND', 'ADD' - :type disk_configuration_type: str or - ~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType - """ - - _attribute_map = { - 'disk_count': {'key': 'diskCount', 'type': 'int'}, - 'starting_device_id': {'key': 'startingDeviceId', 'type': 'int'}, - 'disk_configuration_type': {'key': 'diskConfigurationType', 'type': 'str'}, - } - - def __init__(self, *, disk_count: int=None, starting_device_id: int=None, disk_configuration_type=None, **kwargs) -> None: - super(SqlStorageUpdateSettings, self).__init__(**kwargs) - self.disk_count = disk_count - self.starting_device_id = starting_device_id - self.disk_configuration_type = disk_configuration_type - - -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 - - -class SqlVirtualMachine(TrackedResource): - """A SQL virtual machine. - - 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: Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sqlvirtualmachine.models.ResourceIdentity - :param virtual_machine_resource_id: ARM Resource id of underlying virtual - machine created from SQL marketplace image. - :type virtual_machine_resource_id: str - :ivar provisioning_state: Provisioning state to track the async operation - status. - :vartype provisioning_state: str - :param sql_image_offer: SQL image offer. Examples include SQL2016-WS2016, - SQL2017-WS2016. - :type sql_image_offer: str - :param sql_server_license_type: SQL Server license type. Possible values - include: 'PAYG', 'AHUB', 'DR' - :type sql_server_license_type: str or - ~azure.mgmt.sqlvirtualmachine.models.SqlServerLicenseType - :param sql_management: SQL Server Management type. Possible values - include: 'Full', 'LightWeight', 'NoAgent' - :type sql_management: str or - ~azure.mgmt.sqlvirtualmachine.models.SqlManagementMode - :param sql_image_sku: SQL Server edition type. Possible values include: - 'Developer', 'Express', 'Standard', 'Enterprise', 'Web' - :type sql_image_sku: str or - ~azure.mgmt.sqlvirtualmachine.models.SqlImageSku - :param sql_virtual_machine_group_resource_id: ARM resource id of the SQL - virtual machine group this SQL virtual machine is or will be part of. - :type sql_virtual_machine_group_resource_id: str - :param wsfc_domain_credentials: Domain credentials for setting up Windows - Server Failover Cluster for SQL availability group. - :type wsfc_domain_credentials: - ~azure.mgmt.sqlvirtualmachine.models.WsfcDomainCredentials - :param auto_patching_settings: Auto patching settings for applying - critical security updates to SQL virtual machine. - :type auto_patching_settings: - ~azure.mgmt.sqlvirtualmachine.models.AutoPatchingSettings - :param auto_backup_settings: Auto backup settings for SQL Server. - :type auto_backup_settings: - ~azure.mgmt.sqlvirtualmachine.models.AutoBackupSettings - :param key_vault_credential_settings: Key vault credential settings. - :type key_vault_credential_settings: - ~azure.mgmt.sqlvirtualmachine.models.KeyVaultCredentialSettings - :param server_configurations_management_settings: SQL Server configuration - management settings. - :type server_configurations_management_settings: - ~azure.mgmt.sqlvirtualmachine.models.ServerConfigurationsManagementSettings - :param storage_configuration_settings: Storage Configuration Settings. - :type storage_configuration_settings: - ~azure.mgmt.sqlvirtualmachine.models.StorageConfigurationSettings - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_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}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'virtual_machine_resource_id': {'key': 'properties.virtualMachineResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'sql_image_offer': {'key': 'properties.sqlImageOffer', 'type': 'str'}, - 'sql_server_license_type': {'key': 'properties.sqlServerLicenseType', 'type': 'str'}, - 'sql_management': {'key': 'properties.sqlManagement', 'type': 'str'}, - 'sql_image_sku': {'key': 'properties.sqlImageSku', 'type': 'str'}, - 'sql_virtual_machine_group_resource_id': {'key': 'properties.sqlVirtualMachineGroupResourceId', 'type': 'str'}, - 'wsfc_domain_credentials': {'key': 'properties.wsfcDomainCredentials', 'type': 'WsfcDomainCredentials'}, - 'auto_patching_settings': {'key': 'properties.autoPatchingSettings', 'type': 'AutoPatchingSettings'}, - 'auto_backup_settings': {'key': 'properties.autoBackupSettings', 'type': 'AutoBackupSettings'}, - 'key_vault_credential_settings': {'key': 'properties.keyVaultCredentialSettings', 'type': 'KeyVaultCredentialSettings'}, - 'server_configurations_management_settings': {'key': 'properties.serverConfigurationsManagementSettings', 'type': 'ServerConfigurationsManagementSettings'}, - 'storage_configuration_settings': {'key': 'properties.storageConfigurationSettings', 'type': 'StorageConfigurationSettings'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, virtual_machine_resource_id: str=None, sql_image_offer: str=None, sql_server_license_type=None, sql_management=None, sql_image_sku=None, sql_virtual_machine_group_resource_id: str=None, wsfc_domain_credentials=None, auto_patching_settings=None, auto_backup_settings=None, key_vault_credential_settings=None, server_configurations_management_settings=None, storage_configuration_settings=None, **kwargs) -> None: - super(SqlVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.virtual_machine_resource_id = virtual_machine_resource_id - self.provisioning_state = None - self.sql_image_offer = sql_image_offer - self.sql_server_license_type = sql_server_license_type - self.sql_management = sql_management - self.sql_image_sku = sql_image_sku - self.sql_virtual_machine_group_resource_id = sql_virtual_machine_group_resource_id - self.wsfc_domain_credentials = wsfc_domain_credentials - self.auto_patching_settings = auto_patching_settings - self.auto_backup_settings = auto_backup_settings - self.key_vault_credential_settings = key_vault_credential_settings - self.server_configurations_management_settings = server_configurations_management_settings - self.storage_configuration_settings = storage_configuration_settings - - -class SqlVirtualMachineGroup(TrackedResource): - """A SQL virtual machine 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 location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar provisioning_state: Provisioning state to track the async operation - status. - :vartype provisioning_state: str - :param sql_image_offer: SQL image offer. Examples may include - SQL2016-WS2016, SQL2017-WS2016. - :type sql_image_offer: str - :param sql_image_sku: SQL image sku. Possible values include: 'Developer', - 'Enterprise' - :type sql_image_sku: str or - ~azure.mgmt.sqlvirtualmachine.models.SqlVmGroupImageSku - :ivar scale_type: Scale type. Possible values include: 'HA' - :vartype scale_type: str or ~azure.mgmt.sqlvirtualmachine.models.ScaleType - :ivar cluster_manager_type: Type of cluster manager: Windows Server - Failover Cluster (WSFC), implied by the scale type of the group and the OS - type. Possible values include: 'WSFC' - :vartype cluster_manager_type: str or - ~azure.mgmt.sqlvirtualmachine.models.ClusterManagerType - :ivar cluster_configuration: Cluster type. Possible values include: - 'Domainful' - :vartype cluster_configuration: str or - ~azure.mgmt.sqlvirtualmachine.models.ClusterConfiguration - :param wsfc_domain_profile: Cluster Active Directory domain profile. - :type wsfc_domain_profile: - ~azure.mgmt.sqlvirtualmachine.models.WsfcDomainProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'scale_type': {'readonly': True}, - 'cluster_manager_type': {'readonly': True}, - 'cluster_configuration': {'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}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'sql_image_offer': {'key': 'properties.sqlImageOffer', 'type': 'str'}, - 'sql_image_sku': {'key': 'properties.sqlImageSku', 'type': 'str'}, - 'scale_type': {'key': 'properties.scaleType', 'type': 'str'}, - 'cluster_manager_type': {'key': 'properties.clusterManagerType', 'type': 'str'}, - 'cluster_configuration': {'key': 'properties.clusterConfiguration', 'type': 'str'}, - 'wsfc_domain_profile': {'key': 'properties.wsfcDomainProfile', 'type': 'WsfcDomainProfile'}, - } - - def __init__(self, *, location: str, tags=None, sql_image_offer: str=None, sql_image_sku=None, wsfc_domain_profile=None, **kwargs) -> None: - super(SqlVirtualMachineGroup, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.sql_image_offer = sql_image_offer - self.sql_image_sku = sql_image_sku - self.scale_type = None - self.cluster_manager_type = None - self.cluster_configuration = None - self.wsfc_domain_profile = wsfc_domain_profile - - -class SqlVirtualMachineGroupUpdate(Model): - """An update to a SQL virtual machine group. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(SqlVirtualMachineGroupUpdate, self).__init__(**kwargs) - self.tags = tags - - -class SqlVirtualMachineUpdate(Model): - """An update to a SQL virtual machine. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(SqlVirtualMachineUpdate, self).__init__(**kwargs) - self.tags = tags - - -class SqlWorkloadTypeUpdateSettings(Model): - """Set workload type to optimize storage for SQL Server. - - :param sql_workload_type: SQL Server workload type. Possible values - include: 'GENERAL', 'OLTP', 'DW' - :type sql_workload_type: str or - ~azure.mgmt.sqlvirtualmachine.models.SqlWorkloadType - """ - - _attribute_map = { - 'sql_workload_type': {'key': 'sqlWorkloadType', 'type': 'str'}, - } - - def __init__(self, *, sql_workload_type=None, **kwargs) -> None: - super(SqlWorkloadTypeUpdateSettings, self).__init__(**kwargs) - self.sql_workload_type = sql_workload_type - - -class StorageConfigurationSettings(Model): - """Storage Configurations for SQL Data, Log and TempDb. - - :param sql_data_settings: SQL Server Data Storage Settings. - :type sql_data_settings: - ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings - :param sql_log_settings: SQL Server Log Storage Settings. - :type sql_log_settings: - ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings - :param sql_temp_db_settings: SQL Server TempDb Storage Settings. - :type sql_temp_db_settings: - ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings - :param disk_configuration_type: Disk configuration to apply to SQL Server. - Possible values include: 'NEW', 'EXTEND', 'ADD' - :type disk_configuration_type: str or - ~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType - :param storage_workload_type: Storage workload type. Possible values - include: 'GENERAL', 'OLTP', 'DW' - :type storage_workload_type: str or - ~azure.mgmt.sqlvirtualmachine.models.StorageWorkloadType - """ - - _attribute_map = { - 'sql_data_settings': {'key': 'sqlDataSettings', 'type': 'SQLStorageSettings'}, - 'sql_log_settings': {'key': 'sqlLogSettings', 'type': 'SQLStorageSettings'}, - 'sql_temp_db_settings': {'key': 'sqlTempDbSettings', 'type': 'SQLStorageSettings'}, - 'disk_configuration_type': {'key': 'diskConfigurationType', 'type': 'str'}, - 'storage_workload_type': {'key': 'storageWorkloadType', 'type': 'str'}, - } - - def __init__(self, *, sql_data_settings=None, sql_log_settings=None, sql_temp_db_settings=None, disk_configuration_type=None, storage_workload_type=None, **kwargs) -> None: - super(StorageConfigurationSettings, self).__init__(**kwargs) - self.sql_data_settings = sql_data_settings - self.sql_log_settings = sql_log_settings - self.sql_temp_db_settings = sql_temp_db_settings - self.disk_configuration_type = disk_configuration_type - self.storage_workload_type = storage_workload_type - - -class WsfcDomainCredentials(Model): - """Domain credentials for setting up Windows Server Failover Cluster for SQL - availability group. - - :param cluster_bootstrap_account_password: Cluster bootstrap account - password. - :type cluster_bootstrap_account_password: str - :param cluster_operator_account_password: Cluster operator account - password. - :type cluster_operator_account_password: str - :param sql_service_account_password: SQL service account password. - :type sql_service_account_password: str - """ - - _attribute_map = { - 'cluster_bootstrap_account_password': {'key': 'clusterBootstrapAccountPassword', 'type': 'str'}, - 'cluster_operator_account_password': {'key': 'clusterOperatorAccountPassword', 'type': 'str'}, - 'sql_service_account_password': {'key': 'sqlServiceAccountPassword', 'type': 'str'}, - } - - def __init__(self, *, cluster_bootstrap_account_password: str=None, cluster_operator_account_password: str=None, sql_service_account_password: str=None, **kwargs) -> None: - super(WsfcDomainCredentials, self).__init__(**kwargs) - self.cluster_bootstrap_account_password = cluster_bootstrap_account_password - self.cluster_operator_account_password = cluster_operator_account_password - self.sql_service_account_password = sql_service_account_password - - -class WsfcDomainProfile(Model): - """Active Directory account details to operate Windows Server Failover - Cluster. - - :param domain_fqdn: Fully qualified name of the domain. - :type domain_fqdn: str - :param ou_path: Organizational Unit path in which the nodes and cluster - will be present. - :type ou_path: str - :param cluster_bootstrap_account: Account name used for creating cluster - (at minimum needs permissions to 'Create Computer Objects' in domain). - :type cluster_bootstrap_account: str - :param cluster_operator_account: Account name used for operating cluster - i.e. will be part of administrators group on all the participating virtual - machines in the cluster. - :type cluster_operator_account: str - :param sql_service_account: Account name under which SQL service will run - on all participating SQL virtual machines in the cluster. - :type sql_service_account: str - :param file_share_witness_path: Optional path for fileshare witness. - :type file_share_witness_path: str - :param storage_account_url: Fully qualified ARM resource id of the witness - storage account. - :type storage_account_url: str - :param storage_account_primary_key: Primary key of the witness storage - account. - :type storage_account_primary_key: str - """ - - _attribute_map = { - 'domain_fqdn': {'key': 'domainFqdn', 'type': 'str'}, - 'ou_path': {'key': 'ouPath', 'type': 'str'}, - 'cluster_bootstrap_account': {'key': 'clusterBootstrapAccount', 'type': 'str'}, - 'cluster_operator_account': {'key': 'clusterOperatorAccount', 'type': 'str'}, - 'sql_service_account': {'key': 'sqlServiceAccount', 'type': 'str'}, - 'file_share_witness_path': {'key': 'fileShareWitnessPath', 'type': 'str'}, - 'storage_account_url': {'key': 'storageAccountUrl', 'type': 'str'}, - 'storage_account_primary_key': {'key': 'storageAccountPrimaryKey', 'type': 'str'}, - } - - def __init__(self, *, domain_fqdn: str=None, ou_path: str=None, cluster_bootstrap_account: str=None, cluster_operator_account: str=None, sql_service_account: str=None, file_share_witness_path: str=None, storage_account_url: str=None, storage_account_primary_key: str=None, **kwargs) -> None: - super(WsfcDomainProfile, self).__init__(**kwargs) - self.domain_fqdn = domain_fqdn - self.ou_path = ou_path - self.cluster_bootstrap_account = cluster_bootstrap_account - self.cluster_operator_account = cluster_operator_account - self.sql_service_account = sql_service_account - self.file_share_witness_path = file_share_witness_path - self.storage_account_url = storage_account_url - self.storage_account_primary_key = storage_account_primary_key diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_paged_models.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_paged_models.py deleted file mode 100644 index 0d7ed4bc64be..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_paged_models.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.paging import Paged - - -class AvailabilityGroupListenerPaged(Paged): - """ - A paging container for iterating over a list of :class:`AvailabilityGroupListener ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AvailabilityGroupListener]'} - } - - def __init__(self, *args, **kwargs): - - super(AvailabilityGroupListenerPaged, self).__init__(*args, **kwargs) -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) -class SqlVirtualMachineGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`SqlVirtualMachineGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SqlVirtualMachineGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(SqlVirtualMachineGroupPaged, self).__init__(*args, **kwargs) -class SqlVirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`SqlVirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SqlVirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(SqlVirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_sql_virtual_machine_management_client_enums.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_sql_virtual_machine_management_client_enums.py deleted file mode 100644 index 8b6eaa25e060..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_sql_virtual_machine_management_client_enums.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. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class OperationOrigin(str, Enum): - - user = "user" - system = "system" - - -class SqlVmGroupImageSku(str, Enum): - - developer = "Developer" - enterprise = "Enterprise" - - -class ScaleType(str, Enum): - - ha = "HA" - - -class ClusterManagerType(str, Enum): - - wsfc = "WSFC" - - -class ClusterConfiguration(str, Enum): - - domainful = "Domainful" - - -class IdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class SqlServerLicenseType(str, Enum): - - payg = "PAYG" - ahub = "AHUB" - dr = "DR" - - -class SqlManagementMode(str, Enum): - - full = "Full" - light_weight = "LightWeight" - no_agent = "NoAgent" - - -class SqlImageSku(str, Enum): - - developer = "Developer" - express = "Express" - standard = "Standard" - enterprise = "Enterprise" - web = "Web" - - -class DayOfWeek(str, Enum): - - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" - sunday = "Sunday" - - -class BackupScheduleType(str, Enum): - - manual = "Manual" - automated = "Automated" - - -class FullBackupFrequencyType(str, Enum): - - daily = "Daily" - weekly = "Weekly" - - -class ConnectivityType(str, Enum): - - local = "LOCAL" - private = "PRIVATE" - public = "PUBLIC" - - -class SqlWorkloadType(str, Enum): - - general = "GENERAL" - oltp = "OLTP" - dw = "DW" - - -class DiskConfigurationType(str, Enum): - - new = "NEW" - extend = "EXTEND" - add = "ADD" - - -class StorageWorkloadType(str, Enum): - - general = "GENERAL" - oltp = "OLTP" - dw = "DW" diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/__init__.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/__init__.py deleted file mode 100644 index 49902f5b90cc..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._availability_group_listeners_operations import AvailabilityGroupListenersOperations -from ._operations import Operations -from ._sql_virtual_machine_groups_operations import SqlVirtualMachineGroupsOperations -from ._sql_virtual_machines_operations import SqlVirtualMachinesOperations - -__all__ = [ - 'AvailabilityGroupListenersOperations', - 'Operations', - 'SqlVirtualMachineGroupsOperations', - 'SqlVirtualMachinesOperations', -] diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_availability_group_listeners_operations.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_availability_group_listeners_operations.py deleted file mode 100644 index 2eaa8c663e4a..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_availability_group_listeners_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 AvailabilityGroupListenersOperations(object): - """AvailabilityGroupListenersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :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: 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, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers=None, raw=False, **operation_config): - """Gets an availability group listener. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_group_name: Name of the SQL virtual machine - group. - :type sql_virtual_machine_group_name: str - :param availability_group_listener_name: Name of the availability - group listener. - :type availability_group_listener_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: AvailabilityGroupListener or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sqlvirtualmachine.models.AvailabilityGroupListener - 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'), - 'sqlVirtualMachineGroupName': self._serialize.url("sql_virtual_machine_group_name", sql_virtual_machine_group_name, 'str'), - 'availabilityGroupListenerName': self._serialize.url("availability_group_listener_name", availability_group_listener_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('AvailabilityGroupListener', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}'} - - - def _create_or_update_initial( - self, resource_group_name, sql_virtual_machine_group_name, availability_group_listener_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'), - 'sqlVirtualMachineGroupName': self._serialize.url("sql_virtual_machine_group_name", sql_virtual_machine_group_name, 'str'), - 'availabilityGroupListenerName': self._serialize.url("availability_group_listener_name", availability_group_listener_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, 'AvailabilityGroupListener') - - # 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('AvailabilityGroupListener', response) - if response.status_code == 201: - deserialized = self._deserialize('AvailabilityGroupListener', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an availability group listener. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_group_name: Name of the SQL virtual machine - group. - :type sql_virtual_machine_group_name: str - :param availability_group_listener_name: Name of the availability - group listener. - :type availability_group_listener_name: str - :param parameters: The availability group listener. - :type parameters: - ~azure.mgmt.sqlvirtualmachine.models.AvailabilityGroupListener - :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 - AvailabilityGroupListener or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sqlvirtualmachine.models.AvailabilityGroupListener] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sqlvirtualmachine.models.AvailabilityGroupListener]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - sql_virtual_machine_group_name=sql_virtual_machine_group_name, - availability_group_listener_name=availability_group_listener_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AvailabilityGroupListener', 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.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}'} - - - def _delete_initial( - self, resource_group_name, sql_virtual_machine_group_name, availability_group_listener_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'), - 'sqlVirtualMachineGroupName': self._serialize.url("sql_virtual_machine_group_name", sql_virtual_machine_group_name, 'str'), - 'availabilityGroupListenerName': self._serialize.url("availability_group_listener_name", availability_group_listener_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, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an availability group listener. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_group_name: Name of the SQL virtual machine - group. - :type sql_virtual_machine_group_name: str - :param availability_group_listener_name: Name of the availability - group listener. - :type availability_group_listener_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, - sql_virtual_machine_group_name=sql_virtual_machine_group_name, - availability_group_listener_name=availability_group_listener_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.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}'} - - def list_by_group( - self, resource_group_name, sql_virtual_machine_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all availability group listeners in a SQL virtual machine group. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_group_name: Name of the SQL virtual machine - group. - :type sql_virtual_machine_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 AvailabilityGroupListener - :rtype: - ~azure.mgmt.sqlvirtualmachine.models.AvailabilityGroupListenerPaged[~azure.mgmt.sqlvirtualmachine.models.AvailabilityGroupListener] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'sqlVirtualMachineGroupName': self._serialize.url("sql_virtual_machine_group_name", sql_virtual_machine_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) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - 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 - header_dict = None - if raw: - header_dict = {} - deserialized = models.AvailabilityGroupListenerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners'} diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_operations.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_operations.py deleted file mode 100644 index 2f98818a0495..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_operations.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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :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: 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( - 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.sqlvirtualmachine.models.OperationPaged[~azure.mgmt.sqlvirtualmachine.models.Operation] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - 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) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - 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 - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.SqlVirtualMachine/operations'} diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_sql_virtual_machine_groups_operations.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_sql_virtual_machine_groups_operations.py deleted file mode 100644 index 7b76fbdadb1d..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_sql_virtual_machine_groups_operations.py +++ /dev/null @@ -1,536 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# 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 SqlVirtualMachineGroupsOperations(object): - """SqlVirtualMachineGroupsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :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: 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, sql_virtual_machine_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a SQL virtual machine group. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_group_name: Name of the SQL virtual machine - group. - :type sql_virtual_machine_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: SqlVirtualMachineGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroup 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'), - 'sqlVirtualMachineGroupName': self._serialize.url("sql_virtual_machine_group_name", sql_virtual_machine_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('SqlVirtualMachineGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}'} - - - def _create_or_update_initial( - self, resource_group_name, sql_virtual_machine_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'), - 'sqlVirtualMachineGroupName': self._serialize.url("sql_virtual_machine_group_name", sql_virtual_machine_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, 'SqlVirtualMachineGroup') - - # 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('SqlVirtualMachineGroup', response) - if response.status_code == 201: - deserialized = self._deserialize('SqlVirtualMachineGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, sql_virtual_machine_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a SQL virtual machine group. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_group_name: Name of the SQL virtual machine - group. - :type sql_virtual_machine_group_name: str - :param parameters: The SQL virtual machine group. - :type parameters: - ~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroup - :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 SqlVirtualMachineGroup - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroup] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroup]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - sql_virtual_machine_group_name=sql_virtual_machine_group_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SqlVirtualMachineGroup', 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.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}'} - - - def _delete_initial( - self, resource_group_name, sql_virtual_machine_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'), - 'sqlVirtualMachineGroupName': self._serialize.url("sql_virtual_machine_group_name", sql_virtual_machine_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, sql_virtual_machine_group_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a SQL virtual machine group. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_group_name: Name of the SQL virtual machine - group. - :type sql_virtual_machine_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, - sql_virtual_machine_group_name=sql_virtual_machine_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.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}'} - - - def _update_initial( - self, resource_group_name, sql_virtual_machine_group_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.SqlVirtualMachineGroupUpdate(tags=tags) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'sqlVirtualMachineGroupName': self._serialize.url("sql_virtual_machine_group_name", sql_virtual_machine_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, 'SqlVirtualMachineGroupUpdate') - - # 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('SqlVirtualMachineGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, sql_virtual_machine_group_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates SQL virtual machine group tags. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_group_name: Name of the SQL virtual machine - group. - :type sql_virtual_machine_group_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 SqlVirtualMachineGroup - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroup] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroup]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - sql_virtual_machine_group_name=sql_virtual_machine_group_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SqlVirtualMachineGroup', 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.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets all SQL virtual machine groups in a resource group. - - :param resource_group_name: Name of the resource group 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 SqlVirtualMachineGroup - :rtype: - ~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroupPaged[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroup] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - 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) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - 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 - header_dict = None - if raw: - header_dict = {} - deserialized = models.SqlVirtualMachineGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets all SQL virtual machine groups in a 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 SqlVirtualMachineGroup - :rtype: - ~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroupPaged[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroup] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - 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) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - 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 - header_dict = None - if raw: - header_dict = {} - deserialized = models.SqlVirtualMachineGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups'} diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_sql_virtual_machines_operations.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_sql_virtual_machines_operations.py deleted file mode 100644 index e4f1ad4a930f..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_sql_virtual_machines_operations.py +++ /dev/null @@ -1,611 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# 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 SqlVirtualMachinesOperations(object): - """SqlVirtualMachinesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :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: 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_sql_vm_group( - self, resource_group_name, sql_virtual_machine_group_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of sql virtual machines in a SQL virtual machine group. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_group_name: Name of the SQL virtual machine - group. - :type sql_virtual_machine_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 SqlVirtualMachine - :rtype: - ~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachinePaged[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_sql_vm_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'sqlVirtualMachineGroupName': self._serialize.url("sql_virtual_machine_group_name", sql_virtual_machine_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) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - 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 - header_dict = None - if raw: - header_dict = {} - deserialized = models.SqlVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_sql_vm_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets all SQL virtual machines in a 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 SqlVirtualMachine - :rtype: - ~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachinePaged[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - 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) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - 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 - header_dict = None - if raw: - header_dict = {} - deserialized = models.SqlVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines'} - - def get( - self, resource_group_name, sql_virtual_machine_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets a SQL virtual machine. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_name: Name of the SQL virtual machine. - :type sql_virtual_machine_name: str - :param expand: The child resources to include in the response. - :type expand: 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: SqlVirtualMachine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine 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'), - 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_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 expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, '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('SqlVirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}'} - - - def _create_or_update_initial( - self, resource_group_name, sql_virtual_machine_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'), - 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_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, 'SqlVirtualMachine') - - # 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('SqlVirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('SqlVirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, sql_virtual_machine_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a SQL virtual machine. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_name: Name of the SQL virtual machine. - :type sql_virtual_machine_name: str - :param parameters: The SQL virtual machine. - :type parameters: - ~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine - :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 SqlVirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - sql_virtual_machine_name=sql_virtual_machine_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SqlVirtualMachine', 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.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}'} - - - def _delete_initial( - self, resource_group_name, sql_virtual_machine_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'), - 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_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, sql_virtual_machine_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a SQL virtual machine. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_name: Name of the SQL virtual machine. - :type sql_virtual_machine_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, - sql_virtual_machine_name=sql_virtual_machine_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.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}'} - - - def _update_initial( - self, resource_group_name, sql_virtual_machine_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.SqlVirtualMachineUpdate(tags=tags) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_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, 'SqlVirtualMachineUpdate') - - # 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('SqlVirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, sql_virtual_machine_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a SQL virtual machine. - - :param resource_group_name: Name of the resource group that contains - the resource. You can obtain this value from the Azure Resource - Manager API or the portal. - :type resource_group_name: str - :param sql_virtual_machine_name: Name of the SQL virtual machine. - :type sql_virtual_machine_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 SqlVirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - sql_virtual_machine_name=sql_virtual_machine_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SqlVirtualMachine', 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.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets all SQL virtual machines in a resource group. - - :param resource_group_name: Name of the resource group 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 SqlVirtualMachine - :rtype: - ~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachinePaged[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - 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) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - 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 - header_dict = None - if raw: - header_dict = {} - deserialized = models.SqlVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines'} diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/version.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/version.py deleted file mode 100644 index 266f5a486d79..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/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.5.0" - diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/dev_requirements.txt b/sdk/sql/azure-mgmt-sqlvirtualmachine/dev_requirements.txt deleted file mode 100644 index 1a1c8d8fc379..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/dev_requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ --e ../../../tools/azure-sdk-tools --e ../../../tools/azure-devtools \ No newline at end of file diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/sdk_packaging.toml b/sdk/sql/azure-mgmt-sqlvirtualmachine/sdk_packaging.toml deleted file mode 100644 index da81e215b77e..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/sdk_packaging.toml +++ /dev/null @@ -1,7 +0,0 @@ -[packaging] -package_name = "azure-mgmt-sqlvirtualmachine" -package_nspkg = "azure-mgmt-nspkg" -package_pprint_name = "SQL Virtual Machine Management" -package_doc_id = "" -is_stable = false -is_arm = true diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/setup.cfg b/sdk/sql/azure-mgmt-sqlvirtualmachine/setup.cfg deleted file mode 100644 index 3c6e79cf31da..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/setup.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/setup.py deleted file mode 100644 index a5ae442c86ce..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/setup.py +++ /dev/null @@ -1,90 +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 re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-sqlvirtualmachine" -PACKAGE_PPRINT_NAME = "SQL Virtual Machine Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.md', encoding='utf-8') as f: - readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), - install_requires=[ - 'msrest>=0.5.0', - 'msrestazure>=0.4.32,<2.0.0', - 'azure-common~=1.1', - ], - extras_require={ - ":python_version<'3.0'": ['azure-mgmt-nspkg'], - } -) diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/tests/recordings/test_cli_mgmt_sqlvirtualmachine.test_sqlvirtualmachine.yaml b/sdk/sql/azure-mgmt-sqlvirtualmachine/tests/recordings/test_cli_mgmt_sqlvirtualmachine.test_sqlvirtualmachine.yaml deleted file mode 100644 index 6c090cbd6a3d..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/tests/recordings/test_cli_mgmt_sqlvirtualmachine.test_sqlvirtualmachine.yaml +++ /dev/null @@ -1,2639 +0,0 @@ -interactions: -- request: - body: '{"location": "eastus", "properties": {"addressSpace": {"addressPrefixes": - ["10.0.0.0/16"]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '92' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/10.1.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork?api-version=2020-03-01 - response: - body: - string: "{\r\n \"name\": \"myVirtualNetwork\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork\"\ - ,\r\n \"etag\": \"W/\\\"4d1c63e0-ca7e-4a67-ab6c-a3b648801893\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"fcd8549f-8263-4980-b49d-c7d6486b2eca\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ - : false\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84da73e9-8e7a-4f6a-bc61-ebfe8f75b1ef?api-version=2020-03-01 - cache-control: - - no-cache - content-length: - - '706' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:44:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 39ffd355-8a3c-42c9-b4b0-7a267a0c660d - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/10.1.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84da73e9-8e7a-4f6a-bc61-ebfe8f75b1ef?api-version=2020-03-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:44:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - c1e35b0e-573e-43aa-993d-c887febda9f0 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/10.1.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork?api-version=2020-03-01 - response: - body: - string: "{\r\n \"name\": \"myVirtualNetwork\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork\"\ - ,\r\n \"etag\": \"W/\\\"73b00f4a-d2c5-4ab0-81cc-41c7a90ace1c\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"fcd8549f-8263-4980-b49d-c7d6486b2eca\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ - : false\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '707' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:44:22 GMT - etag: - - W/"73b00f4a-d2c5-4ab0-81cc-41c7a90ace1c" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 973e8775-fd9b-40fc-bd84-eaa973a4b0f8 - status: - code: 200 - message: OK -- request: - body: '{"properties": {"addressPrefix": "10.0.0.0/24"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '48' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/10.1.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/mySubnet?api-version=2020-03-01 - response: - body: - string: "{\r\n \"name\": \"mySubnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/mySubnet\"\ - ,\r\n \"etag\": \"W/\\\"bcf6b5f3-98b6-418c-b747-66e88e315d37\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a5f88e7c-0ec5-4d1a-9b35-a47f36f56f0b?api-version=2020-03-01 - cache-control: - - no-cache - content-length: - - '585' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:44:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 546eb9ef-5091-4efb-a41a-a41909434ac0 - x-ms-ratelimit-remaining-subscription-writes: - - '1196' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/10.1.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a5f88e7c-0ec5-4d1a-9b35-a47f36f56f0b?api-version=2020-03-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:44:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a24d560d-1cb7-4f3f-b4c8-fff7bc4f8618 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/10.1.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/mySubnet?api-version=2020-03-01 - response: - body: - string: "{\r\n \"name\": \"mySubnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/mySubnet\"\ - ,\r\n \"etag\": \"W/\\\"e77d8df1-7a9c-4ad2-b602-a18031a5ddda\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '586' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:44:26 GMT - etag: - - W/"e77d8df1-7a9c-4ad2-b602-a18031a5ddda" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f9a67736-b3b2-4832-a4e8-ccce7fd44ab5 - status: - code: 200 - message: OK -- request: - body: 'b''{"location": "eastus", "properties": {"ipConfigurations": [{"properties": - {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/mySubnet"}}, - "name": "MyIpConfig"}]}}''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '329' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/10.1.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/networkInterfaces/myNetworkInterface?api-version=2020-03-01 - response: - body: - string: "{\r\n \"name\": \"myNetworkInterface\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/networkInterfaces/myNetworkInterface\"\ - ,\r\n \"etag\": \"W/\\\"df3fc1e9-ebaa-47e8-b7a1-26cd8be3a765\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"a8575954-e0fc-447c-a262-55373a749d21\"\ - ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"MyIpConfig\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/networkInterfaces/myNetworkInterface/ipConfigurations/MyIpConfig\"\ - ,\r\n \"etag\": \"W/\\\"df3fc1e9-ebaa-47e8-b7a1-26cd8be3a765\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/mySubnet\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ - \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"t3knr5ddqkaetne3y5leq0zozc.bx.internal.cloudapp.net\"\ - \r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\"\ - : false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\ - \n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\ - \r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/06fce772-81ed-483c-8c38-d1af0cb4acea?api-version=2020-03-01 - cache-control: - - no-cache - content-length: - - '1813' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:44:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 2a31b60f-8509-4884-9fb3-3e3f856e567e - x-ms-ratelimit-remaining-subscription-writes: - - '1195' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/10.1.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/06fce772-81ed-483c-8c38-d1af0cb4acea?api-version=2020-03-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:45:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 41cd97db-5f99-4ca4-b5cd-f926828a0d0f - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/10.1.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/networkInterfaces/myNetworkInterface?api-version=2020-03-01 - response: - body: - string: "{\r\n \"name\": \"myNetworkInterface\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/networkInterfaces/myNetworkInterface\"\ - ,\r\n \"etag\": \"W/\\\"df3fc1e9-ebaa-47e8-b7a1-26cd8be3a765\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"a8575954-e0fc-447c-a262-55373a749d21\"\ - ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"MyIpConfig\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/networkInterfaces/myNetworkInterface/ipConfigurations/MyIpConfig\"\ - ,\r\n \"etag\": \"W/\\\"df3fc1e9-ebaa-47e8-b7a1-26cd8be3a765\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/mySubnet\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ - \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"t3knr5ddqkaetne3y5leq0zozc.bx.internal.cloudapp.net\"\ - \r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\"\ - : false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\ - \n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\ - \r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1813' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:45:01 GMT - etag: - - W/"df3fc1e9-ebaa-47e8-b7a1-26cd8be3a765" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 2b6d1521-4017-48a7-b348-3589bb726813 - status: - code: 200 - message: OK -- request: - body: 'b''{"location": "eastus", "properties": {"hardwareProfile": {"vmSize": - "Standard_D2_v2"}, "storageProfile": {"imageReference": {"publisher": "microsoftsqlserver", - "offer": "sql2019-ws2019", "sku": "enterprise", "version": "latest"}, "osDisk": - {"name": "myVMosdisk", "caching": "ReadWrite", "createOption": "FromImage", - "managedDisk": {"storageAccountType": "Standard_LRS"}}, "dataDisks": [{"lun": - 0, "createOption": "Empty", "diskSizeGB": 1023}, {"lun": 1, "createOption": - "Empty", "diskSizeGB": 1023}]}, "osProfile": {"computerName": "myvm", "adminUsername": - "testuser", "adminPassword": "Password1!!!"}, "networkProfile": {"networkInterfaces": - [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/networkInterfaces/myNetworkInterface", - "properties": {"primary": true}}]}}}''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '885' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine?api-version=2019-07-01 - response: - body: - string: "{\r\n \"name\": \"myVirtualMachine\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine\"\ - ,\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"vmId\": \"0e9dc36e-184e-4d5e-94cc-32756f1c78ab\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_D2_v2\"\r\n\ - \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"microsoftsqlserver\",\r\n \"offer\": \"sql2019-ws2019\"\ - ,\r\n \"sku\": \"enterprise\",\r\n \"version\": \"latest\",\r\ - \n \"exactVersion\": \"15.0.200310\"\r\n },\r\n \"osDisk\"\ - : {\r\n \"osType\": \"Windows\",\r\n \"name\": \"myVMosdisk\"\ - ,\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\ - ,\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\ - \r\n },\r\n \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\"\ - : [\r\n {\r\n \"lun\": 0,\r\n \"createOption\": \"\ - Empty\",\r\n \"caching\": \"None\",\r\n \"managedDisk\"\ - : {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\ - \n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n\ - \ },\r\n {\r\n \"lun\": 1,\r\n \"createOption\"\ - : \"Empty\",\r\n \"caching\": \"None\",\r\n \"managedDisk\"\ - : {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\ - \n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n\ - \ }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ - : \"myvm\",\r\n \"adminUsername\": \"testuser\",\r\n \"windowsConfiguration\"\ - : {\r\n \"provisionVMAgent\": true,\r\n \"enableAutomaticUpdates\"\ - : true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\"\ - : true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"\ - networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/networkInterfaces/myNetworkInterface\"\ - ,\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Creating\"\ - \r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f1e5869b-4b4f-42a7-b5a9-7568321c3330?api-version=2019-07-01 - cache-control: - - no-cache - content-length: - - '2179' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:45:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/PutVM3Min;743,Microsoft.Compute/PutVM30Min;3718 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f1e5869b-4b4f-42a7-b5a9-7568321c3330?api-version=2019-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2020-05-07T19:45:06.8747101+00:00\",\r\n \"\ - status\": \"InProgress\",\r\n \"name\": \"f1e5869b-4b4f-42a7-b5a9-7568321c3330\"\ - \r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:45:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29964 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f1e5869b-4b4f-42a7-b5a9-7568321c3330?api-version=2019-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2020-05-07T19:45:06.8747101+00:00\",\r\n \"\ - status\": \"InProgress\",\r\n \"name\": \"f1e5869b-4b4f-42a7-b5a9-7568321c3330\"\ - \r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:46:08 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29963 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f1e5869b-4b4f-42a7-b5a9-7568321c3330?api-version=2019-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2020-05-07T19:45:06.8747101+00:00\",\r\n \"\ - status\": \"InProgress\",\r\n \"name\": \"f1e5869b-4b4f-42a7-b5a9-7568321c3330\"\ - \r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:46:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14997,Microsoft.Compute/GetOperation30Min;29962 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f1e5869b-4b4f-42a7-b5a9-7568321c3330?api-version=2019-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2020-05-07T19:45:06.8747101+00:00\",\r\n \"\ - status\": \"InProgress\",\r\n \"name\": \"f1e5869b-4b4f-42a7-b5a9-7568321c3330\"\ - \r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:47:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29960 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f1e5869b-4b4f-42a7-b5a9-7568321c3330?api-version=2019-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2020-05-07T19:45:06.8747101+00:00\",\r\n \"\ - endTime\": \"2020-05-07T19:47:34.9685689+00:00\",\r\n \"status\": \"Succeeded\"\ - ,\r\n \"name\": \"f1e5869b-4b4f-42a7-b5a9-7568321c3330\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '184' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:47:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29958 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine?api-version=2019-07-01 - response: - body: - string: "{\r\n \"name\": \"myVirtualMachine\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine\"\ - ,\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"vmId\": \"0e9dc36e-184e-4d5e-94cc-32756f1c78ab\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_D2_v2\"\r\n\ - \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"microsoftsqlserver\",\r\n \"offer\": \"sql2019-ws2019\"\ - ,\r\n \"sku\": \"enterprise\",\r\n \"version\": \"latest\",\r\ - \n \"exactVersion\": \"15.0.200310\"\r\n },\r\n \"osDisk\"\ - : {\r\n \"osType\": \"Windows\",\r\n \"name\": \"myVMosdisk\"\ - ,\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\ - ,\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TEST_CLI_MGMT_SQLVIRTUALMACHINE_TEST_SQLVIRTUALMACHINE6AE51670/providers/Microsoft.Compute/disks/myVMosdisk\"\ - \r\n },\r\n \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\"\ - : [\r\n {\r\n \"lun\": 0,\r\n \"name\": \"myVirtualMachine_disk2_33ecb8eb7f6940f2ac35a154ebca5107\"\ - ,\r\n \"createOption\": \"Empty\",\r\n \"caching\": \"None\"\ - ,\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"\ - Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TEST_CLI_MGMT_SQLVIRTUALMACHINE_TEST_SQLVIRTUALMACHINE6AE51670/providers/Microsoft.Compute/disks/myVirtualMachine_disk2_33ecb8eb7f6940f2ac35a154ebca5107\"\ - \r\n },\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\"\ - : false\r\n },\r\n {\r\n \"lun\": 1,\r\n \"\ - name\": \"myVirtualMachine_disk3_37dd63c50e7b439c810b5331a8ee682f\",\r\n \ - \ \"createOption\": \"Empty\",\r\n \"caching\": \"None\"\ - ,\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"\ - Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TEST_CLI_MGMT_SQLVIRTUALMACHINE_TEST_SQLVIRTUALMACHINE6AE51670/providers/Microsoft.Compute/disks/myVirtualMachine_disk3_37dd63c50e7b439c810b5331a8ee682f\"\ - \r\n },\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\"\ - : false\r\n }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \ - \ \"computerName\": \"myvm\",\r\n \"adminUsername\": \"testuser\",\r\ - \n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\ - \n \"enableAutomaticUpdates\": true\r\n },\r\n \"secrets\"\ - : [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\"\ - : true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Network/networkInterfaces/myNetworkInterface\"\ - ,\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Succeeded\"\ - \r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '3015' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:47:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3997,Microsoft.Compute/LowCostGet30Min;31977 - status: - code: 200 - message: OK -- request: - body: '{"sku": {"name": "Standard_GRS"}, "kind": "StorageV2", "location": "eastus", - "properties": {"encryption": {"services": {"blob": {"enabled": true, "keyType": - "Account"}, "file": {"enabled": true, "keyType": "Account"}}, "keySource": "Microsoft.Storage"}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '254' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storage/9.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Storage/storageAccounts/tempstorageaccountxysdtr?api-version=2019-06-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - content-type: - - text/plain; charset=utf-8 - date: - - Thu, 07 May 2020 19:47:43 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/9b97d5f8-8c2c-476a-a1e1-3765548c31f7?monitor=true&api-version=2019-06-01 - pragma: - - no-cache - server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storage/9.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/9b97d5f8-8c2c-476a-a1e1-3765548c31f7?monitor=true&api-version=2019-06-01 - response: - body: - string: '{"sku":{"name":"Standard_GRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Storage/storageAccounts/tempstorageaccountxysdtr","name":"tempstorageaccountxysdtr","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-05-07T19:47:43.0299968Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-05-07T19:47:43.0299968Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-05-07T19:47:42.9049498Z","primaryEndpoints":{"dfs":"https://tempstorageaccountxysdtr.dfs.core.windows.net/","web":"https://tempstorageaccountxysdtr.z13.web.core.windows.net/","blob":"https://tempstorageaccountxysdtr.blob.core.windows.net/","queue":"https://tempstorageaccountxysdtr.queue.core.windows.net/","table":"https://tempstorageaccountxysdtr.table.core.windows.net/","file":"https://tempstorageaccountxysdtr.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available"}}' - headers: - cache-control: - - no-cache - content-length: - - '1439' - content-type: - - application/json - date: - - Thu, 07 May 2020 19:48:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storage/9.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Storage/storageAccounts/tempstorageaccountxysdtr/listKeys?api-version=2019-06-01 - response: - body: - string: '{"keys":[{"keyName":"key1","value":"4ozVyHkVhOoQ44J+Jy/8tYWAHvDYvPxZQViXo+ctPmmUS8TsyjiIYV7YJUTvjqntUrHdujhaaZxzNaSbDIYxOw==","permissions":"FULL"},{"keyName":"key2","value":"yR3n0inDxGKwsyQadHh5Qlt5pltL4BM0EzXcBF0eTbMXI81qdACHL4/mEKU/wyRanSbNVCQ9Ngztp42JCOsdLw==","permissions":"FULL"}]}' - headers: - cache-control: - - no-cache - content-length: - - '288' - content-type: - - application/json - date: - - Thu, 07 May 2020 19:48:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-resource-requests: - - '11999' - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "tags": {"mytag": "myval"}, "properties": {"sqlImageOffer": - "sql2019-ws2019", "sqlImageSku": "Enterprise", "wsfcDomainProfile": {"domainFqdn": - "testdomain.com", "ouPath": "OU=WSCluster,DC=testdomain,DC=com", "clusterBootstrapAccount": - "testrpadmin", "clusterOperatorAccount": "testrp@testdomain.com", "sqlServiceAccount": - "sqlservice@testdomain.com", "storageAccountUrl": "https://tempstorageaccountxysdtr.blob.core.windows.net/", - "storageAccountPrimaryKey": "4ozVyHkVhOoQ44J+Jy/8tYWAHvDYvPxZQViXo+ctPmmUS8TsyjiIYV7YJUTvjqntUrHdujhaaZxzNaSbDIYxOw=="}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '575' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/mySqlVMGroup?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"provisioningState":"ProvisioningDomainful","sqlImageOffer":"sql2019-ws2019","sqlImageSku":"Enterprise","wsfcDomainProfile":{"storageAccountUrl":"https://tempstorageaccountxysdtr.blob.core.windows.net/"}},"location":"eastus","tags":{"mytag":"myval"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/mySqlVMGroup","name":"mySqlVMGroup","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/createsqlvirtualmachinegroup/operationResults/c9b6e934-9ee8-4959-ac5f-18c0eaf98e14?api-version=2017-03-01-preview - cache-control: - - no-cache - content-length: - - '560' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:48:05 GMT - expires: - - '-1' - 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: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/createsqlvirtualmachinegroup/operationResults/c9b6e934-9ee8-4959-ac5f-18c0eaf98e14?api-version=2017-03-01-preview - response: - body: - string: '{"name":"c9b6e934-9ee8-4959-ac5f-18c0eaf98e14","status":"Succeeded","startTime":"2020-05-07T19:48:03.95Z"}' - headers: - cache-control: - - no-cache - content-length: - - '106' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:48:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/mySqlVMGroup?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"provisioningState":"Succeeded","sqlImageOffer":"sql2019-ws2019","sqlImageSku":"Enterprise","wsfcDomainProfile":{"domainFqdn":"testdomain.com","ouPath":"OU=WSCluster,DC=testdomain,DC=com","clusterBootstrapAccount":"testrpadmin","clusterOperatorAccount":"testrp@testdomain.com","sqlServiceAccount":"sqlservice@testdomain.com","storageAccountUrl":"https://tempstorageaccountxysdtr.blob.core.windows.net/"}},"location":"eastus","tags":{"mytag":"myval"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/mySqlVMGroup","name":"mySqlVMGroup","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups"}' - headers: - cache-control: - - no-cache - content-length: - - '760' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:48:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: 'b''{"location": "eastus", "properties": {"virtualMachineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine", - "sqlServerLicenseType": "PAYG"}}''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '292' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"virtualMachineResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine","provisioningState":"Provisioning","sqlServerLicenseType":"PAYG","sqlManagement":"Full","sqlImageSku":"Unknown"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine","name":"myVirtualMachine","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachines"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/createsqlvirtualmachine/operationResults/95679ed8-523d-4e75-9bad-7e9964cc66fc?api-version=2017-03-01-preview - cache-control: - - no-cache - content-length: - - '661' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:48:27 GMT - expires: - - '-1' - 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: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/createsqlvirtualmachine/operationResults/95679ed8-523d-4e75-9bad-7e9964cc66fc?api-version=2017-03-01-preview - response: - body: - string: '{"name":"95679ed8-523d-4e75-9bad-7e9964cc66fc","status":"InProgress","startTime":"2020-05-07T19:48:26.027Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:48: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 - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/createsqlvirtualmachine/operationResults/95679ed8-523d-4e75-9bad-7e9964cc66fc?api-version=2017-03-01-preview - response: - body: - string: '{"name":"95679ed8-523d-4e75-9bad-7e9964cc66fc","status":"InProgress","startTime":"2020-05-07T19:48:26.027Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 May 2020 19:48:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/createsqlvirtualmachine/operationResults/95679ed8-523d-4e75-9bad-7e9964cc66fc?api-version=2017-03-01-preview - response: - body: - string: '{"name":"95679ed8-523d-4e75-9bad-7e9964cc66fc","status":"Succeeded","startTime":"2020-05-07T19:48:26.027Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 03:58:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"virtualMachineResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine","provisioningState":"Succeeded","sqlImageOffer":"SQL2019-WS2019","sqlServerLicenseType":"PAYG","sqlManagement":"Full","sqlImageSku":"Enterprise"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine","name":"myVirtualMachine","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachines"}' - headers: - cache-control: - - no-cache - content-length: - - '694' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 03:58:16 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: 'b''{"location": "eastus", "properties": {"virtualMachineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine"}}''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '260' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"virtualMachineResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine","provisioningState":"Updating","sqlServerLicenseType":"PAYG","sqlManagement":"Full","sqlImageSku":"Enterprise"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine","name":"myVirtualMachine","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachines"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/5650932d-789f-4759-bbe3-5ff6c400ff5e?api-version=2017-03-01-preview - cache-control: - - no-cache - content-length: - - '660' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 03:58: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 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/5650932d-789f-4759-bbe3-5ff6c400ff5e?api-version=2017-03-01-preview - response: - body: - string: '{"name":"5650932d-789f-4759-bbe3-5ff6c400ff5e","status":"Succeeded","startTime":"2020-05-08T03:58:17.967Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 03:58:34 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"virtualMachineResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine","provisioningState":"Succeeded","sqlImageOffer":"SQL2019-WS2019","sqlServerLicenseType":"PAYG","sqlManagement":"Full","sqlImageSku":"Enterprise"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine","name":"myVirtualMachine","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachines"}' - headers: - cache-control: - - no-cache - content-length: - - '694' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 03:58:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: 'b''{"location": "eastus", "properties": {"virtualMachineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine", - "sqlServerLicenseType": "PAYG", "sqlManagement": "Full", "sqlImageSku": "Enterprise", - "autoPatchingSettings": {"enable": true, "dayOfWeek": "Sunday", "maintenanceWindowStartingHour": - 2, "maintenanceWindowDuration": 60}, "autoBackupSettings": {"enable": true, - "enableEncryption": true, "retentionPeriod": 17, "storageAccountUrl": "https://tempstorageaccountxysdtr.blob.core.windows.net/", - "storageAccessKey": "4ozVyHkVhOoQ44J+Jy/8tYWAHvDYvPxZQViXo+ctPmmUS8TsyjiIYV7YJUTvjqntUrHdujhaaZxzNaSbDIYxOw==", - "password": "", "backupSystemDbs": true, "backupScheduleType": "Manual", - "fullBackupFrequency": "Daily", "fullBackupStartTime": 6, "fullBackupWindowHours": - 11, "logBackupFrequency": 10}, "keyVaultCredentialSettings": {"enable": false}, - "serverConfigurationsManagementSettings": {"sqlConnectivityUpdateSettings": - {"connectivityType": "PRIVATE", "port": 1433, "sqlAuthUpdateUserName": "sqllogin", - "sqlAuthUpdatePassword": ""}, "sqlWorkloadTypeUpdateSettings": {"sqlWorkloadType": - "OLTP"}, "sqlStorageUpdateSettings": {"diskCount": 1, "startingDeviceId": 2, - "diskConfigurationType": "NEW"}, "additionalFeaturesServerConfigurations": {"isRServicesEnabled": - false}}}}''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1442' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"virtualMachineResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine","provisioningState":"Updating","sqlServerLicenseType":"PAYG","sqlManagement":"Full","sqlImageSku":"Enterprise"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine","name":"myVirtualMachine","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachines"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/e09b76d3-4e9e-480f-903b-8e32889760c6?api-version=2017-03-01-preview - cache-control: - - no-cache - content-length: - - '660' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 03:58: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 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/e09b76d3-4e9e-480f-903b-8e32889760c6?api-version=2017-03-01-preview - response: - body: - string: '{"name":"e09b76d3-4e9e-480f-903b-8e32889760c6","status":"InProgress","startTime":"2020-05-08T03:58:37.233Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 03:58:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/e09b76d3-4e9e-480f-903b-8e32889760c6?api-version=2017-03-01-preview - response: - body: - string: '{"name":"e09b76d3-4e9e-480f-903b-8e32889760c6","status":"InProgress","startTime":"2020-05-08T03:58:37.233Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 03:59: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 - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/e09b76d3-4e9e-480f-903b-8e32889760c6?api-version=2017-03-01-preview - response: - body: - string: '{"name":"e09b76d3-4e9e-480f-903b-8e32889760c6","status":"InProgress","startTime":"2020-05-08T03:58:37.233Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 03:59:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/e09b76d3-4e9e-480f-903b-8e32889760c6?api-version=2017-03-01-preview - response: - body: - string: '{"name":"e09b76d3-4e9e-480f-903b-8e32889760c6","status":"InProgress","startTime":"2020-05-08T03:58:37.233Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 03:59: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 - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/e09b76d3-4e9e-480f-903b-8e32889760c6?api-version=2017-03-01-preview - response: - body: - string: '{"name":"e09b76d3-4e9e-480f-903b-8e32889760c6","status":"InProgress","startTime":"2020-05-08T03:58:37.233Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 03:59:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/e09b76d3-4e9e-480f-903b-8e32889760c6?api-version=2017-03-01-preview - response: - body: - string: '{"name":"e09b76d3-4e9e-480f-903b-8e32889760c6","status":"InProgress","startTime":"2020-05-08T03:58:37.233Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:00: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 - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/e09b76d3-4e9e-480f-903b-8e32889760c6?api-version=2017-03-01-preview - response: - body: - string: '{"name":"e09b76d3-4e9e-480f-903b-8e32889760c6","status":"InProgress","startTime":"2020-05-08T03:58:37.233Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:00:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/e09b76d3-4e9e-480f-903b-8e32889760c6?api-version=2017-03-01-preview - response: - body: - string: '{"name":"e09b76d3-4e9e-480f-903b-8e32889760c6","status":"Succeeded","startTime":"2020-05-08T03:58:37.233Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:00: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 - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"virtualMachineResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine","provisioningState":"Succeeded","sqlImageOffer":"SQL2019-WS2019","sqlServerLicenseType":"PAYG","sqlManagement":"Full","sqlImageSku":"Enterprise"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine","name":"myVirtualMachine","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachines"}' - headers: - cache-control: - - no-cache - content-length: - - '694' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:00:47 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: 'b''{"location": "eastus", "properties": {"virtualMachineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine"}}''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '260' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"virtualMachineResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine","provisioningState":"Updating","sqlServerLicenseType":"PAYG","sqlManagement":"Full","sqlImageSku":"Enterprise"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine","name":"myVirtualMachine","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachines"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/14cad9aa-d135-46bb-ae37-5915c6ae1f3b?api-version=2017-03-01-preview - cache-control: - - no-cache - content-length: - - '660' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:00: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 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/updatesqlvirtualmachine/operationResults/14cad9aa-d135-46bb-ae37-5915c6ae1f3b?api-version=2017-03-01-preview - response: - body: - string: '{"name":"14cad9aa-d135-46bb-ae37-5915c6ae1f3b","status":"Succeeded","startTime":"2020-05-08T04:00:50.093Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:01: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 - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"virtualMachineResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine","provisioningState":"Succeeded","sqlImageOffer":"SQL2019-WS2019","sqlServerLicenseType":"PAYG","sqlManagement":"Full","sqlImageSku":"Enterprise"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine","name":"myVirtualMachine","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachines"}' - headers: - cache-control: - - no-cache - content-length: - - '694' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:01:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/mySqlVMGroup?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"provisioningState":"Succeeded","sqlImageOffer":"sql2019-ws2019","sqlImageSku":"Enterprise","wsfcDomainProfile":{"domainFqdn":"testdomain.com","ouPath":"OU=WSCluster,DC=testdomain,DC=com","clusterBootstrapAccount":"testrpadmin","clusterOperatorAccount":"testrp@testdomain.com","sqlServiceAccount":"sqlservice@testdomain.com","storageAccountUrl":"https://tempstorageaccountxysdtr.blob.core.windows.net/"}},"location":"eastus","tags":{"mytag":"myval"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/mySqlVMGroup","name":"mySqlVMGroup","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups"}' - headers: - cache-control: - - no-cache - content-length: - - '760' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:01:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine?api-version=2017-03-01-preview - response: - body: - string: '{"properties":{"virtualMachineResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.Compute/virtualMachines/myVirtualMachine","provisioningState":"Succeeded","sqlImageOffer":"SQL2019-WS2019","sqlServerLicenseType":"PAYG","sqlManagement":"Full","sqlImageSku":"Enterprise"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine","name":"myVirtualMachine","type":"Microsoft.SqlVirtualMachine/sqlVirtualMachines"}' - headers: - cache-control: - - no-cache - content-length: - - '694' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:01:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/mySqlVMGroup?api-version=2017-03-01-preview - response: - body: - string: '' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/deletesqlvirtualmachinegroup/operationResults/29371c96-2a5e-45f4-864d-d8d49d69c4e6?api-version=2017-03-01-preview - cache-control: - - no-cache - content-length: - - '0' - date: - - Fri, 08 May 2020 04:01:11 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/sqlVirtualMachineGroupOperationResults/29371c96-2a5e-45f4-864d-d8d49d69c4e6?api-version=2017-03-01-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/deletesqlvirtualmachinegroup/operationResults/29371c96-2a5e-45f4-864d-d8d49d69c4e6?api-version=2017-03-01-preview - response: - body: - string: '{"name":"29371c96-2a5e-45f4-864d-d8d49d69c4e6","status":"Succeeded","startTime":"2020-05-08T04:01:10.173Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:01:27 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_sqlvirtualmachine_test_sqlvirtualmachine6ae51670/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/myVirtualMachine?api-version=2017-03-01-preview - response: - body: - string: '' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/deletesqlvirtualmachine/operationResults/0b770d47-8651-4c56-a6c2-39695f0dca1a?api-version=2017-03-01-preview - cache-control: - - no-cache - content-length: - - '0' - date: - - Fri, 08 May 2020 04:01:28 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/sqlVirtualMachineOperationResults/0b770d47-8651-4c56-a6c2-39695f0dca1a?api-version=2017-03-01-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/deletesqlvirtualmachine/operationResults/0b770d47-8651-4c56-a6c2-39695f0dca1a?api-version=2017-03-01-preview - response: - body: - string: '{"name":"0b770d47-8651-4c56-a6c2-39695f0dca1a","status":"InProgress","startTime":"2020-05-08T04:01:28.567Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:01: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 - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/deletesqlvirtualmachine/operationResults/0b770d47-8651-4c56-a6c2-39695f0dca1a?api-version=2017-03-01-preview - response: - body: - string: '{"name":"0b770d47-8651-4c56-a6c2-39695f0dca1a","status":"InProgress","startTime":"2020-05-08T04:01:28.567Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:02:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/deletesqlvirtualmachine/operationResults/0b770d47-8651-4c56-a6c2-39695f0dca1a?api-version=2017-03-01-preview - response: - body: - string: '{"name":"0b770d47-8651-4c56-a6c2-39695f0dca1a","status":"InProgress","startTime":"2020-05-08T04:01:28.567Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:02:16 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/deletesqlvirtualmachine/operationResults/0b770d47-8651-4c56-a6c2-39695f0dca1a?api-version=2017-03-01-preview - response: - body: - string: '{"name":"0b770d47-8651-4c56-a6c2-39695f0dca1a","status":"InProgress","startTime":"2020-05-08T04:01:28.567Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:02:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/deletesqlvirtualmachine/operationResults/0b770d47-8651-4c56-a6c2-39695f0dca1a?api-version=2017-03-01-preview - response: - body: - string: '{"name":"0b770d47-8651-4c56-a6c2-39695f0dca1a","status":"InProgress","startTime":"2020-05-08T04:01:28.567Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:02:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-sqlvirtualmachine/0.4.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SqlVirtualMachine/locations/eastus/operationTypes/deletesqlvirtualmachine/operationResults/0b770d47-8651-4c56-a6c2-39695f0dca1a?api-version=2017-03-01-preview - response: - body: - string: '{"name":"0b770d47-8651-4c56-a6c2-39695f0dca1a","status":"Succeeded","startTime":"2020-05-08T04:01:28.567Z"}' - headers: - cache-control: - - no-cache - content-length: - - '107' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 May 2020 04:03:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/tests/test_cli_mgmt_sqlvirtualmachine.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/tests/test_cli_mgmt_sqlvirtualmachine.py deleted file mode 100644 index c6fef23a5c7b..000000000000 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/tests/test_cli_mgmt_sqlvirtualmachine.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. -#-------------------------------------------------------------------------- - - -# TEST SCENARIO COVERAGE -# ---------------------- -# Methods Total : 18 -# Methods Covered : 18 -# Examples Total : 22 -# Examples Tested : 16 -# Coverage % : 55 -# ---------------------- - -import unittest - -import azure.mgmt.sqlvirtualmachine -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - -AZURE_LOCATION = 'eastus' - -class MgmtSqlVirtualMachineTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtSqlVirtualMachineTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.sqlvirtualmachine.SqlVirtualMachineManagementClient - ) - if self.is_live: - from azure.mgmt.compute import ComputeManagementClient - self.compute_client = self.create_mgmt_client( - ComputeManagementClient - ) - from azure.mgmt.network import NetworkManagementClient - self.network_client = self.create_mgmt_client( - NetworkManagementClient - ) - from azure.mgmt.storage import StorageManagementClient - self.storage_client = self.create_mgmt_client( - StorageManagementClient - ) - - - def create_virtual_network(self, group_name, location, network_name, subnet_name): - - azure_operation_poller = self.network_client.virtual_networks.create_or_update( - group_name, - network_name, - { - 'location': location, - 'address_space': { - 'address_prefixes': ['10.0.0.0/16'] - } - }, - ) - result_create = azure_operation_poller.result() - - async_subnet_creation = self.network_client.subnets.create_or_update( - group_name, - network_name, - subnet_name, - {'address_prefix': '10.0.0.0/24'} - ) - subnet_info = async_subnet_creation.result() - - return subnet_info - - def create_network_interface(self, group_name, location, nic_name, subnet_id): - async_nic_creation = self.network_client.network_interfaces.create_or_update( - group_name, - nic_name, - { - 'location': location, - 'ip_configurations': [{ - 'name': 'MyIpConfig', - 'subnet': { - 'id': subnet_id - } - }] - } - ) - nic_info = async_nic_creation.result() - return nic_info.id - - def create_vm(self, group_name, location, vm_name, nic_id): - # Create a vm with empty data disks.[put] - BODY = { - "location": location, - "hardware_profile": { - "vm_size": "Standard_D2_v2" - }, - "storage_profile": { - "image_reference": { - "sku": "enterprise", - "publisher": "microsoftsqlserver", - "version": "latest", - "offer": "sql2019-ws2019" - }, - "os_disk": { - "caching": "ReadWrite", - "managed_disk": { - "storage_account_type": "Standard_LRS" - }, - "name": "myVMosdisk", - "create_option": "FromImage" - }, - "data_disks": [ - { - "disk_size_gb": "1023", - "create_option": "Empty", - "lun": "0" - }, - { - "disk_size_gb": "1023", - "create_option": "Empty", - "lun": "1" - } - ] - }, - "os_profile": { - "admin_username": "testuser", - "admin_password": "Password1!!!", - "computer_name" : "myvm" - }, - "network_profile": { - "network_interfaces": [ - { - # "id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Network/networkInterfaces/" + NIC_ID + "", - "id": nic_id, - "properties": { - "primary": True - } - } - ] - } - } - result = self.compute_client.virtual_machines.create_or_update(group_name, vm_name, BODY) - result = result.result() - - def create_storage_account(self, group_name, location, storage_name): - BODY = { - "sku": { - "name": "Standard_GRS" - }, - "kind": "StorageV2", - "location": AZURE_LOCATION, - "encryption": { - "services": { - "file": { - "key_type": "Account", - "enabled": True - }, - "blob": { - "key_type": "Account", - "enabled": True - } - }, - "key_source": "Microsoft.Storage" - } - } - result_create = self.storage_client.storage_accounts.create( - group_name, - storage_name, - BODY - ) - result = result_create.result() - print(result) - - def get_storage_key(self, group_name, storage_name): - result = self.storage_client.storage_accounts.list_keys(group_name, storage_name) - print(result) - return result.keys[0].value - - - @ResourceGroupPreparer(location=AZURE_LOCATION) - def test_sqlvirtualmachine(self, resource_group): - - SUBSCRIPTION_ID = self.settings.SUBSCRIPTION_ID - TENANT_ID = self.settings.TENANT_ID - RESOURCE_GROUP = resource_group.name - SQL_VIRTUAL_MACHINE_GROUP_NAME = "mySqlVMGroup" - AVAILABILITY_GROUP_LISTENER_NAME = "myAvailabilityGroupListener" - VIRTUAL_NETWORK_NAME = "myVirtualNetwork" - SUBNET_NAME = "mySubnet" - LOAD_BALANCER_NAME = "myLoadBalancer" - SQL_VIRTUAL_MACHINE_NAME = "myVirtualMachine" - VIRTUAL_MACHINE_NAME = "myVirtualMachine" - - if self.is_live: - subnet = self.create_virtual_network(RESOURCE_GROUP, AZURE_LOCATION, "myVirtualNetwork", "mySubnet") - nic_id = self.create_network_interface(RESOURCE_GROUP, AZURE_LOCATION, "myNetworkInterface", subnet.id) - self.create_vm(RESOURCE_GROUP, AZURE_LOCATION, VIRTUAL_MACHINE_NAME, nic_id) - self.create_storage_account(RESOURCE_GROUP, AZURE_LOCATION, "tempstorageaccountxysdtr") - storage_key = self.get_storage_key(RESOURCE_GROUP, "tempstorageaccountxysdtr") - else: - storage_key = "xxxx" - - # /SqlVirtualMachineGroups/put/Creates or updates a SQL virtual machine group.[put] - BODY = { - "location": AZURE_LOCATION, - "tags": { - "mytag": "myval" - }, - "sql_image_offer": "sql2019-ws2019", - "sql_image_sku": "Enterprise", - "wsfc_domain_profile": { - "domain_fqdn": "testdomain.com", - "ou_path": "OU=WSCluster,DC=testdomain,DC=com", - "cluster_bootstrap_account": "testrpadmin", - "cluster_operator_account": "testrp@testdomain.com", - "sql_service_account": "sqlservice@testdomain.com", - "storage_account_url": "https://" + "tempstorageaccountxysdtr" + ".blob.core.windows.net/", - "storage_account_primary_key": storage_key - } - } - result = self.mgmt_client.sql_virtual_machine_groups.create_or_update(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_group_name=SQL_VIRTUAL_MACHINE_GROUP_NAME, parameters=BODY) - result = result.result() - - # /SqlVirtualMachines/put/Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or TempDB storage pool.[put] - BODY = { - "location": AZURE_LOCATION, - "sql_server_license_type": "PAYG", - "virtual_machine_resource_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Compute/virtualMachines/" + VIRTUAL_MACHINE_NAME + "", - "storage_configuration_settings": { - "disk_configuration_type": "EXTEND", - "sql_data_settings": { - "luns": [ - "2" - ] - } - } - } - result = self.mgmt_client.sql_virtual_machines.create_or_update(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_name=SQL_VIRTUAL_MACHINE_NAME, parameters=BODY) - result = result.result() - - # /SqlVirtualMachines/put/Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and TempDB storage pool.[put] - BODY = { - "location": AZURE_LOCATION, - "virtual_machine_resource_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Compute/virtualMachines/" + VIRTUAL_MACHINE_NAME + "", - "storage_configuration_settings": { - "disk_configuration_type": "NEW", - "storage_workload_type": "OLTP", - "sql_data_settings": { - "default_file_path": "F:\\folderpath\\", - "luns": [ - "0" - ] - }, - "sql_log_settings": { - "default_file_path": "G:\\folderpath\\", - "luns": [ - "1" - ] - }, - "sql_temp_db_settings": { - "default_file_path": "D:\\TEMP" - } - } - } - result = self.mgmt_client.sql_virtual_machines.create_or_update(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_name=SQL_VIRTUAL_MACHINE_NAME, parameters=BODY) - result = result.result() - - # /SqlVirtualMachines/put/Creates or updates a SQL virtual machine with max parameters.[put] - BODY = { - "location": AZURE_LOCATION, - "sql_server_license_type": "PAYG", - "sql_image_sku": "Enterprise", - "sql_management": "Full", - "virtual_machine_resource_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Compute/virtualMachines/" + VIRTUAL_MACHINE_NAME + "", - "server_configurations_management_settings": { - "sql_connectivity_update_settings": { - "connectivity_type": "PRIVATE", - "port": "1433", - "sql_auth_update_user_name": "sqllogin", - "sql_auth_update_password": "" - }, - "sql_storage_update_settings": { - "disk_count": "1", - "starting_device_id": "2", - "disk_configuration_type": "NEW" - }, - "sql_workload_type_update_settings": { - "sql_workload_type": "OLTP" - }, - "additional_features_server_configurations": { - "is_rservices_enabled": False - } - }, - "key_vault_credential_settings": { - "enable": False - }, - "auto_patching_settings": { - "enable": True, - "day_of_week": "Sunday", - "maintenance_window_starting_hour": "2", - "maintenance_window_duration": "60" - }, - "auto_backup_settings": { - "enable": True, - "retention_period": "17", - "enable_encryption": True, - "password": "", - "backup_schedule_type": "Manual", - "backup_system_dbs": True, - "storage_account_url": "https://" + "tempstorageaccountxysdtr" + ".blob.core.windows.net/", - "storage_access_key": storage_key, - "full_backup_frequency": "Daily", - "full_backup_start_time": "6", - "full_backup_window_hours": "11", - "log_backup_frequency": "10" - } - } - result = self.mgmt_client.sql_virtual_machines.create_or_update(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_name=SQL_VIRTUAL_MACHINE_NAME, parameters=BODY) - result = result.result() - - # /SqlVirtualMachines/put/Creates or updates a SQL virtual machine with min parameters.[put] - BODY = { - "location": AZURE_LOCATION, - "virtual_machine_resource_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Compute/virtualMachines/" + VIRTUAL_MACHINE_NAME + "" - } - result = self.mgmt_client.sql_virtual_machines.create_or_update(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_name=SQL_VIRTUAL_MACHINE_NAME, parameters=BODY) - result = result.result() - - # /SqlVirtualMachines/put/Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group.[put] - BODY = { - "location": AZURE_LOCATION, - "virtual_machine_resource_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Compute/virtualMachines/" + VIRTUAL_MACHINE_NAME + "", - "sql_virtual_machine_group_resource_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/" + SQL_VIRTUAL_MACHINE_GROUP_NAME + "", - "wsfc_domain_credentials": { - "cluster_bootstrap_account_password": "", - "cluster_operator_account_password": "", - "sql_service_account_password": "" - } - } - # result = self.mgmt_client.sql_virtual_machines.create_or_update(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_name=SQL_VIRTUAL_MACHINE_NAME, parameters=BODY) - # result = result.result() - - # /AvailabilityGroupListeners/put/Creates or updates an availability group listener.[put] - BODY = { - "availability_group_name": "ag-test", - "load_balancer_configurations": [ - { - "private_ip_address": { - "ip_address": "10.1.0.112", - "subnet_resource_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Network/virtualNetworks/" + VIRTUAL_NETWORK_NAME + "/subnets/" + SUBNET_NAME + "" - }, - "load_balancer_resource_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Network/loadBalancers/" + LOAD_BALANCER_NAME + "", - "probe_port": "59983", - "sql_virtual_machine_instances": [ - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2", - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3" - ] - } - ], - "port": "1433" - } - # result = self.mgmt_client.availability_group_listeners.create_or_update(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_group_name=SQL_VIRTUAL_MACHINE_GROUP_NAME, availability_group_listener_name=AVAILABILITY_GROUP_LISTENER_NAME, parameters=BODY) - # result = result.result() - - # /AvailabilityGroupListeners/get/Gets an availability group listener.[get] - # result = self.mgmt_client.availability_group_listeners.get(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_group_name=SQL_VIRTUAL_MACHINE_GROUP_NAME, availability_group_listener_name=AVAILABILITY_GROUP_LISTENER_NAME) - - # /AvailabilityGroupListeners/get/Lists all availability group listeners in a SQL virtual machine group.[get] - # result = self.mgmt_client.availability_group_listeners.list_by_group(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_group_name=SQL_VIRTUAL_MACHINE_GROUP_NAME) - - # /SqlVirtualMachines/get/Gets the list of sql virtual machines in a SQL virtual machine group.[get] - # result = self.mgmt_client.sql_virtual_machines.list_by_sql_vm_group(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_group_name=SQL_VIRTUAL_MACHINE_GROUP_NAME) - - # /SqlVirtualMachineGroups/get/Gets a SQL virtual machine group.[get] - result = self.mgmt_client.sql_virtual_machine_groups.get(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_group_name=SQL_VIRTUAL_MACHINE_GROUP_NAME) - - # /SqlVirtualMachines/get/Gets a SQL virtual machine.[get] - result = self.mgmt_client.sql_virtual_machines.get(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_name=SQL_VIRTUAL_MACHINE_NAME) - - # /SqlVirtualMachineGroups/get/Gets all SQL virtual machine groups in a resource group.[get] - result = self.mgmt_client.sql_virtual_machine_groups.list_by_resource_group(resource_group_name=RESOURCE_GROUP) - - # /SqlVirtualMachines/get/Gets all SQL virtual machines in a resource group.[get] - result = self.mgmt_client.sql_virtual_machines.list_by_resource_group(resource_group_name=RESOURCE_GROUP) - - # /SqlVirtualMachineGroups/get/Gets all SQL virtual machine groups in a subscription.[get] - result = self.mgmt_client.sql_virtual_machine_groups.list() - - # /SqlVirtualMachines/get/Gets all SQL virtual machines in a subscription.[get] - result = self.mgmt_client.sql_virtual_machines.list() - - # /Operations/get/Lists all of the available SQL Rest API operations.[get] - result = self.mgmt_client.operations.list() - - # /SqlVirtualMachineGroups/patch/Updates a SQL virtual machine group tags.[patch] - BODY = { - "tags": { - "mytag": "myval" - } - } - # result = self.mgmt_client.sql_virtual_machine_groups.update(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_group_name=SQL_VIRTUAL_MACHINE_GROUP_NAME, parameters=BODY) - # result = result.result() - - # /SqlVirtualMachines/patch/Updates a SQL virtual machine tags.[patch] - BODY = { - "tags": { - "mytag": "myval" - } - } - # result = self.mgmt_client.sql_virtual_machines.update(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_name=SQL_VIRTUAL_MACHINE_NAME, parameters=BODY) - # result = result.result() - - # /AvailabilityGroupListeners/delete/Deletes an availability group listener.[delete] - # result = self.mgmt_client.availability_group_listeners.delete(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_group_name=SQL_VIRTUAL_MACHINE_GROUP_NAME, availability_group_listener_name=AVAILABILITY_GROUP_LISTENER_NAME) - # result = result.result() - - # /SqlVirtualMachineGroups/delete/Deletes a SQL virtual machine group.[delete] - result = self.mgmt_client.sql_virtual_machine_groups.delete(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_group_name=SQL_VIRTUAL_MACHINE_GROUP_NAME) - result = result.result() - - # /SqlVirtualMachines/delete/Deletes a SQL virtual machine.[delete] - result = self.mgmt_client.sql_virtual_machines.delete(resource_group_name=RESOURCE_GROUP, sql_virtual_machine_name=SQL_VIRTUAL_MACHINE_NAME) - result = result.result() - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() diff --git a/sdk/sql/ci.yml b/sdk/sql/ci.yml index 932bba4b8c01..0529d988b6f8 100644 --- a/sdk/sql/ci.yml +++ b/sdk/sql/ci.yml @@ -32,5 +32,4 @@ extends: Artifacts: - name: azure-mgmt-sql safeName: azuremgmtsql - - name: azure-mgmt-sqlvirtualmachine - safeName: azuremgmtsqlvirtualmachine + diff --git a/sdk/storage/azure-mgmt-storageimportexport/CHANGELOG.md b/sdk/storage/azure-mgmt-storageimportexport/CHANGELOG.md deleted file mode 100644 index 68afb3958b60..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# Release History - -## 0.1.0 (2020-04-11) - -* Initial Release diff --git a/sdk/storage/azure-mgmt-storageimportexport/MANIFEST.in b/sdk/storage/azure-mgmt-storageimportexport/MANIFEST.in deleted file mode 100644 index a3cb07df8765..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -recursive-include tests *.py *.yaml -include *.md -include azure/__init__.py -include azure/mgmt/__init__.py - diff --git a/sdk/storage/azure-mgmt-storageimportexport/README.md b/sdk/storage/azure-mgmt-storageimportexport/README.md deleted file mode 100644 index 3e016825864f..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Microsoft Azure SDK for Python - -This is the Microsoft Azure StorageImportExport Management Client Library. -This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. -For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). - - -# Usage - -For code examples, see [StorageImportExport Management](https://docs.microsoft.com/python/api/overview/azure/) -on docs.microsoft.com. - - -# Provide Feedback - -If you encounter any bugs or have suggestions, please file an issue in the -[Issues](https://github.com/Azure/azure-sdk-for-python/issues) -section of the project. - - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-storageimportexport%2FREADME.png) diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/__init__.py b/sdk/storage/azure-mgmt-storageimportexport/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/__init__.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/__init__.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/__init__.py deleted file mode 100644 index ab735501f311..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import StorageImportExportConfiguration -from ._storage_import_export import StorageImportExport -__all__ = ['StorageImportExport', 'StorageImportExportConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/_configuration.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/_configuration.py deleted file mode 100644 index a9937ca7a989..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/_configuration.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 msrestazure import AzureConfiguration - -from .version import VERSION - - -class StorageImportExportConfiguration(AzureConfiguration): - """Configuration for StorageImportExport - 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 for the Azure user. - :type subscription_id: str - :param accept_language: Specifies the preferred language for the response. - :type accept_language: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, accept_language=None, 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(StorageImportExportConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-storageimportexport/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - self.accept_language = accept_language diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/_storage_import_export.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/_storage_import_export.py deleted file mode 100644 index 5c206d255a34..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/_storage_import_export.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.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import StorageImportExportConfiguration -from .operations import LocationsOperations -from .operations import JobsOperations -from .operations import BitLockerKeysOperations -from .operations import Operations -from . import models - - -class StorageImportExport(SDKClient): - """The Storage Import/Export Resource Provider API. - - :ivar config: Configuration for client. - :vartype config: StorageImportExportConfiguration - - :ivar locations: Locations operations - :vartype locations: azure.mgmt.storageimportexport.operations.LocationsOperations - :ivar jobs: Jobs operations - :vartype jobs: azure.mgmt.storageimportexport.operations.JobsOperations - :ivar bit_locker_keys: BitLockerKeys operations - :vartype bit_locker_keys: azure.mgmt.storageimportexport.operations.BitLockerKeysOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.storageimportexport.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 for the Azure user. - :type subscription_id: str - :param accept_language: Specifies the preferred language for the response. - :type accept_language: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, accept_language=None, base_url=None): - - self.config = StorageImportExportConfiguration(credentials, subscription_id, accept_language, base_url) - super(StorageImportExport, 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 = '2016-11-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.locations = LocationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.jobs = JobsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.bit_locker_keys = BitLockerKeysOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/__init__.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/__init__.py deleted file mode 100644 index b0e2de402a44..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/__init__.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. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import DriveBitLockerKey - from ._models_py3 import DriveStatus - from ._models_py3 import ErrorResponse, ErrorResponseException - from ._models_py3 import ErrorResponseErrorDetailsItem - from ._models_py3 import Export - from ._models_py3 import JobDetails - from ._models_py3 import JobResponse - from ._models_py3 import Location - from ._models_py3 import Operation - from ._models_py3 import PackageInfomation - from ._models_py3 import PutJobParameters - from ._models_py3 import ReturnAddress - from ._models_py3 import ReturnShipping - from ._models_py3 import ShippingInformation - from ._models_py3 import UpdateJobParameters -except (SyntaxError, ImportError): - from ._models import DriveBitLockerKey - from ._models import DriveStatus - from ._models import ErrorResponse, ErrorResponseException - from ._models import ErrorResponseErrorDetailsItem - from ._models import Export - from ._models import JobDetails - from ._models import JobResponse - from ._models import Location - from ._models import Operation - from ._models import PackageInfomation - from ._models import PutJobParameters - from ._models import ReturnAddress - from ._models import ReturnShipping - from ._models import ShippingInformation - from ._models import UpdateJobParameters -from ._paged_models import DriveBitLockerKeyPaged -from ._paged_models import JobResponsePaged -from ._paged_models import LocationPaged -from ._paged_models import OperationPaged -from ._storage_import_export_enums import ( - DriveState, -) - -__all__ = [ - 'DriveBitLockerKey', - 'DriveStatus', - 'ErrorResponse', 'ErrorResponseException', - 'ErrorResponseErrorDetailsItem', - 'Export', - 'JobDetails', - 'JobResponse', - 'Location', - 'Operation', - 'PackageInfomation', - 'PutJobParameters', - 'ReturnAddress', - 'ReturnShipping', - 'ShippingInformation', - 'UpdateJobParameters', - 'LocationPaged', - 'JobResponsePaged', - 'DriveBitLockerKeyPaged', - 'OperationPaged', - 'DriveState', -] diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_models.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_models.py deleted file mode 100644 index 9f8b1ba31d48..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_models.py +++ /dev/null @@ -1,753 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 -from msrest.exceptions import HttpOperationError - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class DriveBitLockerKey(Model): - """BitLocker recovery key or password to the specified drive. - - :param bit_locker_key: BitLocker recovery key or password - :type bit_locker_key: str - :param drive_id: Drive ID - :type drive_id: str - """ - - _attribute_map = { - 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, - 'drive_id': {'key': 'driveId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DriveBitLockerKey, self).__init__(**kwargs) - self.bit_locker_key = kwargs.get('bit_locker_key', None) - self.drive_id = kwargs.get('drive_id', None) - - -class DriveStatus(Model): - """Provides information about the drive's status. - - :param drive_id: The drive's hardware serial number, without spaces. - :type drive_id: str - :param bit_locker_key: The BitLocker key used to encrypt the drive. - :type bit_locker_key: str - :param manifest_file: The relative path of the manifest file on the drive. - :type manifest_file: str - :param manifest_hash: The Base16-encoded MD5 hash of the manifest file on - the drive. - :type manifest_hash: str - :param drive_header_hash: The drive header hash value. - :type drive_header_hash: str - :param state: The drive's current state. Possible values include: - 'Specified', 'Received', 'NeverReceived', 'Transferring', 'Completed', - 'CompletedMoreInfo', 'ShippedBack' - :type state: str or ~azure.mgmt.storageimportexport.models.DriveState - :param copy_status: Detailed status about the data transfer process. This - field is not returned in the response until the drive is in the - Transferring state. - :type copy_status: str - :param percent_complete: Percentage completed for the drive. - :type percent_complete: int - :param verbose_log_uri: A URI that points to the blob containing the - verbose log for the data transfer operation. - :type verbose_log_uri: str - :param error_log_uri: A URI that points to the blob containing the error - log for the data transfer operation. - :type error_log_uri: str - :param manifest_uri: A URI that points to the blob containing the drive - manifest file. - :type manifest_uri: str - :param bytes_succeeded: Bytes successfully transferred for the drive. - :type bytes_succeeded: long - """ - - _attribute_map = { - 'drive_id': {'key': 'driveId', 'type': 'str'}, - 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, - 'manifest_file': {'key': 'manifestFile', 'type': 'str'}, - 'manifest_hash': {'key': 'manifestHash', 'type': 'str'}, - 'drive_header_hash': {'key': 'driveHeaderHash', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'copy_status': {'key': 'copyStatus', 'type': 'str'}, - 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'verbose_log_uri': {'key': 'verboseLogUri', 'type': 'str'}, - 'error_log_uri': {'key': 'errorLogUri', 'type': 'str'}, - 'manifest_uri': {'key': 'manifestUri', 'type': 'str'}, - 'bytes_succeeded': {'key': 'bytesSucceeded', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(DriveStatus, self).__init__(**kwargs) - self.drive_id = kwargs.get('drive_id', None) - self.bit_locker_key = kwargs.get('bit_locker_key', None) - self.manifest_file = kwargs.get('manifest_file', None) - self.manifest_hash = kwargs.get('manifest_hash', None) - self.drive_header_hash = kwargs.get('drive_header_hash', None) - self.state = kwargs.get('state', None) - self.copy_status = kwargs.get('copy_status', None) - self.percent_complete = kwargs.get('percent_complete', None) - self.verbose_log_uri = kwargs.get('verbose_log_uri', None) - self.error_log_uri = kwargs.get('error_log_uri', None) - self.manifest_uri = kwargs.get('manifest_uri', None) - self.bytes_succeeded = kwargs.get('bytes_succeeded', None) - - -class ErrorResponse(Model): - """Response when errors occurred. - - :param code: Provides information about the error code. - :type code: str - :param message: Provides information about the error message. - :type message: str - :param target: Provides information about the error target. - :type target: str - :param details: Describes the error details if present. - :type details: - list[~azure.mgmt.storageimportexport.models.ErrorResponseErrorDetailsItem] - :param innererror: Inner error object if present. - :type innererror: object - """ - - _attribute_map = { - 'code': {'key': 'error.code', 'type': 'str'}, - 'message': {'key': 'error.message', 'type': 'str'}, - 'target': {'key': 'error.target', 'type': 'str'}, - 'details': {'key': 'error.details', 'type': '[ErrorResponseErrorDetailsItem]'}, - 'innererror': {'key': 'error.innererror', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) - - -class ErrorResponseErrorDetailsItem(Model): - """ErrorResponseErrorDetailsItem. - - :param code: Provides information about the error code. - :type code: str - :param target: Provides information about the error target. - :type target: str - :param message: Provides information about the error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponseErrorDetailsItem, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) - - -class Export(Model): - """A property containing information about the blobs to be exported for an - export job. This property is required for export jobs, but must not be - specified for import jobs. - - :param blob_path: A collection of blob-path strings. - :type blob_path: list[str] - :param blob_path_prefix: A collection of blob-prefix strings. - :type blob_path_prefix: list[str] - :param blob_listblob_path: The relative URI to the block blob that - contains the list of blob paths or blob path prefixes as defined above, - beginning with the container name. If the blob is in root container, the - URI must begin with $root. - :type blob_listblob_path: str - """ - - _attribute_map = { - 'blob_path': {'key': 'blobList.blobPath', 'type': '[str]'}, - 'blob_path_prefix': {'key': 'blobList.blobPathPrefix', 'type': '[str]'}, - 'blob_listblob_path': {'key': 'blobListblobPath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Export, self).__init__(**kwargs) - self.blob_path = kwargs.get('blob_path', None) - self.blob_path_prefix = kwargs.get('blob_path_prefix', None) - self.blob_listblob_path = kwargs.get('blob_listblob_path', None) - - -class JobDetails(Model): - """Specifies the job properties. - - :param storage_account_id: The resource identifier of the storage account - where data will be imported to or exported from. - :type storage_account_id: str - :param job_type: The type of job - :type job_type: str - :param return_address: Specifies the return address information for the - job. - :type return_address: ~azure.mgmt.storageimportexport.models.ReturnAddress - :param return_shipping: Specifies the return carrier and customer's - account with the carrier. - :type return_shipping: - ~azure.mgmt.storageimportexport.models.ReturnShipping - :param shipping_information: Contains information about the Microsoft - datacenter to which the drives should be shipped. - :type shipping_information: - ~azure.mgmt.storageimportexport.models.ShippingInformation - :param delivery_package: Contains information about the package being - shipped by the customer to the Microsoft data center. - :type delivery_package: - ~azure.mgmt.storageimportexport.models.PackageInfomation - :param return_package: Contains information about the package being - shipped from the Microsoft data center to the customer to return the - drives. The format is the same as the deliveryPackage property above. This - property is not included if the drives have not yet been returned. - :type return_package: - ~azure.mgmt.storageimportexport.models.PackageInfomation - :param diagnostics_path: The virtual blob directory to which the copy logs - and backups of drive manifest files (if enabled) will be stored. - :type diagnostics_path: str - :param log_level: Default value is Error. Indicates whether error logging - or verbose logging will be enabled. - :type log_level: str - :param backup_drive_manifest: Default value is false. Indicates whether - the manifest files on the drives should be copied to block blobs. - :type backup_drive_manifest: bool - :param state: Current state of the job. - :type state: str - :param cancel_requested: Indicates whether a request has been submitted to - cancel the job. - :type cancel_requested: bool - :param percent_complete: Overall percentage completed for the job. - :type percent_complete: int - :param incomplete_blob_list_uri: A blob path that points to a block blob - containing a list of blob names that were not exported due to insufficient - drive space. If all blobs were exported successfully, then this element is - not included in the response. - :type incomplete_blob_list_uri: str - :param drive_list: List of up to ten drives that comprise the job. The - drive list is a required element for an import job; it is not specified - for export jobs. - :type drive_list: list[~azure.mgmt.storageimportexport.models.DriveStatus] - :param export: A property containing information about the blobs to be - exported for an export job. This property is included for export jobs - only. - :type export: ~azure.mgmt.storageimportexport.models.Export - :param provisioning_state: Specifies the provisioning state of the job. - :type provisioning_state: str - """ - - _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'return_address': {'key': 'returnAddress', 'type': 'ReturnAddress'}, - 'return_shipping': {'key': 'returnShipping', 'type': 'ReturnShipping'}, - 'shipping_information': {'key': 'shippingInformation', 'type': 'ShippingInformation'}, - 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageInfomation'}, - 'return_package': {'key': 'returnPackage', 'type': 'PackageInfomation'}, - 'diagnostics_path': {'key': 'diagnosticsPath', 'type': 'str'}, - 'log_level': {'key': 'logLevel', 'type': 'str'}, - 'backup_drive_manifest': {'key': 'backupDriveManifest', 'type': 'bool'}, - 'state': {'key': 'state', 'type': 'str'}, - 'cancel_requested': {'key': 'cancelRequested', 'type': 'bool'}, - 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'incomplete_blob_list_uri': {'key': 'incompleteBlobListUri', 'type': 'str'}, - 'drive_list': {'key': 'driveList', 'type': '[DriveStatus]'}, - 'export': {'key': 'export', 'type': 'Export'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobDetails, self).__init__(**kwargs) - self.storage_account_id = kwargs.get('storage_account_id', None) - self.job_type = kwargs.get('job_type', None) - self.return_address = kwargs.get('return_address', None) - self.return_shipping = kwargs.get('return_shipping', None) - self.shipping_information = kwargs.get('shipping_information', None) - self.delivery_package = kwargs.get('delivery_package', None) - self.return_package = kwargs.get('return_package', None) - self.diagnostics_path = kwargs.get('diagnostics_path', None) - self.log_level = kwargs.get('log_level', None) - self.backup_drive_manifest = kwargs.get('backup_drive_manifest', None) - self.state = kwargs.get('state', None) - self.cancel_requested = kwargs.get('cancel_requested', None) - self.percent_complete = kwargs.get('percent_complete', None) - self.incomplete_blob_list_uri = kwargs.get('incomplete_blob_list_uri', None) - self.drive_list = kwargs.get('drive_list', None) - self.export = kwargs.get('export', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class JobResponse(Model): - """Contains the job information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Specifies the resource identifier of the job. - :vartype id: str - :ivar name: Specifies the name of the job. - :vartype name: str - :ivar type: Specifies the type of the job resource. - :vartype type: str - :param location: Specifies the Azure location where the job is created. - :type location: str - :param tags: Specifies the tags that are assigned to the job. - :type tags: object - :param properties: Specifies the job properties - :type properties: ~azure.mgmt.storageimportexport.models.JobDetails - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'JobDetails'}, - } - - def __init__(self, **kwargs): - super(JobResponse, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.properties = kwargs.get('properties', None) - - -class Location(Model): - """Provides information about an Azure data center location. - - :param id: Specifies the resource identifier of the location. - :type id: str - :param name: Specifies the name of the location. Use List Locations to get - all supported locations. - :type name: str - :param type: Specifies the type of the location. - :type type: str - :param recipient_name: The recipient name to use when shipping the drives - to the Azure data center. - :type recipient_name: str - :param street_address1: The first line of the street address to use when - shipping the drives to the Azure data center. - :type street_address1: str - :param street_address2: The second line of the street address to use when - shipping the drives to the Azure data center. - :type street_address2: str - :param city: The city name to use when shipping the drives to the Azure - data center. - :type city: str - :param state_or_province: The state or province to use when shipping the - drives to the Azure data center. - :type state_or_province: str - :param postal_code: The postal code to use when shipping the drives to the - Azure data center. - :type postal_code: str - :param country_or_region: The country or region to use when shipping the - drives to the Azure data center. - :type country_or_region: str - :param phone: The phone number for the Azure data center. - :type phone: str - :param supported_carriers: A list of carriers that are supported at this - location. - :type supported_carriers: list[str] - :param alternate_locations: A list of location IDs that should be used to - ship shipping drives to for jobs created against the current location. If - the current location is active, it will be part of the list. If it is - temporarily closed due to maintenance, this list may contain other - locations. - :type alternate_locations: list[str] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recipient_name': {'key': 'properties.recipientName', 'type': 'str'}, - 'street_address1': {'key': 'properties.streetAddress1', 'type': 'str'}, - 'street_address2': {'key': 'properties.streetAddress2', 'type': 'str'}, - 'city': {'key': 'properties.city', 'type': 'str'}, - 'state_or_province': {'key': 'properties.stateOrProvince', 'type': 'str'}, - 'postal_code': {'key': 'properties.postalCode', 'type': 'str'}, - 'country_or_region': {'key': 'properties.countryOrRegion', 'type': 'str'}, - 'phone': {'key': 'properties.phone', 'type': 'str'}, - 'supported_carriers': {'key': 'properties.supportedCarriers', 'type': '[str]'}, - 'alternate_locations': {'key': 'properties.alternateLocations', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(Location, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.recipient_name = kwargs.get('recipient_name', None) - self.street_address1 = kwargs.get('street_address1', None) - self.street_address2 = kwargs.get('street_address2', None) - self.city = kwargs.get('city', None) - self.state_or_province = kwargs.get('state_or_province', None) - self.postal_code = kwargs.get('postal_code', None) - self.country_or_region = kwargs.get('country_or_region', None) - self.phone = kwargs.get('phone', None) - self.supported_carriers = kwargs.get('supported_carriers', None) - self.alternate_locations = kwargs.get('alternate_locations', None) - - -class Operation(Model): - """Describes a supported operation by the Storage Import/Export job API. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the operation. - :type name: str - :param provider: The resource provider name to which the operation - belongs. - :type provider: str - :param resource: The name of the resource to which the operation belongs. - :type resource: str - :param operation: The display name of the operation. - :type operation: str - :param description: Short description of the operation. - :type description: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) - - -class PackageInfomation(Model): - """Contains information about the package being shipped by the customer to the - Microsoft data center. - - All required parameters must be populated in order to send to Azure. - - :param carrier_name: Required. The name of the carrier that is used to - ship the import or export drives. - :type carrier_name: str - :param tracking_number: Required. The tracking number of the package. - :type tracking_number: str - :param drive_count: Required. The number of drives included in the - package. - :type drive_count: int - :param ship_date: Required. The date when the package is shipped. - :type ship_date: str - """ - - _validation = { - 'carrier_name': {'required': True}, - 'tracking_number': {'required': True}, - 'drive_count': {'required': True}, - 'ship_date': {'required': True}, - } - - _attribute_map = { - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'tracking_number': {'key': 'trackingNumber', 'type': 'str'}, - 'drive_count': {'key': 'driveCount', 'type': 'int'}, - 'ship_date': {'key': 'shipDate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PackageInfomation, self).__init__(**kwargs) - self.carrier_name = kwargs.get('carrier_name', None) - self.tracking_number = kwargs.get('tracking_number', None) - self.drive_count = kwargs.get('drive_count', None) - self.ship_date = kwargs.get('ship_date', None) - - -class PutJobParameters(Model): - """Put Job parameters. - - :param location: Specifies the supported Azure location where the job - should be created - :type location: str - :param tags: Specifies the tags that will be assigned to the job. - :type tags: object - :param properties: Specifies the job properties - :type properties: ~azure.mgmt.storageimportexport.models.JobDetails - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'JobDetails'}, - } - - def __init__(self, **kwargs): - super(PutJobParameters, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.properties = kwargs.get('properties', None) - - -class ReturnAddress(Model): - """Specifies the return address information for the job. - - All required parameters must be populated in order to send to Azure. - - :param recipient_name: Required. The name of the recipient who will - receive the hard drives when they are returned. - :type recipient_name: str - :param street_address1: Required. The first line of the street address to - use when returning the drives. - :type street_address1: str - :param street_address2: The second line of the street address to use when - returning the drives. - :type street_address2: str - :param city: Required. The city name to use when returning the drives. - :type city: str - :param state_or_province: The state or province to use when returning the - drives. - :type state_or_province: str - :param postal_code: Required. The postal code to use when returning the - drives. - :type postal_code: str - :param country_or_region: Required. The country or region to use when - returning the drives. - :type country_or_region: str - :param phone: Required. Phone number of the recipient of the returned - drives. - :type phone: str - :param email: Required. Email address of the recipient of the returned - drives. - :type email: str - """ - - _validation = { - 'recipient_name': {'required': True}, - 'street_address1': {'required': True}, - 'city': {'required': True}, - 'postal_code': {'required': True}, - 'country_or_region': {'required': True}, - 'phone': {'required': True}, - 'email': {'required': True}, - } - - _attribute_map = { - 'recipient_name': {'key': 'recipientName', 'type': 'str'}, - 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, - 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, - 'postal_code': {'key': 'postalCode', 'type': 'str'}, - 'country_or_region': {'key': 'countryOrRegion', 'type': 'str'}, - 'phone': {'key': 'phone', 'type': 'str'}, - 'email': {'key': 'email', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReturnAddress, self).__init__(**kwargs) - self.recipient_name = kwargs.get('recipient_name', None) - self.street_address1 = kwargs.get('street_address1', None) - self.street_address2 = kwargs.get('street_address2', None) - self.city = kwargs.get('city', None) - self.state_or_province = kwargs.get('state_or_province', None) - self.postal_code = kwargs.get('postal_code', None) - self.country_or_region = kwargs.get('country_or_region', None) - self.phone = kwargs.get('phone', None) - self.email = kwargs.get('email', None) - - -class ReturnShipping(Model): - """Specifies the return carrier and customer's account with the carrier. - - All required parameters must be populated in order to send to Azure. - - :param carrier_name: Required. The carrier's name. - :type carrier_name: str - :param carrier_account_number: Required. The customer's account number - with the carrier. - :type carrier_account_number: str - """ - - _validation = { - 'carrier_name': {'required': True}, - 'carrier_account_number': {'required': True}, - } - - _attribute_map = { - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'carrier_account_number': {'key': 'carrierAccountNumber', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReturnShipping, self).__init__(**kwargs) - self.carrier_name = kwargs.get('carrier_name', None) - self.carrier_account_number = kwargs.get('carrier_account_number', None) - - -class ShippingInformation(Model): - """Contains information about the Microsoft datacenter to which the drives - should be shipped. - - All required parameters must be populated in order to send to Azure. - - :param recipient_name: Required. The name of the recipient who will - receive the hard drives when they are returned. - :type recipient_name: str - :param street_address1: Required. The first line of the street address to - use when returning the drives. - :type street_address1: str - :param street_address2: The second line of the street address to use when - returning the drives. - :type street_address2: str - :param city: Required. The city name to use when returning the drives. - :type city: str - :param state_or_province: Required. The state or province to use when - returning the drives. - :type state_or_province: str - :param postal_code: Required. The postal code to use when returning the - drives. - :type postal_code: str - :param country_or_region: Required. The country or region to use when - returning the drives. - :type country_or_region: str - :param phone: Phone number of the recipient of the returned drives. - :type phone: str - """ - - _validation = { - 'recipient_name': {'required': True}, - 'street_address1': {'required': True}, - 'city': {'required': True}, - 'state_or_province': {'required': True}, - 'postal_code': {'required': True}, - 'country_or_region': {'required': True}, - } - - _attribute_map = { - 'recipient_name': {'key': 'recipientName', 'type': 'str'}, - 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, - 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, - 'postal_code': {'key': 'postalCode', 'type': 'str'}, - 'country_or_region': {'key': 'countryOrRegion', 'type': 'str'}, - 'phone': {'key': 'phone', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ShippingInformation, self).__init__(**kwargs) - self.recipient_name = kwargs.get('recipient_name', None) - self.street_address1 = kwargs.get('street_address1', None) - self.street_address2 = kwargs.get('street_address2', None) - self.city = kwargs.get('city', None) - self.state_or_province = kwargs.get('state_or_province', None) - self.postal_code = kwargs.get('postal_code', None) - self.country_or_region = kwargs.get('country_or_region', None) - self.phone = kwargs.get('phone', None) - - -class UpdateJobParameters(Model): - """Update Job parameters. - - :param tags: Specifies the tags that will be assigned to the job - :type tags: object - :param cancel_requested: If specified, the value must be true. The service - will attempt to cancel the job. - :type cancel_requested: bool - :param state: If specified, the value must be Shipping, which tells the - Import/Export service that the package for the job has been shipped. The - ReturnAddress and DeliveryPackage properties must have been set either in - this request or in a previous request, otherwise the request will fail. - :type state: str - :param return_address: Specifies the return address information for the - job. - :type return_address: ~azure.mgmt.storageimportexport.models.ReturnAddress - :param return_shipping: Specifies the return carrier and customer's - account with the carrier. - :type return_shipping: - ~azure.mgmt.storageimportexport.models.ReturnShipping - :param delivery_package: Contains information about the package being - shipped by the customer to the Microsoft data center. - :type delivery_package: - ~azure.mgmt.storageimportexport.models.PackageInfomation - :param log_level: Indicates whether error logging or verbose logging is - enabled. - :type log_level: str - :param backup_drive_manifest: Indicates whether the manifest files on the - drives should be copied to block blobs. - :type backup_drive_manifest: bool - :param drive_list: List of drives that comprise the job. - :type drive_list: list[~azure.mgmt.storageimportexport.models.DriveStatus] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': 'object'}, - 'cancel_requested': {'key': 'properties.cancelRequested', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'return_address': {'key': 'properties.returnAddress', 'type': 'ReturnAddress'}, - 'return_shipping': {'key': 'properties.returnShipping', 'type': 'ReturnShipping'}, - 'delivery_package': {'key': 'properties.deliveryPackage', 'type': 'PackageInfomation'}, - 'log_level': {'key': 'properties.logLevel', 'type': 'str'}, - 'backup_drive_manifest': {'key': 'properties.backupDriveManifest', 'type': 'bool'}, - 'drive_list': {'key': 'properties.driveList', 'type': '[DriveStatus]'}, - } - - def __init__(self, **kwargs): - super(UpdateJobParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.cancel_requested = kwargs.get('cancel_requested', None) - self.state = kwargs.get('state', None) - self.return_address = kwargs.get('return_address', None) - self.return_shipping = kwargs.get('return_shipping', None) - self.delivery_package = kwargs.get('delivery_package', None) - self.log_level = kwargs.get('log_level', None) - self.backup_drive_manifest = kwargs.get('backup_drive_manifest', None) - self.drive_list = kwargs.get('drive_list', None) diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_models_py3.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_models_py3.py deleted file mode 100644 index f8f4973efff9..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_models_py3.py +++ /dev/null @@ -1,753 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 -from msrest.exceptions import HttpOperationError - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class DriveBitLockerKey(Model): - """BitLocker recovery key or password to the specified drive. - - :param bit_locker_key: BitLocker recovery key or password - :type bit_locker_key: str - :param drive_id: Drive ID - :type drive_id: str - """ - - _attribute_map = { - 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, - 'drive_id': {'key': 'driveId', 'type': 'str'}, - } - - def __init__(self, *, bit_locker_key: str=None, drive_id: str=None, **kwargs) -> None: - super(DriveBitLockerKey, self).__init__(**kwargs) - self.bit_locker_key = bit_locker_key - self.drive_id = drive_id - - -class DriveStatus(Model): - """Provides information about the drive's status. - - :param drive_id: The drive's hardware serial number, without spaces. - :type drive_id: str - :param bit_locker_key: The BitLocker key used to encrypt the drive. - :type bit_locker_key: str - :param manifest_file: The relative path of the manifest file on the drive. - :type manifest_file: str - :param manifest_hash: The Base16-encoded MD5 hash of the manifest file on - the drive. - :type manifest_hash: str - :param drive_header_hash: The drive header hash value. - :type drive_header_hash: str - :param state: The drive's current state. Possible values include: - 'Specified', 'Received', 'NeverReceived', 'Transferring', 'Completed', - 'CompletedMoreInfo', 'ShippedBack' - :type state: str or ~azure.mgmt.storageimportexport.models.DriveState - :param copy_status: Detailed status about the data transfer process. This - field is not returned in the response until the drive is in the - Transferring state. - :type copy_status: str - :param percent_complete: Percentage completed for the drive. - :type percent_complete: int - :param verbose_log_uri: A URI that points to the blob containing the - verbose log for the data transfer operation. - :type verbose_log_uri: str - :param error_log_uri: A URI that points to the blob containing the error - log for the data transfer operation. - :type error_log_uri: str - :param manifest_uri: A URI that points to the blob containing the drive - manifest file. - :type manifest_uri: str - :param bytes_succeeded: Bytes successfully transferred for the drive. - :type bytes_succeeded: long - """ - - _attribute_map = { - 'drive_id': {'key': 'driveId', 'type': 'str'}, - 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, - 'manifest_file': {'key': 'manifestFile', 'type': 'str'}, - 'manifest_hash': {'key': 'manifestHash', 'type': 'str'}, - 'drive_header_hash': {'key': 'driveHeaderHash', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'copy_status': {'key': 'copyStatus', 'type': 'str'}, - 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'verbose_log_uri': {'key': 'verboseLogUri', 'type': 'str'}, - 'error_log_uri': {'key': 'errorLogUri', 'type': 'str'}, - 'manifest_uri': {'key': 'manifestUri', 'type': 'str'}, - 'bytes_succeeded': {'key': 'bytesSucceeded', 'type': 'long'}, - } - - def __init__(self, *, drive_id: str=None, bit_locker_key: str=None, manifest_file: str=None, manifest_hash: str=None, drive_header_hash: str=None, state=None, copy_status: str=None, percent_complete: int=None, verbose_log_uri: str=None, error_log_uri: str=None, manifest_uri: str=None, bytes_succeeded: int=None, **kwargs) -> None: - super(DriveStatus, self).__init__(**kwargs) - self.drive_id = drive_id - self.bit_locker_key = bit_locker_key - self.manifest_file = manifest_file - self.manifest_hash = manifest_hash - self.drive_header_hash = drive_header_hash - self.state = state - self.copy_status = copy_status - self.percent_complete = percent_complete - self.verbose_log_uri = verbose_log_uri - self.error_log_uri = error_log_uri - self.manifest_uri = manifest_uri - self.bytes_succeeded = bytes_succeeded - - -class ErrorResponse(Model): - """Response when errors occurred. - - :param code: Provides information about the error code. - :type code: str - :param message: Provides information about the error message. - :type message: str - :param target: Provides information about the error target. - :type target: str - :param details: Describes the error details if present. - :type details: - list[~azure.mgmt.storageimportexport.models.ErrorResponseErrorDetailsItem] - :param innererror: Inner error object if present. - :type innererror: object - """ - - _attribute_map = { - 'code': {'key': 'error.code', 'type': 'str'}, - 'message': {'key': 'error.message', 'type': 'str'}, - 'target': {'key': 'error.target', 'type': 'str'}, - 'details': {'key': 'error.details', 'type': '[ErrorResponseErrorDetailsItem]'}, - 'innererror': {'key': 'error.innererror', 'type': 'object'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, innererror=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - self.innererror = innererror - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) - - -class ErrorResponseErrorDetailsItem(Model): - """ErrorResponseErrorDetailsItem. - - :param code: Provides information about the error code. - :type code: str - :param target: Provides information about the error target. - :type target: str - :param message: Provides information about the error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponseErrorDetailsItem, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message - - -class Export(Model): - """A property containing information about the blobs to be exported for an - export job. This property is required for export jobs, but must not be - specified for import jobs. - - :param blob_path: A collection of blob-path strings. - :type blob_path: list[str] - :param blob_path_prefix: A collection of blob-prefix strings. - :type blob_path_prefix: list[str] - :param blob_listblob_path: The relative URI to the block blob that - contains the list of blob paths or blob path prefixes as defined above, - beginning with the container name. If the blob is in root container, the - URI must begin with $root. - :type blob_listblob_path: str - """ - - _attribute_map = { - 'blob_path': {'key': 'blobList.blobPath', 'type': '[str]'}, - 'blob_path_prefix': {'key': 'blobList.blobPathPrefix', 'type': '[str]'}, - 'blob_listblob_path': {'key': 'blobListblobPath', 'type': 'str'}, - } - - def __init__(self, *, blob_path=None, blob_path_prefix=None, blob_listblob_path: str=None, **kwargs) -> None: - super(Export, self).__init__(**kwargs) - self.blob_path = blob_path - self.blob_path_prefix = blob_path_prefix - self.blob_listblob_path = blob_listblob_path - - -class JobDetails(Model): - """Specifies the job properties. - - :param storage_account_id: The resource identifier of the storage account - where data will be imported to or exported from. - :type storage_account_id: str - :param job_type: The type of job - :type job_type: str - :param return_address: Specifies the return address information for the - job. - :type return_address: ~azure.mgmt.storageimportexport.models.ReturnAddress - :param return_shipping: Specifies the return carrier and customer's - account with the carrier. - :type return_shipping: - ~azure.mgmt.storageimportexport.models.ReturnShipping - :param shipping_information: Contains information about the Microsoft - datacenter to which the drives should be shipped. - :type shipping_information: - ~azure.mgmt.storageimportexport.models.ShippingInformation - :param delivery_package: Contains information about the package being - shipped by the customer to the Microsoft data center. - :type delivery_package: - ~azure.mgmt.storageimportexport.models.PackageInfomation - :param return_package: Contains information about the package being - shipped from the Microsoft data center to the customer to return the - drives. The format is the same as the deliveryPackage property above. This - property is not included if the drives have not yet been returned. - :type return_package: - ~azure.mgmt.storageimportexport.models.PackageInfomation - :param diagnostics_path: The virtual blob directory to which the copy logs - and backups of drive manifest files (if enabled) will be stored. - :type diagnostics_path: str - :param log_level: Default value is Error. Indicates whether error logging - or verbose logging will be enabled. - :type log_level: str - :param backup_drive_manifest: Default value is false. Indicates whether - the manifest files on the drives should be copied to block blobs. - :type backup_drive_manifest: bool - :param state: Current state of the job. - :type state: str - :param cancel_requested: Indicates whether a request has been submitted to - cancel the job. - :type cancel_requested: bool - :param percent_complete: Overall percentage completed for the job. - :type percent_complete: int - :param incomplete_blob_list_uri: A blob path that points to a block blob - containing a list of blob names that were not exported due to insufficient - drive space. If all blobs were exported successfully, then this element is - not included in the response. - :type incomplete_blob_list_uri: str - :param drive_list: List of up to ten drives that comprise the job. The - drive list is a required element for an import job; it is not specified - for export jobs. - :type drive_list: list[~azure.mgmt.storageimportexport.models.DriveStatus] - :param export: A property containing information about the blobs to be - exported for an export job. This property is included for export jobs - only. - :type export: ~azure.mgmt.storageimportexport.models.Export - :param provisioning_state: Specifies the provisioning state of the job. - :type provisioning_state: str - """ - - _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'return_address': {'key': 'returnAddress', 'type': 'ReturnAddress'}, - 'return_shipping': {'key': 'returnShipping', 'type': 'ReturnShipping'}, - 'shipping_information': {'key': 'shippingInformation', 'type': 'ShippingInformation'}, - 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageInfomation'}, - 'return_package': {'key': 'returnPackage', 'type': 'PackageInfomation'}, - 'diagnostics_path': {'key': 'diagnosticsPath', 'type': 'str'}, - 'log_level': {'key': 'logLevel', 'type': 'str'}, - 'backup_drive_manifest': {'key': 'backupDriveManifest', 'type': 'bool'}, - 'state': {'key': 'state', 'type': 'str'}, - 'cancel_requested': {'key': 'cancelRequested', 'type': 'bool'}, - 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'incomplete_blob_list_uri': {'key': 'incompleteBlobListUri', 'type': 'str'}, - 'drive_list': {'key': 'driveList', 'type': '[DriveStatus]'}, - 'export': {'key': 'export', 'type': 'Export'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__(self, *, storage_account_id: str=None, job_type: str=None, return_address=None, return_shipping=None, shipping_information=None, delivery_package=None, return_package=None, diagnostics_path: str=None, log_level: str=None, backup_drive_manifest: bool=None, state: str=None, cancel_requested: bool=None, percent_complete: int=None, incomplete_blob_list_uri: str=None, drive_list=None, export=None, provisioning_state: str=None, **kwargs) -> None: - super(JobDetails, self).__init__(**kwargs) - self.storage_account_id = storage_account_id - self.job_type = job_type - self.return_address = return_address - self.return_shipping = return_shipping - self.shipping_information = shipping_information - self.delivery_package = delivery_package - self.return_package = return_package - self.diagnostics_path = diagnostics_path - self.log_level = log_level - self.backup_drive_manifest = backup_drive_manifest - self.state = state - self.cancel_requested = cancel_requested - self.percent_complete = percent_complete - self.incomplete_blob_list_uri = incomplete_blob_list_uri - self.drive_list = drive_list - self.export = export - self.provisioning_state = provisioning_state - - -class JobResponse(Model): - """Contains the job information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Specifies the resource identifier of the job. - :vartype id: str - :ivar name: Specifies the name of the job. - :vartype name: str - :ivar type: Specifies the type of the job resource. - :vartype type: str - :param location: Specifies the Azure location where the job is created. - :type location: str - :param tags: Specifies the tags that are assigned to the job. - :type tags: object - :param properties: Specifies the job properties - :type properties: ~azure.mgmt.storageimportexport.models.JobDetails - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'JobDetails'}, - } - - def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: - super(JobResponse, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - self.properties = properties - - -class Location(Model): - """Provides information about an Azure data center location. - - :param id: Specifies the resource identifier of the location. - :type id: str - :param name: Specifies the name of the location. Use List Locations to get - all supported locations. - :type name: str - :param type: Specifies the type of the location. - :type type: str - :param recipient_name: The recipient name to use when shipping the drives - to the Azure data center. - :type recipient_name: str - :param street_address1: The first line of the street address to use when - shipping the drives to the Azure data center. - :type street_address1: str - :param street_address2: The second line of the street address to use when - shipping the drives to the Azure data center. - :type street_address2: str - :param city: The city name to use when shipping the drives to the Azure - data center. - :type city: str - :param state_or_province: The state or province to use when shipping the - drives to the Azure data center. - :type state_or_province: str - :param postal_code: The postal code to use when shipping the drives to the - Azure data center. - :type postal_code: str - :param country_or_region: The country or region to use when shipping the - drives to the Azure data center. - :type country_or_region: str - :param phone: The phone number for the Azure data center. - :type phone: str - :param supported_carriers: A list of carriers that are supported at this - location. - :type supported_carriers: list[str] - :param alternate_locations: A list of location IDs that should be used to - ship shipping drives to for jobs created against the current location. If - the current location is active, it will be part of the list. If it is - temporarily closed due to maintenance, this list may contain other - locations. - :type alternate_locations: list[str] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recipient_name': {'key': 'properties.recipientName', 'type': 'str'}, - 'street_address1': {'key': 'properties.streetAddress1', 'type': 'str'}, - 'street_address2': {'key': 'properties.streetAddress2', 'type': 'str'}, - 'city': {'key': 'properties.city', 'type': 'str'}, - 'state_or_province': {'key': 'properties.stateOrProvince', 'type': 'str'}, - 'postal_code': {'key': 'properties.postalCode', 'type': 'str'}, - 'country_or_region': {'key': 'properties.countryOrRegion', 'type': 'str'}, - 'phone': {'key': 'properties.phone', 'type': 'str'}, - 'supported_carriers': {'key': 'properties.supportedCarriers', 'type': '[str]'}, - 'alternate_locations': {'key': 'properties.alternateLocations', 'type': '[str]'}, - } - - def __init__(self, *, id: str=None, name: str=None, type: str=None, recipient_name: str=None, street_address1: str=None, street_address2: str=None, city: str=None, state_or_province: str=None, postal_code: str=None, country_or_region: str=None, phone: str=None, supported_carriers=None, alternate_locations=None, **kwargs) -> None: - super(Location, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.recipient_name = recipient_name - self.street_address1 = street_address1 - self.street_address2 = street_address2 - self.city = city - self.state_or_province = state_or_province - self.postal_code = postal_code - self.country_or_region = country_or_region - self.phone = phone - self.supported_carriers = supported_carriers - self.alternate_locations = alternate_locations - - -class Operation(Model): - """Describes a supported operation by the Storage Import/Export job API. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the operation. - :type name: str - :param provider: The resource provider name to which the operation - belongs. - :type provider: str - :param resource: The name of the resource to which the operation belongs. - :type resource: str - :param operation: The display name of the operation. - :type operation: str - :param description: Short description of the operation. - :type description: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - } - - def __init__(self, *, name: str, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -class PackageInfomation(Model): - """Contains information about the package being shipped by the customer to the - Microsoft data center. - - All required parameters must be populated in order to send to Azure. - - :param carrier_name: Required. The name of the carrier that is used to - ship the import or export drives. - :type carrier_name: str - :param tracking_number: Required. The tracking number of the package. - :type tracking_number: str - :param drive_count: Required. The number of drives included in the - package. - :type drive_count: int - :param ship_date: Required. The date when the package is shipped. - :type ship_date: str - """ - - _validation = { - 'carrier_name': {'required': True}, - 'tracking_number': {'required': True}, - 'drive_count': {'required': True}, - 'ship_date': {'required': True}, - } - - _attribute_map = { - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'tracking_number': {'key': 'trackingNumber', 'type': 'str'}, - 'drive_count': {'key': 'driveCount', 'type': 'int'}, - 'ship_date': {'key': 'shipDate', 'type': 'str'}, - } - - def __init__(self, *, carrier_name: str, tracking_number: str, drive_count: int, ship_date: str, **kwargs) -> None: - super(PackageInfomation, self).__init__(**kwargs) - self.carrier_name = carrier_name - self.tracking_number = tracking_number - self.drive_count = drive_count - self.ship_date = ship_date - - -class PutJobParameters(Model): - """Put Job parameters. - - :param location: Specifies the supported Azure location where the job - should be created - :type location: str - :param tags: Specifies the tags that will be assigned to the job. - :type tags: object - :param properties: Specifies the job properties - :type properties: ~azure.mgmt.storageimportexport.models.JobDetails - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'JobDetails'}, - } - - def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: - super(PutJobParameters, self).__init__(**kwargs) - self.location = location - self.tags = tags - self.properties = properties - - -class ReturnAddress(Model): - """Specifies the return address information for the job. - - All required parameters must be populated in order to send to Azure. - - :param recipient_name: Required. The name of the recipient who will - receive the hard drives when they are returned. - :type recipient_name: str - :param street_address1: Required. The first line of the street address to - use when returning the drives. - :type street_address1: str - :param street_address2: The second line of the street address to use when - returning the drives. - :type street_address2: str - :param city: Required. The city name to use when returning the drives. - :type city: str - :param state_or_province: The state or province to use when returning the - drives. - :type state_or_province: str - :param postal_code: Required. The postal code to use when returning the - drives. - :type postal_code: str - :param country_or_region: Required. The country or region to use when - returning the drives. - :type country_or_region: str - :param phone: Required. Phone number of the recipient of the returned - drives. - :type phone: str - :param email: Required. Email address of the recipient of the returned - drives. - :type email: str - """ - - _validation = { - 'recipient_name': {'required': True}, - 'street_address1': {'required': True}, - 'city': {'required': True}, - 'postal_code': {'required': True}, - 'country_or_region': {'required': True}, - 'phone': {'required': True}, - 'email': {'required': True}, - } - - _attribute_map = { - 'recipient_name': {'key': 'recipientName', 'type': 'str'}, - 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, - 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, - 'postal_code': {'key': 'postalCode', 'type': 'str'}, - 'country_or_region': {'key': 'countryOrRegion', 'type': 'str'}, - 'phone': {'key': 'phone', 'type': 'str'}, - 'email': {'key': 'email', 'type': 'str'}, - } - - def __init__(self, *, recipient_name: str, street_address1: str, city: str, postal_code: str, country_or_region: str, phone: str, email: str, street_address2: str=None, state_or_province: str=None, **kwargs) -> None: - super(ReturnAddress, self).__init__(**kwargs) - self.recipient_name = recipient_name - self.street_address1 = street_address1 - self.street_address2 = street_address2 - self.city = city - self.state_or_province = state_or_province - self.postal_code = postal_code - self.country_or_region = country_or_region - self.phone = phone - self.email = email - - -class ReturnShipping(Model): - """Specifies the return carrier and customer's account with the carrier. - - All required parameters must be populated in order to send to Azure. - - :param carrier_name: Required. The carrier's name. - :type carrier_name: str - :param carrier_account_number: Required. The customer's account number - with the carrier. - :type carrier_account_number: str - """ - - _validation = { - 'carrier_name': {'required': True}, - 'carrier_account_number': {'required': True}, - } - - _attribute_map = { - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'carrier_account_number': {'key': 'carrierAccountNumber', 'type': 'str'}, - } - - def __init__(self, *, carrier_name: str, carrier_account_number: str, **kwargs) -> None: - super(ReturnShipping, self).__init__(**kwargs) - self.carrier_name = carrier_name - self.carrier_account_number = carrier_account_number - - -class ShippingInformation(Model): - """Contains information about the Microsoft datacenter to which the drives - should be shipped. - - All required parameters must be populated in order to send to Azure. - - :param recipient_name: Required. The name of the recipient who will - receive the hard drives when they are returned. - :type recipient_name: str - :param street_address1: Required. The first line of the street address to - use when returning the drives. - :type street_address1: str - :param street_address2: The second line of the street address to use when - returning the drives. - :type street_address2: str - :param city: Required. The city name to use when returning the drives. - :type city: str - :param state_or_province: Required. The state or province to use when - returning the drives. - :type state_or_province: str - :param postal_code: Required. The postal code to use when returning the - drives. - :type postal_code: str - :param country_or_region: Required. The country or region to use when - returning the drives. - :type country_or_region: str - :param phone: Phone number of the recipient of the returned drives. - :type phone: str - """ - - _validation = { - 'recipient_name': {'required': True}, - 'street_address1': {'required': True}, - 'city': {'required': True}, - 'state_or_province': {'required': True}, - 'postal_code': {'required': True}, - 'country_or_region': {'required': True}, - } - - _attribute_map = { - 'recipient_name': {'key': 'recipientName', 'type': 'str'}, - 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, - 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, - 'postal_code': {'key': 'postalCode', 'type': 'str'}, - 'country_or_region': {'key': 'countryOrRegion', 'type': 'str'}, - 'phone': {'key': 'phone', 'type': 'str'}, - } - - def __init__(self, *, recipient_name: str, street_address1: str, city: str, state_or_province: str, postal_code: str, country_or_region: str, street_address2: str=None, phone: str=None, **kwargs) -> None: - super(ShippingInformation, self).__init__(**kwargs) - self.recipient_name = recipient_name - self.street_address1 = street_address1 - self.street_address2 = street_address2 - self.city = city - self.state_or_province = state_or_province - self.postal_code = postal_code - self.country_or_region = country_or_region - self.phone = phone - - -class UpdateJobParameters(Model): - """Update Job parameters. - - :param tags: Specifies the tags that will be assigned to the job - :type tags: object - :param cancel_requested: If specified, the value must be true. The service - will attempt to cancel the job. - :type cancel_requested: bool - :param state: If specified, the value must be Shipping, which tells the - Import/Export service that the package for the job has been shipped. The - ReturnAddress and DeliveryPackage properties must have been set either in - this request or in a previous request, otherwise the request will fail. - :type state: str - :param return_address: Specifies the return address information for the - job. - :type return_address: ~azure.mgmt.storageimportexport.models.ReturnAddress - :param return_shipping: Specifies the return carrier and customer's - account with the carrier. - :type return_shipping: - ~azure.mgmt.storageimportexport.models.ReturnShipping - :param delivery_package: Contains information about the package being - shipped by the customer to the Microsoft data center. - :type delivery_package: - ~azure.mgmt.storageimportexport.models.PackageInfomation - :param log_level: Indicates whether error logging or verbose logging is - enabled. - :type log_level: str - :param backup_drive_manifest: Indicates whether the manifest files on the - drives should be copied to block blobs. - :type backup_drive_manifest: bool - :param drive_list: List of drives that comprise the job. - :type drive_list: list[~azure.mgmt.storageimportexport.models.DriveStatus] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': 'object'}, - 'cancel_requested': {'key': 'properties.cancelRequested', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'return_address': {'key': 'properties.returnAddress', 'type': 'ReturnAddress'}, - 'return_shipping': {'key': 'properties.returnShipping', 'type': 'ReturnShipping'}, - 'delivery_package': {'key': 'properties.deliveryPackage', 'type': 'PackageInfomation'}, - 'log_level': {'key': 'properties.logLevel', 'type': 'str'}, - 'backup_drive_manifest': {'key': 'properties.backupDriveManifest', 'type': 'bool'}, - 'drive_list': {'key': 'properties.driveList', 'type': '[DriveStatus]'}, - } - - def __init__(self, *, tags=None, cancel_requested: bool=None, state: str=None, return_address=None, return_shipping=None, delivery_package=None, log_level: str=None, backup_drive_manifest: bool=None, drive_list=None, **kwargs) -> None: - super(UpdateJobParameters, self).__init__(**kwargs) - self.tags = tags - self.cancel_requested = cancel_requested - self.state = state - self.return_address = return_address - self.return_shipping = return_shipping - self.delivery_package = delivery_package - self.log_level = log_level - self.backup_drive_manifest = backup_drive_manifest - self.drive_list = drive_list diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_paged_models.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_paged_models.py deleted file mode 100644 index ee17e76ff59d..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_paged_models.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.paging import Paged - - -class LocationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Location ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Location]'} - } - - def __init__(self, *args, **kwargs): - - super(LocationPaged, self).__init__(*args, **kwargs) -class JobResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`JobResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(JobResponsePaged, self).__init__(*args, **kwargs) -class DriveBitLockerKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`DriveBitLockerKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DriveBitLockerKey]'} - } - - def __init__(self, *args, **kwargs): - - super(DriveBitLockerKeyPaged, self).__init__(*args, **kwargs) -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/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_storage_import_export_enums.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_storage_import_export_enums.py deleted file mode 100644 index e1ed05a35cdb..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_storage_import_export_enums.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 DriveState(str, Enum): - - specified = "Specified" - received = "Received" - never_received = "NeverReceived" - transferring = "Transferring" - completed = "Completed" - completed_more_info = "CompletedMoreInfo" - shipped_back = "ShippedBack" diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/__init__.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/__init__.py deleted file mode 100644 index cce514cc5420..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._locations_operations import LocationsOperations -from ._jobs_operations import JobsOperations -from ._bit_locker_keys_operations import BitLockerKeysOperations -from ._operations import Operations - -__all__ = [ - 'LocationsOperations', - 'JobsOperations', - 'BitLockerKeysOperations', - 'Operations', -] diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_bit_locker_keys_operations.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_bit_locker_keys_operations.py deleted file mode 100644 index 8efec2d55d14..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_bit_locker_keys_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 .. import models - - -class BitLockerKeysOperations(object): - """BitLockerKeysOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :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: Specifies the API version to use for this request. Constant value: "2016-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-11-01" - - self.config = config - - def list( - self, job_name, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Returns the BitLocker Keys for all drives in the specified job. - - :param job_name: The name of the import/export job. - :type job_name: str - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscription. - :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 DriveBitLockerKey - :rtype: - ~azure.mgmt.storageimportexport.models.DriveBitLockerKeyPaged[~azure.mgmt.storageimportexport.models.DriveBitLockerKey] - :raises: - :class:`ErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'jobName': self._serialize.url("job_name", job_name, 'str'), - '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.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DriveBitLockerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}/listBitLockerKeys'} diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_jobs_operations.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_jobs_operations.py deleted file mode 100644 index 3b79298ba236..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_jobs_operations.py +++ /dev/null @@ -1,453 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# 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 .. import models - - -class JobsOperations(object): - """JobsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :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: Specifies the API version to use for this request. Constant value: "2016-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-11-01" - - self.config = config - - def list_by_subscription( - self, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Returns all active and completed jobs in a subscription. - - :param top: An integer value that specifies how many jobs at most - should be returned. The value cannot exceed 100. - :type top: int - :param filter: Can be used to restrict the results to certain - conditions. - :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 JobResponse - :rtype: - ~azure.mgmt.storageimportexport.models.JobResponsePaged[~azure.mgmt.storageimportexport.models.JobResponse] - :raises: - :class:`ErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_subscription.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 = {} - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - 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) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.JobResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ImportExport/jobs'} - - def list_by_resource_group( - self, resource_group_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Returns all active and completed jobs in a resource group. - - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscription. - :type resource_group_name: str - :param top: An integer value that specifies how many jobs at most - should be returned. The value cannot exceed 100. - :type top: int - :param filter: Can be used to restrict the results to certain - conditions. - :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 JobResponse - :rtype: - ~azure.mgmt.storageimportexport.models.JobResponsePaged[~azure.mgmt.storageimportexport.models.JobResponse] - :raises: - :class:`ErrorResponseException` - """ - def prepare_request(next_link=None): - 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 = {} - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - 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) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.JobResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs'} - - def get( - self, job_name, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets information about an existing job. - - :param job_name: The name of the import/export job. - :type job_name: str - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscription. - :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: JobResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.storageimportexport.models.JobResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'jobName': self._serialize.url("job_name", job_name, 'str'), - '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') - - # 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]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('JobResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'} - - def update( - self, job_name, resource_group_name, body, custom_headers=None, raw=False, **operation_config): - """Updates specific properties of a job. You can call this operation to - notify the Import/Export service that the hard drives comprising the - import or export job have been shipped to the Microsoft data center. It - can also be used to cancel an existing job. - - :param job_name: The name of the import/export job. - :type job_name: str - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscription. - :type resource_group_name: str - :param body: The parameters to update in the job - :type body: ~azure.mgmt.storageimportexport.models.UpdateJobParameters - :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: JobResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.storageimportexport.models.JobResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'jobName': self._serialize.url("job_name", job_name, 'str'), - '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') - - # 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(body, 'UpdateJobParameters') - - # 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]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('JobResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'} - - def create( - self, job_name, resource_group_name, body, client_tenant_id=None, custom_headers=None, raw=False, **operation_config): - """Creates a new job or updates an existing job in the specified - subscription. - - :param job_name: The name of the import/export job. - :type job_name: str - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscription. - :type resource_group_name: str - :param body: The parameters used for creating the job - :type body: ~azure.mgmt.storageimportexport.models.PutJobParameters - :param client_tenant_id: The tenant ID of the client making the - request. - :type client_tenant_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: JobResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.storageimportexport.models.JobResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'jobName': self._serialize.url("job_name", job_name, 'str'), - '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') - - # 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') - if client_tenant_id is not None: - header_parameters['x-ms-client-tenant-id'] = self._serialize.header("client_tenant_id", client_tenant_id, 'str') - - # Construct body - body_content = self._serialize.body(body, 'PutJobParameters') - - # 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]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('JobResponse', response) - if response.status_code == 201: - deserialized = self._deserialize('JobResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'} - - def delete( - self, job_name, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing job. Only jobs in the Creating or Completed states - can be deleted. - - :param job_name: The name of the import/export job. - :type job_name: str - :param resource_group_name: The resource group name uniquely - identifies the resource group within the user subscription. - :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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'jobName': self._serialize.url("job_name", job_name, 'str'), - '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') - - # 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]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'} diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_locations_operations.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_locations_operations.py deleted file mode 100644 index 8b3b314d555c..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_locations_operations.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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class LocationsOperations(object): - """LocationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :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: Specifies the API version to use for this request. Constant value: "2016-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-11-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Returns a list of locations to which you can ship the disks associated - with an import or export job. A location is a Microsoft data center - region. - - :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 Location - :rtype: - ~azure.mgmt.storageimportexport.models.LocationPaged[~azure.mgmt.storageimportexport.models.Location] - :raises: - :class:`ErrorResponseException` - """ - def prepare_request(next_link=None): - 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) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.LocationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ImportExport/locations'} - - def get( - self, location_name, custom_headers=None, raw=False, **operation_config): - """Returns the details about a location to which you can ship the disks - associated with an import or export job. A location is an Azure region. - - :param location_name: The name of the location. For example, West US - or westus. - :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: Location or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.storageimportexport.models.Location or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - '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') - - # 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]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Location', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/providers/Microsoft.ImportExport/locations/{locationName}'} diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_operations.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_operations.py deleted file mode 100644 index acf63188630d..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_operations.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# 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 .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :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: Specifies the API version to use for this request. Constant value: "2016-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-11-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Returns the list of operations supported by the import/export resource - provider. - - :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.storageimportexport.models.OperationPaged[~azure.mgmt.storageimportexport.models.Operation] - :raises: - :class:`ErrorResponseException` - """ - def prepare_request(next_link=None): - 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) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ImportExport/operations'} diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/version.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/version.py deleted file mode 100644 index e0ec669828cb..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/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.1.0" - diff --git a/sdk/storage/azure-mgmt-storageimportexport/dev_requirements.txt b/sdk/storage/azure-mgmt-storageimportexport/dev_requirements.txt deleted file mode 100644 index ef30fb5c1b9f..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/dev_requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -../../core/azure-core --e ../../../tools/azure-sdk-tools --e ../../../tools/azure-devtools \ No newline at end of file diff --git a/sdk/storage/azure-mgmt-storageimportexport/sdk_packaging.toml b/sdk/storage/azure-mgmt-storageimportexport/sdk_packaging.toml deleted file mode 100644 index d07136cd2221..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/sdk_packaging.toml +++ /dev/null @@ -1,8 +0,0 @@ -[packaging] -package_name = "azure-mgmt-storageimportexport" -package_nspkg = "azure-mgmt-nspkg" -package_pprint_name = "StorageImportExport Management" -package_doc_id = "" -is_stable = false -is_arm = true -need_msrestazure = true diff --git a/sdk/storage/azure-mgmt-storageimportexport/setup.cfg b/sdk/storage/azure-mgmt-storageimportexport/setup.cfg deleted file mode 100644 index 3c6e79cf31da..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/sdk/storage/azure-mgmt-storageimportexport/setup.py b/sdk/storage/azure-mgmt-storageimportexport/setup.py deleted file mode 100644 index fd025b2f0c65..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/setup.py +++ /dev/null @@ -1,88 +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 re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-storageimportexport" -PACKAGE_PPRINT_NAME = "StorageImportExport Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.md', encoding='utf-8') as f: - readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), - install_requires=[ - 'msrest>=0.5.0', - 'msrestazure>=0.4.32,<2.0.0', - 'azure-common~=1.1', - ], - extras_require={ - ":python_version<'3.0'": ['azure-mgmt-nspkg'], - } -) diff --git a/sdk/storage/azure-mgmt-storageimportexport/tests/recordings/test_cli_mgmt_storageimportexport.test_storageimportexport.yaml b/sdk/storage/azure-mgmt-storageimportexport/tests/recordings/test_cli_mgmt_storageimportexport.test_storageimportexport.yaml deleted file mode 100644 index 09eac37f543a..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/tests/recordings/test_cli_mgmt_storageimportexport.test_storageimportexport.yaml +++ /dev/null @@ -1,247 +0,0 @@ -interactions: -- request: - body: 'b''b\''b\\\''{"location": "West US", "properties": {"storageAccountId": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_storageimportexport_test_storageimportexportcdb9187c/providers/Microsoft.Storage/storageAccounts/gentest", - "jobType": "Import", "returnAddress": {"recipientName": "Tets", "streetAddress1": - "Street1", "streetAddress2": "street2", "city": "Redmond", "stateOrProvince": - "wa", "postalCode": "98007", "countryOrRegion": "USA", "phone": "4250000000", - "email": "Test@contoso.com"}, "diagnosticsPath": "waimportexport", "logLevel": - "Verbose", "backupDriveManifest": true, "driveList": [{"driveId": "9CA995AA", - "bitLockerKey": "238810-662376-448998-450120-652806-203390-606320-483076", "manifestFile": - "\\\\\\\\\\\\\\\\DriveManifest.xml", "manifestHash": "109B21108597EF36D5785F08303F3638", - "driveHeaderHash": ""}]}}\\\''\''''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '842' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storageimportexport/0.1.0 Azure-SDK-For-Python - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_storageimportexport_test_storageimportexportcdb9187c/providers/Microsoft.ImportExport/jobs/myJob?api-version=2016-11-01 - response: - body: - string: '{"properties":{"storageAccountId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_storageimportexport_test_storageimportexportcdb9187c/providers/Microsoft.Storage/storageAccounts/gentest","jobType":"Import","returnAddress":{"recipientName":"Tets","streetAddress1":"Street1","streetAddress2":"street2","city":"Redmond","stateOrProvince":"wa","postalCode":"98007","countryOrRegion":"USA","phone":"4250000000","email":"Test@contoso.com"},"shippingInformation":{"recipientName":"Microsoft - Azure Import/Export Service","streetAddress1":"3020 Coronado","streetAddress2":"","city":"Santa - Clara","stateOrProvince":"CA","postalCode":"95054","countryOrRegion":"USA","phone":"408 - 352 7600"},"diagnosticsPath":"waimportexport","logLevel":"Verbose","backupDriveManifest":true,"cancelRequested":false,"state":"Creating","driveList":[{"driveId":"9CA995AA","manifestFile":"\\DriveManifest.xml","manifestHash":"109B21108597EF36D5785F08303F3638","driveHeaderHash":"","state":"Specified"}],"provisioningState":"Succeeded","encryptionKey":{"kekType":"MicrosoftManaged"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_storageimportexport_test_storageimportexportcdb9187c/providers/Microsoft.ImportExport/jobs/myJob","name":"myJob","type":"Microsoft.ImportExport/jobs","location":"West - US"}' - headers: - cache-control: - - no-cache - content-length: - - '1378' - content-type: - - application/json - date: - - Sat, 11 Apr 2020 11:00:25 GMT - expires: - - '-1' - 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: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storageimportexport/0.1.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_storageimportexport_test_storageimportexportcdb9187c/providers/Microsoft.ImportExport/jobs/myJob?api-version=2016-11-01 - response: - body: - string: '{"properties":{"storageAccountId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_storageimportexport_test_storageimportexportcdb9187c/providers/Microsoft.Storage/storageAccounts/gentest","jobType":"Import","returnAddress":{"recipientName":"Tets","streetAddress1":"Street1","streetAddress2":"street2","city":"Redmond","stateOrProvince":"wa","postalCode":"98007","countryOrRegion":"USA","phone":"4250000000","email":"Test@contoso.com"},"shippingInformation":{"recipientName":"Microsoft - Azure Import/Export Service","streetAddress1":"3020 Coronado","streetAddress2":"","city":"Santa - Clara","stateOrProvince":"CA","postalCode":"95054","countryOrRegion":"USA","phone":"408 - 352 7600"},"diagnosticsPath":"waimportexport","logLevel":"Verbose","backupDriveManifest":true,"cancelRequested":false,"state":"Creating","driveList":[{"driveId":"9CA995AA","manifestFile":"\\DriveManifest.xml","manifestHash":"109B21108597EF36D5785F08303F3638","driveHeaderHash":"","state":"Specified"}],"provisioningState":"Succeeded","encryptionKey":{"kekType":"MicrosoftManaged"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_storageimportexport_test_storageimportexportcdb9187c/providers/Microsoft.ImportExport/jobs/myJob","name":"myJob","type":"Microsoft.ImportExport/jobs","location":"West - US"}' - headers: - cache-control: - - no-cache - content-length: - - '1378' - content-type: - - application/json - date: - - Sat, 11 Apr 2020 11:00:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storageimportexport/0.1.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/providers/Microsoft.ImportExport/locations/eastus?api-version=2016-11-01 - response: - body: - string: '{"properties":{"recipientName":"Microsoft Azure Import/Export Service","streetAddress1":"21625 - Gresham Drive","streetAddress2":"","city":"Ashburn","stateOrProvince":"VA","postalCode":"20147","countryOrRegion":"USA","phone":"","supportedCarriers":["Blue - Dart","DHL","FedEx","TNT","UPS"],"alternateLocations":["/providers/Microsoft.ImportExport/locations/eastus"]},"id":"/providers/Microsoft.ImportExport/locations/eastus","name":"East - US","type":"Microsoft.ImportExport/locations"}' - headers: - cache-control: - - no-cache - content-length: - - '480' - content-type: - - application/json - date: - - Sat, 11 Apr 2020 11:00:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"properties": {"state": ""}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '29' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storageimportexport/0.1.0 Azure-SDK-For-Python - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_storageimportexport_test_storageimportexportcdb9187c/providers/Microsoft.ImportExport/jobs/myJob?api-version=2016-11-01 - response: - body: - string: '{"properties":{"storageAccountId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_storageimportexport_test_storageimportexportcdb9187c/providers/Microsoft.Storage/storageAccounts/gentest","jobType":"Import","returnAddress":{"recipientName":"Tets","streetAddress1":"Street1","streetAddress2":"street2","city":"Redmond","stateOrProvince":"wa","postalCode":"98007","countryOrRegion":"USA","phone":"4250000000","email":"Test@contoso.com"},"shippingInformation":{"recipientName":"Microsoft - Azure Import/Export Service","streetAddress1":"3020 Coronado","streetAddress2":"","city":"Santa - Clara","stateOrProvince":"CA","postalCode":"95054","countryOrRegion":"USA","phone":"408 - 352 7600"},"diagnosticsPath":"waimportexport","logLevel":"Verbose","backupDriveManifest":true,"cancelRequested":false,"state":"Creating","driveList":[{"driveId":"9CA995AA","manifestFile":"\\DriveManifest.xml","manifestHash":"109B21108597EF36D5785F08303F3638","driveHeaderHash":"","state":"Specified"}],"provisioningState":"Succeeded","encryptionKey":{"kekType":"MicrosoftManaged"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_storageimportexport_test_storageimportexportcdb9187c/providers/Microsoft.ImportExport/jobs/myJob","name":"myJob","type":"Microsoft.ImportExport/jobs","location":"West - US"}' - headers: - cache-control: - - no-cache - content-length: - - '1378' - content-type: - - application/json - date: - - Sat, 11 Apr 2020 11:00:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storageimportexport/0.1.0 Azure-SDK-For-Python - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_storageimportexport_test_storageimportexportcdb9187c/providers/Microsoft.ImportExport/jobs/myJob?api-version=2016-11-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Sat, 11 Apr 2020 11:00:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/storage/azure-mgmt-storageimportexport/tests/test_cli_mgmt_storageimportexport.py b/sdk/storage/azure-mgmt-storageimportexport/tests/test_cli_mgmt_storageimportexport.py deleted file mode 100644 index dead3608f762..000000000000 --- a/sdk/storage/azure-mgmt-storageimportexport/tests/test_cli_mgmt_storageimportexport.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. -#-------------------------------------------------------------------------- - - -# TEST SCENARIO COVERAGE -# ---------------------- -# Methods Total : 10 -# Methods Covered : 10 -# Examples Total : 10 -# Examples Tested : 9 -# Coverage % : 90 -# ---------------------- - -import unittest - -import azure.mgmt.storageimportexport -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer, StorageAccountPreparer - -AZURE_LOCATION = 'eastus' - -class MgmtStorageImportExportTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtStorageImportExportTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.storageimportexport.StorageImportExport - ) - - @ResourceGroupPreparer(location=AZURE_LOCATION) - @StorageAccountPreparer(location=AZURE_LOCATION, name_prefix='gentest') - def test_storageimportexport(self, resource_group, storage_account): - - SUBSCRIPTION_ID = self.settings.SUBSCRIPTION_ID - RESOURCE_GROUP = resource_group.name - STORAGE_ACCOUNT_NAME = storage_account.name - JOB_NAME = "myJob" - LOCATION_NAME = "eastus" - - # /Jobs/put/Create job[put] - BODY = { - "location": "West US", - "properties": { - "storage_account_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Storage/storageAccounts/" + STORAGE_ACCOUNT_NAME + "", - "job_type": "Import", - "return_address": { - "recipient_name": "Tets", - "street_address1": "Street1", - "street_address2": "street2", - "city": "Redmond", - "state_or_province": "wa", - "postal_code": "98007", - "country_or_region": "USA", - "phone": "4250000000", - "email": "Test@contoso.com" - }, - "diagnostics_path": "waimportexport", - "log_level": "Verbose", - "backup_drive_manifest": True, - "drive_list": [ - { - "drive_id": "9CA995AA", - "bit_locker_key": "238810-662376-448998-450120-652806-203390-606320-483076", - "manifest_file": "\\DriveManifest.xml", - "manifest_hash": "109B21108597EF36D5785F08303F3638", - "drive_header_hash": "" - } - ] - } - } - result = self.mgmt_client.jobs.create(resource_group_name=RESOURCE_GROUP, job_name=JOB_NAME, body=BODY) - - # /Jobs/get/Get job[get] - result = self.mgmt_client.jobs.get(resource_group_name=RESOURCE_GROUP, job_name=JOB_NAME) - - # /Locations/get/Get locations[get] - result = self.mgmt_client.locations.get(location_name=LOCATION_NAME) - - # /BitLockerKeys/post/List BitLocker Keys for drives in a job[post] - BODY = {} - result = self.mgmt_client.bit_locker_keys.list(resource_group_name=RESOURCE_GROUP, job_name=JOB_NAME, body=BODY) - - # /Jobs/get/List jobs in a resource group[get] - result = self.mgmt_client.jobs.list_by_resource_group(resource_group_name=RESOURCE_GROUP) - - # /Jobs/get/List jobs in a subscription[get] - result = self.mgmt_client.jobs.list_by_subscription() - - # /Locations/get/List locations[get] - result = self.mgmt_client.locations.list() - - # /Jobs/patch/Update job[patch] - BODY = { - "properties": { - "state": "", - "log_level": "Verbose", - "backup_drive_manifest": True - } - } - result = self.mgmt_client.jobs.update(resource_group_name=RESOURCE_GROUP, job_name=JOB_NAME, body=BODY) - - # /Jobs/delete/Delete job[delete] - result = self.mgmt_client.jobs.delete(resource_group_name=RESOURCE_GROUP, job_name=JOB_NAME) - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index cb7389b84345..993b53b17f94 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -54,8 +54,6 @@ extends: safeName: azuremgmtstoragecache - name: azure-mgmt-storagesync safeName: azuremgmtstoragesync - - name: azure-mgmt-storageimportexport - safeName: azuremgmtstorageimportexport CondaArtifacts: - name: azure-storage meta_source: meta.yaml