diff --git a/sdk/resources/azure-mgmt-resource/_meta.json b/sdk/resources/azure-mgmt-resource/_meta.json index d307aab419df..c0425e9b5cb3 100644 --- a/sdk/resources/azure-mgmt-resource/_meta.json +++ b/sdk/resources/azure-mgmt-resource/_meta.json @@ -1,7 +1,7 @@ { "autorest": "V2", "use": "@microsoft.azure/autorest.python@~4.0.71", - "commit": "14d2ddf809ea5c8ce9d6017b5ab1aca96df05643", + "commit": "0eadabcd2f2536eb36df39cb979588c01714e226", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/resources/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", "readme": "specification/resources/resource-manager/readme.md" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_configuration.py index 306faab728ec..5b10350e1f05 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_configuration.py @@ -21,7 +21,7 @@ class ResourceManagementClientConfiguration(AzureConfiguration): :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 target subscription. + :param subscription_id: The Microsoft Azure subscription ID. :type subscription_id: str :param str base_url: Service URL """ diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_resource_groups_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_resource_groups_operations.py index e7d76639c443..f97a21b098c7 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_resource_groups_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_resource_groups_operations.py @@ -387,7 +387,7 @@ def _export_template_initial( url = self.export_template.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, pattern=r'^[-\w\._\(\)]+$') + '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) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_resource_groups_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_resource_groups_operations.py index b61989570e8a..10be0f52cac6 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_resource_groups_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_resource_groups_operations.py @@ -387,7 +387,7 @@ def _export_template_initial( url = self.export_template.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, pattern=r'^[-\w\._\(\)]+$') + '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) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_resource_groups_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_resource_groups_operations.py index f39d5d1e07d6..226363ddc747 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_resource_groups_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_resource_groups_operations.py @@ -168,7 +168,7 @@ def create_or_update( def _delete_initial( - self, resource_group_name, force_deletion_resource_types=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, force_deletion_types=None, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -179,8 +179,8 @@ def _delete_initial( # Construct parameters query_parameters = {} - if force_deletion_resource_types is not None: - query_parameters['forceDeletionResourceTypes'] = self._serialize.query("force_deletion_resource_types", force_deletion_resource_types, 'str') + if force_deletion_types is not None: + query_parameters['forceDeletionTypes'] = self._serialize.query("force_deletion_types", force_deletion_types, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -206,7 +206,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, force_deletion_resource_types=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, force_deletion_types=None, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a resource group. When you delete a resource group, all of its resources are also @@ -216,10 +216,10 @@ def delete( :param resource_group_name: The name of the resource group to delete. The name is case insensitive. :type resource_group_name: str - :param force_deletion_resource_types: The resource types you want to - force delete. Currently, only the following is supported: - forceDeletionResourceTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets - :type force_deletion_resource_types: str + :param force_deletion_types: The resource types you want to force + delete. Currently, only the following is supported: + forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets + :type force_deletion_types: 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 @@ -233,7 +233,7 @@ def delete( """ raw_result = self._delete_initial( resource_group_name=resource_group_name, - force_deletion_resource_types=force_deletion_resource_types, + force_deletion_types=force_deletion_types, custom_headers=custom_headers, raw=True, **operation_config @@ -394,7 +394,7 @@ def _export_template_initial( url = self.export_template.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, pattern=r'^[-\w\._\(\)]+$') + '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) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_resource_groups_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_resource_groups_operations.py index df48fe288a86..bb6827c3f1df 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_resource_groups_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_resource_groups_operations.py @@ -387,7 +387,7 @@ def _export_template_initial( url = self.export_template.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, pattern=r'^[-\w\._\(\)]+$') + '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) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_resource_groups_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_resource_groups_operations.py index a9acf5543280..e441183d54a7 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_resource_groups_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_resource_groups_operations.py @@ -168,7 +168,7 @@ def create_or_update( def _delete_initial( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, force_deletion_types=None, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -179,6 +179,8 @@ def _delete_initial( # Construct parameters query_parameters = {} + if force_deletion_types is not None: + query_parameters['forceDeletionTypes'] = self._serialize.query("force_deletion_types", force_deletion_types, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -204,7 +206,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, force_deletion_types=None, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a resource group. When you delete a resource group, all of its resources are also @@ -214,6 +216,10 @@ def delete( :param resource_group_name: The name of the resource group to delete. The name is case insensitive. :type resource_group_name: str + :param force_deletion_types: The resource types you want to force + delete. Currently, only the following is supported: + forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets + :type force_deletion_types: 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 @@ -227,6 +233,7 @@ def delete( """ raw_result = self._delete_initial( resource_group_name=resource_group_name, + force_deletion_types=force_deletion_types, custom_headers=custom_headers, raw=True, **operation_config @@ -387,7 +394,7 @@ def _export_template_initial( url = self.export_template.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, pattern=r'^[-\w\._\(\)]+$') + '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) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_configuration.py index 3b326f792363..660b6bb0e871 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_configuration.py @@ -21,7 +21,7 @@ class ResourceManagementClientConfiguration(AzureConfiguration): :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 target subscription. + :param subscription_id: The Microsoft Azure subscription ID. :type subscription_id: str :param str base_url: Service URL """ diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_resource_management_client.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_resource_management_client.py index 87eff202634d..fed148b6ac21 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_resource_management_client.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_resource_management_client.py @@ -50,7 +50,7 @@ class ResourceManagementClient(SDKClient): :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 target subscription. + :param subscription_id: The Microsoft Azure subscription ID. :type subscription_id: str :param str base_url: Service URL """ diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resource_groups_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resource_groups_operations.py index fec49db8373e..694241a4fccf 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resource_groups_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resource_groups_operations.py @@ -168,7 +168,7 @@ def create_or_update( def _delete_initial( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, force_deletion_types=None, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -179,6 +179,8 @@ def _delete_initial( # Construct parameters query_parameters = {} + if force_deletion_types is not None: + query_parameters['forceDeletionTypes'] = self._serialize.query("force_deletion_types", force_deletion_types, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -204,7 +206,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, force_deletion_types=None, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a resource group. When you delete a resource group, all of its resources are also @@ -214,6 +216,10 @@ def delete( :param resource_group_name: The name of the resource group to delete. The name is case insensitive. :type resource_group_name: str + :param force_deletion_types: The resource types you want to force + delete. Currently, only the following is supported: + forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets + :type force_deletion_types: 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 @@ -227,6 +233,7 @@ def delete( """ raw_result = self._delete_initial( resource_group_name=resource_group_name, + force_deletion_types=force_deletion_types, custom_headers=custom_headers, raw=True, **operation_config @@ -387,7 +394,7 @@ def _export_template_initial( url = self.export_template.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, pattern=r'^[-\w\._\(\)]+$') + '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) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resources_operations.py index 9d490c2fa24c..7c4e22e81824 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resources_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resources_operations.py @@ -192,14 +192,15 @@ def move_resources( self, source_resource_group_name, resources=None, target_resource_group=None, custom_headers=None, raw=False, polling=True, **operation_config): """Moves resources from one resource group to another resource group. - The resources to move must be in the same source resource group. The - target resource group may be in a different subscription. When moving - resources, both the source group and the target group are locked for - the duration of the operation. Write and delete operations are blocked - on the groups until the move completes. . - - :param source_resource_group_name: The name of the resource group - containing the resources to move. + The resources to be moved must be in the same source resource group in + the source subscription being used. The target resource group may be in + a different subscription. When moving resources, both the source group + and the target group are locked for the duration of the operation. + Write and delete operations are blocked on the groups until the move + completes. . + + :param source_resource_group_name: The name of the resource group from + the source subscription containing the resources to be moved. :type source_resource_group_name: str :param resources: The IDs of the resources. :type resources: list[str] @@ -288,15 +289,17 @@ def validate_move_resources( another resource group. This operation checks whether the specified resources can be moved to - the target. The resources to move must be in the same source resource - group. The target resource group may be in a different subscription. If - validation succeeds, it returns HTTP response code 204 (no content). If - validation fails, it returns HTTP response code 409 (Conflict) with an - error message. Retrieve the URL in the Location header value to check - the result of the long-running operation. - - :param source_resource_group_name: The name of the resource group - containing the resources to validate for move. + the target. The resources to be moved must be in the same source + resource group in the source subscription being used. The target + resource group may be in a different subscription. If validation + succeeds, it returns HTTP response code 204 (no content). If validation + fails, it returns HTTP response code 409 (Conflict) with an error + message. Retrieve the URL in the Location header value to check the + result of the long-running operation. + + :param source_resource_group_name: The name of the resource group from + the source subscription containing the resources to be validated for + move. :type source_resource_group_name: str :param resources: The IDs of the resources. :type resources: list[str]