diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/README.rst b/sdk/appconfiguration/azure-mgmt-appconfiguration/README.rst index d609f27c53ac..f9a9e7f4ad60 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/README.rst +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure App Configuration Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. 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 5b5a199b574c..1a3fc30a3a00 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 @@ -15,8 +15,6 @@ from ._configuration import AppConfigurationManagementClientConfiguration from .operations import ConfigurationStoresOperations from .operations import Operations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations from . import models @@ -30,10 +28,6 @@ class AppConfigurationManagementClient(SDKClient): :vartype configuration_stores: azure.mgmt.appconfiguration.operations.ConfigurationStoresOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.appconfiguration.operations.Operations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.appconfiguration.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.appconfiguration.operations.PrivateLinkResourcesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -50,7 +44,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 = '2019-11-01-preview' + self.api_version = '2019-10-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -58,7 +52,3 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - 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 b8c08ff643a5..00ae3f38392d 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 @@ -14,18 +14,12 @@ from ._models_py3 import CheckNameAvailabilityParameters 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 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 - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkServiceConnectionState from ._models_py3 import RegenerateKeyParameters from ._models_py3 import Resource from ._models_py3 import ResourceIdentity @@ -36,18 +30,12 @@ from ._models import CheckNameAvailabilityParameters from ._models import ConfigurationStore from ._models import ConfigurationStoreUpdateParameters - from ._models import EncryptionProperties from ._models import Error, ErrorException from ._models import KeyValue - from ._models import KeyVaultProperties from ._models import ListKeyValueParameters from ._models import NameAvailabilityStatus from ._models import OperationDefinition from ._models import OperationDefinitionDisplay - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateLinkResource - from ._models import PrivateLinkServiceConnectionState from ._models import RegenerateKeyParameters from ._models import Resource from ._models import ResourceIdentity @@ -56,13 +44,9 @@ from ._paged_models import ApiKeyPaged from ._paged_models import ConfigurationStorePaged from ._paged_models import OperationDefinitionPaged -from ._paged_models import PrivateEndpointConnectionPaged -from ._paged_models import PrivateLinkResourcePaged from ._app_configuration_management_client_enums import ( IdentityType, ProvisioningState, - ConnectionStatus, - ActionsRequired, ) __all__ = [ @@ -70,18 +54,12 @@ 'CheckNameAvailabilityParameters', 'ConfigurationStore', 'ConfigurationStoreUpdateParameters', - 'EncryptionProperties', 'Error', 'ErrorException', 'KeyValue', - 'KeyVaultProperties', 'ListKeyValueParameters', 'NameAvailabilityStatus', 'OperationDefinition', 'OperationDefinitionDisplay', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateLinkResource', - 'PrivateLinkServiceConnectionState', 'RegenerateKeyParameters', 'Resource', 'ResourceIdentity', @@ -90,10 +68,6 @@ 'ConfigurationStorePaged', 'ApiKeyPaged', 'OperationDefinitionPaged', - 'PrivateEndpointConnectionPaged', - 'PrivateLinkResourcePaged', 'IdentityType', 'ProvisioningState', - 'ConnectionStatus', - 'ActionsRequired', ] diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_app_configuration_management_client_enums.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_app_configuration_management_client_enums.py index 4d39f09ae924..dbecfe5d262d 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_app_configuration_management_client_enums.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/models/_app_configuration_management_client_enums.py @@ -28,17 +28,3 @@ class ProvisioningState(str, Enum): succeeded = "Succeeded" failed = "Failed" canceled = "Canceled" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" - - -class ActionsRequired(str, Enum): - - none = "None" - recreate = "Recreate" 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 e87535d78720..7e1afb04a91c 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 @@ -181,8 +181,6 @@ class ConfigurationStore(Resource): :ivar endpoint: The DNS endpoint where the configuration store API will be available. :vartype endpoint: str - :param encryption: The encryption settings of the configuration store. - :type encryption: ~azure.mgmt.appconfiguration.models.EncryptionProperties :param sku: Required. The sku of the configuration store. :type sku: ~azure.mgmt.appconfiguration.models.Sku """ @@ -208,7 +206,6 @@ class ConfigurationStore(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, - 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, 'sku': {'key': 'sku', 'type': 'Sku'}, } @@ -218,15 +215,14 @@ def __init__(self, **kwargs): self.provisioning_state = None self.creation_date = None self.endpoint = None - self.encryption = kwargs.get('encryption', None) self.sku = kwargs.get('sku', None) class ConfigurationStoreUpdateParameters(Model): """The parameters for updating a configuration store. - :param encryption: The encryption settings of the configuration store. - :type encryption: ~azure.mgmt.appconfiguration.models.EncryptionProperties + :param properties: The properties for updating a configuration store. + :type properties: object :param identity: The managed identity information for the configuration store. :type identity: ~azure.mgmt.appconfiguration.models.ResourceIdentity @@ -237,7 +233,7 @@ class ConfigurationStoreUpdateParameters(Model): """ _attribute_map = { - 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'properties': {'key': 'properties', 'type': 'object'}, 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'tags': {'key': 'tags', 'type': '{str}'}, @@ -245,29 +241,12 @@ class ConfigurationStoreUpdateParameters(Model): def __init__(self, **kwargs): super(ConfigurationStoreUpdateParameters, self).__init__(**kwargs) - self.encryption = kwargs.get('encryption', None) + self.properties = kwargs.get('properties', None) self.identity = kwargs.get('identity', None) self.sku = kwargs.get('sku', None) self.tags = kwargs.get('tags', None) -class EncryptionProperties(Model): - """The encryption settings for a configuration store. - - :param key_vault_properties: Key vault properties. - :type key_vault_properties: - ~azure.mgmt.appconfiguration.models.KeyVaultProperties - """ - - _attribute_map = { - 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, - } - - def __init__(self, **kwargs): - super(EncryptionProperties, self).__init__(**kwargs) - self.key_vault_properties = kwargs.get('key_vault_properties', None) - - class Error(Model): """AppConfiguration error object. @@ -367,27 +346,6 @@ def __init__(self, **kwargs): self.tags = None -class KeyVaultProperties(Model): - """Settings concerning key vault encryption for a configuration store. - - :param key_identifier: The URI of the key vault key used to encrypt data. - :type key_identifier: str - :param identity_client_id: The client id of the identity which will be - used to access key vault. - :type identity_client_id: str - """ - - _attribute_map = { - 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, - 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultProperties, self).__init__(**kwargs) - self.key_identifier = kwargs.get('key_identifier', None) - self.identity_client_id = kwargs.get('identity_client_id', None) - - class ListKeyValueParameters(Model): """The parameters used to list a configuration store key-value. @@ -506,155 +464,6 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: 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 provisioning_state: The provisioning status of the private endpoint - connection. Possible values include: 'Creating', 'Updating', 'Deleting', - 'Succeeded', 'Failed', 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.appconfiguration.models.ProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.appconfiguration.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.appconfiguration.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateLinkResource(Model): - """A resource that supports private link capabilities. - - 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 group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.group_id = None - self.required_members = None - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or ~azure.mgmt.appconfiguration.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - :ivar actions_required: Any action that is required beyond basic workflow - (approve/ reject/ disconnect). Possible values include: 'None', 'Recreate' - :vartype actions_required: str or - ~azure.mgmt.appconfiguration.models.ActionsRequired - """ - - _validation = { - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = None - - class RegenerateKeyParameters(Model): """The parameters used to regenerate an API key. @@ -672,7 +481,7 @@ def __init__(self, **kwargs): class ResourceIdentity(Model): - """An identity that can be associated with a resource. + """ResourceIdentity. Variables are only populated by the server, and will be ignored when sending a request. @@ -740,7 +549,7 @@ def __init__(self, **kwargs): class UserIdentity(Model): - """A resource identity that is managed by the user of the service. + """UserIdentity. Variables are only populated by the server, and will be ignored when sending a request. 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 78728848a16a..a2e1d9d17a97 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 @@ -181,8 +181,6 @@ class ConfigurationStore(Resource): :ivar endpoint: The DNS endpoint where the configuration store API will be available. :vartype endpoint: str - :param encryption: The encryption settings of the configuration store. - :type encryption: ~azure.mgmt.appconfiguration.models.EncryptionProperties :param sku: Required. The sku of the configuration store. :type sku: ~azure.mgmt.appconfiguration.models.Sku """ @@ -208,25 +206,23 @@ class ConfigurationStore(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, - 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, *, location: str, sku, tags=None, identity=None, encryption=None, **kwargs) -> None: + def __init__(self, *, location: str, sku, tags=None, identity=None, **kwargs) -> None: super(ConfigurationStore, self).__init__(location=location, tags=tags, **kwargs) self.identity = identity self.provisioning_state = None self.creation_date = None self.endpoint = None - self.encryption = encryption self.sku = sku class ConfigurationStoreUpdateParameters(Model): """The parameters for updating a configuration store. - :param encryption: The encryption settings of the configuration store. - :type encryption: ~azure.mgmt.appconfiguration.models.EncryptionProperties + :param properties: The properties for updating a configuration store. + :type properties: object :param identity: The managed identity information for the configuration store. :type identity: ~azure.mgmt.appconfiguration.models.ResourceIdentity @@ -237,37 +233,20 @@ class ConfigurationStoreUpdateParameters(Model): """ _attribute_map = { - 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'properties': {'key': 'properties', 'type': 'object'}, 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, encryption=None, identity=None, sku=None, tags=None, **kwargs) -> None: + def __init__(self, *, properties=None, identity=None, sku=None, tags=None, **kwargs) -> None: super(ConfigurationStoreUpdateParameters, self).__init__(**kwargs) - self.encryption = encryption + self.properties = properties self.identity = identity self.sku = sku self.tags = tags -class EncryptionProperties(Model): - """The encryption settings for a configuration store. - - :param key_vault_properties: Key vault properties. - :type key_vault_properties: - ~azure.mgmt.appconfiguration.models.KeyVaultProperties - """ - - _attribute_map = { - 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, - } - - def __init__(self, *, key_vault_properties=None, **kwargs) -> None: - super(EncryptionProperties, self).__init__(**kwargs) - self.key_vault_properties = key_vault_properties - - class Error(Model): """AppConfiguration error object. @@ -367,27 +346,6 @@ def __init__(self, **kwargs) -> None: self.tags = None -class KeyVaultProperties(Model): - """Settings concerning key vault encryption for a configuration store. - - :param key_identifier: The URI of the key vault key used to encrypt data. - :type key_identifier: str - :param identity_client_id: The client id of the identity which will be - used to access key vault. - :type identity_client_id: str - """ - - _attribute_map = { - 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, - 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, - } - - def __init__(self, *, key_identifier: str=None, identity_client_id: str=None, **kwargs) -> None: - super(KeyVaultProperties, self).__init__(**kwargs) - self.key_identifier = key_identifier - self.identity_client_id = identity_client_id - - class ListKeyValueParameters(Model): """The parameters used to list a configuration store key-value. @@ -506,155 +464,6 @@ def __init__(self, *, resource: str=None, operation: str=None, description: str= self.description = description -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: 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 provisioning_state: The provisioning status of the private endpoint - connection. Possible values include: 'Creating', 'Updating', 'Deleting', - 'Succeeded', 'Failed', 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.appconfiguration.models.ProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.appconfiguration.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.appconfiguration.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateLinkResource(Model): - """A resource that supports private link capabilities. - - 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 group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, - } - - def __init__(self, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.group_id = None - self.required_members = None - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or ~azure.mgmt.appconfiguration.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - :ivar actions_required: Any action that is required beyond basic workflow - (approve/ reject/ disconnect). Possible values include: 'None', 'Recreate' - :vartype actions_required: str or - ~azure.mgmt.appconfiguration.models.ActionsRequired - """ - - _validation = { - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = None - - class RegenerateKeyParameters(Model): """The parameters used to regenerate an API key. @@ -672,7 +481,7 @@ def __init__(self, *, id: str=None, **kwargs) -> None: class ResourceIdentity(Model): - """An identity that can be associated with a resource. + """ResourceIdentity. Variables are only populated by the server, and will be ignored when sending a request. @@ -740,7 +549,7 @@ def __init__(self, *, name: str, **kwargs) -> None: class UserIdentity(Model): - """A resource identity that is managed by the user of the service. + """UserIdentity. Variables are only populated by the server, and will be ignored when sending a request. 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..f1891f586461 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 @@ -51,29 +51,3 @@ class OperationDefinitionPaged(Paged): def __init__(self, *args, **kwargs): super(OperationDefinitionPaged, self).__init__(*args, **kwargs) -class PrivateEndpointConnectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} - } - - def __init__(self, *args, **kwargs): - - super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) -class PrivateLinkResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`PrivateLinkResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PrivateLinkResource]'} - } - - def __init__(self, *args, **kwargs): - - super(PrivateLinkResourcePaged, 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..5f75ce25a133 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 @@ -11,12 +11,8 @@ from ._configuration_stores_operations import ConfigurationStoresOperations from ._operations import Operations -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations -from ._private_link_resources_operations import PrivateLinkResourcesOperations __all__ = [ 'ConfigurationStoresOperations', 'Operations', - 'PrivateEndpointConnectionsOperations', - 'PrivateLinkResourcesOperations', ] 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 0cb0d8864f47..9a3bde26f9b8 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: "2019-11-01-preview". + :ivar api_version: The client API version. Constant value: "2019-10-01". """ 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 = "2019-11-01-preview" + self.api_version = "2019-10-01" self.config = config 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 41a22d5009da..d48b064e0e38 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: "2019-11-01-preview". + :ivar api_version: The client API version. Constant value: "2019-10-01". """ 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 = "2019-11-01-preview" + self.api_version = "2019-10-01" self.config = config 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 deleted file mode 100644 index c7a2614a0c32..000000000000 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,381 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations 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: "2019-11-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-11-01-preview" - - self.config = config - - def list_by_configuration_store( - self, resource_group_name, config_store_name, custom_headers=None, raw=False, **operation_config): - """Lists all private endpoint connections for a 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 dict custom_headers: headers that will 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 PrivateEndpointConnection - :rtype: - ~azure.mgmt.appconfiguration.models.PrivateEndpointConnectionPaged[~azure.mgmt.appconfiguration.models.PrivateEndpointConnection] - :raises: - :class:`ErrorException` - """ - 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') - - 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.ErrorException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_configuration_store.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections'} - - def get( - self, resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets the specified private endpoint connection associated with the - 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 private_endpoint_connection_name: Private endpoint connection - name - :type private_endpoint_connection_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: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.appconfiguration.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorException` - """ - # 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_-]*$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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.ErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', 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}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _create_or_update_initial( - self, resource_group_name, config_store_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): - private_endpoint_connection = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'configStoreName': self._serialize.url("config_store_name", config_store_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9_-]*$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - if response.status_code == 201: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, config_store_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Update the state of the specified private endpoint connection - associated with the 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 private_endpoint_connection_name: Private endpoint connection - name - :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.appconfiguration.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.appconfiguration.models.PrivateEndpoint - :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 - PrivateEndpointConnection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appconfiguration.models.PrivateEndpointConnection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appconfiguration.models.PrivateEndpointConnection]] - :raises: - :class:`ErrorException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - config_store_name=config_store_name, - private_endpoint_connection_name=private_endpoint_connection_name, - private_link_service_connection_state=private_link_service_connection_state, - private_endpoint=private_endpoint, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, config_store_name, private_endpoint_connection_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_-]*$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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.ErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection. - - :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 private_endpoint_connection_name: Private endpoint connection - name - :type private_endpoint_connection_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:`ErrorException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - config_store_name=config_store_name, - private_endpoint_connection_name=private_endpoint_connection_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}/privateEndpointConnections/{privateEndpointConnectionName}'} 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 deleted file mode 100644 index 83765212f058..000000000000 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations 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: "2019-11-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-11-01-preview" - - self.config = config - - def list_by_configuration_store( - self, resource_group_name, config_store_name, custom_headers=None, raw=False, **operation_config): - """Gets the private link resources that need to be created for a - 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 dict custom_headers: headers that will 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 PrivateLinkResource - :rtype: - ~azure.mgmt.appconfiguration.models.PrivateLinkResourcePaged[~azure.mgmt.appconfiguration.models.PrivateLinkResource] - :raises: - :class:`ErrorException` - """ - 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') - - 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.ErrorException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PrivateLinkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_configuration_store.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateLinkResources'} - - def get( - self, resource_group_name, config_store_name, group_name, custom_headers=None, raw=False, **operation_config): - """Gets a private link resource that need to be created for a - 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 group_name: The name of the private link resource group. - :type 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: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.appconfiguration.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorException` - """ - # 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_-]*$'), - 'groupName': self._serialize.url("group_name", group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', 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}/privateLinkResources/{groupName}'} diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/setup.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/setup.py index 1eee328efe1d..b0118f0f5b97 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/setup.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/setup.py @@ -67,6 +67,7 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,