From a13b28b6bd2db0f555c736d16b2c3feef19668ae Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 21 Feb 2018 12:52:31 -0800 Subject: [PATCH 1/4] Generated from 372c468ed72f67efcbb2a9442e136c99f8839a28 (#2003) Change statusMessage property to wildcard type. The statusMessage can be a string or a JSON object, so model it as a wildcard type. --- .../operations/features_operations.py | 14 ++++-- .../operations/resource_links_operations.py | 17 ++++--- .../operations/management_locks_operations.py | 35 +++++++++----- .../operations/management_locks_operations.py | 47 ++++++++++++------- .../application_definitions_operations.py | 23 +++++---- .../operations/applications_operations.py | 32 ++++++++----- .../policy_assignments_operations.py | 29 ++++++++---- .../policy_definitions_operations.py | 14 ++++-- .../policy_assignments_operations.py | 29 ++++++++---- .../policy_definitions_operations.py | 14 ++++-- .../policy_assignments_operations.py | 29 ++++++++---- .../policy_definitions_operations.py | 32 ++++++++----- .../policy_assignments_operations.py | 29 ++++++++---- .../policy_definitions_operations.py | 32 ++++++++----- .../policy_set_definitions_operations.py | 32 ++++++++----- .../operations/deployment_operations.py | 8 ++-- .../operations/deployments_operations.py | 26 ++++++---- .../operations/providers_operations.py | 14 ++++-- .../operations/resource_groups_operations.py | 26 ++++++---- .../operations/resources_operations.py | 23 +++++---- .../v2016_02_01/operations/tags_operations.py | 17 ++++--- .../operations/deployment_operations.py | 8 ++-- .../operations/deployments_operations.py | 26 ++++++---- .../operations/providers_operations.py | 14 ++++-- .../operations/resource_groups_operations.py | 26 ++++++---- .../operations/resources_operations.py | 38 ++++++++++----- .../v2016_09_01/operations/tags_operations.py | 17 ++++--- .../operations/deployment_operations.py | 8 ++-- .../operations/deployments_operations.py | 26 ++++++---- .../operations/providers_operations.py | 14 ++++-- .../operations/resource_groups_operations.py | 23 +++++---- .../operations/resources_operations.py | 44 +++++++++++------ .../v2017_05_10/operations/tags_operations.py | 17 ++++--- .../operations/subscriptions_operations.py | 11 +++-- .../operations/tenants_operations.py | 5 +- 35 files changed, 521 insertions(+), 278 deletions(-) diff --git a/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/features_operations.py b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/features_operations.py index e648e17c723b..dc13aa490301 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/features_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/features_operations.py @@ -22,7 +22,7 @@ class FeaturesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2015-12-01". """ @@ -56,7 +56,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Features/features' + url = self.list_all.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -101,6 +101,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Features/features'} def list( self, resource_provider_namespace, custom_headers=None, raw=False, **operation_config): @@ -124,7 +125,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features' + url = self.list.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -170,6 +171,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features'} def get( self, resource_provider_namespace, feature_name, custom_headers=None, raw=False, **operation_config): @@ -191,7 +193,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'featureName': self._serialize.url("feature_name", feature_name, 'str'), @@ -232,6 +234,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}'} def register( self, resource_provider_namespace, feature_name, custom_headers=None, raw=False, **operation_config): @@ -253,7 +256,7 @@ def register( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/register' + url = self.register.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'featureName': self._serialize.url("feature_name", feature_name, 'str'), @@ -294,3 +297,4 @@ def register( return client_raw_response return deserialized + register.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/register'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/operations/resource_links_operations.py b/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/operations/resource_links_operations.py index b2d526f859f0..9769f1f95977 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/operations/resource_links_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/operations/resource_links_operations.py @@ -22,7 +22,7 @@ class ResourceLinksOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2016-09-01". """ @@ -57,7 +57,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/{linkId}' + url = self.delete.metadata['url'] path_format_arguments = { 'linkId': self._serialize.url("link_id", link_id, 'str', skip_quote=True) } @@ -89,6 +89,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/{linkId}'} def create_or_update( self, link_id, properties=None, custom_headers=None, raw=False, **operation_config): @@ -116,7 +117,7 @@ def create_or_update( parameters = models.ResourceLink(properties=properties) # Construct URL - url = '/{linkId}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'linkId': self._serialize.url("link_id", link_id, 'str', skip_quote=True) } @@ -161,6 +162,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/{linkId}'} def get( self, link_id, custom_headers=None, raw=False, **operation_config): @@ -181,7 +183,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/{linkId}' + url = self.get.metadata['url'] path_format_arguments = { 'linkId': self._serialize.url("link_id", link_id, 'str', skip_quote=True) } @@ -220,6 +222,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/{linkId}'} def list_at_subscription( self, filter=None, custom_headers=None, raw=False, **operation_config): @@ -243,7 +246,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Resources/links' + url = self.list_at_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -290,6 +293,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_at_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Resources/links'} def list_at_source_scope( self, scope, filter=None, custom_headers=None, raw=False, **operation_config): @@ -318,7 +322,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/{scope}/providers/Microsoft.Resources/links' + url = self.list_at_source_scope.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) } @@ -365,3 +369,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_at_source_scope.metadata = {'url': '/{scope}/providers/Microsoft.Resources/links'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/management_locks_operations.py b/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/management_locks_operations.py index 0321bfcd9aea..ba8a6446daaf 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/management_locks_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/management_locks_operations.py @@ -22,7 +22,7 @@ class ManagementLocksOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-01-01". """ @@ -60,7 +60,7 @@ def create_or_update_at_resource_group_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.create_or_update_at_resource_group_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'lockName': self._serialize.url("lock_name", lock_name, 'str'), @@ -107,6 +107,7 @@ def create_or_update_at_resource_group_level( return client_raw_response return deserialized + create_or_update_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}'} def delete_at_resource_group_level( self, resource_group_name, lock_name, custom_headers=None, raw=False, **operation_config): @@ -126,7 +127,7 @@ def delete_at_resource_group_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.delete_at_resource_group_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'lockName': self._serialize.url("lock_name", lock_name, 'str'), @@ -160,6 +161,7 @@ def delete_at_resource_group_level( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}'} def get_at_resource_group_level( self, resource_group_name, lock_name, custom_headers=None, raw=False, **operation_config): @@ -181,7 +183,7 @@ def get_at_resource_group_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.get_at_resource_group_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'lockName': self._serialize.url("lock_name", lock_name, 'str'), @@ -222,6 +224,7 @@ def get_at_resource_group_level( return client_raw_response return deserialized + get_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}'} def create_or_update_at_resource_level( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -255,7 +258,7 @@ def create_or_update_at_resource_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.create_or_update_at_resource_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -306,6 +309,7 @@ def create_or_update_at_resource_level( return client_raw_response return deserialized + create_or_update_at_resource_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}'} def delete_at_resource_level( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, custom_headers=None, raw=False, **operation_config): @@ -333,7 +337,7 @@ def delete_at_resource_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.delete_at_resource_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -371,6 +375,7 @@ def delete_at_resource_level( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_at_resource_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}'} def create_or_update_at_subscription_level( self, lock_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -393,7 +398,7 @@ def create_or_update_at_subscription_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.create_or_update_at_subscription_level.metadata['url'] path_format_arguments = { 'lockName': self._serialize.url("lock_name", lock_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -439,6 +444,7 @@ def create_or_update_at_subscription_level( return client_raw_response return deserialized + create_or_update_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}'} def delete_at_subscription_level( self, lock_name, custom_headers=None, raw=False, **operation_config): @@ -456,7 +462,7 @@ def delete_at_subscription_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.delete_at_subscription_level.metadata['url'] path_format_arguments = { 'lockName': self._serialize.url("lock_name", lock_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -489,6 +495,7 @@ def delete_at_subscription_level( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}'} def get( self, lock_name, custom_headers=None, raw=False, **operation_config): @@ -508,7 +515,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.get.metadata['url'] path_format_arguments = { 'lockName': self._serialize.url("lock_name", lock_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -548,6 +555,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}'} def list_at_resource_group_level( self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -571,7 +579,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks' + url = self.list_at_resource_group_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -619,6 +627,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks'} def list_at_resource_level( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -652,7 +661,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks' + url = self.list_at_resource_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -704,6 +713,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_at_resource_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks'} def list_at_subscription_level( self, filter=None, custom_headers=None, raw=False, **operation_config): @@ -725,7 +735,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks' + url = self.list_at_subscription_level.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -772,3 +782,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/operations/management_locks_operations.py b/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/operations/management_locks_operations.py index 41479b8a7e9a..01e2085a67fa 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/operations/management_locks_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/operations/management_locks_operations.py @@ -22,7 +22,7 @@ class ManagementLocksOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2016-09-01". """ @@ -68,7 +68,7 @@ def create_or_update_at_resource_group_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.create_or_update_at_resource_group_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'lockName': self._serialize.url("lock_name", lock_name, 'str'), @@ -115,6 +115,7 @@ def create_or_update_at_resource_group_level( return client_raw_response return deserialized + create_or_update_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}'} def delete_at_resource_group_level( self, resource_group_name, lock_name, custom_headers=None, raw=False, **operation_config): @@ -140,7 +141,7 @@ def delete_at_resource_group_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.delete_at_resource_group_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'lockName': self._serialize.url("lock_name", lock_name, 'str'), @@ -174,6 +175,7 @@ def delete_at_resource_group_level( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}'} def get_at_resource_group_level( self, resource_group_name, lock_name, custom_headers=None, raw=False, **operation_config): @@ -195,7 +197,7 @@ def get_at_resource_group_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.get_at_resource_group_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'lockName': self._serialize.url("lock_name", lock_name, 'str'), @@ -236,6 +238,7 @@ def get_at_resource_group_level( return client_raw_response return deserialized + get_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}'} def create_or_update_by_scope( self, scope, lock_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -265,7 +268,7 @@ def create_or_update_by_scope( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.create_or_update_by_scope.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str'), 'lockName': self._serialize.url("lock_name", lock_name, 'str') @@ -311,6 +314,7 @@ def create_or_update_by_scope( return client_raw_response return deserialized + create_or_update_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/locks/{lockName}'} def delete_by_scope( self, scope, lock_name, custom_headers=None, raw=False, **operation_config): @@ -330,7 +334,7 @@ def delete_by_scope( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.delete_by_scope.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str'), 'lockName': self._serialize.url("lock_name", lock_name, 'str') @@ -363,6 +367,7 @@ def delete_by_scope( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/locks/{lockName}'} def get_by_scope( self, scope, lock_name, custom_headers=None, raw=False, **operation_config): @@ -384,7 +389,7 @@ def get_by_scope( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.get_by_scope.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str'), 'lockName': self._serialize.url("lock_name", lock_name, 'str') @@ -424,6 +429,7 @@ def get_by_scope( return client_raw_response return deserialized + get_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/locks/{lockName}'} def create_or_update_at_resource_level( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -468,7 +474,7 @@ def create_or_update_at_resource_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.create_or_update_at_resource_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -519,6 +525,7 @@ def create_or_update_at_resource_level( return client_raw_response return deserialized + create_or_update_at_resource_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}'} def delete_at_resource_level( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, custom_headers=None, raw=False, **operation_config): @@ -556,7 +563,7 @@ def delete_at_resource_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.delete_at_resource_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -594,6 +601,7 @@ def delete_at_resource_level( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_at_resource_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}'} def get_at_resource_level( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, custom_headers=None, raw=False, **operation_config): @@ -625,7 +633,7 @@ def get_at_resource_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.get_at_resource_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -670,6 +678,7 @@ def get_at_resource_level( return client_raw_response return deserialized + get_at_resource_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}'} def create_or_update_at_subscription_level( self, lock_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -700,7 +709,7 @@ def create_or_update_at_subscription_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.create_or_update_at_subscription_level.metadata['url'] path_format_arguments = { 'lockName': self._serialize.url("lock_name", lock_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -746,6 +755,7 @@ def create_or_update_at_subscription_level( return client_raw_response return deserialized + create_or_update_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}'} def delete_at_subscription_level( self, lock_name, custom_headers=None, raw=False, **operation_config): @@ -768,7 +778,7 @@ def delete_at_subscription_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.delete_at_subscription_level.metadata['url'] path_format_arguments = { 'lockName': self._serialize.url("lock_name", lock_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -801,6 +811,7 @@ def delete_at_subscription_level( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}'} def get_at_subscription_level( self, lock_name, custom_headers=None, raw=False, **operation_config): @@ -820,7 +831,7 @@ def get_at_subscription_level( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}' + url = self.get_at_subscription_level.metadata['url'] path_format_arguments = { 'lockName': self._serialize.url("lock_name", lock_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -860,6 +871,7 @@ def get_at_subscription_level( return client_raw_response return deserialized + get_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}'} def list_at_resource_group_level( self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -884,7 +896,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks' + url = self.list_at_resource_group_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -932,6 +944,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks'} def list_at_resource_level( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -966,7 +979,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks' + url = self.list_at_resource_level.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -1018,6 +1031,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_at_resource_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks'} def list_at_subscription_level( self, filter=None, custom_headers=None, raw=False, **operation_config): @@ -1039,7 +1053,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks' + url = self.list_at_subscription_level.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -1086,3 +1100,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/application_definitions_operations.py b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/application_definitions_operations.py index f31291de8abd..b9246c7c85cd 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/application_definitions_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/application_definitions_operations.py @@ -23,7 +23,7 @@ class ApplicationDefinitionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2017-09-01". """ @@ -61,7 +61,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'applicationDefinitionName': self._serialize.url("application_definition_name", application_definition_name, 'str', max_length=64, min_length=3), @@ -100,12 +100,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}'} def _delete_initial( self, resource_group_name, application_definition_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'applicationDefinitionName': self._serialize.url("application_definition_name", application_definition_name, 'str', max_length=64, min_length=3), @@ -197,12 +198,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}'} def _create_or_update_initial( self, resource_group_name, application_definition_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'applicationDefinitionName': self._serialize.url("application_definition_name", application_definition_name, 'str', max_length=64, min_length=3), @@ -317,6 +319,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -340,7 +343,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -384,6 +387,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions'} def get_by_id( self, application_definition_id, custom_headers=None, raw=False, **operation_config): @@ -407,7 +411,7 @@ def get_by_id( :class:`ErrorResponseException` """ # Construct URL - url = '/{applicationDefinitionId}' + url = self.get_by_id.metadata['url'] path_format_arguments = { 'applicationDefinitionId': self._serialize.url("application_definition_id", application_definition_id, 'str', skip_quote=True) } @@ -444,12 +448,13 @@ def get_by_id( return client_raw_response return deserialized + get_by_id.metadata = {'url': '/{applicationDefinitionId}'} def _delete_by_id_initial( self, application_definition_id, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/{applicationDefinitionId}' + url = self.delete_by_id.metadata['url'] path_format_arguments = { 'applicationDefinitionId': self._serialize.url("application_definition_id", application_definition_id, 'str', skip_quote=True) } @@ -537,12 +542,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete_by_id.metadata = {'url': '/{applicationDefinitionId}'} def _create_or_update_by_id_initial( self, application_definition_id, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/{applicationDefinitionId}' + url = self.create_or_update_by_id.metadata['url'] path_format_arguments = { 'applicationDefinitionId': self._serialize.url("application_definition_id", application_definition_id, 'str', skip_quote=True) } @@ -653,3 +659,4 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create_or_update_by_id.metadata = {'url': '/{applicationDefinitionId}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/applications_operations.py b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/applications_operations.py index da5db7103de6..f2866e9dcd24 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/applications_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/applications_operations.py @@ -23,7 +23,7 @@ class ApplicationsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2017-09-01". """ @@ -59,7 +59,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=3), @@ -98,12 +98,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}'} def _delete_initial( self, resource_group_name, application_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=3), @@ -194,12 +195,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}'} def _create_or_update_initial( self, resource_group_name, application_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=3), @@ -313,6 +315,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}'} def update( self, resource_group_name, application_name, parameters=None, custom_headers=None, raw=False, **operation_config): @@ -340,7 +343,7 @@ def update( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=3), @@ -386,6 +389,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -409,7 +413,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -453,6 +457,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications'} def list_by_subscription( self, custom_headers=None, raw=False, **operation_config): @@ -473,7 +478,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Solutions/applications' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -516,6 +521,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Solutions/applications'} def get_by_id( self, application_id, custom_headers=None, raw=False, **operation_config): @@ -538,7 +544,7 @@ def get_by_id( :class:`ErrorResponseException` """ # Construct URL - url = '/{applicationId}' + url = self.get_by_id.metadata['url'] path_format_arguments = { 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) } @@ -575,12 +581,13 @@ def get_by_id( return client_raw_response return deserialized + get_by_id.metadata = {'url': '/{applicationId}'} def _delete_by_id_initial( self, application_id, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/{applicationId}' + url = self.delete_by_id.metadata['url'] path_format_arguments = { 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) } @@ -668,12 +675,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete_by_id.metadata = {'url': '/{applicationId}'} def _create_or_update_by_id_initial( self, application_id, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/{applicationId}' + url = self.create_or_update_by_id.metadata['url'] path_format_arguments = { 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) } @@ -784,6 +792,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create_or_update_by_id.metadata = {'url': '/{applicationId}'} def update_by_id( self, application_id, parameters=None, custom_headers=None, raw=False, **operation_config): @@ -811,7 +820,7 @@ def update_by_id( :class:`ErrorResponseException` """ # Construct URL - url = '/{applicationId}' + url = self.update_by_id.metadata['url'] path_format_arguments = { 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) } @@ -855,3 +864,4 @@ def update_by_id( return client_raw_response return deserialized + update_by_id.metadata = {'url': '/{applicationId}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/policy_assignments_operations.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/policy_assignments_operations.py index 74b2ccc646e1..eabe172cc056 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/policy_assignments_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/policy_assignments_operations.py @@ -22,7 +22,7 @@ class PolicyAssignmentsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2015-10-01-preview". """ @@ -58,7 +58,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}' + url = self.delete.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -98,6 +98,7 @@ def delete( return client_raw_response return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}'} def create( self, scope, policy_assignment_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -126,7 +127,7 @@ def create( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}' + url = self.create.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -170,6 +171,7 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}'} def get( self, scope, policy_assignment_name, custom_headers=None, raw=False, **operation_config): @@ -192,7 +194,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}' + url = self.get.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -232,6 +234,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}'} def list_for_resource_group( self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -256,7 +259,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments' + url = self.list_for_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -304,6 +307,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_for_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments'} def list_for_resource( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -338,7 +342,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyassignments' + url = self.list_for_resource.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -390,6 +394,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_for_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyassignments'} def list( self, filter=None, custom_headers=None, raw=False, **operation_config): @@ -411,7 +416,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyassignments' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -458,6 +463,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyassignments'} def delete_by_id( self, policy_assignment_id, custom_headers=None, raw=False, **operation_config): @@ -486,7 +492,7 @@ def delete_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.delete_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -525,6 +531,7 @@ def delete_by_id( return client_raw_response return deserialized + delete_by_id.metadata = {'url': '/{policyAssignmentId}'} def create_by_id( self, policy_assignment_id, parameters, custom_headers=None, raw=False, **operation_config): @@ -558,7 +565,7 @@ def create_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.create_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -601,6 +608,7 @@ def create_by_id( return client_raw_response return deserialized + create_by_id.metadata = {'url': '/{policyAssignmentId}'} def get_by_id( self, policy_assignment_id, custom_headers=None, raw=False, **operation_config): @@ -629,7 +637,7 @@ def get_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.get_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -668,3 +676,4 @@ def get_by_id( return client_raw_response return deserialized + get_by_id.metadata = {'url': '/{policyAssignmentId}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/policy_definitions_operations.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/policy_definitions_operations.py index c705bea8b8b9..9a881ad52f60 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/policy_definitions_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/policy_definitions_operations.py @@ -22,7 +22,7 @@ class PolicyDefinitionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2015-10-01-preview". """ @@ -59,7 +59,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -103,6 +103,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}'} def delete( self, policy_definition_name, custom_headers=None, raw=False, **operation_config): @@ -121,7 +122,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -154,6 +155,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}'} def get( self, policy_definition_name, custom_headers=None, raw=False, **operation_config): @@ -174,7 +176,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}' + url = self.get.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -214,6 +216,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}'} def list( self, filter=None, custom_headers=None, raw=False, **operation_config): @@ -235,7 +238,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -282,3 +285,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/policy_assignments_operations.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/policy_assignments_operations.py index 05a8229a4a1f..d2b33b9aa90d 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/policy_assignments_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/policy_assignments_operations.py @@ -22,7 +22,7 @@ class PolicyAssignmentsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2016-04-01". """ @@ -58,7 +58,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}' + url = self.delete.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -98,6 +98,7 @@ def delete( return client_raw_response return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}'} def create( self, scope, policy_assignment_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -126,7 +127,7 @@ def create( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}' + url = self.create.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -170,6 +171,7 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}'} def get( self, scope, policy_assignment_name, custom_headers=None, raw=False, **operation_config): @@ -192,7 +194,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}' + url = self.get.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -232,6 +234,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}'} def list_for_resource_group( self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -256,7 +259,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments' + url = self.list_for_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -304,6 +307,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_for_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments'} def list_for_resource( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -338,7 +342,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyassignments' + url = self.list_for_resource.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -390,6 +394,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_for_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyassignments'} def list( self, filter=None, custom_headers=None, raw=False, **operation_config): @@ -411,7 +416,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyassignments' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -458,6 +463,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyassignments'} def delete_by_id( self, policy_assignment_id, custom_headers=None, raw=False, **operation_config): @@ -486,7 +492,7 @@ def delete_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.delete_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -525,6 +531,7 @@ def delete_by_id( return client_raw_response return deserialized + delete_by_id.metadata = {'url': '/{policyAssignmentId}'} def create_by_id( self, policy_assignment_id, parameters, custom_headers=None, raw=False, **operation_config): @@ -558,7 +565,7 @@ def create_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.create_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -601,6 +608,7 @@ def create_by_id( return client_raw_response return deserialized + create_by_id.metadata = {'url': '/{policyAssignmentId}'} def get_by_id( self, policy_assignment_id, custom_headers=None, raw=False, **operation_config): @@ -629,7 +637,7 @@ def get_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.get_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -668,3 +676,4 @@ def get_by_id( return client_raw_response return deserialized + get_by_id.metadata = {'url': '/{policyAssignmentId}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/policy_definitions_operations.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/policy_definitions_operations.py index 644a2e7ea208..c7ebdfb0f0be 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/policy_definitions_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/policy_definitions_operations.py @@ -22,7 +22,7 @@ class PolicyDefinitionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2016-04-01". """ @@ -59,7 +59,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -103,6 +103,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}'} def delete( self, policy_definition_name, custom_headers=None, raw=False, **operation_config): @@ -121,7 +122,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -154,6 +155,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}'} def get( self, policy_definition_name, custom_headers=None, raw=False, **operation_config): @@ -174,7 +176,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}' + url = self.get.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -214,6 +216,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}'} def list( self, filter=None, custom_headers=None, raw=False, **operation_config): @@ -235,7 +238,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -282,3 +285,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_assignments_operations.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_assignments_operations.py index 13dd79e5b66a..1b5de5c73aa4 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_assignments_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_assignments_operations.py @@ -23,7 +23,7 @@ class PolicyAssignmentsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2016-12-01". """ @@ -59,7 +59,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}' + url = self.delete.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -99,6 +99,7 @@ def delete( return client_raw_response return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'} def create( self, scope, policy_assignment_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -127,7 +128,7 @@ def create( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}' + url = self.create.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -171,6 +172,7 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'} def get( self, scope, policy_assignment_name, custom_headers=None, raw=False, **operation_config): @@ -193,7 +195,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}' + url = self.get.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -233,6 +235,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'} def list_for_resource_group( self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -257,7 +260,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments' + url = self.list_for_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -305,6 +308,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_for_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments'} def list_for_resource( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -343,7 +347,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments' + url = self.list_for_resource.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -395,6 +399,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_for_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments'} def list( self, filter=None, custom_headers=None, raw=False, **operation_config): @@ -416,7 +421,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -463,6 +468,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments'} def delete_by_id( self, policy_assignment_id, custom_headers=None, raw=False, **operation_config): @@ -491,7 +497,7 @@ def delete_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.delete_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -530,6 +536,7 @@ def delete_by_id( return client_raw_response return deserialized + delete_by_id.metadata = {'url': '/{policyAssignmentId}'} def create_by_id( self, policy_assignment_id, parameters, custom_headers=None, raw=False, **operation_config): @@ -563,7 +570,7 @@ def create_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.create_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -606,6 +613,7 @@ def create_by_id( return client_raw_response return deserialized + create_by_id.metadata = {'url': '/{policyAssignmentId}'} def get_by_id( self, policy_assignment_id, custom_headers=None, raw=False, **operation_config): @@ -634,7 +642,7 @@ def get_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.get_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -673,3 +681,4 @@ def get_by_id( return client_raw_response return deserialized + get_by_id.metadata = {'url': '/{policyAssignmentId}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_definitions_operations.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_definitions_operations.py index cd2687c458dd..cf5f29d8966f 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_definitions_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_definitions_operations.py @@ -22,7 +22,7 @@ class PolicyDefinitionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2016-12-01". """ @@ -59,7 +59,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -103,6 +103,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def delete( self, policy_definition_name, custom_headers=None, raw=False, **operation_config): @@ -121,7 +122,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -154,6 +155,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def get( self, policy_definition_name, custom_headers=None, raw=False, **operation_config): @@ -174,7 +176,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.get.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -214,6 +216,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def get_built_in( self, policy_definition_name, custom_headers=None, raw=False, **operation_config): @@ -234,7 +237,7 @@ def get_built_in( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.get_built_in.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str') } @@ -273,6 +276,7 @@ def get_built_in( return client_raw_response return deserialized + get_built_in.metadata = {'url': '/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def create_or_update_at_management_group( self, policy_definition_name, parameters, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -298,7 +302,7 @@ def create_or_update_at_management_group( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.create_or_update_at_management_group.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') @@ -342,6 +346,7 @@ def create_or_update_at_management_group( return client_raw_response return deserialized + create_or_update_at_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def delete_at_management_group( self, policy_definition_name, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -362,7 +367,7 @@ def delete_at_management_group( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.delete_at_management_group.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') @@ -395,6 +400,7 @@ def delete_at_management_group( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_at_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def get_at_management_group( self, policy_definition_name, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -417,7 +423,7 @@ def get_at_management_group( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.get_at_management_group.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') @@ -457,6 +463,7 @@ def get_at_management_group( return client_raw_response return deserialized + get_at_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -476,7 +483,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -521,6 +528,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions'} def list_built_in( self, custom_headers=None, raw=False, **operation_config): @@ -540,7 +548,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Authorization/policyDefinitions' + url = self.list_built_in.metadata['url'] # Construct parameters query_parameters = {} @@ -581,6 +589,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_built_in.metadata = {'url': '/providers/Microsoft.Authorization/policyDefinitions'} def list_by_management_group( self, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -603,7 +612,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions' + url = self.list_by_management_group.metadata['url'] path_format_arguments = { 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') } @@ -648,3 +657,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_assignments_operations.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_assignments_operations.py index 001b8adf94f2..3338ae8646b2 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_assignments_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_assignments_operations.py @@ -22,7 +22,7 @@ class PolicyAssignmentsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2017-06-01-preview". """ @@ -59,7 +59,7 @@ def delete( :class:`ErrorResponseException` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}' + url = self.delete.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -97,6 +97,7 @@ def delete( return client_raw_response return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'} def create( self, scope, policy_assignment_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -126,7 +127,7 @@ def create( :class:`ErrorResponseException` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}' + url = self.create.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -168,6 +169,7 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'} def get( self, scope, policy_assignment_name, custom_headers=None, raw=False, **operation_config): @@ -191,7 +193,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}' + url = self.get.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'policyAssignmentName': self._serialize.url("policy_assignment_name", policy_assignment_name, 'str') @@ -229,6 +231,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'} def list_for_resource_group( self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -254,7 +257,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments' + url = self.list_for_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -300,6 +303,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_for_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments'} def list_for_resource( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -339,7 +343,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments' + url = self.list_for_resource.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -389,6 +393,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_for_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments'} def list( self, filter=None, custom_headers=None, raw=False, **operation_config): @@ -411,7 +416,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -456,6 +461,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments'} def delete_by_id( self, policy_assignment_id, custom_headers=None, raw=False, **operation_config): @@ -485,7 +491,7 @@ def delete_by_id( :class:`ErrorResponseException` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.delete_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -522,6 +528,7 @@ def delete_by_id( return client_raw_response return deserialized + delete_by_id.metadata = {'url': '/{policyAssignmentId}'} def create_by_id( self, policy_assignment_id, parameters, custom_headers=None, raw=False, **operation_config): @@ -556,7 +563,7 @@ def create_by_id( :class:`ErrorResponseException` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.create_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -597,6 +604,7 @@ def create_by_id( return client_raw_response return deserialized + create_by_id.metadata = {'url': '/{policyAssignmentId}'} def get_by_id( self, policy_assignment_id, custom_headers=None, raw=False, **operation_config): @@ -626,7 +634,7 @@ def get_by_id( :class:`ErrorResponseException` """ # Construct URL - url = '/{policyAssignmentId}' + url = self.get_by_id.metadata['url'] path_format_arguments = { 'policyAssignmentId': self._serialize.url("policy_assignment_id", policy_assignment_id, 'str', skip_quote=True) } @@ -663,3 +671,4 @@ def get_by_id( return client_raw_response return deserialized + get_by_id.metadata = {'url': '/{policyAssignmentId}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_definitions_operations.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_definitions_operations.py index a35abe13f271..a34a22e9843b 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_definitions_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_definitions_operations.py @@ -22,7 +22,7 @@ class PolicyDefinitionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2016-12-01". """ @@ -59,7 +59,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -103,6 +103,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def delete( self, policy_definition_name, custom_headers=None, raw=False, **operation_config): @@ -121,7 +122,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -154,6 +155,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def get( self, policy_definition_name, custom_headers=None, raw=False, **operation_config): @@ -174,7 +176,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.get.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -214,6 +216,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def get_built_in( self, policy_definition_name, custom_headers=None, raw=False, **operation_config): @@ -234,7 +237,7 @@ def get_built_in( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.get_built_in.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str') } @@ -273,6 +276,7 @@ def get_built_in( return client_raw_response return deserialized + get_built_in.metadata = {'url': '/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def create_or_update_at_management_group( self, policy_definition_name, parameters, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -298,7 +302,7 @@ def create_or_update_at_management_group( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.create_or_update_at_management_group.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') @@ -342,6 +346,7 @@ def create_or_update_at_management_group( return client_raw_response return deserialized + create_or_update_at_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def delete_at_management_group( self, policy_definition_name, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -362,7 +367,7 @@ def delete_at_management_group( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.delete_at_management_group.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') @@ -395,6 +400,7 @@ def delete_at_management_group( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_at_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def get_at_management_group( self, policy_definition_name, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -417,7 +423,7 @@ def get_at_management_group( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + url = self.get_at_management_group.metadata['url'] path_format_arguments = { 'policyDefinitionName': self._serialize.url("policy_definition_name", policy_definition_name, 'str'), 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') @@ -457,6 +463,7 @@ def get_at_management_group( return client_raw_response return deserialized + get_at_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -476,7 +483,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -521,6 +528,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions'} def list_built_in( self, custom_headers=None, raw=False, **operation_config): @@ -540,7 +548,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Authorization/policyDefinitions' + url = self.list_built_in.metadata['url'] # Construct parameters query_parameters = {} @@ -581,6 +589,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_built_in.metadata = {'url': '/providers/Microsoft.Authorization/policyDefinitions'} def list_by_management_group( self, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -603,7 +612,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions' + url = self.list_by_management_group.metadata['url'] path_format_arguments = { 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') } @@ -648,3 +657,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_set_definitions_operations.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_set_definitions_operations.py index 10e186f8151d..d00bce89f40d 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_set_definitions_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_set_definitions_operations.py @@ -21,7 +21,7 @@ class PolicySetDefinitionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2017-06-01-preview". """ @@ -59,7 +59,7 @@ def create_or_update( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'policySetDefinitionName': self._serialize.url("policy_set_definition_name", policy_set_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -103,6 +103,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}'} def delete( self, policy_set_definition_name, custom_headers=None, raw=False, **operation_config): @@ -122,7 +123,7 @@ def delete( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'policySetDefinitionName': self._serialize.url("policy_set_definition_name", policy_set_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -153,6 +154,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}'} def get( self, policy_set_definition_name, custom_headers=None, raw=False, **operation_config): @@ -174,7 +176,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}' + url = self.get.metadata['url'] path_format_arguments = { 'policySetDefinitionName': self._serialize.url("policy_set_definition_name", policy_set_definition_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -212,6 +214,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}'} def get_built_in( self, policy_set_definition_name, custom_headers=None, raw=False, **operation_config): @@ -233,7 +236,7 @@ def get_built_in( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}' + url = self.get_built_in.metadata['url'] path_format_arguments = { 'policySetDefinitionName': self._serialize.url("policy_set_definition_name", policy_set_definition_name, 'str') } @@ -270,6 +273,7 @@ def get_built_in( return client_raw_response return deserialized + get_built_in.metadata = {'url': '/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -290,7 +294,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -333,6 +337,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions'} def list_built_in( self, custom_headers=None, raw=False, **operation_config): @@ -353,7 +358,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Authorization/policySetDefinitions' + url = self.list_built_in.metadata['url'] # Construct parameters query_parameters = {} @@ -392,6 +397,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_built_in.metadata = {'url': '/providers/Microsoft.Authorization/policySetDefinitions'} def create_or_update_at_management_group( self, policy_set_definition_name, parameters, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -418,7 +424,7 @@ def create_or_update_at_management_group( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}' + url = self.create_or_update_at_management_group.metadata['url'] path_format_arguments = { 'policySetDefinitionName': self._serialize.url("policy_set_definition_name", policy_set_definition_name, 'str'), 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') @@ -462,6 +468,7 @@ def create_or_update_at_management_group( return client_raw_response return deserialized + create_or_update_at_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}'} def delete_at_management_group( self, policy_set_definition_name, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -483,7 +490,7 @@ def delete_at_management_group( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}' + url = self.delete_at_management_group.metadata['url'] path_format_arguments = { 'policySetDefinitionName': self._serialize.url("policy_set_definition_name", policy_set_definition_name, 'str'), 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') @@ -514,6 +521,7 @@ def delete_at_management_group( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_at_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}'} def get_at_management_group( self, policy_set_definition_name, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -537,7 +545,7 @@ def get_at_management_group( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}' + url = self.get_at_management_group.metadata['url'] path_format_arguments = { 'policySetDefinitionName': self._serialize.url("policy_set_definition_name", policy_set_definition_name, 'str'), 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') @@ -575,6 +583,7 @@ def get_at_management_group( return client_raw_response return deserialized + get_at_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}'} def list_by_management_group( self, management_group_id, custom_headers=None, raw=False, **operation_config): @@ -598,7 +607,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions' + url = self.list_by_management_group.metadata['url'] path_format_arguments = { 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') } @@ -641,3 +650,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/deployment_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/deployment_operations.py index 1a6e6bb5911b..fee524c2ee5f 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/deployment_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/deployment_operations.py @@ -22,7 +22,7 @@ class DeploymentOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-02-01". """ @@ -60,7 +60,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), @@ -102,6 +102,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}'} def list( self, resource_group_name, deployment_name, top=None, custom_headers=None, raw=False, **operation_config): @@ -128,7 +129,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations' + url = self.list.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), @@ -177,3 +178,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/deployments_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/deployments_operations.py index 10152f69d972..868d350bd3b8 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/deployments_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/deployments_operations.py @@ -24,7 +24,7 @@ class DeploymentsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-02-01". """ @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), @@ -137,6 +137,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def check_existence( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -157,7 +158,7 @@ def check_existence( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.check_existence.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), @@ -193,6 +194,7 @@ def check_existence( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def _create_or_update_initial( @@ -200,7 +202,7 @@ def _create_or_update_initial( parameters = models.Deployment(properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), @@ -316,6 +318,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def get( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -338,7 +341,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), @@ -379,6 +382,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def cancel( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -399,7 +403,7 @@ def cancel( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel' + url = self.cancel.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), @@ -433,6 +437,7 @@ def cancel( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel'} def validate( self, resource_group_name, deployment_name, properties=None, custom_headers=None, raw=False, **operation_config): @@ -460,7 +465,7 @@ def validate( parameters = models.Deployment(properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate' + url = self.validate.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), @@ -507,6 +512,7 @@ def validate( return client_raw_response return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate'} def export_template( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -529,7 +535,7 @@ def export_template( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate' + url = self.export_template.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), @@ -570,6 +576,7 @@ def export_template( return client_raw_response return deserialized + export_template.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate'} def list( self, resource_group_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config): @@ -597,7 +604,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/' + url = self.list.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -647,3 +654,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/providers_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/providers_operations.py index 742a74358fb3..d31a55392def 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/providers_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/providers_operations.py @@ -22,7 +22,7 @@ class ProvidersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-02-01". """ @@ -55,7 +55,7 @@ def unregister( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister' + url = self.unregister.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -95,6 +95,7 @@ def unregister( return client_raw_response return deserialized + unregister.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister'} def register( self, resource_provider_namespace, custom_headers=None, raw=False, **operation_config): @@ -114,7 +115,7 @@ def register( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register' + url = self.register.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -154,6 +155,7 @@ def register( return client_raw_response return deserialized + register.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register'} def list( self, top=None, expand=None, custom_headers=None, raw=False, **operation_config): @@ -179,7 +181,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -228,6 +230,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers'} def get( self, resource_provider_namespace, expand=None, custom_headers=None, raw=False, **operation_config): @@ -250,7 +253,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -292,3 +295,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/resource_groups_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/resource_groups_operations.py index 92b570e4ad4b..65f11a23e74f 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/resource_groups_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/resource_groups_operations.py @@ -24,7 +24,7 @@ class ResourceGroupsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-02-01". """ @@ -67,7 +67,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources' + url = self.list_resources.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -119,6 +119,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} def check_existence( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -137,7 +138,7 @@ def check_existence( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.check_existence.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -172,6 +173,7 @@ def check_existence( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def create_or_update( self, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -196,7 +198,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -242,12 +244,13 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def _delete_initial( self, resource_group_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -337,6 +340,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def get( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -357,7 +361,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -397,6 +401,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def patch( self, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -424,7 +429,7 @@ def patch( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.patch.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -468,6 +473,7 @@ def patch( return client_raw_response return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def export_template( self, resource_group_name, resources=None, options=None, custom_headers=None, raw=False, **operation_config): @@ -498,7 +504,7 @@ def export_template( parameters = models.ExportTemplateRequest(resources=resources, options=options) # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate' + url = self.export_template.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -542,6 +548,7 @@ def export_template( return client_raw_response return deserialized + export_template.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate'} def list( self, filter=None, top=None, custom_headers=None, raw=False, **operation_config): @@ -566,7 +573,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -615,3 +622,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/resources_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/resources_operations.py index 528db23300e8..f75ad84f5d05 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/resources_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/resources_operations.py @@ -24,7 +24,7 @@ class ResourcesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-02-01". """ @@ -45,7 +45,7 @@ def _move_resources_initial( parameters = models.ResourcesMoveInfo(resources=resources, target_resource_group=target_resource_group) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources' + url = self.move_resources.metadata['url'] path_format_arguments = { 'sourceResourceGroupName': self._serialize.url("source_resource_group_name", source_resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -145,6 +145,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + move_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources'} def list( self, filter=None, expand=None, top=None, custom_headers=None, raw=False, **operation_config): @@ -171,7 +172,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resources' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -222,6 +223,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} def check_existence( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): @@ -250,7 +252,7 @@ def check_existence( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.check_existence.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -289,6 +291,7 @@ def check_existence( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def delete( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): @@ -317,7 +320,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -354,6 +357,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def create_or_update( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers=None, raw=False, **operation_config): @@ -387,7 +391,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -437,12 +441,13 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def _update_initial( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -572,6 +577,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def get( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): @@ -602,7 +608,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -646,3 +652,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/tags_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/tags_operations.py index 1dcc4c0339d5..5b1cece54254 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/tags_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/tags_operations.py @@ -22,7 +22,7 @@ class TagsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-02-01". """ @@ -55,7 +55,7 @@ def delete_value( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}' + url = self.delete_value.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'tagValue': self._serialize.url("tag_value", tag_value, 'str'), @@ -89,6 +89,7 @@ def delete_value( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_value.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}'} def create_or_update_value( self, tag_name, tag_value, custom_headers=None, raw=False, **operation_config): @@ -109,7 +110,7 @@ def create_or_update_value( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}' + url = self.create_or_update_value.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'tagValue': self._serialize.url("tag_value", tag_value, 'str'), @@ -152,6 +153,7 @@ def create_or_update_value( return client_raw_response return deserialized + create_or_update_value.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}'} def create_or_update( self, tag_name, custom_headers=None, raw=False, **operation_config): @@ -170,7 +172,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -212,6 +214,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}'} def delete( self, tag_name, custom_headers=None, raw=False, **operation_config): @@ -229,7 +232,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}' + url = self.delete.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -262,6 +265,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -281,7 +285,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -326,3 +330,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/deployment_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/deployment_operations.py index d35cc2414055..4ed26e30a340 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/deployment_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/deployment_operations.py @@ -22,7 +22,7 @@ class DeploymentOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2016-09-01". """ @@ -60,7 +60,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -102,6 +102,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}'} def list( self, resource_group_name, deployment_name, top=None, custom_headers=None, raw=False, **operation_config): @@ -129,7 +130,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations' + url = self.list.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -178,3 +179,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/deployments_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/deployments_operations.py index eba1446a9e73..473dc3ab491c 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/deployments_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/deployments_operations.py @@ -24,7 +24,7 @@ class DeploymentsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2016-09-01". """ @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -149,6 +149,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def check_existence( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -169,7 +170,7 @@ def check_existence( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.check_existence.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -205,6 +206,7 @@ def check_existence( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def _create_or_update_initial( @@ -212,7 +214,7 @@ def _create_or_update_initial( parameters = models.Deployment(properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -332,6 +334,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def get( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -354,7 +357,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -395,6 +398,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def cancel( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -421,7 +425,7 @@ def cancel( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel' + url = self.cancel.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -455,6 +459,7 @@ def cancel( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel'} def validate( self, resource_group_name, deployment_name, properties, custom_headers=None, raw=False, **operation_config): @@ -483,7 +488,7 @@ def validate( parameters = models.Deployment(properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate' + url = self.validate.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -530,6 +535,7 @@ def validate( return client_raw_response return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate'} def export_template( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -553,7 +559,7 @@ def export_template( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate' + url = self.export_template.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -594,6 +600,7 @@ def export_template( return client_raw_response return deserialized + export_template.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate'} def list( self, resource_group_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config): @@ -622,7 +629,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/' + url = self.list.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -672,3 +679,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/providers_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/providers_operations.py index 0c156906a95f..02c3ae0ac126 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/providers_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/providers_operations.py @@ -22,7 +22,7 @@ class ProvidersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2016-09-01". """ @@ -55,7 +55,7 @@ def unregister( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister' + url = self.unregister.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -95,6 +95,7 @@ def unregister( return client_raw_response return deserialized + unregister.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister'} def register( self, resource_provider_namespace, custom_headers=None, raw=False, **operation_config): @@ -114,7 +115,7 @@ def register( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register' + url = self.register.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -154,6 +155,7 @@ def register( return client_raw_response return deserialized + register.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register'} def list( self, top=None, expand=None, custom_headers=None, raw=False, **operation_config): @@ -181,7 +183,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -230,6 +232,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers'} def get( self, resource_provider_namespace, expand=None, custom_headers=None, raw=False, **operation_config): @@ -252,7 +255,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -294,3 +297,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/resource_groups_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/resource_groups_operations.py index 15781bf6e187..2f335eaeee56 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/resource_groups_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/resource_groups_operations.py @@ -24,7 +24,7 @@ class ResourceGroupsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2016-09-01". """ @@ -67,7 +67,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources' + url = self.list_resources.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -119,6 +119,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} def check_existence( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -137,7 +138,7 @@ def check_existence( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.check_existence.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -172,6 +173,7 @@ def check_existence( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def create_or_update( self, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -196,7 +198,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -242,12 +244,13 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def _delete_initial( self, resource_group_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -341,6 +344,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def get( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -361,7 +365,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -401,6 +405,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def patch( self, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -429,7 +434,7 @@ def patch( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.patch.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -473,6 +478,7 @@ def patch( return client_raw_response return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def export_template( self, resource_group_name, resources=None, options=None, custom_headers=None, raw=False, **operation_config): @@ -503,7 +509,7 @@ def export_template( parameters = models.ExportTemplateRequest(resources=resources, options=options) # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate' + url = self.export_template.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -547,6 +553,7 @@ def export_template( return client_raw_response return deserialized + export_template.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate'} def list( self, filter=None, top=None, custom_headers=None, raw=False, **operation_config): @@ -571,7 +578,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -620,3 +627,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/resources_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/resources_operations.py index d17c35213bc0..473a720a6e57 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/resources_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/resources_operations.py @@ -24,7 +24,7 @@ class ResourcesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2016-09-01". """ @@ -45,7 +45,7 @@ def _move_resources_initial( parameters = models.ResourcesMoveInfo(resources=resources, target_resource_group=target_resource_group) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources' + url = self.move_resources.metadata['url'] path_format_arguments = { 'sourceResourceGroupName': self._serialize.url("source_resource_group_name", source_resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -151,6 +151,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + move_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources'} def list( self, filter=None, expand=None, top=None, custom_headers=None, raw=False, **operation_config): @@ -177,7 +178,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resources' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -228,6 +229,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} def check_existence( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): @@ -258,7 +260,7 @@ def check_existence( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.check_existence.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -297,12 +299,13 @@ def check_existence( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def _delete_initial( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -412,12 +415,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def _create_or_update_initial( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -549,12 +553,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def _update_initial( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -684,6 +689,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def get( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): @@ -715,7 +721,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -759,6 +765,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def check_existence_by_id( self, resource_id, api_version, custom_headers=None, raw=False, **operation_config): @@ -780,7 +787,7 @@ def check_existence_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{resourceId}' + url = self.check_existence_by_id.metadata['url'] path_format_arguments = { 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) } @@ -814,12 +821,13 @@ def check_existence_by_id( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_existence_by_id.metadata = {'url': '/{resourceId}'} def _delete_by_id_initial( self, resource_id, api_version, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/{resourceId}' + url = self.delete_by_id.metadata['url'] path_format_arguments = { 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) } @@ -912,12 +920,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete_by_id.metadata = {'url': '/{resourceId}'} def _create_or_update_by_id_initial( self, resource_id, api_version, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/{resourceId}' + url = self.create_or_update_by_id.metadata['url'] path_format_arguments = { 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) } @@ -1032,12 +1041,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create_or_update_by_id.metadata = {'url': '/{resourceId}'} def _update_by_id_initial( self, resource_id, api_version, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/{resourceId}' + url = self.update_by_id.metadata['url'] path_format_arguments = { 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) } @@ -1150,6 +1160,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + update_by_id.metadata = {'url': '/{resourceId}'} def get_by_id( self, resource_id, api_version, custom_headers=None, raw=False, **operation_config): @@ -1173,7 +1184,7 @@ def get_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{resourceId}' + url = self.get_by_id.metadata['url'] path_format_arguments = { 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) } @@ -1212,3 +1223,4 @@ def get_by_id( return client_raw_response return deserialized + get_by_id.metadata = {'url': '/{resourceId}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/tags_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/tags_operations.py index 3c7bfea723bd..2386cdcfed9b 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/tags_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/tags_operations.py @@ -22,7 +22,7 @@ class TagsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2016-09-01". """ @@ -55,7 +55,7 @@ def delete_value( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}' + url = self.delete_value.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'tagValue': self._serialize.url("tag_value", tag_value, 'str'), @@ -89,6 +89,7 @@ def delete_value( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_value.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}'} def create_or_update_value( self, tag_name, tag_value, custom_headers=None, raw=False, **operation_config): @@ -109,7 +110,7 @@ def create_or_update_value( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}' + url = self.create_or_update_value.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'tagValue': self._serialize.url("tag_value", tag_value, 'str'), @@ -152,6 +153,7 @@ def create_or_update_value( return client_raw_response return deserialized + create_or_update_value.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}'} def create_or_update( self, tag_name, custom_headers=None, raw=False, **operation_config): @@ -174,7 +176,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -216,6 +218,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}'} def delete( self, tag_name, custom_headers=None, raw=False, **operation_config): @@ -236,7 +239,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}' + url = self.delete.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -269,6 +272,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -289,7 +293,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -334,3 +338,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/deployment_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/deployment_operations.py index ee04909a24dd..054df317785e 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/deployment_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/deployment_operations.py @@ -22,7 +22,7 @@ class DeploymentOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2017-05-10". """ @@ -60,7 +60,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -102,6 +102,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}'} def list( self, resource_group_name, deployment_name, top=None, custom_headers=None, raw=False, **operation_config): @@ -129,7 +130,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations' + url = self.list.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -178,3 +179,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/deployments_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/deployments_operations.py index 0a3eed9cfd72..4fe757a41efc 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/deployments_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/deployments_operations.py @@ -24,7 +24,7 @@ class DeploymentsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2017-05-10". """ @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -149,6 +149,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def check_existence( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -169,7 +170,7 @@ def check_existence( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.check_existence.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -205,6 +206,7 @@ def check_existence( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def _create_or_update_initial( @@ -212,7 +214,7 @@ def _create_or_update_initial( parameters = models.Deployment(properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -332,6 +334,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def get( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -354,7 +357,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -395,6 +398,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} def cancel( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -421,7 +425,7 @@ def cancel( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel' + url = self.cancel.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -455,6 +459,7 @@ def cancel( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel'} def validate( self, resource_group_name, deployment_name, properties, custom_headers=None, raw=False, **operation_config): @@ -483,7 +488,7 @@ def validate( parameters = models.Deployment(properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate' + url = self.validate.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -530,6 +535,7 @@ def validate( return client_raw_response return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate'} def export_template( self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): @@ -553,7 +559,7 @@ def export_template( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate' + url = self.export_template.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -594,6 +600,7 @@ def export_template( return client_raw_response return deserialized + export_template.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate'} def list_by_resource_group( self, resource_group_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config): @@ -622,7 +629,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -672,3 +679,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/providers_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/providers_operations.py index 1f11681e6d5f..9e9790970806 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/providers_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/providers_operations.py @@ -22,7 +22,7 @@ class ProvidersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2017-05-10". """ @@ -55,7 +55,7 @@ def unregister( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister' + url = self.unregister.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -95,6 +95,7 @@ def unregister( return client_raw_response return deserialized + unregister.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister'} def register( self, resource_provider_namespace, custom_headers=None, raw=False, **operation_config): @@ -114,7 +115,7 @@ def register( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register' + url = self.register.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -154,6 +155,7 @@ def register( return client_raw_response return deserialized + register.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register'} def list( self, top=None, expand=None, custom_headers=None, raw=False, **operation_config): @@ -181,7 +183,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -230,6 +232,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers'} def get( self, resource_provider_namespace, expand=None, custom_headers=None, raw=False, **operation_config): @@ -252,7 +255,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -294,3 +297,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/resource_groups_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/resource_groups_operations.py index 8f97b51a9a38..78fe91152e55 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/resource_groups_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/resource_groups_operations.py @@ -24,7 +24,7 @@ class ResourceGroupsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2017-05-10". """ @@ -56,7 +56,7 @@ def check_existence( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.check_existence.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -91,6 +91,7 @@ def check_existence( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def create_or_update( self, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -115,7 +116,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -161,12 +162,13 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def _delete_initial( self, resource_group_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -260,6 +262,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def get( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -280,7 +283,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -320,6 +323,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def update( self, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -348,7 +352,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -392,6 +396,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} def export_template( self, resource_group_name, resources=None, options=None, custom_headers=None, raw=False, **operation_config): @@ -422,7 +427,7 @@ def export_template( parameters = models.ExportTemplateRequest(resources=resources, options=options) # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate' + url = self.export_template.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -466,6 +471,7 @@ def export_template( return client_raw_response return deserialized + export_template.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate'} def list( self, filter=None, top=None, custom_headers=None, raw=False, **operation_config): @@ -490,7 +496,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -539,3 +545,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/resources_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/resources_operations.py index 95b9449f7e6a..db6363e89600 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/resources_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/resources_operations.py @@ -24,7 +24,7 @@ class ResourcesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2017-05-10". """ @@ -67,7 +67,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -119,6 +119,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} def _move_resources_initial( @@ -126,7 +127,7 @@ def _move_resources_initial( parameters = models.ResourcesMoveInfo(resources=resources, target_resource_group=target_resource_group) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources' + url = self.move_resources.metadata['url'] path_format_arguments = { 'sourceResourceGroupName': self._serialize.url("source_resource_group_name", source_resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -232,6 +233,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + move_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources'} def _validate_move_resources_initial( @@ -239,7 +241,7 @@ def _validate_move_resources_initial( parameters = models.ResourcesMoveInfo(resources=resources, target_resource_group=target_resource_group) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/validateMoveResources' + url = self.validate_move_resources.metadata['url'] path_format_arguments = { 'sourceResourceGroupName': self._serialize.url("source_resource_group_name", source_resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -348,6 +350,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + validate_move_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/validateMoveResources'} def list( self, filter=None, expand=None, top=None, custom_headers=None, raw=False, **operation_config): @@ -374,7 +377,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resources' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -425,6 +428,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} def check_existence( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): @@ -455,7 +459,7 @@ def check_existence( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.check_existence.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -494,12 +498,13 @@ def check_existence( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def _delete_initial( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -609,12 +614,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def _create_or_update_initial( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -746,12 +752,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def _update_initial( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -881,6 +888,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def get( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): @@ -912,7 +920,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), @@ -956,6 +964,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} def check_existence_by_id( self, resource_id, api_version, custom_headers=None, raw=False, **operation_config): @@ -977,7 +986,7 @@ def check_existence_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{resourceId}' + url = self.check_existence_by_id.metadata['url'] path_format_arguments = { 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) } @@ -1011,12 +1020,13 @@ def check_existence_by_id( client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_existence_by_id.metadata = {'url': '/{resourceId}'} def _delete_by_id_initial( self, resource_id, api_version, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/{resourceId}' + url = self.delete_by_id.metadata['url'] path_format_arguments = { 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) } @@ -1109,12 +1119,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete_by_id.metadata = {'url': '/{resourceId}'} def _create_or_update_by_id_initial( self, resource_id, api_version, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/{resourceId}' + url = self.create_or_update_by_id.metadata['url'] path_format_arguments = { 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) } @@ -1229,12 +1240,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create_or_update_by_id.metadata = {'url': '/{resourceId}'} def _update_by_id_initial( self, resource_id, api_version, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/{resourceId}' + url = self.update_by_id.metadata['url'] path_format_arguments = { 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) } @@ -1347,6 +1359,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + update_by_id.metadata = {'url': '/{resourceId}'} def get_by_id( self, resource_id, api_version, custom_headers=None, raw=False, **operation_config): @@ -1370,7 +1383,7 @@ def get_by_id( :raises: :class:`CloudError` """ # Construct URL - url = '/{resourceId}' + url = self.get_by_id.metadata['url'] path_format_arguments = { 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) } @@ -1409,3 +1422,4 @@ def get_by_id( return client_raw_response return deserialized + get_by_id.metadata = {'url': '/{resourceId}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/tags_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/tags_operations.py index 0bcef4fe6853..7833bf78047a 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/tags_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/tags_operations.py @@ -22,7 +22,7 @@ class TagsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for this operation. Constant value: "2017-05-10". """ @@ -55,7 +55,7 @@ def delete_value( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}' + url = self.delete_value.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'tagValue': self._serialize.url("tag_value", tag_value, 'str'), @@ -89,6 +89,7 @@ def delete_value( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_value.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}'} def create_or_update_value( self, tag_name, tag_value, custom_headers=None, raw=False, **operation_config): @@ -109,7 +110,7 @@ def create_or_update_value( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}' + url = self.create_or_update_value.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'tagValue': self._serialize.url("tag_value", tag_value, 'str'), @@ -152,6 +153,7 @@ def create_or_update_value( return client_raw_response return deserialized + create_or_update_value.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}'} def create_or_update( self, tag_name, custom_headers=None, raw=False, **operation_config): @@ -174,7 +176,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -216,6 +218,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}'} def delete( self, tag_name, custom_headers=None, raw=False, **operation_config): @@ -236,7 +239,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames/{tagName}' + url = self.delete.metadata['url'] path_format_arguments = { 'tagName': self._serialize.url("tag_name", tag_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -269,6 +272,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -289,7 +293,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/tagNames' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -334,3 +338,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/subscriptions_operations.py b/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/subscriptions_operations.py index e6e8484f2922..e48f00643a03 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/subscriptions_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/subscriptions_operations.py @@ -22,7 +22,7 @@ class SubscriptionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2016-06-01". """ @@ -61,7 +61,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/locations' + url = self.list_locations.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') } @@ -106,6 +106,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_locations.metadata = {'url': '/subscriptions/{subscriptionId}/locations'} def get( self, subscription_id, custom_headers=None, raw=False, **operation_config): @@ -125,7 +126,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') } @@ -164,6 +165,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -183,7 +185,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -224,3 +226,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/tenants_operations.py b/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/tenants_operations.py index 0f4c6d259e84..3d01811a9005 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/tenants_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/tenants_operations.py @@ -22,7 +22,7 @@ class TenantsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the operation. Constant value: "2016-06-01". """ @@ -55,7 +55,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/tenants' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -96,3 +96,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/tenants'} From 23f9ee52a570f73bf977c39cb7471b675b5e1394 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 7 Mar 2018 16:47:13 -0800 Subject: [PATCH 2/4] [AutoPR resources/resource-manager] Add on error deployment ARM (#2084) * Generated from fb5bfbc0054cc881ceccb498444bf2201fa2b8a4 Update readme.md file * Generated from 14856524df1f832625ce8f5626a11bd866896301 Add provisioning state for the on error deployment --- .../resources/resource_management_client.py | 22 + .../resources/v2018_02_01/__init__.py | 18 + .../resources/v2018_02_01/models/__init__.py | 116 ++ .../v2018_02_01/models/alias_path_type.py | 32 + .../v2018_02_01/models/alias_type.py | 33 + .../v2018_02_01/models/basic_dependency.py | 36 + .../v2018_02_01/models/debug_setting.py | 34 + .../v2018_02_01/models/dependency.py | 41 + .../v2018_02_01/models/deployment.py | 33 + .../models/deployment_export_result.py | 28 + .../v2018_02_01/models/deployment_extended.py | 41 + .../models/deployment_extended_filter.py | 28 + .../models/deployment_extended_paged.py | 27 + .../models/deployment_operation.py | 45 + .../models/deployment_operation_paged.py | 27 + .../models/deployment_operation_properties.py | 73 + .../models/deployment_properties.py | 78 + .../models/deployment_properties_extended.py | 98 ++ .../models/deployment_validate_result.py | 34 + .../models/export_template_request.py | 36 + .../v2018_02_01/models/generic_resource.py | 73 + .../models/generic_resource_filter.py | 36 + .../models/generic_resource_paged.py | 27 + .../v2018_02_01/models/http_message.py | 28 + .../resources/v2018_02_01/models/identity.py | 45 + .../v2018_02_01/models/on_error_deployment.py | 35 + .../models/on_error_deployment_extended.py | 47 + .../v2018_02_01/models/parameters_link.py | 37 + .../resources/v2018_02_01/models/plan.py | 44 + .../resources/v2018_02_01/models/provider.py | 50 + .../v2018_02_01/models/provider_paged.py | 27 + .../models/provider_resource_type.py | 46 + .../resources/v2018_02_01/models/resource.py | 53 + .../v2018_02_01/models/resource_group.py | 60 + .../models/resource_group_export_result.py | 33 + .../models/resource_group_filter.py | 32 + .../models/resource_group_paged.py | 27 + .../models/resource_group_patchable.py | 42 + .../models/resource_group_properties.py | 35 + .../resource_management_client_enums.py | 29 + .../resource_management_error_with_details.py | 51 + ...e_provider_operation_display_properties.py | 44 + .../v2018_02_01/models/resources_move_info.py | 32 + .../resources/v2018_02_01/models/sku.py | 48 + .../v2018_02_01/models/sub_resource.py | 28 + .../resources/v2018_02_01/models/tag_count.py | 32 + .../v2018_02_01/models/tag_details.py | 43 + .../v2018_02_01/models/tag_details_paged.py | 27 + .../resources/v2018_02_01/models/tag_value.py | 36 + .../v2018_02_01/models/target_resource.py | 36 + .../v2018_02_01/models/template_link.py | 37 + .../v2018_02_01/operations/__init__.py | 26 + .../operations/deployment_operations.py | 182 +++ .../operations/deployments_operations.py | 682 ++++++++ .../operations/providers_operations.py | 300 ++++ .../operations/resource_groups_operations.py | 548 +++++++ .../operations/resources_operations.py | 1425 +++++++++++++++++ .../v2018_02_01/operations/tags_operations.py | 341 ++++ .../v2018_02_01/resource_management_client.py | 106 ++ .../resource/resources/v2018_02_01/version.py | 13 + 60 files changed, 5723 insertions(+) create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/__init__.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/alias_path_type.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/alias_type.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/basic_dependency.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/debug_setting.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/dependency.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_export_result.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended_filter.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended_paged.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation_paged.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation_properties.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_properties.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_properties_extended.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_validate_result.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/export_template_request.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource_filter.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource_paged.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/http_message.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/identity.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/on_error_deployment.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/on_error_deployment_extended.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/parameters_link.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/plan.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider_paged.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider_resource_type.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_export_result.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_filter.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_paged.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_patchable.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_properties.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_client_enums.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_error_with_details.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_provider_operation_display_properties.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resources_move_info.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/sku.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/sub_resource.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_count.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_details.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_details_paged.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_value.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/target_resource.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/template_link.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/__init__.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/deployment_operations.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/deployments_operations.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/providers_operations.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/resource_groups_operations.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/resources_operations.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/tags_operations.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/resource_management_client.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/version.py diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/resource_management_client.py b/azure-mgmt-resource/azure/mgmt/resource/resources/resource_management_client.py index 64955ca43752..7951c0d5542b 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/resource_management_client.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/resource_management_client.py @@ -90,6 +90,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2016-02-01: :mod:`v2016_02_01.models` * 2016-09-01: :mod:`v2016_09_01.models` * 2017-05-10: :mod:`v2017_05_10.models` + * 2018-02-01: :mod:`v2018_02_01.models` """ if api_version == '2016-02-01': from .v2016_02_01 import models @@ -100,6 +101,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2017-05-10': from .v2017_05_10 import models return models + elif api_version == '2018-02-01': + from .v2018_02_01 import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) @property @@ -109,6 +113,7 @@ def deployment_operations(self): * 2016-02-01: :class:`DeploymentOperations` * 2016-09-01: :class:`DeploymentOperations` * 2017-05-10: :class:`DeploymentOperations` + * 2018-02-01: :class:`DeploymentOperations` """ api_version = self.profile.get('deployment_operations', self.api_version) if api_version == '2016-02-01': @@ -117,6 +122,8 @@ def deployment_operations(self): from .v2016_09_01.operations import DeploymentOperations as OperationClass elif api_version == '2017-05-10': from .v2017_05_10.operations import DeploymentOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import DeploymentOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -128,6 +135,7 @@ def deployments(self): * 2016-02-01: :class:`DeploymentsOperations` * 2016-09-01: :class:`DeploymentsOperations` * 2017-05-10: :class:`DeploymentsOperations` + * 2018-02-01: :class:`DeploymentsOperations` """ api_version = self.profile.get('deployments', self.api_version) if api_version == '2016-02-01': @@ -136,6 +144,8 @@ def deployments(self): from .v2016_09_01.operations import DeploymentsOperations as OperationClass elif api_version == '2017-05-10': from .v2017_05_10.operations import DeploymentsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import DeploymentsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -147,6 +157,7 @@ def providers(self): * 2016-02-01: :class:`ProvidersOperations` * 2016-09-01: :class:`ProvidersOperations` * 2017-05-10: :class:`ProvidersOperations` + * 2018-02-01: :class:`ProvidersOperations` """ api_version = self.profile.get('providers', self.api_version) if api_version == '2016-02-01': @@ -155,6 +166,8 @@ def providers(self): from .v2016_09_01.operations import ProvidersOperations as OperationClass elif api_version == '2017-05-10': from .v2017_05_10.operations import ProvidersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ProvidersOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -166,6 +179,7 @@ def resource_groups(self): * 2016-02-01: :class:`ResourceGroupsOperations` * 2016-09-01: :class:`ResourceGroupsOperations` * 2017-05-10: :class:`ResourceGroupsOperations` + * 2018-02-01: :class:`ResourceGroupsOperations` """ api_version = self.profile.get('resource_groups', self.api_version) if api_version == '2016-02-01': @@ -174,6 +188,8 @@ def resource_groups(self): from .v2016_09_01.operations import ResourceGroupsOperations as OperationClass elif api_version == '2017-05-10': from .v2017_05_10.operations import ResourceGroupsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ResourceGroupsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -185,6 +201,7 @@ def resources(self): * 2016-02-01: :class:`ResourcesOperations` * 2016-09-01: :class:`ResourcesOperations` * 2017-05-10: :class:`ResourcesOperations` + * 2018-02-01: :class:`ResourcesOperations` """ api_version = self.profile.get('resources', self.api_version) if api_version == '2016-02-01': @@ -193,6 +210,8 @@ def resources(self): from .v2016_09_01.operations import ResourcesOperations as OperationClass elif api_version == '2017-05-10': from .v2017_05_10.operations import ResourcesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ResourcesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -204,6 +223,7 @@ def tags(self): * 2016-02-01: :class:`TagsOperations` * 2016-09-01: :class:`TagsOperations` * 2017-05-10: :class:`TagsOperations` + * 2018-02-01: :class:`TagsOperations` """ api_version = self.profile.get('tags', self.api_version) if api_version == '2016-02-01': @@ -212,6 +232,8 @@ def tags(self): from .v2016_09_01.operations import TagsOperations as OperationClass elif api_version == '2017-05-10': from .v2017_05_10.operations import TagsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import TagsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/__init__.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/__init__.py new file mode 100644 index 000000000000..d2e3198e88e6 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_management_client import ResourceManagementClient +from .version import VERSION + +__all__ = ['ResourceManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py new file mode 100644 index 000000000000..65f602d7e7d2 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .deployment_extended_filter import DeploymentExtendedFilter +from .generic_resource_filter import GenericResourceFilter +from .resource_group_filter import ResourceGroupFilter +from .template_link import TemplateLink +from .parameters_link import ParametersLink +from .debug_setting import DebugSetting +from .on_error_deployment import OnErrorDeployment +from .deployment_properties import DeploymentProperties +from .deployment import Deployment +from .deployment_export_result import DeploymentExportResult +from .resource_management_error_with_details import ResourceManagementErrorWithDetails +from .alias_path_type import AliasPathType +from .alias_type import AliasType +from .provider_resource_type import ProviderResourceType +from .provider import Provider +from .basic_dependency import BasicDependency +from .dependency import Dependency +from .on_error_deployment_extended import OnErrorDeploymentExtended +from .deployment_properties_extended import DeploymentPropertiesExtended +from .deployment_validate_result import DeploymentValidateResult +from .deployment_extended import DeploymentExtended +from .plan import Plan +from .sku import Sku +from .identity import Identity +from .generic_resource import GenericResource +from .resource_group_properties import ResourceGroupProperties +from .resource_group import ResourceGroup +from .resource_group_patchable import ResourceGroupPatchable +from .resources_move_info import ResourcesMoveInfo +from .export_template_request import ExportTemplateRequest +from .tag_count import TagCount +from .tag_value import TagValue +from .tag_details import TagDetails +from .target_resource import TargetResource +from .http_message import HttpMessage +from .deployment_operation_properties import DeploymentOperationProperties +from .deployment_operation import DeploymentOperation +from .resource_provider_operation_display_properties import ResourceProviderOperationDisplayProperties +from .resource import Resource +from .sub_resource import SubResource +from .resource_group_export_result import ResourceGroupExportResult +from .deployment_extended_paged import DeploymentExtendedPaged +from .provider_paged import ProviderPaged +from .generic_resource_paged import GenericResourcePaged +from .resource_group_paged import ResourceGroupPaged +from .tag_details_paged import TagDetailsPaged +from .deployment_operation_paged import DeploymentOperationPaged +from .resource_management_client_enums import ( + DeploymentMode, + OnErrorDeploymentType, + ResourceIdentityType, +) + +__all__ = [ + 'DeploymentExtendedFilter', + 'GenericResourceFilter', + 'ResourceGroupFilter', + 'TemplateLink', + 'ParametersLink', + 'DebugSetting', + 'OnErrorDeployment', + 'DeploymentProperties', + 'Deployment', + 'DeploymentExportResult', + 'ResourceManagementErrorWithDetails', + 'AliasPathType', + 'AliasType', + 'ProviderResourceType', + 'Provider', + 'BasicDependency', + 'Dependency', + 'OnErrorDeploymentExtended', + 'DeploymentPropertiesExtended', + 'DeploymentValidateResult', + 'DeploymentExtended', + 'Plan', + 'Sku', + 'Identity', + 'GenericResource', + 'ResourceGroupProperties', + 'ResourceGroup', + 'ResourceGroupPatchable', + 'ResourcesMoveInfo', + 'ExportTemplateRequest', + 'TagCount', + 'TagValue', + 'TagDetails', + 'TargetResource', + 'HttpMessage', + 'DeploymentOperationProperties', + 'DeploymentOperation', + 'ResourceProviderOperationDisplayProperties', + 'Resource', + 'SubResource', + 'ResourceGroupExportResult', + 'DeploymentExtendedPaged', + 'ProviderPaged', + 'GenericResourcePaged', + 'ResourceGroupPaged', + 'TagDetailsPaged', + 'DeploymentOperationPaged', + 'DeploymentMode', + 'OnErrorDeploymentType', + 'ResourceIdentityType', +] diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/alias_path_type.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/alias_path_type.py new file mode 100644 index 000000000000..35ffbb1ca154 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/alias_path_type.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AliasPathType(Model): + """The type of the paths for alias. . + + :param path: The path of an alias. + :type path: str + :param api_versions: The API versions. + :type api_versions: list[str] + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + } + + def __init__(self, path=None, api_versions=None): + super(AliasPathType, self).__init__() + self.path = path + self.api_versions = api_versions diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/alias_type.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/alias_type.py new file mode 100644 index 000000000000..b0ad4f1967e0 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/alias_type.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AliasType(Model): + """The alias type. . + + :param name: The alias name. + :type name: str + :param paths: The paths for an alias. + :type paths: + list[~azure.mgmt.resource.resources.v2018_02_01.models.AliasPathType] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'paths': {'key': 'paths', 'type': '[AliasPathType]'}, + } + + def __init__(self, name=None, paths=None): + super(AliasType, self).__init__() + self.name = name + self.paths = paths diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/basic_dependency.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/basic_dependency.py new file mode 100644 index 000000000000..d16931dabd70 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/basic_dependency.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BasicDependency(Model): + """Deployment dependency information. + + :param id: The ID of the dependency. + :type id: str + :param resource_type: The dependency resource type. + :type resource_type: str + :param resource_name: The dependency resource name. + :type resource_name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + } + + def __init__(self, id=None, resource_type=None, resource_name=None): + super(BasicDependency, self).__init__() + self.id = id + self.resource_type = resource_type + self.resource_name = resource_name diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/debug_setting.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/debug_setting.py new file mode 100644 index 000000000000..e908a46b1c52 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/debug_setting.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DebugSetting(Model): + """DebugSetting. + + :param detail_level: Specifies the type of information to log for + debugging. The permitted values are none, requestContent, responseContent, + or both requestContent and responseContent separated by a comma. The + default is none. When setting this value, carefully consider the type of + information you are passing in during deployment. By logging information + about the request or response, you could potentially expose sensitive data + that is retrieved through the deployment operations. + :type detail_level: str + """ + + _attribute_map = { + 'detail_level': {'key': 'detailLevel', 'type': 'str'}, + } + + def __init__(self, detail_level=None): + super(DebugSetting, self).__init__() + self.detail_level = detail_level diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/dependency.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/dependency.py new file mode 100644 index 000000000000..bc860bcf2a04 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/dependency.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Dependency(Model): + """Deployment dependency information. + + :param depends_on: The list of dependencies. + :type depends_on: + list[~azure.mgmt.resource.resources.v2018_02_01.models.BasicDependency] + :param id: The ID of the dependency. + :type id: str + :param resource_type: The dependency resource type. + :type resource_type: str + :param resource_name: The dependency resource name. + :type resource_name: str + """ + + _attribute_map = { + 'depends_on': {'key': 'dependsOn', 'type': '[BasicDependency]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + } + + def __init__(self, depends_on=None, id=None, resource_type=None, resource_name=None): + super(Dependency, self).__init__() + self.depends_on = depends_on + self.id = id + self.resource_type = resource_type + self.resource_name = resource_name diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment.py new file mode 100644 index 000000000000..0911a5bb6c75 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Deployment(Model): + """Deployment operation parameters. + + :param properties: The deployment properties. + :type properties: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'DeploymentProperties'}, + } + + def __init__(self, properties): + super(Deployment, self).__init__() + self.properties = properties diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_export_result.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_export_result.py new file mode 100644 index 000000000000..8834a8cd1ccb --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_export_result.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeploymentExportResult(Model): + """The deployment export result. . + + :param template: The template content. + :type template: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + } + + def __init__(self, template=None): + super(DeploymentExportResult, self).__init__() + self.template = template diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended.py new file mode 100644 index 000000000000..17e781079a97 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeploymentExtended(Model): + """Deployment information. + + :param id: The ID of the deployment. + :type id: str + :param name: The name of the deployment. + :type name: str + :param properties: Deployment properties. + :type properties: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentPropertiesExtended + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'}, + } + + def __init__(self, name, id=None, properties=None): + super(DeploymentExtended, self).__init__() + self.id = id + self.name = name + self.properties = properties diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended_filter.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended_filter.py new file mode 100644 index 000000000000..45bb10fa20b0 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended_filter.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeploymentExtendedFilter(Model): + """Deployment filter. + + :param provisioning_state: The provisioning state. + :type provisioning_state: str + """ + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, provisioning_state=None): + super(DeploymentExtendedFilter, self).__init__() + self.provisioning_state = provisioning_state diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended_paged.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended_paged.py new file mode 100644 index 000000000000..61a16fb15dff --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_extended_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DeploymentExtendedPaged(Paged): + """ + A paging container for iterating over a list of :class:`DeploymentExtended ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeploymentExtended]'} + } + + def __init__(self, *args, **kwargs): + + super(DeploymentExtendedPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation.py new file mode 100644 index 000000000000..d21434c2fa55 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeploymentOperation(Model): + """Deployment operation information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Full deployment operation ID. + :vartype id: str + :ivar operation_id: Deployment operation ID. + :vartype operation_id: str + :param properties: Deployment properties. + :type properties: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentOperationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'operation_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeploymentOperationProperties'}, + } + + def __init__(self, properties=None): + super(DeploymentOperation, self).__init__() + self.id = None + self.operation_id = None + self.properties = properties diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation_paged.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation_paged.py new file mode 100644 index 000000000000..443462fdfe33 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DeploymentOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`DeploymentOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeploymentOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(DeploymentOperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation_properties.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation_properties.py new file mode 100644 index 000000000000..0ee78f2f7f0c --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_operation_properties.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeploymentOperationProperties(Model): + """Deployment operation properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: The state of the provisioning. + :vartype provisioning_state: str + :ivar timestamp: The date and time of the operation. + :vartype timestamp: datetime + :ivar service_request_id: Deployment operation service request id. + :vartype service_request_id: str + :ivar status_code: Operation status code. + :vartype status_code: str + :ivar status_message: Operation status message. + :vartype status_message: object + :ivar target_resource: The target resource. + :vartype target_resource: + ~azure.mgmt.resource.resources.v2018_02_01.models.TargetResource + :ivar request: The HTTP request message. + :vartype request: + ~azure.mgmt.resource.resources.v2018_02_01.models.HttpMessage + :ivar response: The HTTP response message. + :vartype response: + ~azure.mgmt.resource.resources.v2018_02_01.models.HttpMessage + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'service_request_id': {'readonly': True}, + 'status_code': {'readonly': True}, + 'status_message': {'readonly': True}, + 'target_resource': {'readonly': True}, + 'request': {'readonly': True}, + 'response': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'service_request_id': {'key': 'serviceRequestId', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'object'}, + 'target_resource': {'key': 'targetResource', 'type': 'TargetResource'}, + 'request': {'key': 'request', 'type': 'HttpMessage'}, + 'response': {'key': 'response', 'type': 'HttpMessage'}, + } + + def __init__(self): + super(DeploymentOperationProperties, self).__init__() + self.provisioning_state = None + self.timestamp = None + self.service_request_id = None + self.status_code = None + self.status_message = None + self.target_resource = None + self.request = None + self.response = None diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_properties.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_properties.py new file mode 100644 index 000000000000..2992efe7d405 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_properties.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeploymentProperties(Model): + """Deployment properties. + + :param template: The template content. You use this element when you want + to pass the template syntax directly in the request rather than link to an + existing template. It can be a JObject or well-formed JSON string. Use + either the templateLink property or the template property, but not both. + :type template: object + :param template_link: The URI of the template. Use either the templateLink + property or the template property, but not both. + :type template_link: + ~azure.mgmt.resource.resources.v2018_02_01.models.TemplateLink + :param parameters: Name and value pairs that define the deployment + parameters for the template. You use this element when you want to provide + the parameter values directly in the request rather than link to an + existing parameter file. Use either the parametersLink property or the + parameters property, but not both. It can be a JObject or a well formed + JSON string. + :type parameters: object + :param parameters_link: The URI of parameters file. You use this element + to link to an existing parameters file. Use either the parametersLink + property or the parameters property, but not both. + :type parameters_link: + ~azure.mgmt.resource.resources.v2018_02_01.models.ParametersLink + :param mode: The mode that is used to deploy resources. This value can be + either Incremental or Complete. In Incremental mode, resources are + deployed without deleting existing resources that are not included in the + template. In Complete mode, resources are deployed and existing resources + in the resource group that are not included in the template are deleted. + Be careful when using Complete mode as you may unintentionally delete + resources. Possible values include: 'Incremental', 'Complete' + :type mode: str or + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentMode + :param debug_setting: The debug setting of the deployment. + :type debug_setting: + ~azure.mgmt.resource.resources.v2018_02_01.models.DebugSetting + :param on_error_deployment: The deployment on error behavior. + :type on_error_deployment: + ~azure.mgmt.resource.resources.v2018_02_01.models.OnErrorDeployment + """ + + _validation = { + 'mode': {'required': True}, + } + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'template_link': {'key': 'templateLink', 'type': 'TemplateLink'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'parameters_link': {'key': 'parametersLink', 'type': 'ParametersLink'}, + 'mode': {'key': 'mode', 'type': 'DeploymentMode'}, + 'debug_setting': {'key': 'debugSetting', 'type': 'DebugSetting'}, + 'on_error_deployment': {'key': 'onErrorDeployment', 'type': 'OnErrorDeployment'}, + } + + def __init__(self, mode, template=None, template_link=None, parameters=None, parameters_link=None, debug_setting=None, on_error_deployment=None): + super(DeploymentProperties, self).__init__() + self.template = template + self.template_link = template_link + self.parameters = parameters + self.parameters_link = parameters_link + self.mode = mode + self.debug_setting = debug_setting + self.on_error_deployment = on_error_deployment diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_properties_extended.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_properties_extended.py new file mode 100644 index 000000000000..9c6b35094661 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_properties_extended.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeploymentPropertiesExtended(Model): + """Deployment properties with additional details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: The state of the provisioning. + :vartype provisioning_state: str + :ivar correlation_id: The correlation ID of the deployment. + :vartype correlation_id: str + :ivar timestamp: The timestamp of the template deployment. + :vartype timestamp: datetime + :param outputs: Key/value pairs that represent deploymentoutput. + :type outputs: object + :param providers: The list of resource providers needed for the + deployment. + :type providers: + list[~azure.mgmt.resource.resources.v2018_02_01.models.Provider] + :param dependencies: The list of deployment dependencies. + :type dependencies: + list[~azure.mgmt.resource.resources.v2018_02_01.models.Dependency] + :param template: The template content. Use only one of Template or + TemplateLink. + :type template: object + :param template_link: The URI referencing the template. Use only one of + Template or TemplateLink. + :type template_link: + ~azure.mgmt.resource.resources.v2018_02_01.models.TemplateLink + :param parameters: Deployment parameters. Use only one of Parameters or + ParametersLink. + :type parameters: object + :param parameters_link: The URI referencing the parameters. Use only one + of Parameters or ParametersLink. + :type parameters_link: + ~azure.mgmt.resource.resources.v2018_02_01.models.ParametersLink + :param mode: The deployment mode. Possible values are Incremental and + Complete. Possible values include: 'Incremental', 'Complete' + :type mode: str or + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentMode + :param debug_setting: The debug setting of the deployment. + :type debug_setting: + ~azure.mgmt.resource.resources.v2018_02_01.models.DebugSetting + :param on_error_deployment: The deployment on error behavior. + :type on_error_deployment: + ~azure.mgmt.resource.resources.v2018_02_01.models.OnErrorDeploymentExtended + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'timestamp': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'outputs': {'key': 'outputs', 'type': 'object'}, + 'providers': {'key': 'providers', 'type': '[Provider]'}, + 'dependencies': {'key': 'dependencies', 'type': '[Dependency]'}, + 'template': {'key': 'template', 'type': 'object'}, + 'template_link': {'key': 'templateLink', 'type': 'TemplateLink'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'parameters_link': {'key': 'parametersLink', 'type': 'ParametersLink'}, + 'mode': {'key': 'mode', 'type': 'DeploymentMode'}, + 'debug_setting': {'key': 'debugSetting', 'type': 'DebugSetting'}, + 'on_error_deployment': {'key': 'onErrorDeployment', 'type': 'OnErrorDeploymentExtended'}, + } + + def __init__(self, outputs=None, providers=None, dependencies=None, template=None, template_link=None, parameters=None, parameters_link=None, mode=None, debug_setting=None, on_error_deployment=None): + super(DeploymentPropertiesExtended, self).__init__() + self.provisioning_state = None + self.correlation_id = None + self.timestamp = None + self.outputs = outputs + self.providers = providers + self.dependencies = dependencies + self.template = template + self.template_link = template_link + self.parameters = parameters + self.parameters_link = parameters_link + self.mode = mode + self.debug_setting = debug_setting + self.on_error_deployment = on_error_deployment diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_validate_result.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_validate_result.py new file mode 100644 index 000000000000..a5a9121538f5 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/deployment_validate_result.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeploymentValidateResult(Model): + """Information from validate template deployment response. + + :param error: Validation error. + :type error: + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceManagementErrorWithDetails + :param properties: The template deployment properties. + :type properties: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentPropertiesExtended + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ResourceManagementErrorWithDetails'}, + 'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'}, + } + + def __init__(self, error=None, properties=None): + super(DeploymentValidateResult, self).__init__() + self.error = error + self.properties = properties diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/export_template_request.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/export_template_request.py new file mode 100644 index 000000000000..d39261d5fb13 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/export_template_request.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExportTemplateRequest(Model): + """Export resource group template request parameters. + + :param resources: The IDs of the resources. The only supported string + currently is '*' (all resources). Future updates will support exporting + specific resources. + :type resources: list[str] + :param options: The export template options. Supported values include + 'IncludeParameterDefaultValue', 'IncludeComments' or + 'IncludeParameterDefaultValue, IncludeComments + :type options: str + """ + + _attribute_map = { + 'resources': {'key': 'resources', 'type': '[str]'}, + 'options': {'key': 'options', 'type': 'str'}, + } + + def __init__(self, resources=None, options=None): + super(ExportTemplateRequest, self).__init__() + self.resources = resources + self.options = options diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource.py new file mode 100644 index 000000000000..13cfcf5e8c3c --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 GenericResource(Resource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2018_02_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2018_02_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2018_02_01.models.Identity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + } + + _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}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + } + + def __init__(self, location=None, tags=None, plan=None, properties=None, kind=None, managed_by=None, sku=None, identity=None): + super(GenericResource, self).__init__(location=location, tags=tags) + self.plan = plan + self.properties = properties + self.kind = kind + self.managed_by = managed_by + self.sku = sku + self.identity = identity diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource_filter.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource_filter.py new file mode 100644 index 000000000000..a31e587e849a --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource_filter.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GenericResourceFilter(Model): + """Resource filter. + + :param resource_type: The resource type. + :type resource_type: str + :param tagname: The tag name. + :type tagname: str + :param tagvalue: The tag value. + :type tagvalue: str + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'tagname': {'key': 'tagname', 'type': 'str'}, + 'tagvalue': {'key': 'tagvalue', 'type': 'str'}, + } + + def __init__(self, resource_type=None, tagname=None, tagvalue=None): + super(GenericResourceFilter, self).__init__() + self.resource_type = resource_type + self.tagname = tagname + self.tagvalue = tagvalue diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource_paged.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource_paged.py new file mode 100644 index 000000000000..9a79d84888f6 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/generic_resource_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class GenericResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`GenericResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GenericResource]'} + } + + def __init__(self, *args, **kwargs): + + super(GenericResourcePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/http_message.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/http_message.py new file mode 100644 index 000000000000..f94eada2e8a3 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/http_message.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpMessage(Model): + """HTTP message. + + :param content: HTTP message content. + :type content: object + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'object'}, + } + + def __init__(self, content=None): + super(HttpMessage, self).__init__() + self.content = content diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/identity.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/identity.py new file mode 100644 index 000000000000..253a8dc02c24 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/identity.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, type=None): + super(Identity, self).__init__() + self.principal_id = None + self.tenant_id = None + self.type = type diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/on_error_deployment.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/on_error_deployment.py new file mode 100644 index 000000000000..a96ddd536a58 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/on_error_deployment.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OnErrorDeployment(Model): + """Deployment on error behavior. + + :param type: The deployment on error behavior type. Possible values are + LastSuccessful and SpecificDeployment. Possible values include: + 'LastSuccessful', 'SpecificDeployment' + :type type: str or + ~azure.mgmt.resource.resources.v2018_02_01.models.OnErrorDeploymentType + :param deployment_name: The deployment to be used on error case. + :type deployment_name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'OnErrorDeploymentType'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__(self, type=None, deployment_name=None): + super(OnErrorDeployment, self).__init__() + self.type = type + self.deployment_name = deployment_name diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/on_error_deployment_extended.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/on_error_deployment_extended.py new file mode 100644 index 000000000000..fdf1348d7d3c --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/on_error_deployment_extended.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OnErrorDeploymentExtended(Model): + """Deployment on error behavior with additional details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: The state of the provisioning for the on error + deployment. + :vartype provisioning_state: str + :param type: The deployment on error behavior type. Possible values are + LastSuccessful and SpecificDeployment. Possible values include: + 'LastSuccessful', 'SpecificDeployment' + :type type: str or + ~azure.mgmt.resource.resources.v2018_02_01.models.OnErrorDeploymentType + :param deployment_name: The deployment to be used on error case. + :type deployment_name: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'OnErrorDeploymentType'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__(self, type=None, deployment_name=None): + super(OnErrorDeploymentExtended, self).__init__() + self.provisioning_state = None + self.type = type + self.deployment_name = deployment_name diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/parameters_link.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/parameters_link.py new file mode 100644 index 000000000000..ca52e7df302c --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/parameters_link.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ParametersLink(Model): + """Entity representing the reference to the deployment paramaters. + + :param uri: The URI of the parameters file. + :type uri: str + :param content_version: If included, must match the ContentVersion in the + template. + :type content_version: str + """ + + _validation = { + 'uri': {'required': True}, + } + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + } + + def __init__(self, uri, content_version=None): + super(ParametersLink, self).__init__() + self.uri = uri + self.content_version = content_version diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/plan.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/plan.py new file mode 100644 index 000000000000..d915ea5bb3bd --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/plan.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Plan(Model): + """Plan for the resource. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: The offer ID. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + :param version: The plan's version. + :type version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, name=None, publisher=None, product=None, promotion_code=None, version=None): + super(Plan, self).__init__() + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + self.version = version diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider.py new file mode 100644 index 000000000000..5e6cf3cb35b5 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Provider(Model): + """Resource provider information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The provider ID. + :vartype id: str + :param namespace: The namespace of the resource provider. + :type namespace: str + :ivar registration_state: The registration state of the provider. + :vartype registration_state: str + :ivar resource_types: The collection of provider resource types. + :vartype resource_types: + list[~azure.mgmt.resource.resources.v2018_02_01.models.ProviderResourceType] + """ + + _validation = { + 'id': {'readonly': True}, + 'registration_state': {'readonly': True}, + 'resource_types': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'registration_state': {'key': 'registrationState', 'type': 'str'}, + 'resource_types': {'key': 'resourceTypes', 'type': '[ProviderResourceType]'}, + } + + def __init__(self, namespace=None): + super(Provider, self).__init__() + self.id = None + self.namespace = namespace + self.registration_state = None + self.resource_types = None diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider_paged.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider_paged.py new file mode 100644 index 000000000000..7a6abf6f944b --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ProviderPaged(Paged): + """ + A paging container for iterating over a list of :class:`Provider ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Provider]'} + } + + def __init__(self, *args, **kwargs): + + super(ProviderPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider_resource_type.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider_resource_type.py new file mode 100644 index 000000000000..ff5cc26565d4 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/provider_resource_type.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProviderResourceType(Model): + """Resource type managed by the resource provider. + + :param resource_type: The resource type. + :type resource_type: str + :param locations: The collection of locations where this resource type can + be created. + :type locations: list[str] + :param aliases: The aliases that are supported by this resource type. + :type aliases: + list[~azure.mgmt.resource.resources.v2018_02_01.models.AliasType] + :param api_versions: The API version. + :type api_versions: list[str] + :param properties: The properties. + :type properties: dict[str, str] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'aliases': {'key': 'aliases', 'type': '[AliasType]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, resource_type=None, locations=None, aliases=None, api_versions=None, properties=None): + super(ProviderResourceType, self).__init__() + self.resource_type = resource_type + self.locations = locations + self.aliases = aliases + self.api_versions = api_versions + self.properties = properties diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource.py new file mode 100644 index 000000000000..14a828e9001b --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location=None, tags=None): + super(Resource, self).__init__() + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group.py new file mode 100644 index 000000000000..198d05ef0a00 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceGroup(Model): + """Resource group information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource group. + :vartype id: str + :param name: The name of the resource group. + :type name: str + :param properties: + :type properties: + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroupProperties + :param location: The location of the resource group. It cannot be changed + after the resource group has been created. It must be one of the supported + Azure locations. + :type location: str + :param managed_by: The ID of the resource that manages this resource + group. + :type managed_by: str + :param tags: The tags attached to the resource group. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ResourceGroupProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, name=None, properties=None, managed_by=None, tags=None): + super(ResourceGroup, self).__init__() + self.id = None + self.name = name + self.properties = properties + self.location = location + self.managed_by = managed_by + self.tags = tags diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_export_result.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_export_result.py new file mode 100644 index 000000000000..d77a41b20087 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_export_result.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceGroupExportResult(Model): + """Resource group export result. + + :param template: The template content. + :type template: object + :param error: The error. + :type error: + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceManagementErrorWithDetails + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'error': {'key': 'error', 'type': 'ResourceManagementErrorWithDetails'}, + } + + def __init__(self, template=None, error=None): + super(ResourceGroupExportResult, self).__init__() + self.template = template + self.error = error diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_filter.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_filter.py new file mode 100644 index 000000000000..fa0011120785 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_filter.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceGroupFilter(Model): + """Resource group filter. + + :param tag_name: The tag name. + :type tag_name: str + :param tag_value: The tag value. + :type tag_value: str + """ + + _attribute_map = { + 'tag_name': {'key': 'tagName', 'type': 'str'}, + 'tag_value': {'key': 'tagValue', 'type': 'str'}, + } + + def __init__(self, tag_name=None, tag_value=None): + super(ResourceGroupFilter, self).__init__() + self.tag_name = tag_name + self.tag_value = tag_value diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_paged.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_paged.py new file mode 100644 index 000000000000..e3f4bf44e308 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ResourceGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceGroupPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_patchable.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_patchable.py new file mode 100644 index 000000000000..b7028e852899 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_patchable.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceGroupPatchable(Model): + """Resource group information. + + :param name: The name of the resource group. + :type name: str + :param properties: + :type properties: + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroupProperties + :param managed_by: The ID of the resource that manages this resource + group. + :type managed_by: str + :param tags: The tags attached to the resource group. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ResourceGroupProperties'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, name=None, properties=None, managed_by=None, tags=None): + super(ResourceGroupPatchable, self).__init__() + self.name = name + self.properties = properties + self.managed_by = managed_by + self.tags = tags diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_properties.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_properties.py new file mode 100644 index 000000000000..a6c35140c9d6 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_group_properties.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceGroupProperties(Model): + """The resource group properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self): + super(ResourceGroupProperties, self).__init__() + self.provisioning_state = None diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_client_enums.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_client_enums.py new file mode 100644 index 000000000000..fa9c8c732e6c --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_client_enums.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 DeploymentMode(Enum): + + incremental = "Incremental" + complete = "Complete" + + +class OnErrorDeploymentType(Enum): + + last_successful = "LastSuccessful" + specific_deployment = "SpecificDeployment" + + +class ResourceIdentityType(Enum): + + system_assigned = "SystemAssigned" diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_error_with_details.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_error_with_details.py new file mode 100644 index 000000000000..2fe367e9d98c --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_error_with_details.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceManagementErrorWithDetails(Model): + """The detailed error message of resource management. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code returned when exporting the template. + :vartype code: str + :ivar message: The error message describing the export error. + :vartype message: str + :ivar target: The target of the error. + :vartype target: str + :ivar details: Validation error. + :vartype details: + list[~azure.mgmt.resource.resources.v2018_02_01.models.ResourceManagementErrorWithDetails] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ResourceManagementErrorWithDetails]'}, + } + + def __init__(self): + super(ResourceManagementErrorWithDetails, self).__init__() + self.code = None + self.message = None + self.target = None + self.details = None diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_provider_operation_display_properties.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_provider_operation_display_properties.py new file mode 100644 index 000000000000..6a1f181d764a --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_provider_operation_display_properties.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceProviderOperationDisplayProperties(Model): + """Resource provider operation's display properties. + + :param publisher: Operation description. + :type publisher: str + :param provider: Operation provider. + :type provider: str + :param resource: Operation resource. + :type resource: str + :param operation: Operation. + :type operation: str + :param description: Operation description. + :type description: str + """ + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, publisher=None, provider=None, resource=None, operation=None, description=None): + super(ResourceProviderOperationDisplayProperties, self).__init__() + self.publisher = publisher + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resources_move_info.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resources_move_info.py new file mode 100644 index 000000000000..a33bdefaeca1 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resources_move_info.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourcesMoveInfo(Model): + """Parameters of move resources. + + :param resources: The IDs of the resources. + :type resources: list[str] + :param target_resource_group: The target resource group. + :type target_resource_group: str + """ + + _attribute_map = { + 'resources': {'key': 'resources', 'type': '[str]'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + } + + def __init__(self, resources=None, target_resource_group=None): + super(ResourcesMoveInfo, self).__init__() + self.resources = resources + self.target_resource_group = target_resource_group diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/sku.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/sku.py new file mode 100644 index 000000000000..109278b7fe75 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/sku.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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): + """SKU for the resource. + + :param name: The SKU name. + :type name: str + :param tier: The SKU tier. + :type tier: str + :param size: The SKU size. + :type size: str + :param family: The SKU family. + :type family: str + :param model: The SKU model. + :type model: str + :param capacity: The SKU capacity. + :type capacity: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'model': {'key': 'model', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, name=None, tier=None, size=None, family=None, model=None, capacity=None): + super(Sku, self).__init__() + self.name = name + self.tier = tier + self.size = size + self.family = family + self.model = model + self.capacity = capacity diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/sub_resource.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/sub_resource.py new file mode 100644 index 000000000000..2d6ffc89a72e --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/sub_resource.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubResource(Model): + """Sub-resource. + + :param id: Resource ID + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, id=None): + super(SubResource, self).__init__() + self.id = id diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_count.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_count.py new file mode 100644 index 000000000000..a94e6ef38d55 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_count.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagCount(Model): + """Tag count. + + :param type: Type of count. + :type type: str + :param value: Value of count. + :type value: int + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'}, + } + + def __init__(self, type=None, value=None): + super(TagCount, self).__init__() + self.type = type + self.value = value diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_details.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_details.py new file mode 100644 index 000000000000..9f112aeef4d2 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_details.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagDetails(Model): + """Tag details. + + :param id: The tag ID. + :type id: str + :param tag_name: The tag name. + :type tag_name: str + :param count: The total number of resources that use the resource tag. + When a tag is initially created and has no associated resources, the value + is 0. + :type count: ~azure.mgmt.resource.resources.v2018_02_01.models.TagCount + :param values: The list of tag values. + :type values: + list[~azure.mgmt.resource.resources.v2018_02_01.models.TagValue] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'tag_name': {'key': 'tagName', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'TagCount'}, + 'values': {'key': 'values', 'type': '[TagValue]'}, + } + + def __init__(self, id=None, tag_name=None, count=None, values=None): + super(TagDetails, self).__init__() + self.id = id + self.tag_name = tag_name + self.count = count + self.values = values diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_details_paged.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_details_paged.py new file mode 100644 index 000000000000..c8e6889a8ce9 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_details_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class TagDetailsPaged(Paged): + """ + A paging container for iterating over a list of :class:`TagDetails ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TagDetails]'} + } + + def __init__(self, *args, **kwargs): + + super(TagDetailsPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_value.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_value.py new file mode 100644 index 000000000000..015caea4f086 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/tag_value.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagValue(Model): + """Tag information. + + :param id: The tag ID. + :type id: str + :param tag_value: The tag value. + :type tag_value: str + :param count: The tag value count. + :type count: ~azure.mgmt.resource.resources.v2018_02_01.models.TagCount + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'tag_value': {'key': 'tagValue', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'TagCount'}, + } + + def __init__(self, id=None, tag_value=None, count=None): + super(TagValue, self).__init__() + self.id = id + self.tag_value = tag_value + self.count = count diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/target_resource.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/target_resource.py new file mode 100644 index 000000000000..311bd74c9c2d --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/target_resource.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TargetResource(Model): + """Target resource. + + :param id: The ID of the resource. + :type id: str + :param resource_name: The name of the resource. + :type resource_name: str + :param resource_type: The type of the resource. + :type resource_type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + } + + def __init__(self, id=None, resource_name=None, resource_type=None): + super(TargetResource, self).__init__() + self.id = id + self.resource_name = resource_name + self.resource_type = resource_type diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/template_link.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/template_link.py new file mode 100644 index 000000000000..7a29c00576bb --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/template_link.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TemplateLink(Model): + """Entity representing the reference to the template. + + :param uri: The URI of the template to deploy. + :type uri: str + :param content_version: If included, must match the ContentVersion in the + template. + :type content_version: str + """ + + _validation = { + 'uri': {'required': True}, + } + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + } + + def __init__(self, uri, content_version=None): + super(TemplateLink, self).__init__() + self.uri = uri + self.content_version = content_version diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/__init__.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/__init__.py new file mode 100644 index 000000000000..5aae03a99594 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/__init__.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .deployments_operations import DeploymentsOperations +from .providers_operations import ProvidersOperations +from .resources_operations import ResourcesOperations +from .resource_groups_operations import ResourceGroupsOperations +from .tags_operations import TagsOperations +from .deployment_operations import DeploymentOperations + +__all__ = [ + 'DeploymentsOperations', + 'ProvidersOperations', + 'ResourcesOperations', + 'ResourceGroupsOperations', + 'TagsOperations', + 'DeploymentOperations', +] diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/deployment_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/deployment_operations.py new file mode 100644 index 000000000000..914651c2fe28 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/deployment_operations.py @@ -0,0 +1,182 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 DeploymentOperations(object): + """DeploymentOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def get( + self, resource_group_name, deployment_name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets a deployments operation. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param deployment_name: The name of the deployment. + :type deployment_name: str + :param operation_id: The ID of the operation to get. + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeploymentOperation or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentOperation + 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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DeploymentOperation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}'} + + def list( + self, resource_group_name, deployment_name, top=None, custom_headers=None, raw=False, **operation_config): + """Gets all deployments operations for a deployment. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param deployment_name: The name of the deployment with the operation + to get. + :type deployment_name: str + :param top: The number of results to return. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeploymentOperation + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentOperationPaged[~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentOperation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + '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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DeploymentOperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DeploymentOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/deployments_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/deployments_operations.py new file mode 100644 index 000000000000..0905a2bcec59 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/deployments_operations.py @@ -0,0 +1,682 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class DeploymentsOperations(object): + """DeploymentsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + + def _delete_initial( + self, resource_group_name, deployment_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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [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, deployment_name, custom_headers=None, raw=False, **operation_config): + """Deletes a deployment from the deployment history. + + A template deployment that is currently running cannot be deleted. + Deleting a template deployment removes the associated deployment + operations. Deleting a template deployment does not affect the state of + the resource group. This is an asynchronous operation that returns a + status of 202 until the template deployment is successfully deleted. + The Location response header contains the URI that is used to obtain + the status of the process. While the process is running, a call to the + URI in the Location header returns a status of 202. When the process + finishes, the URI in the Location header returns a status of 204 on + success. If the asynchronous request failed, the URI in the Location + header returns an error-level status code. + + :param resource_group_name: The name of the resource group with the + deployment to delete. The name is case insensitive. + :type resource_group_name: str + :param deployment_name: The name of the deployment to delete. + :type deployment_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + deployment_name=deployment_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} + + def check_existence( + self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): + """Checks whether the deployment exists. + + :param resource_group_name: The name of the resource group with the + deployment to check. The name is case insensitive. + :type resource_group_name: str + :param deployment_name: The name of the deployment to check. + :type deployment_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: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.check_existence.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 204) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} + + + def _create_or_update_initial( + self, resource_group_name, deployment_name, properties, custom_headers=None, raw=False, **operation_config): + parameters = models.Deployment(properties=properties) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + 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('DeploymentExtended', response) + if response.status_code == 201: + deserialized = self._deserialize('DeploymentExtended', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, deployment_name, properties, custom_headers=None, raw=False, **operation_config): + """Deploys resources to a resource group. + + You can provide the template and parameters directly in the request or + link to JSON files. + + :param resource_group_name: The name of the resource group to deploy + the resources to. The name is case insensitive. The resource group + must already exist. + :type resource_group_name: str + :param deployment_name: The name of the deployment. + :type deployment_name: str + :param properties: The deployment properties. + :type properties: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + DeploymentExtended or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentExtended] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + deployment_name=deployment_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('DeploymentExtended', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} + + def get( + self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): + """Gets a deployment. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param deployment_name: The name of the deployment to get. + :type deployment_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: DeploymentExtended or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentExtended + 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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DeploymentExtended', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'} + + def cancel( + self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): + """Cancels a currently running template deployment. + + You can cancel a deployment only if the provisioningState is Accepted + or Running. After the deployment is canceled, the provisioningState is + set to Canceled. Canceling a template deployment stops the currently + running template deployment and leaves the resource group partially + deployed. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param deployment_name: The name of the deployment to cancel. + :type deployment_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [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 + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel'} + + def validate( + self, resource_group_name, deployment_name, properties, custom_headers=None, raw=False, **operation_config): + """Validates whether the specified template is syntactically correct and + will be accepted by Azure Resource Manager.. + + :param resource_group_name: The name of the resource group the + template will be deployed to. The name is case insensitive. + :type resource_group_name: str + :param deployment_name: The name of the deployment. + :type deployment_name: str + :param properties: The deployment properties. + :type properties: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeploymentValidateResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentValidateResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.Deployment(properties=properties) + + # Construct URL + url = self.validate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Deployment') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 400]: + 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('DeploymentValidateResult', response) + if response.status_code == 400: + deserialized = self._deserialize('DeploymentValidateResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate'} + + def export_template( + self, resource_group_name, deployment_name, custom_headers=None, raw=False, **operation_config): + """Exports the template used for specified deployment. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param deployment_name: The name of the deployment from which to get + the template. + :type deployment_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: DeploymentExportResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentExportResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.export_template.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DeploymentExportResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + export_template.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate'} + + def list_by_resource_group( + self, resource_group_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config): + """Get all the deployments for a resource group. + + :param resource_group_name: The name of the resource group with the + deployments to get. The name is case insensitive. + :type resource_group_name: str + :param filter: The filter to apply on the operation. For example, you + can use $filter=provisioningState eq '{state}'. + :type filter: str + :param top: The number of results to get. If null is passed, returns + all deployments. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeploymentExtended + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentExtendedPaged[~azure.mgmt.resource.resources.v2018_02_01.models.DeploymentExtended] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DeploymentExtendedPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DeploymentExtendedPaged(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.Resources/deployments/'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/providers_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/providers_operations.py new file mode 100644 index 000000000000..16eb094c3851 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/providers_operations.py @@ -0,0 +1,300 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 ProvidersOperations(object): + """ProvidersOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def unregister( + self, resource_provider_namespace, custom_headers=None, raw=False, **operation_config): + """Unregisters a subscription from a resource provider. + + :param resource_provider_namespace: The namespace of the resource + provider to unregister. + :type resource_provider_namespace: 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: Provider or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.Provider or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.unregister.metadata['url'] + path_format_arguments = { + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Provider', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + unregister.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister'} + + def register( + self, resource_provider_namespace, custom_headers=None, raw=False, **operation_config): + """Registers a subscription with a resource provider. + + :param resource_provider_namespace: The namespace of the resource + provider to register. + :type resource_provider_namespace: 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: Provider or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.Provider or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.register.metadata['url'] + path_format_arguments = { + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Provider', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + register.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register'} + + def list( + self, top=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets all resource providers for a subscription. + + :param top: The number of results to return. If null is passed returns + all deployments. + :type top: int + :param expand: The properties to include in the results. For example, + use &$expand=metadata in the query string to retrieve resource + provider metadata. To include property aliases in response, use + $expand=resourceTypes/aliases. + :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: An iterator like instance of Provider + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.ProviderPaged[~azure.mgmt.resource.resources.v2018_02_01.models.Provider] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + 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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ProviderPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ProviderPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers'} + + def get( + self, resource_provider_namespace, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets the specified resource provider. + + :param resource_provider_namespace: The namespace of the resource + provider. + :type resource_provider_namespace: str + :param expand: The $expand query parameter. For example, to include + property aliases in response, use $expand=resourceTypes/aliases. + :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: Provider or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.Provider or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, '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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Provider', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/resource_groups_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/resource_groups_operations.py new file mode 100644 index 000000000000..8650d43c925b --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/resource_groups_operations.py @@ -0,0 +1,548 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class ResourceGroupsOperations(object): + """ResourceGroupsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def check_existence( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Checks whether a resource group exists. + + :param resource_group_name: The name of the resource group to check. + The name is case insensitive. + :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: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.check_existence.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 204) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} + + def create_or_update( + self, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates a resource group. + + :param resource_group_name: The name of the resource group to create + or update. + :type resource_group_name: str + :param parameters: Parameters supplied to the create or update a + resource group. + :type parameters: + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroup + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceGroup or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ResourceGroup') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + 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('ResourceGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('ResourceGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} + + + def _delete_initial( + self, resource_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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + 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, custom_headers=None, raw=False, **operation_config): + """Deletes a resource group. + + When you delete a resource group, all of its resources are also + deleted. Deleting a resource group deletes all of its template + deployments and currently stored operations. + + :param resource_group_name: The name of the resource group to delete. + The name is case insensitive. + :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 + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} + + def get( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a resource group. + + :param resource_group_name: The name of the resource group to get. The + name is case insensitive. + :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: ResourceGroup or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroup 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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ResourceGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} + + def update( + self, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): + """Updates a resource group. + + Resource groups can be updated through a simple PATCH operation to a + group address. The format of the request is the same as that for + creating a resource group. If a field is unspecified, the current value + is retained. + + :param resource_group_name: The name of the resource group to update. + The name is case insensitive. + :type resource_group_name: str + :param parameters: Parameters supplied to update a resource group. + :type parameters: + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroupPatchable + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceGroup or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ResourceGroupPatchable') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + 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('ResourceGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'} + + def export_template( + self, resource_group_name, resources=None, options=None, custom_headers=None, raw=False, **operation_config): + """Captures the specified resource group as a template. + + :param resource_group_name: The name of the resource group to export + as a template. + :type resource_group_name: str + :param resources: The IDs of the resources. The only supported string + currently is '*' (all resources). Future updates will support + exporting specific resources. + :type resources: list[str] + :param options: The export template options. Supported values include + 'IncludeParameterDefaultValue', 'IncludeComments' or + 'IncludeParameterDefaultValue, IncludeComments + :type options: 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: ResourceGroupExportResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroupExportResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.ExportTemplateRequest(resources=resources, options=options) + + # Construct URL + url = self.export_template.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ExportTemplateRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ResourceGroupExportResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + export_template.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate'} + + def list( + self, filter=None, top=None, custom_headers=None, raw=False, **operation_config): + """Gets all the resource groups for a subscription. + + :param filter: The filter to apply on the operation. + :type filter: str + :param top: The number of results to return. If null is passed, + returns all resource groups. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceGroup + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroupPaged[~azure.mgmt.resource.resources.v2018_02_01.models.ResourceGroup] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ResourceGroupPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ResourceGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/resources_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/resources_operations.py new file mode 100644 index 000000000000..ed1ecd0d23e0 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/resources_operations.py @@ -0,0 +1,1425 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class ResourcesOperations(object): + """ResourcesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list_by_resource_group( + self, resource_group_name, filter=None, expand=None, top=None, custom_headers=None, raw=False, **operation_config): + """Get all the resources for a resource group. + + :param resource_group_name: The resource group with the resources to + get. + :type resource_group_name: str + :param filter: The filter to apply on the operation. + :type filter: str + :param expand: The $expand query parameter + :type expand: str + :param top: The number of results to return. If null is passed, + returns all resources. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GenericResource + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} + + + def _move_resources_initial( + self, source_resource_group_name, resources=None, target_resource_group=None, custom_headers=None, raw=False, **operation_config): + parameters = models.ResourcesMoveInfo(resources=resources, target_resource_group=target_resource_group) + + # Construct URL + url = self.move_resources.metadata['url'] + path_format_arguments = { + 'sourceResourceGroupName': self._serialize.url("source_resource_group_name", source_resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ResourcesMoveInfo') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [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 move_resources( + self, source_resource_group_name, resources=None, target_resource_group=None, custom_headers=None, raw=False, **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. + :type source_resource_group_name: str + :param resources: The IDs of the resources. + :type resources: list[str] + :param target_resource_group: The target resource group. + :type target_resource_group: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._move_resources_initial( + source_resource_group_name=source_resource_group_name, + resources=resources, + target_resource_group=target_resource_group, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + move_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources'} + + + def _validate_move_resources_initial( + self, source_resource_group_name, resources=None, target_resource_group=None, custom_headers=None, raw=False, **operation_config): + parameters = models.ResourcesMoveInfo(resources=resources, target_resource_group=target_resource_group) + + # Construct URL + url = self.validate_move_resources.metadata['url'] + path_format_arguments = { + 'sourceResourceGroupName': self._serialize.url("source_resource_group_name", source_resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ResourcesMoveInfo') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [202, 204, 409]: + 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 validate_move_resources( + self, source_resource_group_name, resources=None, target_resource_group=None, custom_headers=None, raw=False, **operation_config): + """Validates whether resources can be moved from one resource group to + 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. + :type source_resource_group_name: str + :param resources: The IDs of the resources. + :type resources: list[str] + :param target_resource_group: The target resource group. + :type target_resource_group: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._validate_move_resources_initial( + source_resource_group_name=source_resource_group_name, + resources=resources, + target_resource_group=target_resource_group, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + validate_move_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/validateMoveResources'} + + def list( + self, filter=None, expand=None, top=None, custom_headers=None, raw=False, **operation_config): + """Get all the resources in a subscription. + + :param filter: The filter to apply on the operation. + :type filter: str + :param expand: The $expand query parameter. + :type expand: str + :param top: The number of results to return. If null is passed, + returns all resource groups. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GenericResource + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} + + def check_existence( + self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): + """Checks whether a resource exists. + + :param resource_group_name: The name of the resource group containing + the resource to check. The name is case insensitive. + :type resource_group_name: str + :param resource_provider_namespace: The resource provider of the + resource to check. + :type resource_provider_namespace: str + :param parent_resource_path: The parent resource identity. + :type parent_resource_path: str + :param resource_type: The resource type. + :type resource_type: str + :param resource_name: The name of the resource to check whether it + exists. + :type resource_name: str + :param api_version: The API version to use for the operation. + :type api_version: 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: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.check_existence.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), + 'parentResourcePath': self._serialize.url("parent_resource_path", parent_resource_path, 'str', skip_quote=True), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str', skip_quote=True), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 204) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized + check_existence.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} + + + def _delete_initial( + self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, 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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), + 'parentResourcePath': self._serialize.url("parent_resource_path", parent_resource_path, 'str', skip_quote=True), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str', skip_quote=True), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): + """Deletes a resource. + + :param resource_group_name: The name of the resource group that + contains the resource to delete. The name is case insensitive. + :type resource_group_name: str + :param resource_provider_namespace: The namespace of the resource + provider. + :type resource_provider_namespace: str + :param parent_resource_path: The parent resource identity. + :type parent_resource_path: str + :param resource_type: The resource type. + :type resource_type: str + :param resource_name: The name of the resource to delete. + :type resource_name: str + :param api_version: The API version to use for the operation. + :type api_version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_provider_namespace=resource_provider_namespace, + parent_resource_path=parent_resource_path, + resource_type=resource_type, + resource_name=resource_name, + api_version=api_version, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} + + + def _create_or_update_initial( + self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, 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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), + 'parentResourcePath': self._serialize.url("parent_resource_path", parent_resource_path, 'str', skip_quote=True), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str', skip_quote=True), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'GenericResource') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GenericResource', response) + if response.status_code == 201: + deserialized = self._deserialize('GenericResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers=None, raw=False, **operation_config): + """Creates a resource. + + :param resource_group_name: The name of the resource group for the + resource. The name is case insensitive. + :type resource_group_name: str + :param resource_provider_namespace: The namespace of the resource + provider. + :type resource_provider_namespace: str + :param parent_resource_path: The parent resource identity. + :type parent_resource_path: str + :param resource_type: The resource type of the resource to create. + :type resource_type: str + :param resource_name: The name of the resource to create. + :type resource_name: str + :param api_version: The API version to use for the operation. + :type api_version: str + :param parameters: Parameters for creating or updating the resource. + :type parameters: + ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + GenericResource or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_provider_namespace=resource_provider_namespace, + parent_resource_path=parent_resource_path, + resource_type=resource_type, + resource_name=resource_name, + api_version=api_version, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('GenericResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} + + + def _update_initial( + self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), + 'parentResourcePath': self._serialize.url("parent_resource_path", parent_resource_path, 'str', skip_quote=True), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str', skip_quote=True), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'GenericResource') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GenericResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers=None, raw=False, **operation_config): + """Updates a resource. + + :param resource_group_name: The name of the resource group for the + resource. The name is case insensitive. + :type resource_group_name: str + :param resource_provider_namespace: The namespace of the resource + provider. + :type resource_provider_namespace: str + :param parent_resource_path: The parent resource identity. + :type parent_resource_path: str + :param resource_type: The resource type of the resource to update. + :type resource_type: str + :param resource_name: The name of the resource to update. + :type resource_name: str + :param api_version: The API version to use for the operation. + :type api_version: str + :param parameters: Parameters for updating the resource. + :type parameters: + ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + GenericResource or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + resource_provider_namespace=resource_provider_namespace, + parent_resource_path=parent_resource_path, + resource_type=resource_type, + resource_name=resource_name, + api_version=api_version, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('GenericResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} + + def get( + self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers=None, raw=False, **operation_config): + """Gets a resource. + + :param resource_group_name: The name of the resource group containing + the resource to get. The name is case insensitive. + :type resource_group_name: str + :param resource_provider_namespace: The namespace of the resource + provider. + :type resource_provider_namespace: str + :param parent_resource_path: The parent resource identity. + :type parent_resource_path: str + :param resource_type: The resource type of the resource. + :type resource_type: str + :param resource_name: The name of the resource to get. + :type resource_name: str + :param api_version: The API version to use for the operation. + :type api_version: 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: GenericResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource 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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), + 'parentResourcePath': self._serialize.url("parent_resource_path", parent_resource_path, 'str', skip_quote=True), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str', skip_quote=True), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GenericResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'} + + def check_existence_by_id( + self, resource_id, api_version, custom_headers=None, raw=False, **operation_config): + """Checks by ID whether a resource exists. + + :param resource_id: The fully qualified ID of the resource, including + the resource name and resource type. Use the format, + /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + :type resource_id: str + :param api_version: The API version to use for the operation. + :type api_version: 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: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.check_existence_by_id.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 204) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized + check_existence_by_id.metadata = {'url': '/{resourceId}'} + + + def _delete_by_id_initial( + self, resource_id, api_version, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_by_id.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_by_id( + self, resource_id, api_version, custom_headers=None, raw=False, **operation_config): + """Deletes a resource by ID. + + :param resource_id: The fully qualified ID of the resource, including + the resource name and resource type. Use the format, + /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + :type resource_id: str + :param api_version: The API version to use for the operation. + :type api_version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_by_id_initial( + resource_id=resource_id, + api_version=api_version, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete_by_id.metadata = {'url': '/{resourceId}'} + + + def _create_or_update_by_id_initial( + self, resource_id, api_version, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_by_id.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'GenericResource') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GenericResource', response) + if response.status_code == 201: + deserialized = self._deserialize('GenericResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_by_id( + self, resource_id, api_version, parameters, custom_headers=None, raw=False, **operation_config): + """Create a resource by ID. + + :param resource_id: The fully qualified ID of the resource, including + the resource name and resource type. Use the format, + /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + :type resource_id: str + :param api_version: The API version to use for the operation. + :type api_version: str + :param parameters: Create or update resource parameters. + :type parameters: + ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + GenericResource or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_by_id_initial( + resource_id=resource_id, + api_version=api_version, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('GenericResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update_by_id.metadata = {'url': '/{resourceId}'} + + + def _update_by_id_initial( + self, resource_id, api_version, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update_by_id.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'GenericResource') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GenericResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_by_id( + self, resource_id, api_version, parameters, custom_headers=None, raw=False, **operation_config): + """Updates a resource by ID. + + :param resource_id: The fully qualified ID of the resource, including + the resource name and resource type. Use the format, + /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + :type resource_id: str + :param api_version: The API version to use for the operation. + :type api_version: str + :param parameters: Update resource parameters. + :type parameters: + ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + GenericResource or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._update_by_id_initial( + resource_id=resource_id, + api_version=api_version, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('GenericResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + update_by_id.metadata = {'url': '/{resourceId}'} + + def get_by_id( + self, resource_id, api_version, custom_headers=None, raw=False, **operation_config): + """Gets a resource by ID. + + :param resource_id: The fully qualified ID of the resource, including + the resource name and resource type. Use the format, + /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + :type resource_id: str + :param api_version: The API version to use for the operation. + :type api_version: 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: GenericResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_id.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GenericResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_id.metadata = {'url': '/{resourceId}'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/tags_operations.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/tags_operations.py new file mode 100644 index 000000000000..04c6fc1e6941 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/tags_operations.py @@ -0,0 +1,341 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 TagsOperations(object): + """TagsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def delete_value( + self, tag_name, tag_value, custom_headers=None, raw=False, **operation_config): + """Deletes a tag value. + + :param tag_name: The name of the tag. + :type tag_name: str + :param tag_value: The value of the tag to delete. + :type tag_value: 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_value.metadata['url'] + path_format_arguments = { + 'tagName': self._serialize.url("tag_name", tag_name, 'str'), + 'tagValue': self._serialize.url("tag_value", tag_value, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 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_value.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}'} + + def create_or_update_value( + self, tag_name, tag_value, custom_headers=None, raw=False, **operation_config): + """Creates a tag value. The name of the tag must already exist. + + :param tag_name: The name of the tag. + :type tag_name: str + :param tag_value: The value of the tag to create. + :type tag_value: 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: TagValue or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.TagValue or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_value.metadata['url'] + path_format_arguments = { + 'tagName': self._serialize.url("tag_name", tag_name, 'str'), + 'tagValue': self._serialize.url("tag_value", tag_value, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send(request, header_parameters, 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('TagValue', response) + if response.status_code == 201: + deserialized = self._deserialize('TagValue', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_value.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}'} + + def create_or_update( + self, tag_name, custom_headers=None, raw=False, **operation_config): + """Creates a tag in the subscription. + + The tag name can have a maximum of 512 characters and is case + insensitive. Tag names created by Azure have prefixes of microsoft, + azure, or windows. You cannot create tags with one of these prefixes. + + :param tag_name: The name of the tag to create. + :type tag_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: TagDetails or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.resource.resources.v2018_02_01.models.TagDetails + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'tagName': self._serialize.url("tag_name", tag_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send(request, header_parameters, 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('TagDetails', response) + if response.status_code == 201: + deserialized = self._deserialize('TagDetails', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames/{tagName}'} + + def delete( + self, tag_name, custom_headers=None, raw=False, **operation_config): + """Deletes a tag from the subscription. + + You must remove all values from a resource tag before you can delete + it. + + :param tag_name: The name of the tag. + :type tag_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 = { + 'tagName': self._serialize.url("tag_name", tag_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 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}/tagNames/{tagName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the names and values of all resource tags that are defined 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 TagDetails + :rtype: + ~azure.mgmt.resource.resources.v2018_02_01.models.TagDetailsPaged[~azure.mgmt.resource.resources.v2018_02_01.models.TagDetails] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.TagDetailsPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.TagDetailsPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames'} diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/resource_management_client.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/resource_management_client.py new file mode 100644 index 000000000000..9fac1285e238 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/resource_management_client.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.deployments_operations import DeploymentsOperations +from .operations.providers_operations import ProvidersOperations +from .operations.resources_operations import ResourcesOperations +from .operations.resource_groups_operations import ResourceGroupsOperations +from .operations.tags_operations import TagsOperations +from .operations.deployment_operations import DeploymentOperations +from . import models + + +class ResourceManagementClientConfiguration(AzureConfiguration): + """Configuration for ResourceManagementClient + 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 target 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(ResourceManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-resource/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class ResourceManagementClient(object): + """Provides operations for working with resources and resource groups. + + :ivar config: Configuration for client. + :vartype config: ResourceManagementClientConfiguration + + :ivar deployments: Deployments operations + :vartype deployments: azure.mgmt.resource.resources.v2018_02_01.operations.DeploymentsOperations + :ivar providers: Providers operations + :vartype providers: azure.mgmt.resource.resources.v2018_02_01.operations.ProvidersOperations + :ivar resources: Resources operations + :vartype resources: azure.mgmt.resource.resources.v2018_02_01.operations.ResourcesOperations + :ivar resource_groups: ResourceGroups operations + :vartype resource_groups: azure.mgmt.resource.resources.v2018_02_01.operations.ResourceGroupsOperations + :ivar tags: Tags operations + :vartype tags: azure.mgmt.resource.resources.v2018_02_01.operations.TagsOperations + :ivar deployment_operations: DeploymentOperations operations + :vartype deployment_operations: azure.mgmt.resource.resources.v2018_02_01.operations.DeploymentOperations + + :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. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ResourceManagementClientConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-02-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.deployments = DeploymentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.providers = ProvidersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.resources = ResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.resource_groups = ResourceGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.tags = TagsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.deployment_operations = DeploymentOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/version.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/version.py new file mode 100644 index 000000000000..848a6c9f9e92 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2018-02-01" + From 869276ab5dbb3fc0ee349e108085f36b5e50e05c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 14 Mar 2018 16:20:55 -0700 Subject: [PATCH 3/4] [AutoPR resources/resource-manager] Add more enum values for Identity/type in generic resource swagger (#2130) * Generated from 618de80a1454153967c1b0f065cb270ccd7f60fd Add more enum values for Identity/type in generic resource swagger Resource types like "Microsoft.Compute/VirtualMachines" have more than one enum value for Identity/type. Updating generic resource swagger so it is up-to-date. * Generated from f7fb396c7887e1d61eb7e92133fc1c1fab3ae941 Revert changes in swagger spec for 2017 API Version --- .../mgmt/resource/resources/v2018_02_01/models/identity.py | 3 ++- .../v2018_02_01/models/resource_management_client_enums.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/identity.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/identity.py index 253a8dc02c24..ff0da548daff 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/identity.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/identity.py @@ -22,7 +22,8 @@ class Identity(Model): :vartype principal_id: str :ivar tenant_id: The tenant ID of resource. :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' + :param type: The identity type. Possible values include: 'SystemAssigned', + 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' :type type: str or ~azure.mgmt.resource.resources.v2018_02_01.models.ResourceIdentityType """ diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_client_enums.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_client_enums.py index fa9c8c732e6c..76f4a25765d0 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_client_enums.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/resource_management_client_enums.py @@ -27,3 +27,6 @@ class OnErrorDeploymentType(Enum): class ResourceIdentityType(Enum): system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned, UserAssigned" + none = "None" From f8a811349357a6a87b4acc1bf1e6772006a80dc7 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sat, 17 Mar 2018 02:10:43 +0000 Subject: [PATCH 4/4] Generated from cd1fa615903edb2e5367b5cbac4f75bce63d053b Correct typo caused CI problems --- .../features/v2015_12_01/models/__init__.py | 6 ++ .../models/operation_definition.py | 33 +++++++ .../v2015_12_01/models/operation_display.py | 40 +++++++++ .../v2015_12_01/models/operations_list.py | 29 +++++++ .../operations/features_operations.py | 52 +++++++++++ .../managedapplications/application_client.py | 5 ++ .../managedapplications/models/__init__.py | 6 ++ .../models/operation_definition.py | 33 +++++++ .../models/operation_display.py | 40 +++++++++ .../models/operations_list.py | 29 +++++++ .../operations/__init__.py | 2 + .../operations/solutions_operations.py | 87 +++++++++++++++++++ 12 files changed, 362 insertions(+) create mode 100644 azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operation_definition.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operation_display.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operations_list.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operation_definition.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operation_display.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operations_list.py create mode 100644 azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/solutions_operations.py diff --git a/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/__init__.py b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/__init__.py index e78be06f1f4a..251f285bc737 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/__init__.py +++ b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/__init__.py @@ -11,10 +11,16 @@ from .feature_properties import FeatureProperties from .feature_result import FeatureResult +from .operation_display import OperationDisplay +from .operation_definition import OperationDefinition +from .operations_list import OperationsList from .feature_result_paged import FeatureResultPaged __all__ = [ 'FeatureProperties', 'FeatureResult', + 'OperationDisplay', + 'OperationDefinition', + 'OperationsList', 'FeatureResultPaged', ] diff --git a/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operation_definition.py b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operation_definition.py new file mode 100644 index 000000000000..043bdf99e79a --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operation_definition.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDefinition(Model): + """OperationDefinition. + + :param name: The name of the operation. + :type name: str + :param display: The operation display definition. + :type display: + ~azure.mgmt.resource.features.v2015_12_01.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, name=None, display=None): + super(OperationDefinition, self).__init__() + self.name = name + self.display = display diff --git a/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operation_display.py b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operation_display.py new file mode 100644 index 000000000000..43f64e94f5c4 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operation_display.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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): + """OperationDisplay. + + :param provider: Operation provider. + :type provider: str + :param resource: Operation resource. + :type resource: str + :param operation: Operation. + :type operation: str + :param description: Operation description. + :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=None, resource=None, operation=None, description=None): + super(OperationDisplay, self).__init__() + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operations_list.py b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operations_list.py new file mode 100644 index 000000000000..5ae543438612 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/models/operations_list.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationsList(Model): + """OperationsList. + + :param operations: The array of feature operations. + :type operations: + list[~azure.mgmt.resource.features.v2015_12_01.models.OperationDefinition] + """ + + _attribute_map = { + 'operations': {'key': 'operations', 'type': '[OperationDefinition]'}, + } + + def __init__(self, operations=None): + super(OperationsList, self).__init__() + self.operations = operations diff --git a/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/features_operations.py b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/features_operations.py index dc13aa490301..5d7d290838a8 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/features_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/features_operations.py @@ -103,6 +103,58 @@ def internal_paging(next_link=None, raw=False): return deserialized list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Features/features'} + def operations( + self, custom_headers=None, raw=False, **operation_config): + """Gets all the preview feature 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: OperationsList or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.features.v2015_12_01.models.OperationsList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.operations.metadata['url'] + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationsList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + operations.metadata = {'url': '/providers/Microsoft.Features/operations'} + def list( self, resource_provider_namespace, custom_headers=None, raw=False, **operation_config): """Gets all the preview features in a provider namespace that are diff --git a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/application_client.py b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/application_client.py index a42f5253e331..037156d03f69 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/application_client.py +++ b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/application_client.py @@ -15,6 +15,7 @@ from .version import VERSION from .operations.applications_operations import ApplicationsOperations from .operations.application_definitions_operations import ApplicationDefinitionsOperations +from .operations.solutions_operations import SolutionsOperations from . import models @@ -60,6 +61,8 @@ class ApplicationClient(object): :vartype applications: azure.mgmt.resource.managedapplications.operations.ApplicationsOperations :ivar application_definitions: ApplicationDefinitions operations :vartype application_definitions: azure.mgmt.resource.managedapplications.operations.ApplicationDefinitionsOperations + :ivar solutions: Solutions operations + :vartype solutions: azure.mgmt.resource.managedapplications.operations.SolutionsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -84,3 +87,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.application_definitions = ApplicationDefinitionsOperations( self._client, self.config, self._serialize, self._deserialize) + self.solutions = SolutionsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/__init__.py b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/__init__.py index af7eb12ce63f..e4460f9d2550 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/__init__.py +++ b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/__init__.py @@ -21,6 +21,9 @@ from .generic_resource import GenericResource from .resource import Resource from .error_response import ErrorResponse, ErrorResponseException +from .operation_display import OperationDisplay +from .operation_definition import OperationDefinition +from .operations_list import OperationsList from .application_paged import ApplicationPaged from .application_definition_paged import ApplicationDefinitionPaged from .application_client_enums import ( @@ -43,6 +46,9 @@ 'GenericResource', 'Resource', 'ErrorResponse', 'ErrorResponseException', + 'OperationDisplay', + 'OperationDefinition', + 'OperationsList', 'ApplicationPaged', 'ApplicationDefinitionPaged', 'ProvisioningState', diff --git a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operation_definition.py b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operation_definition.py new file mode 100644 index 000000000000..0fa7f2ec2873 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operation_definition.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDefinition(Model): + """OperationDefinition. + + :param name: The name of the operation. + :type name: str + :param display: The operation display definition. + :type display: + ~azure.mgmt.resource.managedapplications.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, name=None, display=None): + super(OperationDefinition, self).__init__() + self.name = name + self.display = display diff --git a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operation_display.py b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operation_display.py new file mode 100644 index 000000000000..43f64e94f5c4 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operation_display.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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): + """OperationDisplay. + + :param provider: Operation provider. + :type provider: str + :param resource: Operation resource. + :type resource: str + :param operation: Operation. + :type operation: str + :param description: Operation description. + :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=None, resource=None, operation=None, description=None): + super(OperationDisplay, self).__init__() + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operations_list.py b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operations_list.py new file mode 100644 index 000000000000..029912edf414 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/models/operations_list.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationsList(Model): + """OperationsList. + + :param operations: The array of solution operations. + :type operations: + list[~azure.mgmt.resource.managedapplications.models.OperationDefinition] + """ + + _attribute_map = { + 'operations': {'key': 'operations', 'type': '[OperationDefinition]'}, + } + + def __init__(self, operations=None): + super(OperationsList, self).__init__() + self.operations = operations diff --git a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/__init__.py b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/__init__.py index 8dde81835052..7a0f8fec8ca5 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/__init__.py +++ b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/__init__.py @@ -11,8 +11,10 @@ from .applications_operations import ApplicationsOperations from .application_definitions_operations import ApplicationDefinitionsOperations +from .solutions_operations import SolutionsOperations __all__ = [ 'ApplicationsOperations', 'ApplicationDefinitionsOperations', + 'SolutionsOperations', ] diff --git a/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/solutions_operations.py b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/solutions_operations.py new file mode 100644 index 000000000000..575927240b1e --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/managedapplications/operations/solutions_operations.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 SolutionsOperations(object): + """SolutionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def operations( + self, custom_headers=None, raw=False, **operation_config): + """Gets all the preview solution 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: OperationsList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.resource.managedapplications.models.OperationsList + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.operations.metadata['url'] + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationsList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + operations.metadata = {'url': '/providers/Microsoft.Solutions/operations'}