Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR track2_azure-mgmt-appconfiguration] [T2] appconfiguration - enable t2 generation #11870

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -63,6 +65,7 @@
ProvisioningState,
ConnectionStatus,
ActionsRequired,
PublicNetworkAccess,
)

__all__ = [
Expand All @@ -80,6 +83,7 @@
'OperationDefinitionDisplay',
'PrivateEndpoint',
'PrivateEndpointConnection',
'PrivateEndpointConnectionReference',
'PrivateLinkResource',
'PrivateLinkServiceConnectionState',
'RegenerateKeyParameters',
Expand All @@ -96,4 +100,5 @@
'ProvisioningState',
'ConnectionStatus',
'ActionsRequired',
'PublicNetworkAccess',
]
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ class ActionsRequired(str, Enum):

none = "None"
recreate = "Recreate"


class PublicNetworkAccess(str, Enum):

enabled = "Enabled"
disabled = "Disabled"
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand All @@ -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},
}

Expand All @@ -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'},
}

Expand All @@ -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)


Expand Down Expand Up @@ -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.

Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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):
Expand All @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand All @@ -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},
}

Expand All @@ -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


Expand Down Expand Up @@ -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.

Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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:
Expand All @@ -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):
Expand Down
4 changes: 3 additions & 1 deletion sdk/appconfiguration/azure-mgmt-appconfiguration/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down