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..8f670de6be62 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 @@ -24,6 +24,7 @@ from ._models_py3 import OperationDefinitionDisplay from ._models_py3 import PrivateEndpoint from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionReference from ._models_py3 import PrivateLinkResource from ._models_py3 import PrivateLinkServiceConnectionState from ._models_py3 import RegenerateKeyParameters @@ -46,6 +47,7 @@ from ._models import OperationDefinitionDisplay from ._models import PrivateEndpoint from ._models import PrivateEndpointConnection + from ._models import PrivateEndpointConnectionReference from ._models import PrivateLinkResource from ._models import PrivateLinkServiceConnectionState from ._models import RegenerateKeyParameters @@ -63,6 +65,7 @@ ProvisioningState, ConnectionStatus, ActionsRequired, + PublicNetworkAccess, ) __all__ = [ @@ -80,6 +83,7 @@ 'OperationDefinitionDisplay', 'PrivateEndpoint', 'PrivateEndpointConnection', + 'PrivateEndpointConnectionReference', 'PrivateLinkResource', 'PrivateLinkServiceConnectionState', 'RegenerateKeyParameters', @@ -96,4 +100,5 @@ 'ProvisioningState', 'ConnectionStatus', 'ActionsRequired', + 'PublicNetworkAccess', ] 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..81df981c080e 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 @@ -42,3 +42,9 @@ class ActionsRequired(str, Enum): none = "None" recreate = "Recreate" + + +class PublicNetworkAccess(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" 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..7ce7a269eda9 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 @@ -183,6 +183,15 @@ class ConfigurationStore(Resource): :vartype endpoint: str :param encryption: The encryption settings of the configuration store. :type encryption: ~azure.mgmt.appconfiguration.models.EncryptionProperties + :ivar private_endpoint_connections: The list of private endpoint + connections that are set up for this resource. + :vartype private_endpoint_connections: + list[~azure.mgmt.appconfiguration.models.PrivateEndpointConnectionReference] + :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 sku: Required. The sku of the configuration store. :type sku: ~azure.mgmt.appconfiguration.models.Sku """ @@ -195,6 +204,7 @@ class ConfigurationStore(Resource): 'provisioning_state': {'readonly': True}, 'creation_date': {'readonly': True}, 'endpoint': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, 'sku': {'required': True}, } @@ -209,6 +219,8 @@ class ConfigurationStore(Resource): 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnectionReference]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, } @@ -219,6 +231,8 @@ def __init__(self, **kwargs): self.creation_date = None self.endpoint = None self.encryption = kwargs.get('encryption', None) + self.private_endpoint_connections = None + self.public_network_access = kwargs.get('public_network_access', None) self.sku = kwargs.get('sku', None) @@ -578,6 +592,62 @@ def __init__(self, **kwargs): self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) +class PrivateEndpointConnectionReference(Model): + """A reference to a related 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(PrivateEndpointConnectionReference, 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. @@ -594,6 +664,9 @@ class PrivateLinkResource(Model): :vartype group_id: str :ivar required_members: The private link resource required member names. :vartype required_members: list[str] + :ivar required_zone_names: The list of required DNS zone names of the + private link resource. + :vartype required_zone_names: list[str] """ _validation = { @@ -602,6 +675,7 @@ class PrivateLinkResource(Model): 'type': {'readonly': True}, 'group_id': {'readonly': True}, 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, } _attribute_map = { @@ -610,6 +684,7 @@ class PrivateLinkResource(Model): 'type': {'key': 'type', 'type': 'str'}, 'group_id': {'key': 'properties.groupId', 'type': 'str'}, 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -619,6 +694,7 @@ def __init__(self, **kwargs): self.type = None self.group_id = None self.required_members = None + self.required_zone_names = None class PrivateLinkServiceConnectionState(Model): 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..5dc9335e0d43 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 @@ -183,6 +183,15 @@ class ConfigurationStore(Resource): :vartype endpoint: str :param encryption: The encryption settings of the configuration store. :type encryption: ~azure.mgmt.appconfiguration.models.EncryptionProperties + :ivar private_endpoint_connections: The list of private endpoint + connections that are set up for this resource. + :vartype private_endpoint_connections: + list[~azure.mgmt.appconfiguration.models.PrivateEndpointConnectionReference] + :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 sku: Required. The sku of the configuration store. :type sku: ~azure.mgmt.appconfiguration.models.Sku """ @@ -195,6 +204,7 @@ class ConfigurationStore(Resource): 'provisioning_state': {'readonly': True}, 'creation_date': {'readonly': True}, 'endpoint': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, 'sku': {'required': True}, } @@ -209,16 +219,20 @@ class ConfigurationStore(Resource): 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnectionReference]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, '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, encryption=None, public_network_access=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.private_endpoint_connections = None + self.public_network_access = public_network_access self.sku = sku @@ -578,6 +592,62 @@ def __init__(self, *, private_link_service_connection_state, private_endpoint=No self.private_link_service_connection_state = private_link_service_connection_state +class PrivateEndpointConnectionReference(Model): + """A reference to a related 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(PrivateEndpointConnectionReference, 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. @@ -594,6 +664,9 @@ class PrivateLinkResource(Model): :vartype group_id: str :ivar required_members: The private link resource required member names. :vartype required_members: list[str] + :ivar required_zone_names: The list of required DNS zone names of the + private link resource. + :vartype required_zone_names: list[str] """ _validation = { @@ -602,6 +675,7 @@ class PrivateLinkResource(Model): 'type': {'readonly': True}, 'group_id': {'readonly': True}, 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, } _attribute_map = { @@ -610,6 +684,7 @@ class PrivateLinkResource(Model): 'type': {'key': 'type', 'type': 'str'}, 'group_id': {'key': 'properties.groupId', 'type': 'str'}, 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, } def __init__(self, **kwargs) -> None: @@ -619,6 +694,7 @@ def __init__(self, **kwargs) -> None: self.type = None self.group_id = None self.required_members = None + self.required_zone_names = None class PrivateLinkServiceConnectionState(Model): diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/setup.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/setup.py index f8e42b642997..7e202d136576 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/setup.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)