diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py index 70047606cb69..e9b3d955406e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py @@ -39,6 +39,9 @@ from ._models_py3 import Resource from ._models_py3 import Server from ._models_py3 import ServerForCreate + from ._models_py3 import ServerPrivateEndpointConnection + from ._models_py3 import ServerPrivateEndpointConnectionProperties + from ._models_py3 import ServerPrivateLinkServiceConnectionStateProperty from ._models_py3 import ServerPropertiesForCreate from ._models_py3 import ServerPropertiesForDefaultCreate from ._models_py3 import ServerPropertiesForGeoRestore @@ -84,6 +87,9 @@ from ._models import Resource from ._models import Server from ._models import ServerForCreate + from ._models import ServerPrivateEndpointConnection + from ._models import ServerPrivateEndpointConnectionProperties + from ._models import ServerPrivateLinkServiceConnectionStateProperty from ._models import ServerPropertiesForCreate from ._models import ServerPropertiesForDefaultCreate from ._models import ServerPropertiesForGeoRestore @@ -116,9 +122,13 @@ from ._maria_db_management_client_enums import ( ServerVersion, SslEnforcementEnum, + PrivateLinkServiceConnectionStateStatus, + PrivateLinkServiceConnectionStateActionsRequire, + PrivateEndpointProvisioningState, ServerState, GeoRedundantBackup, StorageAutogrow, + PublicNetworkAccessEnum, SkuTier, VirtualNetworkRuleState, OperationOrigin, @@ -155,6 +165,9 @@ 'Resource', 'Server', 'ServerForCreate', + 'ServerPrivateEndpointConnection', + 'ServerPrivateEndpointConnectionProperties', + 'ServerPrivateLinkServiceConnectionStateProperty', 'ServerPropertiesForCreate', 'ServerPropertiesForDefaultCreate', 'ServerPropertiesForGeoRestore', @@ -186,9 +199,13 @@ 'PrivateLinkResourcePaged', 'ServerVersion', 'SslEnforcementEnum', + 'PrivateLinkServiceConnectionStateStatus', + 'PrivateLinkServiceConnectionStateActionsRequire', + 'PrivateEndpointProvisioningState', 'ServerState', 'GeoRedundantBackup', 'StorageAutogrow', + 'PublicNetworkAccessEnum', 'SkuTier', 'VirtualNetworkRuleState', 'OperationOrigin', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_maria_db_management_client_enums.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_maria_db_management_client_enums.py index 741cf2c884d9..8bd3dcdab5bb 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_maria_db_management_client_enums.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_maria_db_management_client_enums.py @@ -24,6 +24,28 @@ class SslEnforcementEnum(str, Enum): disabled = "Disabled" +class PrivateLinkServiceConnectionStateStatus(str, Enum): + + approved = "Approved" + pending = "Pending" + rejected = "Rejected" + disconnected = "Disconnected" + + +class PrivateLinkServiceConnectionStateActionsRequire(str, Enum): + + none = "None" + + +class PrivateEndpointProvisioningState(str, Enum): + + approving = "Approving" + ready = "Ready" + dropping = "Dropping" + failed = "Failed" + rejecting = "Rejecting" + + class ServerState(str, Enum): ready = "Ready" @@ -43,6 +65,12 @@ class StorageAutogrow(str, Enum): disabled = "Disabled" +class PublicNetworkAccessEnum(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class SkuTier(str, Enum): basic = "Basic" diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models.py index 5ac3699b3022..85cdc09bb648 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models.py @@ -1161,6 +1161,15 @@ class Server(TrackedResource): :param replica_capacity: The maximum number of replicas that a master server can have. :type replica_capacity: int + :param public_network_access: Whether or not public endpoint access is + allowed for this server. Value is optional but if passed in, must be + 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum + :ivar private_endpoint_connections: List of private endpoint connections + on a server + :vartype private_endpoint_connections: + list[~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnection] """ _validation = { @@ -1169,6 +1178,7 @@ class Server(TrackedResource): 'type': {'readonly': True}, 'location': {'required': True}, 'replica_capacity': {'minimum': 0}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { @@ -1188,6 +1198,8 @@ class Server(TrackedResource): 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ServerPrivateEndpointConnection]'}, } def __init__(self, **kwargs): @@ -1203,6 +1215,8 @@ def __init__(self, **kwargs): self.replication_role = kwargs.get('replication_role', None) self.master_server_id = kwargs.get('master_server_id', None) self.replica_capacity = kwargs.get('replica_capacity', None) + self.public_network_access = kwargs.get('public_network_access', None) + self.private_endpoint_connections = None class ServerForCreate(Model): @@ -1241,6 +1255,112 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class ServerPrivateEndpointConnection(Model): + """A private endpoint connection under a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id of the private endpoint connection. + :vartype id: str + :ivar properties: Private endpoint connection properties + :vartype properties: + ~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ServerPrivateEndpointConnectionProperties'}, + } + + def __init__(self, **kwargs): + super(ServerPrivateEndpointConnection, self).__init__(**kwargs) + self.id = None + self.properties = None + + +class ServerPrivateEndpointConnectionProperties(Model): + """Properties of a private endpoint connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param private_endpoint: Private endpoint which the connection belongs to. + :type private_endpoint: + ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.rdbms.mariadb.models.ServerPrivateLinkServiceConnectionStateProperty + :ivar provisioning_state: State of the private endpoint connection. + Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', + 'Rejecting' + :vartype provisioning_state: str or + ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointProperty'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ServerPrivateLinkServiceConnectionStateProperty'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerPrivateEndpointConnectionProperties, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None + + +class ServerPrivateLinkServiceConnectionStateProperty(Model): + """ServerPrivateLinkServiceConnectionStateProperty. + + 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. + + :param status: Required. The private link service connection status. + Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateStatus + :param description: Required. The private link service connection + description. + :type description: str + :ivar actions_required: The actions required for private link service + connection. Possible values include: 'None' + :vartype actions_required: str or + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateActionsRequire + """ + + _validation = { + 'status': {'required': True}, + 'description': {'required': True}, + '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(ServerPrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = None + + class ServerPropertiesForCreate(Model): """The properties used to create a new server. diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models_py3.py index c84f00be6592..0c8808aaf231 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models_py3.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models_py3.py @@ -1161,6 +1161,15 @@ class Server(TrackedResource): :param replica_capacity: The maximum number of replicas that a master server can have. :type replica_capacity: int + :param public_network_access: Whether or not public endpoint access is + allowed for this server. Value is optional but if passed in, must be + 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum + :ivar private_endpoint_connections: List of private endpoint connections + on a server + :vartype private_endpoint_connections: + list[~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnection] """ _validation = { @@ -1169,6 +1178,7 @@ class Server(TrackedResource): 'type': {'readonly': True}, 'location': {'required': True}, 'replica_capacity': {'minimum': 0}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { @@ -1188,9 +1198,11 @@ class Server(TrackedResource): 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ServerPrivateEndpointConnection]'}, } - def __init__(self, *, location: str, tags=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, replication_role: str=None, master_server_id: str=None, replica_capacity: int=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, replication_role: str=None, master_server_id: str=None, replica_capacity: int=None, public_network_access=None, **kwargs) -> None: super(Server, self).__init__(tags=tags, location=location, **kwargs) self.sku = sku self.administrator_login = administrator_login @@ -1203,6 +1215,8 @@ def __init__(self, *, location: str, tags=None, sku=None, administrator_login: s self.replication_role = replication_role self.master_server_id = master_server_id self.replica_capacity = replica_capacity + self.public_network_access = public_network_access + self.private_endpoint_connections = None class ServerForCreate(Model): @@ -1241,6 +1255,112 @@ def __init__(self, *, properties, location: str, sku=None, tags=None, **kwargs) self.tags = tags +class ServerPrivateEndpointConnection(Model): + """A private endpoint connection under a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id of the private endpoint connection. + :vartype id: str + :ivar properties: Private endpoint connection properties + :vartype properties: + ~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ServerPrivateEndpointConnectionProperties'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerPrivateEndpointConnection, self).__init__(**kwargs) + self.id = None + self.properties = None + + +class ServerPrivateEndpointConnectionProperties(Model): + """Properties of a private endpoint connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param private_endpoint: Private endpoint which the connection belongs to. + :type private_endpoint: + ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.rdbms.mariadb.models.ServerPrivateLinkServiceConnectionStateProperty + :ivar provisioning_state: State of the private endpoint connection. + Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', + 'Rejecting' + :vartype provisioning_state: str or + ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointProperty'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ServerPrivateLinkServiceConnectionStateProperty'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + super(ServerPrivateEndpointConnectionProperties, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + + +class ServerPrivateLinkServiceConnectionStateProperty(Model): + """ServerPrivateLinkServiceConnectionStateProperty. + + 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. + + :param status: Required. The private link service connection status. + Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateStatus + :param description: Required. The private link service connection + description. + :type description: str + :ivar actions_required: The actions required for private link service + connection. Possible values include: 'None' + :vartype actions_required: str or + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateActionsRequire + """ + + _validation = { + 'status': {'required': True}, + 'description': {'required': True}, + '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, description: str, **kwargs) -> None: + super(ServerPrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = None + + class ServerPropertiesForCreate(Model): """The properties used to create a new server.