From bea58ea534a4b62409bc35361a81012302d81557 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 22 Oct 2020 02:28:20 +0000 Subject: [PATCH] Generated from 0e5a9dba02e521c7f89a7364a3560cfee8c4f9ec --- .../_app_configuration_management_client.py | 7 +- .../mgmt/appconfiguration/models/__init__.py | 14 +- .../mgmt/appconfiguration/models/_models.py | 137 +++---- .../appconfiguration/models/_models_py3.py | 143 ++++---- .../appconfiguration/models/_paged_models.py | 13 + .../appconfiguration/operations/__init__.py | 2 + .../_configuration_stores_operations.py | 107 +----- .../operations/_key_values_operations.py | 345 ++++++++++++++++++ .../operations/_operations.py | 12 +- ...private_endpoint_connections_operations.py | 20 +- .../_private_link_resources_operations.py | 12 +- 11 files changed, 557 insertions(+), 255 deletions(-) create mode 100644 sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_key_values_operations.py diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_app_configuration_management_client.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_app_configuration_management_client.py index e87b243ceb8d..848eacfa137c 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_app_configuration_management_client.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_app_configuration_management_client.py @@ -17,6 +17,7 @@ from .operations import Operations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations +from .operations import KeyValuesOperations from . import models @@ -34,6 +35,8 @@ class AppConfigurationManagementClient(SDKClient): :vartype private_endpoint_connections: azure.mgmt.appconfiguration.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResources operations :vartype private_link_resources: azure.mgmt.appconfiguration.operations.PrivateLinkResourcesOperations + :ivar key_values: KeyValues operations + :vartype key_values: azure.mgmt.appconfiguration.operations.KeyValuesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -50,7 +53,7 @@ def __init__( super(AppConfigurationManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-06-01' + self.api_version = '2020-07-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -62,3 +65,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self.config, self._serialize, self._deserialize) + self.key_values = KeyValuesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/__init__.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/__init__.py index 8f670de6be62..f9e1fdd39176 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/__init__.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/__init__.py @@ -15,10 +15,10 @@ from ._models_py3 import ConfigurationStore from ._models_py3 import ConfigurationStoreUpdateParameters from ._models_py3 import EncryptionProperties - from ._models_py3 import Error, ErrorException + from ._models_py3 import ErrorDetails + from ._models_py3 import ErrorResponse, ErrorResponseException from ._models_py3 import KeyValue from ._models_py3 import KeyVaultProperties - from ._models_py3 import ListKeyValueParameters from ._models_py3 import NameAvailabilityStatus from ._models_py3 import OperationDefinition from ._models_py3 import OperationDefinitionDisplay @@ -38,10 +38,10 @@ from ._models import ConfigurationStore from ._models import ConfigurationStoreUpdateParameters from ._models import EncryptionProperties - from ._models import Error, ErrorException + from ._models import ErrorDetails + from ._models import ErrorResponse, ErrorResponseException from ._models import KeyValue from ._models import KeyVaultProperties - from ._models import ListKeyValueParameters from ._models import NameAvailabilityStatus from ._models import OperationDefinition from ._models import OperationDefinitionDisplay @@ -57,6 +57,7 @@ from ._models import UserIdentity from ._paged_models import ApiKeyPaged from ._paged_models import ConfigurationStorePaged +from ._paged_models import KeyValuePaged from ._paged_models import OperationDefinitionPaged from ._paged_models import PrivateEndpointConnectionPaged from ._paged_models import PrivateLinkResourcePaged @@ -74,10 +75,10 @@ 'ConfigurationStore', 'ConfigurationStoreUpdateParameters', 'EncryptionProperties', - 'Error', 'ErrorException', + 'ErrorDetails', + 'ErrorResponse', 'ErrorResponseException', 'KeyValue', 'KeyVaultProperties', - 'ListKeyValueParameters', 'NameAvailabilityStatus', 'OperationDefinition', 'OperationDefinitionDisplay', @@ -96,6 +97,7 @@ 'OperationDefinitionPaged', 'PrivateEndpointConnectionPaged', 'PrivateLinkResourcePaged', + 'KeyValuePaged', 'IdentityType', 'ProvisioningState', 'ConnectionStatus', diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_models.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_models.py index 4c892b7a7a3c..4b5b9072c895 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_models.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_models.py @@ -241,11 +241,6 @@ class ConfigurationStoreUpdateParameters(Model): :param encryption: The encryption settings of the configuration store. :type encryption: ~azure.mgmt.appconfiguration.models.EncryptionProperties - :param public_network_access: Control permission for data plane traffic - coming from public networks while private endpoint is enabled. Possible - values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.appconfiguration.models.PublicNetworkAccess :param identity: The managed identity information for the configuration store. :type identity: ~azure.mgmt.appconfiguration.models.ResourceIdentity @@ -257,7 +252,6 @@ class ConfigurationStoreUpdateParameters(Model): _attribute_map = { 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'tags': {'key': 'tags', 'type': '{str}'}, @@ -266,7 +260,6 @@ class ConfigurationStoreUpdateParameters(Model): def __init__(self, **kwargs): super(ConfigurationStoreUpdateParameters, self).__init__(**kwargs) self.encryption = kwargs.get('encryption', None) - self.public_network_access = kwargs.get('public_network_access', None) self.identity = kwargs.get('identity', None) self.sku = kwargs.get('sku', None) self.tags = kwargs.get('tags', None) @@ -289,28 +282,53 @@ def __init__(self, **kwargs): self.key_vault_properties = kwargs.get('key_vault_properties', None) -class Error(Model): - """AppConfiguration error object. +class ErrorDetails(Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when + sending a request. - :param code: Error code. - :type code: str - :param message: Error message. - :type message: str + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str """ + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, } def __init__(self, **kwargs): - super(Error, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None -class ErrorException(HttpOperationError): - """Server responsed with exception of type: 'Error'. +class ErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.appconfiguration.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. :param deserialize: A deserializer :param response: Server response to be deserialized. @@ -318,28 +336,33 @@ class ErrorException(HttpOperationError): def __init__(self, deserialize, response, *args): - super(ErrorException, self).__init__(deserialize, response, 'Error', *args) + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) class KeyValue(Model): - """The result of a request to retrieve a key-value from the specified - configuration store. + """The key-value resource along with all resource properties. Variables are only populated by the server, and will be ignored when sending a request. + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str :ivar key: The primary identifier of a key-value. The key is used in unison with the label to uniquely identify a key-value. :vartype key: str :ivar label: A value used to group key-values. The label is used in unison with the key to uniquely identify a key-value. :vartype label: str - :ivar value: The value of the key-value. - :vartype value: str - :ivar content_type: The content type of the key-value's value. + :param value: The value of the key-value. + :type value: str + :param content_type: The content type of the key-value's value. Providing a proper content-type can enable transformations of values when they are retrieved by applications. - :vartype content_type: str + :type content_type: str :ivar e_tag: An ETag indicating the state of a key-value within a configuration store. :vartype e_tag: str @@ -349,43 +372,49 @@ class KeyValue(Model): :ivar locked: A value indicating whether the key-value is locked. A locked key-value may not be modified until it is unlocked. :vartype locked: bool - :ivar tags: A dictionary of tags that can help identify what a key-value + :param tags: A dictionary of tags that can help identify what a key-value may be applicable for. - :vartype tags: dict[str, str] + :type tags: dict[str, str] """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'key': {'readonly': True}, 'label': {'readonly': True}, - 'value': {'readonly': True}, - 'content_type': {'readonly': True}, 'e_tag': {'readonly': True}, 'last_modified': {'readonly': True}, 'locked': {'readonly': True}, - 'tags': {'readonly': True}, } _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, - 'locked': {'key': 'locked', 'type': 'bool'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'key': {'key': 'properties.key', 'type': 'str'}, + 'label': {'key': 'properties.label', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'e_tag': {'key': 'properties.eTag', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'locked': {'key': 'properties.locked', 'type': 'bool'}, + 'tags': {'key': 'properties.tags', 'type': '{str}'}, } def __init__(self, **kwargs): super(KeyValue, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.key = None self.label = None - self.value = None - self.content_type = None + self.value = kwargs.get('value', None) + self.content_type = kwargs.get('content_type', None) self.e_tag = None self.last_modified = None self.locked = None - self.tags = None + self.tags = kwargs.get('tags', None) class KeyVaultProperties(Model): @@ -409,32 +438,6 @@ def __init__(self, **kwargs): self.identity_client_id = kwargs.get('identity_client_id', None) -class ListKeyValueParameters(Model): - """The parameters used to list a configuration store key-value. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key to retrieve. - :type key: str - :param label: The label of the key. - :type label: str - """ - - _validation = { - 'key': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ListKeyValueParameters, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.label = kwargs.get('label', None) - - class NameAvailabilityStatus(Model): """The result of a request to check the availability of a resource name. diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_models_py3.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_models_py3.py index 15213ffa3a2d..f11ab4b26601 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_models_py3.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_models_py3.py @@ -241,11 +241,6 @@ class ConfigurationStoreUpdateParameters(Model): :param encryption: The encryption settings of the configuration store. :type encryption: ~azure.mgmt.appconfiguration.models.EncryptionProperties - :param public_network_access: Control permission for data plane traffic - coming from public networks while private endpoint is enabled. Possible - values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.appconfiguration.models.PublicNetworkAccess :param identity: The managed identity information for the configuration store. :type identity: ~azure.mgmt.appconfiguration.models.ResourceIdentity @@ -257,16 +252,14 @@ class ConfigurationStoreUpdateParameters(Model): _attribute_map = { 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, encryption=None, public_network_access=None, identity=None, sku=None, tags=None, **kwargs) -> None: + def __init__(self, *, encryption=None, identity=None, sku=None, tags=None, **kwargs) -> None: super(ConfigurationStoreUpdateParameters, self).__init__(**kwargs) self.encryption = encryption - self.public_network_access = public_network_access self.identity = identity self.sku = sku self.tags = tags @@ -289,28 +282,53 @@ def __init__(self, *, key_vault_properties=None, **kwargs) -> None: self.key_vault_properties = key_vault_properties -class Error(Model): - """AppConfiguration error object. +class ErrorDetails(Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when + sending a request. - :param code: Error code. - :type code: str - :param message: Error message. - :type message: str + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str """ + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(Error, self).__init__(**kwargs) - self.code = code - self.message = message + def __init__(self, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.appconfiguration.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error -class ErrorException(HttpOperationError): - """Server responsed with exception of type: 'Error'. + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. :param deserialize: A deserializer :param response: Server response to be deserialized. @@ -318,28 +336,33 @@ class ErrorException(HttpOperationError): def __init__(self, deserialize, response, *args): - super(ErrorException, self).__init__(deserialize, response, 'Error', *args) + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) class KeyValue(Model): - """The result of a request to retrieve a key-value from the specified - configuration store. + """The key-value resource along with all resource properties. Variables are only populated by the server, and will be ignored when sending a request. + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str :ivar key: The primary identifier of a key-value. The key is used in unison with the label to uniquely identify a key-value. :vartype key: str :ivar label: A value used to group key-values. The label is used in unison with the key to uniquely identify a key-value. :vartype label: str - :ivar value: The value of the key-value. - :vartype value: str - :ivar content_type: The content type of the key-value's value. + :param value: The value of the key-value. + :type value: str + :param content_type: The content type of the key-value's value. Providing a proper content-type can enable transformations of values when they are retrieved by applications. - :vartype content_type: str + :type content_type: str :ivar e_tag: An ETag indicating the state of a key-value within a configuration store. :vartype e_tag: str @@ -349,43 +372,49 @@ class KeyValue(Model): :ivar locked: A value indicating whether the key-value is locked. A locked key-value may not be modified until it is unlocked. :vartype locked: bool - :ivar tags: A dictionary of tags that can help identify what a key-value + :param tags: A dictionary of tags that can help identify what a key-value may be applicable for. - :vartype tags: dict[str, str] + :type tags: dict[str, str] """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'key': {'readonly': True}, 'label': {'readonly': True}, - 'value': {'readonly': True}, - 'content_type': {'readonly': True}, 'e_tag': {'readonly': True}, 'last_modified': {'readonly': True}, 'locked': {'readonly': True}, - 'tags': {'readonly': True}, } _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, - 'locked': {'key': 'locked', 'type': 'bool'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'key': {'key': 'properties.key', 'type': 'str'}, + 'label': {'key': 'properties.label', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'e_tag': {'key': 'properties.eTag', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'locked': {'key': 'properties.locked', 'type': 'bool'}, + 'tags': {'key': 'properties.tags', 'type': '{str}'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, value: str=None, content_type: str=None, tags=None, **kwargs) -> None: super(KeyValue, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.key = None self.label = None - self.value = None - self.content_type = None + self.value = value + self.content_type = content_type self.e_tag = None self.last_modified = None self.locked = None - self.tags = None + self.tags = tags class KeyVaultProperties(Model): @@ -409,32 +438,6 @@ def __init__(self, *, key_identifier: str=None, identity_client_id: str=None, ** self.identity_client_id = identity_client_id -class ListKeyValueParameters(Model): - """The parameters used to list a configuration store key-value. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key to retrieve. - :type key: str - :param label: The label of the key. - :type label: str - """ - - _validation = { - 'key': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - } - - def __init__(self, *, key: str, label: str=None, **kwargs) -> None: - super(ListKeyValueParameters, self).__init__(**kwargs) - self.key = key - self.label = label - - class NameAvailabilityStatus(Model): """The result of a request to check the availability of a resource name. diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_paged_models.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_paged_models.py index 1605c1056678..4b75921107d4 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_paged_models.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_paged_models.py @@ -77,3 +77,16 @@ class PrivateLinkResourcePaged(Paged): def __init__(self, *args, **kwargs): super(PrivateLinkResourcePaged, self).__init__(*args, **kwargs) +class KeyValuePaged(Paged): + """ + A paging container for iterating over a list of :class:`KeyValue ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[KeyValue]'} + } + + def __init__(self, *args, **kwargs): + + super(KeyValuePaged, self).__init__(*args, **kwargs) diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/__init__.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/__init__.py index 3f2fa8e0ec48..0651b55494aa 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/__init__.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/__init__.py @@ -13,10 +13,12 @@ from ._operations import Operations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._key_values_operations import KeyValuesOperations __all__ = [ 'ConfigurationStoresOperations', 'Operations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', + 'KeyValuesOperations', ] diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_configuration_stores_operations.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_configuration_stores_operations.py index e81ce3612e77..a729c4438cf2 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_configuration_stores_operations.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_configuration_stores_operations.py @@ -26,7 +26,7 @@ class ConfigurationStoresOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The client API version. Constant value: "2020-06-01". + :ivar api_version: The client API version. Constant value: "2020-07-01-preview". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-01" + self.api_version = "2020-07-01-preview" self.config = config @@ -59,7 +59,7 @@ def list( :rtype: ~azure.mgmt.appconfiguration.models.ConfigurationStorePaged[~azure.mgmt.appconfiguration.models.ConfigurationStore] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -100,7 +100,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -135,7 +135,7 @@ def list_by_resource_group( :rtype: ~azure.mgmt.appconfiguration.models.ConfigurationStorePaged[~azure.mgmt.appconfiguration.models.ConfigurationStore] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -177,7 +177,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -208,7 +208,7 @@ def get( :rtype: ~azure.mgmt.appconfiguration.models.ConfigurationStore or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -238,7 +238,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -286,7 +286,7 @@ def _create_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -326,7 +326,7 @@ def create( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appconfiguration.models.ConfigurationStore]] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ raw_result = self._create_initial( resource_group_name=resource_group_name, @@ -385,7 +385,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -410,7 +410,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -469,7 +469,7 @@ def _update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -509,7 +509,7 @@ def update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appconfiguration.models.ConfigurationStore]] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ raw_result = self._update_initial( resource_group_name=resource_group_name, @@ -562,7 +562,7 @@ def list_keys( :rtype: ~azure.mgmt.appconfiguration.models.ApiKeyPaged[~azure.mgmt.appconfiguration.models.ApiKey] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -605,7 +605,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -638,7 +638,7 @@ def regenerate_key( :rtype: ~azure.mgmt.appconfiguration.models.ApiKey or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ regenerate_key_parameters = models.RegenerateKeyParameters(id=id) @@ -674,7 +674,7 @@ def regenerate_key( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -686,74 +686,3 @@ def regenerate_key( return deserialized regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/RegenerateKey'} - - def list_key_value( - self, resource_group_name, config_store_name, key, label=None, custom_headers=None, raw=False, **operation_config): - """Lists a configuration store key-value. - - :param resource_group_name: The name of the resource group to which - the container registry belongs. - :type resource_group_name: str - :param config_store_name: The name of the configuration store. - :type config_store_name: str - :param key: The key to retrieve. - :type key: str - :param label: The label of the key. - :type label: 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: KeyValue or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.appconfiguration.models.KeyValue or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorException` - """ - list_key_value_parameters = models.ListKeyValueParameters(key=key, label=label) - - # Construct URL - url = self.list_key_value.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'configStoreName': self._serialize.url("config_store_name", config_store_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9_-]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(list_key_value_parameters, 'ListKeyValueParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyValue', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_key_value.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/listKeyValue'} diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_key_values_operations.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_key_values_operations.py new file mode 100644 index 000000000000..bdb1192a6f1d --- /dev/null +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_key_values_operations.py @@ -0,0 +1,345 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class KeyValuesOperations(object): + """KeyValuesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The client API version. Constant value: "2020-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-07-01-preview" + + self.config = config + + def list_by_configuration_store( + self, resource_group_name, config_store_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Lists the key-values for a given configuration store. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param config_store_name: The name of the configuration store. + :type config_store_name: str + :param skip_token: A skip token is used to continue retrieving items + after an operation returns a partial result. If a previous response + contains a nextLink element, the value of the nextLink element will + include a skipToken parameter that specifies a starting point to use + for subsequent calls. + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of KeyValue + :rtype: + ~azure.mgmt.appconfiguration.models.KeyValuePaged[~azure.mgmt.appconfiguration.models.KeyValue] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_configuration_store.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'configStoreName': self._serialize.url("config_store_name", config_store_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9_-]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.KeyValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_configuration_store.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues'} + + def get( + self, resource_group_name, config_store_name, key_value_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified key-value. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param config_store_name: The name of the configuration store. + :type config_store_name: str + :param key_value_name: Identifier of key and label combination. Key + and label are joined by $ character. Label is optional. + :type key_value_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: KeyValue or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.appconfiguration.models.KeyValue or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'configStoreName': self._serialize.url("config_store_name", config_store_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9_-]*$'), + 'keyValueName': self._serialize.url("key_value_name", key_value_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyValue', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}'} + + def create_or_update( + self, resource_group_name, config_store_name, key_value_name, key_value_parameters=None, custom_headers=None, raw=False, **operation_config): + """Creates a key-value. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param config_store_name: The name of the configuration store. + :type config_store_name: str + :param key_value_name: Identifier of key and label combination. Key + and label are joined by $ character. Label is optional. + :type key_value_name: str + :param key_value_parameters: The parameters for creating a key-value. + :type key_value_parameters: + ~azure.mgmt.appconfiguration.models.KeyValue + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyValue or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.appconfiguration.models.KeyValue or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'configStoreName': self._serialize.url("config_store_name", config_store_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9_-]*$'), + 'keyValueName': self._serialize.url("key_value_name", key_value_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if key_value_parameters is not None: + body_content = self._serialize.body(key_value_parameters, 'KeyValue') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyValue', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}'} + + + def _delete_initial( + self, resource_group_name, config_store_name, key_value_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'configStoreName': self._serialize.url("config_store_name", config_store_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9_-]*$'), + 'keyValueName': self._serialize.url("key_value_name", key_value_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, config_store_name, key_value_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a key-value. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param config_store_name: The name of the configuration store. + :type config_store_name: str + :param key_value_name: Identifier of key and label combination. Key + and label are joined by $ character. Label is optional. + :type key_value_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + config_store_name=config_store_name, + key_value_name=key_value_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}'} diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_operations.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_operations.py index 98a1d019392d..b3bcd9ee1940 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_operations.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_operations.py @@ -24,7 +24,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The client API version. Constant value: "2020-06-01". + :ivar api_version: The client API version. Constant value: "2020-07-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-01" + self.api_version = "2020-07-01-preview" self.config = config @@ -53,7 +53,7 @@ def check_name_availability( :rtype: ~azure.mgmt.appconfiguration.models.NameAvailabilityStatus or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ check_name_availability_parameters = models.CheckNameAvailabilityParameters(name=name) @@ -87,7 +87,7 @@ def check_name_availability( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -119,7 +119,7 @@ def list( :rtype: ~azure.mgmt.appconfiguration.models.OperationDefinitionPaged[~azure.mgmt.appconfiguration.models.OperationDefinition] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -156,7 +156,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_endpoint_connections_operations.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_endpoint_connections_operations.py index 0994852951e1..bdf1dcae229c 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_endpoint_connections_operations.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_endpoint_connections_operations.py @@ -26,7 +26,7 @@ class PrivateEndpointConnectionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The client API version. Constant value: "2020-06-01". + :ivar api_version: The client API version. Constant value: "2020-07-01-preview". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-01" + self.api_version = "2020-07-01-preview" self.config = config @@ -58,7 +58,7 @@ def list_by_configuration_store( :rtype: ~azure.mgmt.appconfiguration.models.PrivateEndpointConnectionPaged[~azure.mgmt.appconfiguration.models.PrivateEndpointConnection] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -99,7 +99,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -134,7 +134,7 @@ def get( :rtype: ~azure.mgmt.appconfiguration.models.PrivateEndpointConnection or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -165,7 +165,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -216,7 +216,7 @@ def _create_or_update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -265,7 +265,7 @@ def create_or_update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appconfiguration.models.PrivateEndpointConnection]] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -327,7 +327,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -355,7 +355,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py index 2889aa906108..4f753c19c3fa 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py @@ -24,7 +24,7 @@ class PrivateLinkResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The client API version. Constant value: "2020-06-01". + :ivar api_version: The client API version. Constant value: "2020-07-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-01" + self.api_version = "2020-07-01-preview" self.config = config @@ -57,7 +57,7 @@ def list_by_configuration_store( :rtype: ~azure.mgmt.appconfiguration.models.PrivateLinkResourcePaged[~azure.mgmt.appconfiguration.models.PrivateLinkResource] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -98,7 +98,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -132,7 +132,7 @@ def get( :rtype: ~azure.mgmt.appconfiguration.models.PrivateLinkResource or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -163,7 +163,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: