From fac0ea0bc321ee2dbac0565b7c74e67250c62282 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 11 Dec 2020 22:27:57 +0000 Subject: [PATCH] CodeGen from PR 12077 in Azure/azure-rest-api-specs Merge 573157c577f3e15e67062ecabfaf5ff9a79245d2 into 88aae44f2ca08a5bf249f5cb64f9ce01d3429ec6 --- .../azure/mgmt/Purview/__init__.py | 19 + .../azure/mgmt/Purview/_configuration.py | 48 + .../Purview/_purview_management_client.py | 69 + .../azure/mgmt/Purview/models/__init__.py | 142 ++ .../azure/mgmt/Purview/models/_models.py | 1227 +++++++++++++++++ .../azure/mgmt/Purview/models/_models_py3.py | 1227 +++++++++++++++++ .../mgmt/Purview/models/_paged_models.py | 66 + .../_purview_management_client_enums.py | 61 + .../azure/mgmt/Purview/operations/__init__.py | 24 + .../operations/_accounts_operations.py | 632 +++++++++ .../_default_accounts_operations.py | 219 +++ .../mgmt/Purview/operations/_operations.py | 102 ++ ...private_endpoint_connections_operations.py | 349 +++++ .../_private_link_resources_operations.py | 179 +++ .../azure/mgmt/Purview/version.py | 13 + 15 files changed, 4377 insertions(+) create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/__init__.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/_configuration.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/_purview_management_client.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/__init__.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_models.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_models_py3.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_paged_models.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_purview_management_client_enums.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/__init__.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_accounts_operations.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_default_accounts_operations.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_operations.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_private_link_resources_operations.py create mode 100644 sdk/azure-mgmt-Purview/azure/mgmt/Purview/version.py diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/__init__.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/__init__.py new file mode 100644 index 000000000000..4ab7c3cb2ddb --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/__init__.py @@ -0,0 +1,19 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._configuration import PurviewManagementClientConfiguration +from ._purview_management_client import PurviewManagementClient +__all__ = ['PurviewManagementClient', 'PurviewManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/_configuration.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/_configuration.py new file mode 100644 index 000000000000..b42f33e4432e --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/_configuration.py @@ -0,0 +1,48 @@ +# 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. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class PurviewManagementClientConfiguration(AzureConfiguration): + """Configuration for PurviewManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(PurviewManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-Purview/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/_purview_management_client.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/_purview_management_client.py new file mode 100644 index 000000000000..81546b54a01b --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/_purview_management_client.py @@ -0,0 +1,69 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import PurviewManagementClientConfiguration +from .operations import AccountsOperations +from .operations import DefaultAccountsOperations +from .operations import Operations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from . import models + + +class PurviewManagementClient(SDKClient): + """Creates a Microsoft.Purview management client. + + :ivar config: Configuration for client. + :vartype config: PurviewManagementClientConfiguration + + :ivar accounts: Accounts operations + :vartype accounts: azure.mgmt.purview.operations.AccountsOperations + :ivar default_accounts: DefaultAccounts operations + :vartype default_accounts: azure.mgmt.purview.operations.DefaultAccountsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.purview.operations.Operations + :ivar private_endpoint_connections: PrivateEndpointConnections operations + :vartype private_endpoint_connections: azure.mgmt.purview.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResources operations + :vartype private_link_resources: azure.mgmt.purview.operations.PrivateLinkResourcesOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = PurviewManagementClientConfiguration(credentials, subscription_id, base_url) + super(PurviewManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2020-12-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.accounts = AccountsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.default_accounts = DefaultAccountsOperations( + 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/azure-mgmt-Purview/azure/mgmt/Purview/models/__init__.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/__init__.py new file mode 100644 index 000000000000..bf75167fe2ba --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/__init__.py @@ -0,0 +1,142 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AccessKeys + from ._models_py3 import Account + from ._models_py3 import AccountEndpoints + from ._models_py3 import AccountProperties + from ._models_py3 import AccountPropertiesEndpoints + from ._models_py3 import AccountPropertiesManagedResources + from ._models_py3 import AccountSku + from ._models_py3 import AccountUpdateParameters + from ._models_py3 import CheckNameAvailabilityRequest + from ._models_py3 import CheckNameAvailabilityResult + from ._models_py3 import CloudConnectors + from ._models_py3 import DefaultAccountPayload + from ._models_py3 import DeletedAccount + from ._models_py3 import DeletedAccountList + from ._models_py3 import DeletedAccountPropertiesModel + from ._models_py3 import DimensionProperties + from ._models_py3 import ErrorModel + from ._models_py3 import ErrorResponseModel, ErrorResponseModelException + from ._models_py3 import ErrorResponseModelError + from ._models_py3 import Identity + from ._models_py3 import ManagedResources + from ._models_py3 import NetworkAcls + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationMetaLogSpecification + from ._models_py3 import OperationMetaMetricSpecification + from ._models_py3 import OperationMetaServiceSpecification + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceProperties + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import ProxyResource + from ._models_py3 import TrackedResource +except (SyntaxError, ImportError): + from ._models import AccessKeys + from ._models import Account + from ._models import AccountEndpoints + from ._models import AccountProperties + from ._models import AccountPropertiesEndpoints + from ._models import AccountPropertiesManagedResources + from ._models import AccountSku + from ._models import AccountUpdateParameters + from ._models import CheckNameAvailabilityRequest + from ._models import CheckNameAvailabilityResult + from ._models import CloudConnectors + from ._models import DefaultAccountPayload + from ._models import DeletedAccount + from ._models import DeletedAccountList + from ._models import DeletedAccountPropertiesModel + from ._models import DimensionProperties + from ._models import ErrorModel + from ._models import ErrorResponseModel, ErrorResponseModelException + from ._models import ErrorResponseModelError + from ._models import Identity + from ._models import ManagedResources + from ._models import NetworkAcls + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationMetaLogSpecification + from ._models import OperationMetaMetricSpecification + from ._models import OperationMetaServiceSpecification + from ._models import PrivateEndpoint + from ._models import PrivateEndpointConnection + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceProperties + from ._models import PrivateLinkServiceConnectionState + from ._models import ProxyResource + from ._models import TrackedResource +from ._paged_models import AccountPaged +from ._paged_models import OperationPaged +from ._paged_models import PrivateEndpointConnectionPaged +from ._paged_models import PrivateLinkResourcePaged +from ._purview_management_client_enums import ( + DefaultAction, + Status, + ProvisioningState, + Name, + Type, + ScopeType, + Reason, +) + +__all__ = [ + 'AccessKeys', + 'Account', + 'AccountEndpoints', + 'AccountProperties', + 'AccountPropertiesEndpoints', + 'AccountPropertiesManagedResources', + 'AccountSku', + 'AccountUpdateParameters', + 'CheckNameAvailabilityRequest', + 'CheckNameAvailabilityResult', + 'CloudConnectors', + 'DefaultAccountPayload', + 'DeletedAccount', + 'DeletedAccountList', + 'DeletedAccountPropertiesModel', + 'DimensionProperties', + 'ErrorModel', + 'ErrorResponseModel', 'ErrorResponseModelException', + 'ErrorResponseModelError', + 'Identity', + 'ManagedResources', + 'NetworkAcls', + 'Operation', + 'OperationDisplay', + 'OperationMetaLogSpecification', + 'OperationMetaMetricSpecification', + 'OperationMetaServiceSpecification', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateLinkResource', + 'PrivateLinkResourceProperties', + 'PrivateLinkServiceConnectionState', + 'ProxyResource', + 'TrackedResource', + 'AccountPaged', + 'OperationPaged', + 'PrivateEndpointConnectionPaged', + 'PrivateLinkResourcePaged', + 'DefaultAction', + 'Status', + 'ProvisioningState', + 'Name', + 'Type', + 'ScopeType', + 'Reason', +] diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_models.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_models.py new file mode 100644 index 000000000000..6ee5f23493d6 --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_models.py @@ -0,0 +1,1227 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccessKeys(Model): + """The Account access keys. + + :param atlas_kafka_primary_endpoint: Gets or sets the primary connection + string. + :type atlas_kafka_primary_endpoint: str + :param atlas_kafka_secondary_endpoint: Gets or sets the secondary + connection string. + :type atlas_kafka_secondary_endpoint: str + """ + + _attribute_map = { + 'atlas_kafka_primary_endpoint': {'key': 'atlasKafkaPrimaryEndpoint', 'type': 'str'}, + 'atlas_kafka_secondary_endpoint': {'key': 'atlasKafkaSecondaryEndpoint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccessKeys, self).__init__(**kwargs) + self.atlas_kafka_primary_endpoint = kwargs.get('atlas_kafka_primary_endpoint', None) + self.atlas_kafka_secondary_endpoint = kwargs.get('atlas_kafka_secondary_endpoint', None) + + +class TrackedResource(Model): + """Azure ARM Tracked Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :param identity: Identity Info on the tracked resource + :type identity: ~azure.mgmt.purview.models.Identity + :param location: Gets or sets the location. + :type location: str + :ivar name: Gets or sets the name. + :vartype name: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] + :ivar type: Gets or sets the type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.id = None + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.name = None + self.tags = kwargs.get('tags', None) + self.type = None + + +class Account(TrackedResource): + """Account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :param identity: Identity Info on the tracked resource + :type identity: ~azure.mgmt.purview.models.Identity + :param location: Gets or sets the location. + :type location: str + :ivar name: Gets or sets the name. + :vartype name: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] + :ivar type: Gets or sets the type. + :vartype type: str + :param cloud_connectors: Cloud connectors. + External cloud identifier used as part of scanning configuration. + :type cloud_connectors: ~azure.mgmt.purview.models.CloudConnectors + :ivar created_at: Gets the time at which the entity was created. + :vartype created_at: datetime + :ivar created_by: Gets the creator of the entity. + :vartype created_by: str + :ivar created_by_object_id: Gets the creators of the entity's object id. + :vartype created_by_object_id: str + :ivar endpoints: The URIs that are the public endpoints of the account. + :vartype endpoints: ~azure.mgmt.purview.models.AccountPropertiesEndpoints + :ivar friendly_name: Gets or sets the friendly name. + :vartype friendly_name: str + :ivar managed_resources: Gets the resource identifiers of the managed + resources. + :vartype managed_resources: + ~azure.mgmt.purview.models.AccountPropertiesManagedResources + :param network_acls: Get the network ACLs. + :type network_acls: ~azure.mgmt.purview.models.NetworkAcls + :ivar private_endpoint_connections: Gets the private endpoint connections + information. + :vartype private_endpoint_connections: + list[~azure.mgmt.purview.models.PrivateEndpointConnection] + :ivar provisioning_state: Gets or sets the state of the provisioning. + Possible values include: 'Unknown', 'Creating', 'Moving', 'Deleting', + 'SoftDeleting', 'SoftDeleted', 'Failed', 'Succeeded' + :vartype provisioning_state: str or + ~azure.mgmt.purview.models.ProvisioningState + :param sku: Gets or sets the Sku. + :type sku: ~azure.mgmt.purview.models.AccountSku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'created_by_object_id': {'readonly': True}, + 'endpoints': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'managed_resources': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cloud_connectors': {'key': 'properties.cloudConnectors', 'type': 'CloudConnectors'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, + 'created_by_object_id': {'key': 'properties.createdByObjectId', 'type': 'str'}, + 'endpoints': {'key': 'properties.endpoints', 'type': 'AccountPropertiesEndpoints'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'managed_resources': {'key': 'properties.managedResources', 'type': 'AccountPropertiesManagedResources'}, + 'network_acls': {'key': 'properties.networkAcls', 'type': 'NetworkAcls'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'AccountSku'}, + } + + def __init__(self, **kwargs): + super(Account, self).__init__(**kwargs) + self.cloud_connectors = kwargs.get('cloud_connectors', None) + self.created_at = None + self.created_by = None + self.created_by_object_id = None + self.endpoints = None + self.friendly_name = None + self.managed_resources = None + self.network_acls = kwargs.get('network_acls', None) + self.private_endpoint_connections = None + self.provisioning_state = None + self.sku = kwargs.get('sku', None) + + +class AccountEndpoints(Model): + """The account endpoints. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar catalog: Gets the catalog endpoint. + :vartype catalog: str + :ivar guardian: Gets the guardian endpoint. + :vartype guardian: str + :ivar scan: Gets the scan endpoint. + :vartype scan: str + """ + + _validation = { + 'catalog': {'readonly': True}, + 'guardian': {'readonly': True}, + 'scan': {'readonly': True}, + } + + _attribute_map = { + 'catalog': {'key': 'catalog', 'type': 'str'}, + 'guardian': {'key': 'guardian', 'type': 'str'}, + 'scan': {'key': 'scan', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccountEndpoints, self).__init__(**kwargs) + self.catalog = None + self.guardian = None + self.scan = None + + +class AccountProperties(Model): + """The account properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param cloud_connectors: Cloud connectors. + External cloud identifier used as part of scanning configuration. + :type cloud_connectors: ~azure.mgmt.purview.models.CloudConnectors + :ivar created_at: Gets the time at which the entity was created. + :vartype created_at: datetime + :ivar created_by: Gets the creator of the entity. + :vartype created_by: str + :ivar created_by_object_id: Gets the creators of the entity's object id. + :vartype created_by_object_id: str + :ivar endpoints: The URIs that are the public endpoints of the account. + :vartype endpoints: ~azure.mgmt.purview.models.AccountPropertiesEndpoints + :ivar friendly_name: Gets or sets the friendly name. + :vartype friendly_name: str + :ivar managed_resources: Gets the resource identifiers of the managed + resources. + :vartype managed_resources: + ~azure.mgmt.purview.models.AccountPropertiesManagedResources + :param network_acls: Get the network ACLs. + :type network_acls: ~azure.mgmt.purview.models.NetworkAcls + :ivar private_endpoint_connections: Gets the private endpoint connections + information. + :vartype private_endpoint_connections: + list[~azure.mgmt.purview.models.PrivateEndpointConnection] + :ivar provisioning_state: Gets or sets the state of the provisioning. + Possible values include: 'Unknown', 'Creating', 'Moving', 'Deleting', + 'SoftDeleting', 'SoftDeleted', 'Failed', 'Succeeded' + :vartype provisioning_state: str or + ~azure.mgmt.purview.models.ProvisioningState + """ + + _validation = { + 'created_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'created_by_object_id': {'readonly': True}, + 'endpoints': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'managed_resources': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'cloud_connectors': {'key': 'cloudConnectors', 'type': 'CloudConnectors'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_object_id': {'key': 'createdByObjectId', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': 'AccountPropertiesEndpoints'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'managed_resources': {'key': 'managedResources', 'type': 'AccountPropertiesManagedResources'}, + 'network_acls': {'key': 'networkAcls', 'type': 'NetworkAcls'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccountProperties, self).__init__(**kwargs) + self.cloud_connectors = kwargs.get('cloud_connectors', None) + self.created_at = None + self.created_by = None + self.created_by_object_id = None + self.endpoints = None + self.friendly_name = None + self.managed_resources = None + self.network_acls = kwargs.get('network_acls', None) + self.private_endpoint_connections = None + self.provisioning_state = None + + +class AccountPropertiesEndpoints(AccountEndpoints): + """The URIs that are the public endpoints of the account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar catalog: Gets the catalog endpoint. + :vartype catalog: str + :ivar guardian: Gets the guardian endpoint. + :vartype guardian: str + :ivar scan: Gets the scan endpoint. + :vartype scan: str + """ + + _validation = { + 'catalog': {'readonly': True}, + 'guardian': {'readonly': True}, + 'scan': {'readonly': True}, + } + + _attribute_map = { + 'catalog': {'key': 'catalog', 'type': 'str'}, + 'guardian': {'key': 'guardian', 'type': 'str'}, + 'scan': {'key': 'scan', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccountPropertiesEndpoints, self).__init__(**kwargs) + + +class ManagedResources(Model): + """The managed resources in customer subscription. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_hub_namespace: Gets the managed event hub namespace resource + identifier. + :vartype event_hub_namespace: str + :ivar resource_group: Gets the managed resource group resource identifier. + This resource group will host resource dependencies for the account. + :vartype resource_group: str + :ivar storage_account: Gets the managed storage account resource + identifier. + :vartype storage_account: str + """ + + _validation = { + 'event_hub_namespace': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'storage_account': {'readonly': True}, + } + + _attribute_map = { + 'event_hub_namespace': {'key': 'eventHubNamespace', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'storage_account': {'key': 'storageAccount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedResources, self).__init__(**kwargs) + self.event_hub_namespace = None + self.resource_group = None + self.storage_account = None + + +class AccountPropertiesManagedResources(ManagedResources): + """Gets the resource identifiers of the managed resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_hub_namespace: Gets the managed event hub namespace resource + identifier. + :vartype event_hub_namespace: str + :ivar resource_group: Gets the managed resource group resource identifier. + This resource group will host resource dependencies for the account. + :vartype resource_group: str + :ivar storage_account: Gets the managed storage account resource + identifier. + :vartype storage_account: str + """ + + _validation = { + 'event_hub_namespace': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'storage_account': {'readonly': True}, + } + + _attribute_map = { + 'event_hub_namespace': {'key': 'eventHubNamespace', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'storage_account': {'key': 'storageAccount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccountPropertiesManagedResources, self).__init__(**kwargs) + + +class AccountSku(Model): + """The Sku. + + :param capacity: Gets or sets the sku capacity. Possible values include: + 4, 16 + :type capacity: int + :param name: Gets or sets the sku name. Possible values include: + 'Standard' + :type name: str or ~azure.mgmt.purview.models.Name + """ + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccountSku, self).__init__(**kwargs) + self.capacity = kwargs.get('capacity', None) + self.name = kwargs.get('name', None) + + +class AccountUpdateParameters(Model): + """The account update properties. + + :param properties: The account properties. + :type properties: ~azure.mgmt.purview.models.AccountProperties + :param tags: Tags on the azure resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AccountProperties'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(AccountUpdateParameters, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.tags = kwargs.get('tags', None) + + +class CheckNameAvailabilityRequest(Model): + """The request payload for CheckNameAvailability API. + + :param name: Resource name to verify for availability + :type name: str + :param type: Fully qualified resource type which includes provider + namespace + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class CheckNameAvailabilityResult(Model): + """The response payload for CheckNameAvailability API. + + :param message: Error message + :type message: str + :param name_available: Indicates if name is valid and available. + :type name_available: bool + :param reason: The reason the name is not available. Possible values + include: 'Invalid', 'AlreadyExists' + :type reason: str or ~azure.mgmt.purview.models.Reason + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + + +class CloudConnectors(Model): + """CloudConnectors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar aws_external_id: AWS external identifier. + Configured in AWS to allow use of the role arn used for scanning + :vartype aws_external_id: str + """ + + _validation = { + 'aws_external_id': {'readonly': True}, + } + + _attribute_map = { + 'aws_external_id': {'key': 'awsExternalId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CloudConnectors, self).__init__(**kwargs) + self.aws_external_id = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class DefaultAccountPayload(Model): + """Payload to get and set the default account in the given scope. + + :param account_name: The name of the account that is set as the default. + :type account_name: str + :param resource_group_name: The resource group name of the account that is + set as the default. + :type resource_group_name: str + :param scope: The scope object ID. For example, sub ID or tenant ID. + :type scope: str + :param scope_tenant_id: The scope tenant in which the default account is + set. + :type scope_tenant_id: str + :param scope_type: The scope where the default account is set. Possible + values include: 'Tenant', 'Subscription' + :type scope_type: str or ~azure.mgmt.purview.models.ScopeType + :param subscription_id: The subscription ID of the account that is set as + the default. + :type subscription_id: str + """ + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'scope_tenant_id': {'key': 'scopeTenantId', 'type': 'str'}, + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DefaultAccountPayload, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.scope = kwargs.get('scope', None) + self.scope_tenant_id = kwargs.get('scope_tenant_id', None) + self.scope_type = kwargs.get('scope_type', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class ProxyResource(Model): + """Proxy Azure Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :ivar name: Gets or sets the name. + :vartype name: str + :ivar type: Gets or sets the type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DeletedAccount(ProxyResource): + """Soft Deleted Account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :ivar name: Gets or sets the name. + :vartype name: str + :ivar type: Gets or sets the type. + :vartype type: str + :ivar account_id: Gets the account identifier associated with resource. + :vartype account_id: str + :ivar deleted_by: Gets the user identifier that deleted resource. + :vartype deleted_by: str + :ivar deletion_date: Gets the time at which the resource was soft deleted. + :vartype deletion_date: datetime + :ivar location: Gets the resource location. + :vartype location: str + :ivar scheduled_purge_date: Gets the scheduled purge datetime. + :vartype scheduled_purge_date: datetime + :ivar tags: Gets the account tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'account_id': {'readonly': True}, + 'deleted_by': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'location': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'deleted_by': {'key': 'properties.deletedBy', 'type': 'str'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'scheduled_purge_date': {'key': 'properties.scheduledPurgeDate', 'type': 'iso-8601'}, + 'tags': {'key': 'properties.tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DeletedAccount, self).__init__(**kwargs) + self.account_id = None + self.deleted_by = None + self.deletion_date = None + self.location = None + self.scheduled_purge_date = None + self.tags = None + + +class DeletedAccountList(Model): + """Paged list of soft deleted account resources. + + All required parameters must be populated in order to send to Azure. + + :param count: Total item count. + :type count: long + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type results. + :type value: list[~azure.mgmt.purview.models.DeletedAccount] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'long'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DeletedAccount]'}, + } + + def __init__(self, **kwargs): + super(DeletedAccountList, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class DeletedAccountPropertiesModel(Model): + """The soft deleted account properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_id: Gets the account identifier associated with resource. + :vartype account_id: str + :ivar deleted_by: Gets the user identifier that deleted resource. + :vartype deleted_by: str + :ivar deletion_date: Gets the time at which the resource was soft deleted. + :vartype deletion_date: datetime + :ivar location: Gets the resource location. + :vartype location: str + :ivar scheduled_purge_date: Gets the scheduled purge datetime. + :vartype scheduled_purge_date: datetime + :ivar tags: Gets the account tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'account_id': {'readonly': True}, + 'deleted_by': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'location': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'deleted_by': {'key': 'deletedBy', 'type': 'str'}, + 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, + 'location': {'key': 'location', 'type': 'str'}, + 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DeletedAccountPropertiesModel, self).__init__(**kwargs) + self.account_id = None + self.deleted_by = None + self.deletion_date = None + self.location = None + self.scheduled_purge_date = None + self.tags = None + + +class DimensionProperties(Model): + """properties for dimension. + + :param display_name: localized display name of the dimension to customer + :type display_name: str + :param name: dimension name + :type name: str + :param to_be_exported_for_customer: flag indicating whether this dimension + should be included to the customer in Azure Monitor logs (aka Shoebox) + :type to_be_exported_for_customer: bool + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'to_be_exported_for_customer': {'key': 'toBeExportedForCustomer', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DimensionProperties, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.name = kwargs.get('name', None) + self.to_be_exported_for_customer = kwargs.get('to_be_exported_for_customer', None) + + +class ErrorModel(Model): + """Default error model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Gets or sets the code. + :vartype code: str + :ivar details: Gets or sets the details. + :vartype details: list[~azure.mgmt.purview.models.ErrorModel] + :ivar message: Gets or sets the messages. + :vartype message: str + :ivar target: Gets or sets the target. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'details': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorModel]'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorModel, self).__init__(**kwargs) + self.code = None + self.details = None + self.message = None + self.target = None + + +class ErrorResponseModel(Model): + """Default error response model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Gets or sets the error. + :vartype error: ~azure.mgmt.purview.models.ErrorResponseModelError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseModelError'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseModel, self).__init__(**kwargs) + self.error = None + + +class ErrorResponseModelException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponseModel'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseModelException, self).__init__(deserialize, response, 'ErrorResponseModel', *args) + + +class ErrorResponseModelError(ErrorModel): + """Gets or sets the error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Gets or sets the code. + :vartype code: str + :ivar details: Gets or sets the details. + :vartype details: list[~azure.mgmt.purview.models.ErrorModel] + :ivar message: Gets or sets the messages. + :vartype message: str + :ivar target: Gets or sets the target. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'details': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorModel]'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseModelError, self).__init__(**kwargs) + + +class Identity(Model): + """The Managed Identity of the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: Service principal object Id + :vartype principal_id: str + :ivar tenant_id: Tenant Id + :vartype tenant_id: str + :param type: Identity Type. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.purview.models.Type + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class NetworkAcls(Model): + """The Network ACLs. + + :param default_action: Gets or sets the default behavior of network ACLs. + Possible values include: 'Allow', 'Deny' + :type default_action: str or ~azure.mgmt.purview.models.DefaultAction + """ + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkAcls, self).__init__(**kwargs) + self.default_action = kwargs.get('default_action', None) + + +class Operation(Model): + """Operation resource. + + :param display: Properties on the operation + :type display: ~azure.mgmt.purview.models.OperationDisplay + :param is_data_action: Whether operation is a data action + :type is_data_action: bool + :param name: Operation name for display purposes + :type name: str + :param origin: origin of the operation + :type origin: str + :param service_specification: meta service specification + :type service_specification: + ~azure.mgmt.purview.models.OperationMetaServiceSpecification + """ + + _attribute_map = { + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationMetaServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.display = kwargs.get('display', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.name = kwargs.get('name', None) + self.origin = kwargs.get('origin', None) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationDisplay(Model): + """The response model for get operation properties. + + :param description: Description of the operation for display purposes + :type description: str + :param operation: Name of the operation for display purposes + :type operation: str + :param provider: Name of the provider for display purposes + :type provider: str + :param resource: Name of the resource type for display purposes + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.operation = kwargs.get('operation', None) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + + +class OperationMetaLogSpecification(Model): + """log specifications for operation api. + + :param blob_duration: blob duration of the log + :type blob_duration: str + :param display_name: localized name of the log category + :type display_name: str + :param name: name of the log category + :type name: str + """ + + _attribute_map = { + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationMetaLogSpecification, self).__init__(**kwargs) + self.blob_duration = kwargs.get('blob_duration', None) + self.display_name = kwargs.get('display_name', None) + self.name = kwargs.get('name', None) + + +class OperationMetaMetricSpecification(Model): + """metric specifications for the operation. + + :param aggregation_type: aggregation type of metric + :type aggregation_type: str + :param dimensions: properties for dimension + :type dimensions: list[~azure.mgmt.purview.models.DimensionProperties] + :param display_description: description of the metric + :type display_description: str + :param display_name: localized name of the metric + :type display_name: str + :param enable_regional_mdm_account: enable regional mdm account + :type enable_regional_mdm_account: str + :param internal_metric_name: internal metric name + :type internal_metric_name: str + :param name: name of the metric + :type name: str + :param resource_id_dimension_name_override: dimension name use to replace + resource id if specified + :type resource_id_dimension_name_override: str + :param source_mdm_namespace: Metric namespace. + Only set the namespace if different from the default value, + leaving it empty makes it use the value from the ARM manifest. + :type source_mdm_namespace: str + :param supported_aggregation_types: supported aggregation types + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: supported time grain types + :type supported_time_grain_types: list[str] + :param unit: units for the metric + :type unit: str + """ + + _attribute_map = { + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[DimensionProperties]'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationMetaMetricSpecification, self).__init__(**kwargs) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.dimensions = kwargs.get('dimensions', None) + self.display_description = kwargs.get('display_description', None) + self.display_name = kwargs.get('display_name', None) + self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) + self.internal_metric_name = kwargs.get('internal_metric_name', None) + self.name = kwargs.get('name', None) + self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) + self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.unit = kwargs.get('unit', None) + + +class OperationMetaServiceSpecification(Model): + """The operation meta service specification. + + :param log_specifications: log specifications for the operation + :type log_specifications: + list[~azure.mgmt.purview.models.OperationMetaLogSpecification] + :param metric_specifications: metric specifications for the operation + :type metric_specifications: + list[~azure.mgmt.purview.models.OperationMetaMetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationMetaLogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetaMetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(OperationMetaServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class PrivateEndpoint(Model): + """A private endpoint class. + + :param id: The private endpoint identifier. + :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(ProxyResource): + """A private endpoint connection class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :ivar name: Gets or sets the name. + :vartype name: str + :ivar type: Gets or sets the type. + :vartype type: str + :param private_endpoint: The private endpoint information. + :type private_endpoint: ~azure.mgmt.purview.models.PrivateEndpoint + :param private_link_service_connection_state: The private link service + connection state. + :type private_link_service_connection_state: + ~azure.mgmt.purview.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnection, 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 PrivateLinkResource(Model): + """A privately linkable resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The private link resource identifier. + :vartype id: str + :ivar name: The private link resource name. + :vartype name: str + :ivar properties: The private link resource properties. + :vartype properties: + ~azure.mgmt.purview.models.PrivateLinkResourceProperties + :ivar type: The private link resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.properties = None + self.type = None + + +class PrivateLinkResourceProperties(Model): + """A privately linkable resource properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar group_id: The private link resource group identifier. + :vartype group_id: str + :ivar required_members: This translates to how many Private IPs should be + created for each privately linkable resource. + :vartype required_members: list[str] + :ivar required_zone_names: The required zone names for private link + resource. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkServiceConnectionState(Model): + """The private link service connection state. + + :param actions_required: The required actions. + :type actions_required: str + :param description: The description. + :type description: str + :param status: The status. Possible values include: 'Unknown', 'Pending', + 'Approved', 'Rejected', 'Disconnected' + :type status: str or ~azure.mgmt.purview.models.Status + """ + + _attribute_map = { + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.actions_required = kwargs.get('actions_required', None) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_models_py3.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_models_py3.py new file mode 100644 index 000000000000..6b9c9fc741e9 --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_models_py3.py @@ -0,0 +1,1227 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccessKeys(Model): + """The Account access keys. + + :param atlas_kafka_primary_endpoint: Gets or sets the primary connection + string. + :type atlas_kafka_primary_endpoint: str + :param atlas_kafka_secondary_endpoint: Gets or sets the secondary + connection string. + :type atlas_kafka_secondary_endpoint: str + """ + + _attribute_map = { + 'atlas_kafka_primary_endpoint': {'key': 'atlasKafkaPrimaryEndpoint', 'type': 'str'}, + 'atlas_kafka_secondary_endpoint': {'key': 'atlasKafkaSecondaryEndpoint', 'type': 'str'}, + } + + def __init__(self, *, atlas_kafka_primary_endpoint: str=None, atlas_kafka_secondary_endpoint: str=None, **kwargs) -> None: + super(AccessKeys, self).__init__(**kwargs) + self.atlas_kafka_primary_endpoint = atlas_kafka_primary_endpoint + self.atlas_kafka_secondary_endpoint = atlas_kafka_secondary_endpoint + + +class TrackedResource(Model): + """Azure ARM Tracked Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :param identity: Identity Info on the tracked resource + :type identity: ~azure.mgmt.purview.models.Identity + :param location: Gets or sets the location. + :type location: str + :ivar name: Gets or sets the name. + :vartype name: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] + :ivar type: Gets or sets the type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, identity=None, location: str=None, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.id = None + self.identity = identity + self.location = location + self.name = None + self.tags = tags + self.type = None + + +class Account(TrackedResource): + """Account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :param identity: Identity Info on the tracked resource + :type identity: ~azure.mgmt.purview.models.Identity + :param location: Gets or sets the location. + :type location: str + :ivar name: Gets or sets the name. + :vartype name: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] + :ivar type: Gets or sets the type. + :vartype type: str + :param cloud_connectors: Cloud connectors. + External cloud identifier used as part of scanning configuration. + :type cloud_connectors: ~azure.mgmt.purview.models.CloudConnectors + :ivar created_at: Gets the time at which the entity was created. + :vartype created_at: datetime + :ivar created_by: Gets the creator of the entity. + :vartype created_by: str + :ivar created_by_object_id: Gets the creators of the entity's object id. + :vartype created_by_object_id: str + :ivar endpoints: The URIs that are the public endpoints of the account. + :vartype endpoints: ~azure.mgmt.purview.models.AccountPropertiesEndpoints + :ivar friendly_name: Gets or sets the friendly name. + :vartype friendly_name: str + :ivar managed_resources: Gets the resource identifiers of the managed + resources. + :vartype managed_resources: + ~azure.mgmt.purview.models.AccountPropertiesManagedResources + :param network_acls: Get the network ACLs. + :type network_acls: ~azure.mgmt.purview.models.NetworkAcls + :ivar private_endpoint_connections: Gets the private endpoint connections + information. + :vartype private_endpoint_connections: + list[~azure.mgmt.purview.models.PrivateEndpointConnection] + :ivar provisioning_state: Gets or sets the state of the provisioning. + Possible values include: 'Unknown', 'Creating', 'Moving', 'Deleting', + 'SoftDeleting', 'SoftDeleted', 'Failed', 'Succeeded' + :vartype provisioning_state: str or + ~azure.mgmt.purview.models.ProvisioningState + :param sku: Gets or sets the Sku. + :type sku: ~azure.mgmt.purview.models.AccountSku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'created_by_object_id': {'readonly': True}, + 'endpoints': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'managed_resources': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cloud_connectors': {'key': 'properties.cloudConnectors', 'type': 'CloudConnectors'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, + 'created_by_object_id': {'key': 'properties.createdByObjectId', 'type': 'str'}, + 'endpoints': {'key': 'properties.endpoints', 'type': 'AccountPropertiesEndpoints'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'managed_resources': {'key': 'properties.managedResources', 'type': 'AccountPropertiesManagedResources'}, + 'network_acls': {'key': 'properties.networkAcls', 'type': 'NetworkAcls'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'AccountSku'}, + } + + def __init__(self, *, identity=None, location: str=None, tags=None, cloud_connectors=None, network_acls=None, sku=None, **kwargs) -> None: + super(Account, self).__init__(identity=identity, location=location, tags=tags, **kwargs) + self.cloud_connectors = cloud_connectors + self.created_at = None + self.created_by = None + self.created_by_object_id = None + self.endpoints = None + self.friendly_name = None + self.managed_resources = None + self.network_acls = network_acls + self.private_endpoint_connections = None + self.provisioning_state = None + self.sku = sku + + +class AccountEndpoints(Model): + """The account endpoints. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar catalog: Gets the catalog endpoint. + :vartype catalog: str + :ivar guardian: Gets the guardian endpoint. + :vartype guardian: str + :ivar scan: Gets the scan endpoint. + :vartype scan: str + """ + + _validation = { + 'catalog': {'readonly': True}, + 'guardian': {'readonly': True}, + 'scan': {'readonly': True}, + } + + _attribute_map = { + 'catalog': {'key': 'catalog', 'type': 'str'}, + 'guardian': {'key': 'guardian', 'type': 'str'}, + 'scan': {'key': 'scan', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AccountEndpoints, self).__init__(**kwargs) + self.catalog = None + self.guardian = None + self.scan = None + + +class AccountProperties(Model): + """The account properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param cloud_connectors: Cloud connectors. + External cloud identifier used as part of scanning configuration. + :type cloud_connectors: ~azure.mgmt.purview.models.CloudConnectors + :ivar created_at: Gets the time at which the entity was created. + :vartype created_at: datetime + :ivar created_by: Gets the creator of the entity. + :vartype created_by: str + :ivar created_by_object_id: Gets the creators of the entity's object id. + :vartype created_by_object_id: str + :ivar endpoints: The URIs that are the public endpoints of the account. + :vartype endpoints: ~azure.mgmt.purview.models.AccountPropertiesEndpoints + :ivar friendly_name: Gets or sets the friendly name. + :vartype friendly_name: str + :ivar managed_resources: Gets the resource identifiers of the managed + resources. + :vartype managed_resources: + ~azure.mgmt.purview.models.AccountPropertiesManagedResources + :param network_acls: Get the network ACLs. + :type network_acls: ~azure.mgmt.purview.models.NetworkAcls + :ivar private_endpoint_connections: Gets the private endpoint connections + information. + :vartype private_endpoint_connections: + list[~azure.mgmt.purview.models.PrivateEndpointConnection] + :ivar provisioning_state: Gets or sets the state of the provisioning. + Possible values include: 'Unknown', 'Creating', 'Moving', 'Deleting', + 'SoftDeleting', 'SoftDeleted', 'Failed', 'Succeeded' + :vartype provisioning_state: str or + ~azure.mgmt.purview.models.ProvisioningState + """ + + _validation = { + 'created_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'created_by_object_id': {'readonly': True}, + 'endpoints': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'managed_resources': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'cloud_connectors': {'key': 'cloudConnectors', 'type': 'CloudConnectors'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_object_id': {'key': 'createdByObjectId', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': 'AccountPropertiesEndpoints'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'managed_resources': {'key': 'managedResources', 'type': 'AccountPropertiesManagedResources'}, + 'network_acls': {'key': 'networkAcls', 'type': 'NetworkAcls'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, cloud_connectors=None, network_acls=None, **kwargs) -> None: + super(AccountProperties, self).__init__(**kwargs) + self.cloud_connectors = cloud_connectors + self.created_at = None + self.created_by = None + self.created_by_object_id = None + self.endpoints = None + self.friendly_name = None + self.managed_resources = None + self.network_acls = network_acls + self.private_endpoint_connections = None + self.provisioning_state = None + + +class AccountPropertiesEndpoints(AccountEndpoints): + """The URIs that are the public endpoints of the account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar catalog: Gets the catalog endpoint. + :vartype catalog: str + :ivar guardian: Gets the guardian endpoint. + :vartype guardian: str + :ivar scan: Gets the scan endpoint. + :vartype scan: str + """ + + _validation = { + 'catalog': {'readonly': True}, + 'guardian': {'readonly': True}, + 'scan': {'readonly': True}, + } + + _attribute_map = { + 'catalog': {'key': 'catalog', 'type': 'str'}, + 'guardian': {'key': 'guardian', 'type': 'str'}, + 'scan': {'key': 'scan', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AccountPropertiesEndpoints, self).__init__(**kwargs) + + +class ManagedResources(Model): + """The managed resources in customer subscription. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_hub_namespace: Gets the managed event hub namespace resource + identifier. + :vartype event_hub_namespace: str + :ivar resource_group: Gets the managed resource group resource identifier. + This resource group will host resource dependencies for the account. + :vartype resource_group: str + :ivar storage_account: Gets the managed storage account resource + identifier. + :vartype storage_account: str + """ + + _validation = { + 'event_hub_namespace': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'storage_account': {'readonly': True}, + } + + _attribute_map = { + 'event_hub_namespace': {'key': 'eventHubNamespace', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'storage_account': {'key': 'storageAccount', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ManagedResources, self).__init__(**kwargs) + self.event_hub_namespace = None + self.resource_group = None + self.storage_account = None + + +class AccountPropertiesManagedResources(ManagedResources): + """Gets the resource identifiers of the managed resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_hub_namespace: Gets the managed event hub namespace resource + identifier. + :vartype event_hub_namespace: str + :ivar resource_group: Gets the managed resource group resource identifier. + This resource group will host resource dependencies for the account. + :vartype resource_group: str + :ivar storage_account: Gets the managed storage account resource + identifier. + :vartype storage_account: str + """ + + _validation = { + 'event_hub_namespace': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'storage_account': {'readonly': True}, + } + + _attribute_map = { + 'event_hub_namespace': {'key': 'eventHubNamespace', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'storage_account': {'key': 'storageAccount', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AccountPropertiesManagedResources, self).__init__(**kwargs) + + +class AccountSku(Model): + """The Sku. + + :param capacity: Gets or sets the sku capacity. Possible values include: + 4, 16 + :type capacity: int + :param name: Gets or sets the sku name. Possible values include: + 'Standard' + :type name: str or ~azure.mgmt.purview.models.Name + """ + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, capacity: int=None, name=None, **kwargs) -> None: + super(AccountSku, self).__init__(**kwargs) + self.capacity = capacity + self.name = name + + +class AccountUpdateParameters(Model): + """The account update properties. + + :param properties: The account properties. + :type properties: ~azure.mgmt.purview.models.AccountProperties + :param tags: Tags on the azure resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AccountProperties'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, properties=None, tags=None, **kwargs) -> None: + super(AccountUpdateParameters, self).__init__(**kwargs) + self.properties = properties + self.tags = tags + + +class CheckNameAvailabilityRequest(Model): + """The request payload for CheckNameAvailability API. + + :param name: Resource name to verify for availability + :type name: str + :param type: Fully qualified resource type which includes provider + namespace + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + + +class CheckNameAvailabilityResult(Model): + """The response payload for CheckNameAvailability API. + + :param message: Error message + :type message: str + :param name_available: Indicates if name is valid and available. + :type name_available: bool + :param reason: The reason the name is not available. Possible values + include: 'Invalid', 'AlreadyExists' + :type reason: str or ~azure.mgmt.purview.models.Reason + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, message: str=None, name_available: bool=None, reason=None, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = message + self.name_available = name_available + self.reason = reason + + +class CloudConnectors(Model): + """CloudConnectors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar aws_external_id: AWS external identifier. + Configured in AWS to allow use of the role arn used for scanning + :vartype aws_external_id: str + """ + + _validation = { + 'aws_external_id': {'readonly': True}, + } + + _attribute_map = { + 'aws_external_id': {'key': 'awsExternalId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CloudConnectors, self).__init__(**kwargs) + self.aws_external_id = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class DefaultAccountPayload(Model): + """Payload to get and set the default account in the given scope. + + :param account_name: The name of the account that is set as the default. + :type account_name: str + :param resource_group_name: The resource group name of the account that is + set as the default. + :type resource_group_name: str + :param scope: The scope object ID. For example, sub ID or tenant ID. + :type scope: str + :param scope_tenant_id: The scope tenant in which the default account is + set. + :type scope_tenant_id: str + :param scope_type: The scope where the default account is set. Possible + values include: 'Tenant', 'Subscription' + :type scope_type: str or ~azure.mgmt.purview.models.ScopeType + :param subscription_id: The subscription ID of the account that is set as + the default. + :type subscription_id: str + """ + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'scope_tenant_id': {'key': 'scopeTenantId', 'type': 'str'}, + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + } + + def __init__(self, *, account_name: str=None, resource_group_name: str=None, scope: str=None, scope_tenant_id: str=None, scope_type=None, subscription_id: str=None, **kwargs) -> None: + super(DefaultAccountPayload, self).__init__(**kwargs) + self.account_name = account_name + self.resource_group_name = resource_group_name + self.scope = scope + self.scope_tenant_id = scope_tenant_id + self.scope_type = scope_type + self.subscription_id = subscription_id + + +class ProxyResource(Model): + """Proxy Azure Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :ivar name: Gets or sets the name. + :vartype name: str + :ivar type: Gets or sets the type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DeletedAccount(ProxyResource): + """Soft Deleted Account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :ivar name: Gets or sets the name. + :vartype name: str + :ivar type: Gets or sets the type. + :vartype type: str + :ivar account_id: Gets the account identifier associated with resource. + :vartype account_id: str + :ivar deleted_by: Gets the user identifier that deleted resource. + :vartype deleted_by: str + :ivar deletion_date: Gets the time at which the resource was soft deleted. + :vartype deletion_date: datetime + :ivar location: Gets the resource location. + :vartype location: str + :ivar scheduled_purge_date: Gets the scheduled purge datetime. + :vartype scheduled_purge_date: datetime + :ivar tags: Gets the account tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'account_id': {'readonly': True}, + 'deleted_by': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'location': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'deleted_by': {'key': 'properties.deletedBy', 'type': 'str'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'scheduled_purge_date': {'key': 'properties.scheduledPurgeDate', 'type': 'iso-8601'}, + 'tags': {'key': 'properties.tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedAccount, self).__init__(**kwargs) + self.account_id = None + self.deleted_by = None + self.deletion_date = None + self.location = None + self.scheduled_purge_date = None + self.tags = None + + +class DeletedAccountList(Model): + """Paged list of soft deleted account resources. + + All required parameters must be populated in order to send to Azure. + + :param count: Total item count. + :type count: long + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type results. + :type value: list[~azure.mgmt.purview.models.DeletedAccount] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'long'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DeletedAccount]'}, + } + + def __init__(self, *, value, count: int=None, next_link: str=None, **kwargs) -> None: + super(DeletedAccountList, self).__init__(**kwargs) + self.count = count + self.next_link = next_link + self.value = value + + +class DeletedAccountPropertiesModel(Model): + """The soft deleted account properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_id: Gets the account identifier associated with resource. + :vartype account_id: str + :ivar deleted_by: Gets the user identifier that deleted resource. + :vartype deleted_by: str + :ivar deletion_date: Gets the time at which the resource was soft deleted. + :vartype deletion_date: datetime + :ivar location: Gets the resource location. + :vartype location: str + :ivar scheduled_purge_date: Gets the scheduled purge datetime. + :vartype scheduled_purge_date: datetime + :ivar tags: Gets the account tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'account_id': {'readonly': True}, + 'deleted_by': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'location': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'deleted_by': {'key': 'deletedBy', 'type': 'str'}, + 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, + 'location': {'key': 'location', 'type': 'str'}, + 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedAccountPropertiesModel, self).__init__(**kwargs) + self.account_id = None + self.deleted_by = None + self.deletion_date = None + self.location = None + self.scheduled_purge_date = None + self.tags = None + + +class DimensionProperties(Model): + """properties for dimension. + + :param display_name: localized display name of the dimension to customer + :type display_name: str + :param name: dimension name + :type name: str + :param to_be_exported_for_customer: flag indicating whether this dimension + should be included to the customer in Azure Monitor logs (aka Shoebox) + :type to_be_exported_for_customer: bool + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'to_be_exported_for_customer': {'key': 'toBeExportedForCustomer', 'type': 'bool'}, + } + + def __init__(self, *, display_name: str=None, name: str=None, to_be_exported_for_customer: bool=None, **kwargs) -> None: + super(DimensionProperties, self).__init__(**kwargs) + self.display_name = display_name + self.name = name + self.to_be_exported_for_customer = to_be_exported_for_customer + + +class ErrorModel(Model): + """Default error model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Gets or sets the code. + :vartype code: str + :ivar details: Gets or sets the details. + :vartype details: list[~azure.mgmt.purview.models.ErrorModel] + :ivar message: Gets or sets the messages. + :vartype message: str + :ivar target: Gets or sets the target. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'details': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorModel]'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorModel, self).__init__(**kwargs) + self.code = None + self.details = None + self.message = None + self.target = None + + +class ErrorResponseModel(Model): + """Default error response model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Gets or sets the error. + :vartype error: ~azure.mgmt.purview.models.ErrorResponseModelError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseModelError'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponseModel, self).__init__(**kwargs) + self.error = None + + +class ErrorResponseModelException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponseModel'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseModelException, self).__init__(deserialize, response, 'ErrorResponseModel', *args) + + +class ErrorResponseModelError(ErrorModel): + """Gets or sets the error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Gets or sets the code. + :vartype code: str + :ivar details: Gets or sets the details. + :vartype details: list[~azure.mgmt.purview.models.ErrorModel] + :ivar message: Gets or sets the messages. + :vartype message: str + :ivar target: Gets or sets the target. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'details': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorModel]'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponseModelError, self).__init__(**kwargs) + + +class Identity(Model): + """The Managed Identity of the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: Service principal object Id + :vartype principal_id: str + :ivar tenant_id: Tenant Id + :vartype tenant_id: str + :param type: Identity Type. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.purview.models.Type + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class NetworkAcls(Model): + """The Network ACLs. + + :param default_action: Gets or sets the default behavior of network ACLs. + Possible values include: 'Allow', 'Deny' + :type default_action: str or ~azure.mgmt.purview.models.DefaultAction + """ + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + } + + def __init__(self, *, default_action=None, **kwargs) -> None: + super(NetworkAcls, self).__init__(**kwargs) + self.default_action = default_action + + +class Operation(Model): + """Operation resource. + + :param display: Properties on the operation + :type display: ~azure.mgmt.purview.models.OperationDisplay + :param is_data_action: Whether operation is a data action + :type is_data_action: bool + :param name: Operation name for display purposes + :type name: str + :param origin: origin of the operation + :type origin: str + :param service_specification: meta service specification + :type service_specification: + ~azure.mgmt.purview.models.OperationMetaServiceSpecification + """ + + _attribute_map = { + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationMetaServiceSpecification'}, + } + + def __init__(self, *, display=None, is_data_action: bool=None, name: str=None, origin: str=None, service_specification=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.display = display + self.is_data_action = is_data_action + self.name = name + self.origin = origin + self.service_specification = service_specification + + +class OperationDisplay(Model): + """The response model for get operation properties. + + :param description: Description of the operation for display purposes + :type description: str + :param operation: Name of the operation for display purposes + :type operation: str + :param provider: Name of the provider for display purposes + :type provider: str + :param resource: Name of the resource type for display purposes + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, operation: str=None, provider: str=None, resource: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.description = description + self.operation = operation + self.provider = provider + self.resource = resource + + +class OperationMetaLogSpecification(Model): + """log specifications for operation api. + + :param blob_duration: blob duration of the log + :type blob_duration: str + :param display_name: localized name of the log category + :type display_name: str + :param name: name of the log category + :type name: str + """ + + _attribute_map = { + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, blob_duration: str=None, display_name: str=None, name: str=None, **kwargs) -> None: + super(OperationMetaLogSpecification, self).__init__(**kwargs) + self.blob_duration = blob_duration + self.display_name = display_name + self.name = name + + +class OperationMetaMetricSpecification(Model): + """metric specifications for the operation. + + :param aggregation_type: aggregation type of metric + :type aggregation_type: str + :param dimensions: properties for dimension + :type dimensions: list[~azure.mgmt.purview.models.DimensionProperties] + :param display_description: description of the metric + :type display_description: str + :param display_name: localized name of the metric + :type display_name: str + :param enable_regional_mdm_account: enable regional mdm account + :type enable_regional_mdm_account: str + :param internal_metric_name: internal metric name + :type internal_metric_name: str + :param name: name of the metric + :type name: str + :param resource_id_dimension_name_override: dimension name use to replace + resource id if specified + :type resource_id_dimension_name_override: str + :param source_mdm_namespace: Metric namespace. + Only set the namespace if different from the default value, + leaving it empty makes it use the value from the ARM manifest. + :type source_mdm_namespace: str + :param supported_aggregation_types: supported aggregation types + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: supported time grain types + :type supported_time_grain_types: list[str] + :param unit: units for the metric + :type unit: str + """ + + _attribute_map = { + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[DimensionProperties]'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, *, aggregation_type: str=None, dimensions=None, display_description: str=None, display_name: str=None, enable_regional_mdm_account: str=None, internal_metric_name: str=None, name: str=None, resource_id_dimension_name_override: str=None, source_mdm_namespace: str=None, supported_aggregation_types=None, supported_time_grain_types=None, unit: str=None, **kwargs) -> None: + super(OperationMetaMetricSpecification, self).__init__(**kwargs) + self.aggregation_type = aggregation_type + self.dimensions = dimensions + self.display_description = display_description + self.display_name = display_name + self.enable_regional_mdm_account = enable_regional_mdm_account + self.internal_metric_name = internal_metric_name + self.name = name + self.resource_id_dimension_name_override = resource_id_dimension_name_override + self.source_mdm_namespace = source_mdm_namespace + self.supported_aggregation_types = supported_aggregation_types + self.supported_time_grain_types = supported_time_grain_types + self.unit = unit + + +class OperationMetaServiceSpecification(Model): + """The operation meta service specification. + + :param log_specifications: log specifications for the operation + :type log_specifications: + list[~azure.mgmt.purview.models.OperationMetaLogSpecification] + :param metric_specifications: metric specifications for the operation + :type metric_specifications: + list[~azure.mgmt.purview.models.OperationMetaMetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationMetaLogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetaMetricSpecification]'}, + } + + def __init__(self, *, log_specifications=None, metric_specifications=None, **kwargs) -> None: + super(OperationMetaServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + self.metric_specifications = metric_specifications + + +class PrivateEndpoint(Model): + """A private endpoint class. + + :param id: The private endpoint identifier. + :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(ProxyResource): + """A private endpoint connection class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :ivar name: Gets or sets the name. + :vartype name: str + :ivar type: Gets or sets the type. + :vartype type: str + :param private_endpoint: The private endpoint information. + :type private_endpoint: ~azure.mgmt.purview.models.PrivateEndpoint + :param private_link_service_connection_state: The private link service + connection state. + :type private_link_service_connection_state: + ~azure.mgmt.purview.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + + +class PrivateLinkResource(Model): + """A privately linkable resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The private link resource identifier. + :vartype id: str + :ivar name: The private link resource name. + :vartype name: str + :ivar properties: The private link resource properties. + :vartype properties: + ~azure.mgmt.purview.models.PrivateLinkResourceProperties + :ivar type: The private link resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.properties = None + self.type = None + + +class PrivateLinkResourceProperties(Model): + """A privately linkable resource properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar group_id: The private link resource group identifier. + :vartype group_id: str + :ivar required_members: This translates to how many Private IPs should be + created for each privately linkable resource. + :vartype required_members: list[str] + :ivar required_zone_names: The required zone names for private link + resource. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkServiceConnectionState(Model): + """The private link service connection state. + + :param actions_required: The required actions. + :type actions_required: str + :param description: The description. + :type description: str + :param status: The status. Possible values include: 'Unknown', 'Pending', + 'Approved', 'Rejected', 'Disconnected' + :type status: str or ~azure.mgmt.purview.models.Status + """ + + _attribute_map = { + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, actions_required: str=None, description: str=None, status=None, **kwargs) -> None: + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.actions_required = actions_required + self.description = description + self.status = status diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_paged_models.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_paged_models.py new file mode 100644 index 000000000000..e65fb8f6e75d --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_paged_models.py @@ -0,0 +1,66 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class AccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`Account ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Account]'} + } + + def __init__(self, *args, **kwargs): + + super(AccountPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, 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/azure-mgmt-Purview/azure/mgmt/Purview/models/_purview_management_client_enums.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_purview_management_client_enums.py new file mode 100644 index 000000000000..27950094e0a5 --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/models/_purview_management_client_enums.py @@ -0,0 +1,61 @@ +# 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. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DefaultAction(str, Enum): + + allow = "Allow" + deny = "Deny" + + +class Status(str, Enum): + + unknown = "Unknown" + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + disconnected = "Disconnected" + + +class ProvisioningState(str, Enum): + + unknown = "Unknown" + creating = "Creating" + moving = "Moving" + deleting = "Deleting" + soft_deleting = "SoftDeleting" + soft_deleted = "SoftDeleted" + failed = "Failed" + succeeded = "Succeeded" + + +class Name(str, Enum): + + standard = "Standard" + + +class Type(str, Enum): + + system_assigned = "SystemAssigned" + + +class ScopeType(str, Enum): + + tenant = "Tenant" + subscription = "Subscription" + + +class Reason(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/__init__.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/__init__.py new file mode 100644 index 000000000000..d25911de2680 --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/__init__.py @@ -0,0 +1,24 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._accounts_operations import AccountsOperations +from ._default_accounts_operations import DefaultAccountsOperations +from ._operations import Operations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations + +__all__ = [ + 'AccountsOperations', + 'DefaultAccountsOperations', + 'Operations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', +] diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_accounts_operations.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_accounts_operations.py new file mode 100644 index 000000000000..8d37d78c6a0a --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_accounts_operations.py @@ -0,0 +1,632 @@ +# 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 AccountsOperations(object): + """AccountsOperations 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 api version to use. Constant value: "2020-12-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01-preview" + + self.config = config + + def list_by_resource_group( + self, resource_group_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Gets the accounts resources by resource group. + + List accounts in ResourceGroup. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param skip_token: The skip token. + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Account + :rtype: + ~azure.mgmt.purview.models.AccountPaged[~azure.mgmt.purview.models.Account] + :raises: + :class:`ErrorResponseModelException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseModelException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts'} + + def list_by_subscription( + self, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Gets the accounts resources by subscription. + + List accounts in Subscription. + + :param skip_token: The skip token. + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Account + :rtype: + ~azure.mgmt.purview.models.AccountPaged[~azure.mgmt.purview.models.Account] + :raises: + :class:`ErrorResponseModelException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseModelException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Purview/accounts'} + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Gets the account resource. + + Get an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the account. + :type account_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: Account or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.purview.models.Account or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseModelException` + """ + # 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'), + 'accountName': self._serialize.url("account_name", account_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.ErrorResponseModelException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Account', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}'} + + + def _create_or_update_initial( + self, resource_group_name, account_name, account, custom_headers=None, raw=False, **operation_config): + # 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'), + 'accountName': self._serialize.url("account_name", account_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(account, 'Account') + + # 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.ErrorResponseModelException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Account', response) + if response.status_code == 201: + deserialized = self._deserialize('Account', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, account_name, account, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an account resource. + + Creates or updates an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the account. + :type account_name: str + :param account: The account. + :type account: ~azure.mgmt.purview.models.Account + :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 Account or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.purview.models.Account] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.purview.models.Account]] + :raises: + :class:`ErrorResponseModelException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + account=account, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Account', 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.Purview/accounts/{accountName}'} + + + def _delete_initial( + self, resource_group_name, account_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'), + 'accountName': self._serialize.url("account_name", account_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.ErrorResponseModelException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the account resource. + + Deletes an account resource. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the account. + :type account_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:`ErrorResponseModelException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_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.Purview/accounts/{accountName}'} + + def update( + self, resource_group_name, account_name, properties=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Patches the account resource. + + Updates an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the account. + :type account_name: str + :param properties: The account properties. + :type properties: ~azure.mgmt.purview.models.AccountProperties + :param tags: Tags on the azure resource. + :type tags: dict[str, 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: Account or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.purview.models.Account or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseModelException` + """ + account_update_parameters = models.AccountUpdateParameters(properties=properties, tags=tags) + + # Construct URL + url = self.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'), + 'accountName': self._serialize.url("account_name", account_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(account_update_parameters, 'AccountUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseModelException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Account', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}'} + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the keys asynchronous. + + List the authorization keys associated with this account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the account. + :type account_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: AccessKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.purview.models.AccessKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseModelException` + """ + # Construct URL + url = self.list_keys.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'), + 'accountName': self._serialize.url("account_name", account_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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseModelException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccessKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/listkeys'} + + def check_name_availability( + self, name=None, type=None, custom_headers=None, raw=False, **operation_config): + """Checks the account name availability. + + Checks if account name is available. + + :param name: Resource name to verify for availability + :type name: str + :param type: Fully qualified resource type which includes provider + namespace + :type type: 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: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.purview.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseModelException` + """ + check_name_availability_request = models.CheckNameAvailabilityRequest(name=name, type=type) + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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(check_name_availability_request, 'CheckNameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseModelException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Purview/checkNameAvailability'} diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_default_accounts_operations.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_default_accounts_operations.py new file mode 100644 index 000000000000..cd5dfde95263 --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_default_accounts_operations.py @@ -0,0 +1,219 @@ +# 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 DefaultAccountsOperations(object): + """DefaultAccountsOperations 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 api version to use. Constant value: "2020-12-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01-preview" + + self.config = config + + def get( + self, scope_tenant_id, scope_type, scope=None, custom_headers=None, raw=False, **operation_config): + """Gets the default account information set for the scope. + + Get the default account for the scope. + + :param scope_tenant_id: The tenant ID. + :type scope_tenant_id: str + :param scope_type: The scope for the default account. Possible values + include: 'Tenant', 'Subscription' + :type scope_type: str or ~azure.mgmt.purview.models.ScopeType + :param scope: The Id of the scope object, for example if the scope is + "Subscription" then it is the ID of that subscription. + :type scope: 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: DefaultAccountPayload or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.purview.models.DefaultAccountPayload or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseModelException` + """ + # Construct URL + url = self.get.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['scopeTenantId'] = self._serialize.query("scope_tenant_id", scope_tenant_id, 'str') + query_parameters['scopeType'] = self._serialize.query("scope_type", scope_type, 'str') + if scope is not None: + query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + 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.ErrorResponseModelException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DefaultAccountPayload', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Purview/getDefaultAccount'} + + def set( + self, default_account_payload, custom_headers=None, raw=False, **operation_config): + """Sets the default account for the scope. + + Sets the default account for the scope. + + :param default_account_payload: The payload containing the default + account information and the scope. + :type default_account_payload: + ~azure.mgmt.purview.models.DefaultAccountPayload + :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: DefaultAccountPayload or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.purview.models.DefaultAccountPayload or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseModelException` + """ + # Construct URL + url = self.set.metadata['url'] + + # 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(default_account_payload, 'DefaultAccountPayload') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseModelException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DefaultAccountPayload', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + set.metadata = {'url': '/providers/Microsoft.Purview/setDefaultAccount'} + + def remove( + self, scope_tenant_id, scope_type, scope=None, custom_headers=None, raw=False, **operation_config): + """Removes the default account from the scope. + + Removes the default account from the scope. + + :param scope_tenant_id: The tenant ID. + :type scope_tenant_id: str + :param scope_type: The scope for the default account. Possible values + include: 'Tenant', 'Subscription' + :type scope_type: str or ~azure.mgmt.purview.models.ScopeType + :param scope: The Id of the scope object, for example if the scope is + "Subscription" then it is the ID of that subscription. + :type scope: 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseModelException` + """ + # Construct URL + url = self.remove.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['scopeTenantId'] = self._serialize.query("scope_tenant_id", scope_tenant_id, 'str') + query_parameters['scopeType'] = self._serialize.query("scope_type", scope_type, 'str') + if scope is not None: + query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + 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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseModelException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + remove.metadata = {'url': '/providers/Microsoft.Purview/removeDefaultAccount'} diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_operations.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_operations.py new file mode 100644 index 000000000000..ac177ee08dad --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_operations.py @@ -0,0 +1,102 @@ +# 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 Operations(object): + """Operations 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 api version to use. Constant value: "2020-12-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists the available operations. + + List of available operations. + + :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 Operation + :rtype: + ~azure.mgmt.purview.models.OperationPaged[~azure.mgmt.purview.models.Operation] + :raises: + :class:`ErrorResponseModelException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # 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.ErrorResponseModelException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Purview/operations'} diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_private_endpoint_connections_operations.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..46c899a15c18 --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,349 @@ +# 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 api version to use. Constant value: "2020-12-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01-preview" + + self.config = config + + def list_by_account( + self, resource_group_name, account_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Gets private endpoint connections. + + Get private endpoint connections for account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the account. + :type account_name: str + :param skip_token: The skip token. + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.mgmt.purview.models.PrivateEndpointConnectionPaged[~azure.mgmt.purview.models.PrivateEndpointConnection] + :raises: + :class:`ErrorResponseModelException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_account.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'), + 'accountName': self._serialize.url("account_name", account_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') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseModelException(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_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateEndpointConnections'} + + def get( + self, resource_group_name, account_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """Gets private endpoint connection information. + + Get a private endpoint connection. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the account. + :type account_name: str + :param private_endpoint_connection_name: Name of the private endpoint + connection. + :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.purview.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseModelException` + """ + # 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'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + '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.ErrorResponseModelException(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.Purview/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def create_or_update( + self, resource_group_name, account_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): + """Approves/Rejects private endpoint connection request. + + Create or update a private endpoint connection. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the account. + :type account_name: str + :param private_endpoint_connection_name: Name of the private endpoint + connection. + :type private_endpoint_connection_name: str + :param private_endpoint: The private endpoint information. + :type private_endpoint: ~azure.mgmt.purview.models.PrivateEndpoint + :param private_link_service_connection_state: The private link service + connection state. + :type private_link_service_connection_state: + ~azure.mgmt.purview.models.PrivateLinkServiceConnectionState + :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.purview.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseModelException` + """ + request = 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'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + '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(request, '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.ErrorResponseModelException(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 + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_initial( + self, resource_group_name, account_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'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + '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.ErrorResponseModelException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, account_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes private endpoint connection. + + Delete a private endpoint connection. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the account. + :type account_name: str + :param private_endpoint_connection_name: Name of the private endpoint + connection. + :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:`ErrorResponseModelException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_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.Purview/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_private_link_resources_operations.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..6786567ba931 --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/operations/_private_link_resources_operations.py @@ -0,0 +1,179 @@ +# 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 api version to use. Constant value: "2020-12-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01-preview" + + self.config = config + + def list_by_account( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of privately linkable resources for an account. + + Gets a list of privately linkable resources for an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the account. + :type account_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.purview.models.PrivateLinkResourcePaged[~azure.mgmt.purview.models.PrivateLinkResource] + :raises: + :class:`ErrorResponseModelException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_account.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'), + 'accountName': self._serialize.url("account_name", account_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') + + 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.ErrorResponseModelException(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_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateLinkResources'} + + def get_by_group_id( + self, resource_group_name, account_name, group_id, custom_headers=None, raw=False, **operation_config): + """Gets a privately linkable resources for an account with given group + identifier. + + Gets a privately linkable resources for an account with given group + identifier. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the account. + :type account_name: str + :param group_id: The group identifier. + :type group_id: 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.purview.models.PrivateLinkResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseModelException` + """ + # Construct URL + url = self.get_by_group_id.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'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'groupId': self._serialize.url("group_id", group_id, '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.ErrorResponseModelException(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_by_group_id.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateLinkResources/{groupId}'} diff --git a/sdk/azure-mgmt-Purview/azure/mgmt/Purview/version.py b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/version.py new file mode 100644 index 000000000000..43900bfee57a --- /dev/null +++ b/sdk/azure-mgmt-Purview/azure/mgmt/Purview/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "2020-12-01-preview" +