From 578bd3a9040612d6167334aa0b6588c257bc9d11 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 25 Aug 2020 07:15:19 +0000 Subject: [PATCH] Generated from 61d78f0fbcf6543b7181f1eb524eb8e1cd37809f add logLevel/enableReliableLogging to LogStorageSettings --- .../_data_factory_management_client.py | 10 + .../azure/mgmt/datafactory/models/__init__.py | 28 ++ .../azure/mgmt/datafactory/models/_models.py | 323 ++++++++++++++++- .../mgmt/datafactory/models/_models_py3.py | 331 +++++++++++++++++- .../mgmt/datafactory/models/_paged_models.py | 26 ++ .../mgmt/datafactory/operations/__init__.py | 4 + .../_exposure_control_operations.py | 70 ++++ .../_managed_private_endpoints_operations.py | 331 ++++++++++++++++++ .../_managed_virtual_networks_operations.py | 262 ++++++++++++++ .../azure-mgmt-datafactory/setup.py | 2 +- 10 files changed, 1376 insertions(+), 11 deletions(-) create mode 100644 sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_managed_private_endpoints_operations.py create mode 100644 sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_managed_virtual_networks_operations.py diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_data_factory_management_client.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_data_factory_management_client.py index 78ff241e7898..d80dbd4cbb10 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_data_factory_management_client.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_data_factory_management_client.py @@ -28,6 +28,8 @@ from .operations import TriggerRunsOperations from .operations import DataFlowsOperations from .operations import DataFlowDebugSessionOperations +from .operations import ManagedVirtualNetworksOperations +from .operations import ManagedPrivateEndpointsOperations from . import models @@ -67,6 +69,10 @@ class DataFactoryManagementClient(SDKClient): :vartype data_flows: azure.mgmt.datafactory.operations.DataFlowsOperations :ivar data_flow_debug_session: DataFlowDebugSession operations :vartype data_flow_debug_session: azure.mgmt.datafactory.operations.DataFlowDebugSessionOperations + :ivar managed_virtual_networks: ManagedVirtualNetworks operations + :vartype managed_virtual_networks: azure.mgmt.datafactory.operations.ManagedVirtualNetworksOperations + :ivar managed_private_endpoints: ManagedPrivateEndpoints operations + :vartype managed_private_endpoints: azure.mgmt.datafactory.operations.ManagedPrivateEndpointsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -117,3 +123,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.data_flow_debug_session = DataFlowDebugSessionOperations( self._client, self.config, self._serialize, self._deserialize) + self.managed_virtual_networks = ManagedVirtualNetworksOperations( + self._client, self.config, self._serialize, self._deserialize) + self.managed_private_endpoints = ManagedPrivateEndpointsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py index 0c5031e135bc..95dc22d97aad 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py @@ -65,6 +65,7 @@ from ._models_py3 import AzureFileStorageLinkedService from ._models_py3 import AzureFileStorageLocation from ._models_py3 import AzureFileStorageReadSettings + from ._models_py3 import AzureFileStorageWriteSettings from ._models_py3 import AzureFunctionActivity from ._models_py3 import AzureFunctionLinkedService from ._models_py3 import AzureKeyVaultLinkedService @@ -125,6 +126,7 @@ from ._models_py3 import ConcurLinkedService from ._models_py3 import ConcurObjectDataset from ._models_py3 import ConcurSource + from ._models_py3 import ConnectionStateProperties from ._models_py3 import ControlActivity from ._models_py3 import CopyActivity from ._models_py3 import CopySink @@ -224,6 +226,8 @@ from ._models_py3 import ExecuteSSISPackageActivity from ._models_py3 import ExecutionActivity from ._models_py3 import ExportSettings + from ._models_py3 import ExposureControlBatchRequest + from ._models_py3 import ExposureControlBatchResponse from ._models_py3 import ExposureControlRequest from ._models_py3 import ExposureControlResponse from ._models_py3 import Expression @@ -348,6 +352,10 @@ from ._models_py3 import ManagedIntegrationRuntimeNode from ._models_py3 import ManagedIntegrationRuntimeOperationResult from ._models_py3 import ManagedIntegrationRuntimeStatus + from ._models_py3 import ManagedPrivateEndpoint + from ._models_py3 import ManagedPrivateEndpointResource + from ._models_py3 import ManagedVirtualNetwork + from ._models_py3 import ManagedVirtualNetworkResource from ._models_py3 import MappingDataFlow from ._models_py3 import MariaDBLinkedService from ._models_py3 import MariaDBSource @@ -664,6 +672,7 @@ from ._models import AzureFileStorageLinkedService from ._models import AzureFileStorageLocation from ._models import AzureFileStorageReadSettings + from ._models import AzureFileStorageWriteSettings from ._models import AzureFunctionActivity from ._models import AzureFunctionLinkedService from ._models import AzureKeyVaultLinkedService @@ -724,6 +733,7 @@ from ._models import ConcurLinkedService from ._models import ConcurObjectDataset from ._models import ConcurSource + from ._models import ConnectionStateProperties from ._models import ControlActivity from ._models import CopyActivity from ._models import CopySink @@ -823,6 +833,8 @@ from ._models import ExecuteSSISPackageActivity from ._models import ExecutionActivity from ._models import ExportSettings + from ._models import ExposureControlBatchRequest + from ._models import ExposureControlBatchResponse from ._models import ExposureControlRequest from ._models import ExposureControlResponse from ._models import Expression @@ -947,6 +959,10 @@ from ._models import ManagedIntegrationRuntimeNode from ._models import ManagedIntegrationRuntimeOperationResult from ._models import ManagedIntegrationRuntimeStatus + from ._models import ManagedPrivateEndpoint + from ._models import ManagedPrivateEndpointResource + from ._models import ManagedVirtualNetwork + from ._models import ManagedVirtualNetworkResource from ._models import MappingDataFlow from ._models import MariaDBLinkedService from ._models import MariaDBSource @@ -1213,6 +1229,8 @@ from ._paged_models import FactoryPaged from ._paged_models import IntegrationRuntimeResourcePaged from ._paged_models import LinkedServiceResourcePaged +from ._paged_models import ManagedPrivateEndpointResourcePaged +from ._paged_models import ManagedVirtualNetworkResourcePaged from ._paged_models import OperationPaged from ._paged_models import PipelineResourcePaged from ._paged_models import TriggerResourcePaged @@ -1353,6 +1371,7 @@ 'AzureFileStorageLinkedService', 'AzureFileStorageLocation', 'AzureFileStorageReadSettings', + 'AzureFileStorageWriteSettings', 'AzureFunctionActivity', 'AzureFunctionLinkedService', 'AzureKeyVaultLinkedService', @@ -1413,6 +1432,7 @@ 'ConcurLinkedService', 'ConcurObjectDataset', 'ConcurSource', + 'ConnectionStateProperties', 'ControlActivity', 'CopyActivity', 'CopySink', @@ -1512,6 +1532,8 @@ 'ExecuteSSISPackageActivity', 'ExecutionActivity', 'ExportSettings', + 'ExposureControlBatchRequest', + 'ExposureControlBatchResponse', 'ExposureControlRequest', 'ExposureControlResponse', 'Expression', @@ -1636,6 +1658,10 @@ 'ManagedIntegrationRuntimeNode', 'ManagedIntegrationRuntimeOperationResult', 'ManagedIntegrationRuntimeStatus', + 'ManagedPrivateEndpoint', + 'ManagedPrivateEndpointResource', + 'ManagedVirtualNetwork', + 'ManagedVirtualNetworkResource', 'MappingDataFlow', 'MariaDBLinkedService', 'MariaDBSource', @@ -1905,6 +1931,8 @@ 'TriggerResourcePaged', 'DataFlowResourcePaged', 'DataFlowDebugSessionInfoPaged', + 'ManagedVirtualNetworkResourcePaged', + 'ManagedPrivateEndpointResourcePaged', 'GlobalParameterType', 'IntegrationRuntimeState', 'IntegrationRuntimeAutoUpdate', diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models.py index 146a5589d83c..d712ea8c161c 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models.py @@ -2553,8 +2553,9 @@ class StoreWriteSettings(Model): """Connector write settings. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FileServerWriteSettings, AzureDataLakeStoreWriteSettings, - AzureBlobFSWriteSettings, AzureBlobStorageWriteSettings, SftpWriteSettings + sub-classes are: AzureFileStorageWriteSettings, FileServerWriteSettings, + AzureDataLakeStoreWriteSettings, AzureBlobFSWriteSettings, + AzureBlobStorageWriteSettings, SftpWriteSettings All required parameters must be populated in order to send to Azure. @@ -2583,7 +2584,7 @@ class StoreWriteSettings(Model): } _subtype_map = { - 'type': {'FileServerWriteSettings': 'FileServerWriteSettings', 'AzureDataLakeStoreWriteSettings': 'AzureDataLakeStoreWriteSettings', 'AzureBlobFSWriteSettings': 'AzureBlobFSWriteSettings', 'AzureBlobStorageWriteSettings': 'AzureBlobStorageWriteSettings', 'SftpWriteSettings': 'SftpWriteSettings'} + 'type': {'AzureFileStorageWriteSettings': 'AzureFileStorageWriteSettings', 'FileServerWriteSettings': 'FileServerWriteSettings', 'AzureDataLakeStoreWriteSettings': 'AzureDataLakeStoreWriteSettings', 'AzureBlobFSWriteSettings': 'AzureBlobFSWriteSettings', 'AzureBlobStorageWriteSettings': 'AzureBlobStorageWriteSettings', 'SftpWriteSettings': 'SftpWriteSettings'} } def __init__(self, **kwargs): @@ -4160,6 +4161,40 @@ def __init__(self, **kwargs): self.type = 'AzureFileStorageReadSettings' +class AzureFileStorageWriteSettings(StoreWriteSettings): + """Azure File Storage write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileStorageWriteSettings, self).__init__(**kwargs) + self.type = 'AzureFileStorageWriteSettings' + + class AzureFunctionActivity(ExecutionActivity): """Azure Function activity. @@ -8189,6 +8224,40 @@ def __init__(self, **kwargs): self.type = 'ConcurSource' +class ConnectionStateProperties(Model): + """The connection state of a managed private endpoint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar actions_required: The actions required on the managed private + endpoint + :vartype actions_required: str + :ivar description: The managed private endpoint description + :vartype description: str + :ivar status: The approval status + :vartype status: str + """ + + _validation = { + 'actions_required': {'readonly': True}, + 'description': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectionStateProperties, self).__init__(**kwargs) + self.actions_required = None + self.description = None + self.status = None + + class CopyActivity(ExecutionActivity): """Copy activity. @@ -8773,6 +8842,9 @@ class CosmosDbSqlApiSource(CopySource): :param preferred_regions: Preferred regions. Type: array of strings (or Expression with resultType array of strings). :type preferred_regions: object + :param detect_datetime: Whether detect primitive values as datetime + values. Type: boolean (or Expression with resultType boolean). + :type detect_datetime: object :param additional_columns: Specifies the additional columns to be added to source data. Type: array of objects (or Expression with resultType array of objects). @@ -8793,6 +8865,7 @@ class CosmosDbSqlApiSource(CopySource): 'query': {'key': 'query', 'type': 'object'}, 'page_size': {'key': 'pageSize', 'type': 'object'}, 'preferred_regions': {'key': 'preferredRegions', 'type': 'object'}, + 'detect_datetime': {'key': 'detectDatetime', 'type': 'object'}, 'additional_columns': {'key': 'additionalColumns', 'type': '[AdditionalColumns]'}, } @@ -8801,6 +8874,7 @@ def __init__(self, **kwargs): self.query = kwargs.get('query', None) self.page_size = kwargs.get('page_size', None) self.preferred_regions = kwargs.get('preferred_regions', None) + self.detect_datetime = kwargs.get('detect_datetime', None) self.additional_columns = kwargs.get('additional_columns', None) self.type = 'CosmosDbSqlApiSource' @@ -13007,6 +13081,54 @@ def __init__(self, **kwargs): self.type = None +class ExposureControlBatchRequest(Model): + """A list of exposure control features. + + All required parameters must be populated in order to send to Azure. + + :param exposure_control_requests: Required. List of exposure control + features. + :type exposure_control_requests: + list[~azure.mgmt.datafactory.models.ExposureControlRequest] + """ + + _validation = { + 'exposure_control_requests': {'required': True}, + } + + _attribute_map = { + 'exposure_control_requests': {'key': 'exposureControlRequests', 'type': '[ExposureControlRequest]'}, + } + + def __init__(self, **kwargs): + super(ExposureControlBatchRequest, self).__init__(**kwargs) + self.exposure_control_requests = kwargs.get('exposure_control_requests', None) + + +class ExposureControlBatchResponse(Model): + """A list of exposure control feature values. + + All required parameters must be populated in order to send to Azure. + + :param exposure_control_responses: Required. List of exposure control + feature values. + :type exposure_control_responses: + list[~azure.mgmt.datafactory.models.ExposureControlResponse] + """ + + _validation = { + 'exposure_control_responses': {'required': True}, + } + + _attribute_map = { + 'exposure_control_responses': {'key': 'exposureControlResponses', 'type': '[ExposureControlResponse]'}, + } + + def __init__(self, **kwargs): + super(ExposureControlBatchResponse, self).__init__(**kwargs) + self.exposure_control_responses = kwargs.get('exposure_control_responses', None) + + class ExposureControlRequest(Model): """The exposure control request. @@ -15528,6 +15650,10 @@ class HdfsReadSettings(StoreReadSettings): :type modified_datetime_end: object :param distcp_settings: Specifies Distcp-related settings. :type distcp_settings: ~azure.mgmt.datafactory.models.DistcpSettings + :param delete_files_after_completion: Indicates whether the source files + need to be deleted after copy completion. Default is false. Type: boolean + (or Expression with resultType boolean). + :type delete_files_after_completion: object """ _validation = { @@ -15547,6 +15673,7 @@ class HdfsReadSettings(StoreReadSettings): 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, 'distcp_settings': {'key': 'distcpSettings', 'type': 'DistcpSettings'}, + 'delete_files_after_completion': {'key': 'deleteFilesAfterCompletion', 'type': 'object'}, } def __init__(self, **kwargs): @@ -15560,6 +15687,7 @@ def __init__(self, **kwargs): self.modified_datetime_start = kwargs.get('modified_datetime_start', None) self.modified_datetime_end = kwargs.get('modified_datetime_end', None) self.distcp_settings = kwargs.get('distcp_settings', None) + self.delete_files_after_completion = kwargs.get('delete_files_after_completion', None) self.type = 'HdfsReadSettings' @@ -19248,6 +19376,12 @@ class LogStorageSettings(Model): :param path: The path to storage for storing detailed logs of activity execution. Type: string (or Expression with resultType string). :type path: object + :param log_level: Gets or sets the log level, support: Info, Warning. + Type: string (or Expression with resultType string). + :type log_level: object + :param enable_reliable_logging: Specifies whether to enable reliable + logging. Type: boolean (or Expression with resultType boolean). + :type enable_reliable_logging: object """ _validation = { @@ -19258,6 +19392,8 @@ class LogStorageSettings(Model): 'additional_properties': {'key': '', 'type': '{object}'}, 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, 'path': {'key': 'path', 'type': 'object'}, + 'log_level': {'key': 'logLevel', 'type': 'object'}, + 'enable_reliable_logging': {'key': 'enableReliableLogging', 'type': 'object'}, } def __init__(self, **kwargs): @@ -19265,6 +19401,8 @@ def __init__(self, **kwargs): self.additional_properties = kwargs.get('additional_properties', None) self.linked_service_name = kwargs.get('linked_service_name', None) self.path = kwargs.get('path', None) + self.log_level = kwargs.get('log_level', None) + self.enable_reliable_logging = kwargs.get('enable_reliable_logging', None) class LookupActivity(ExecutionActivity): @@ -19773,6 +19911,174 @@ def __init__(self, **kwargs): self.type = 'Managed' +class ManagedPrivateEndpoint(Model): + """Properties of a managed private endpoint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connection_state: The managed private endpoint connection state + :type connection_state: + ~azure.mgmt.datafactory.models.ConnectionStateProperties + :param fqdns: Fully qualified domain names + :type fqdns: list[str] + :param group_id: The groupId to which the managed private endpoint is + created + :type group_id: str + :ivar is_reserved: Denotes whether the managed private endpoint is + reserved + :vartype is_reserved: bool + :param private_link_resource_id: The ARM resource ID of the resource to + which the managed private endpoint is created + :type private_link_resource_id: str + :ivar provisioning_state: The managed private endpoint provisioning state + :vartype provisioning_state: str + """ + + _validation = { + 'is_reserved': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connection_state': {'key': 'connectionState', 'type': 'ConnectionStateProperties'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'is_reserved': {'key': 'isReserved', 'type': 'bool'}, + 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedPrivateEndpoint, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.connection_state = kwargs.get('connection_state', None) + self.fqdns = kwargs.get('fqdns', None) + self.group_id = kwargs.get('group_id', None) + self.is_reserved = None + self.private_link_resource_id = kwargs.get('private_link_resource_id', None) + self.provisioning_state = None + + +class ManagedPrivateEndpointResource(SubResource): + """Managed private endpoint resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Managed private endpoint properties. + :type properties: ~azure.mgmt.datafactory.models.ManagedPrivateEndpoint + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ManagedPrivateEndpoint'}, + } + + def __init__(self, **kwargs): + super(ManagedPrivateEndpointResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ManagedVirtualNetwork(Model): + """A managed Virtual Network associated with the Azure Data Factory. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar v_net_id: Managed Virtual Network ID. + :vartype v_net_id: str + :ivar alias: Managed Virtual Network alias. + :vartype alias: str + """ + + _validation = { + 'v_net_id': {'readonly': True}, + 'alias': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'v_net_id': {'key': 'vNetId', 'type': 'str'}, + 'alias': {'key': 'alias', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedVirtualNetwork, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.v_net_id = None + self.alias = None + + +class ManagedVirtualNetworkResource(SubResource): + """Managed Virtual Network resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Managed Virtual Network properties. + :type properties: ~azure.mgmt.datafactory.models.ManagedVirtualNetwork + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ManagedVirtualNetwork'}, + } + + def __init__(self, **kwargs): + super(ManagedVirtualNetworkResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + class MappingDataFlow(DataFlow): """Mapping data flow. @@ -33827,6 +34133,13 @@ class XmlReadSettings(FormatReadSettings): reading the xml files. Allowed values: 'none', 'xsd', or 'dtd'. Type: string (or Expression with resultType string). :type validation_mode: object + :param detect_data_type: Indicates whether type detection is enabled when + reading the xml files. Type: boolean (or Expression with resultType + boolean). + :type detect_data_type: object + :param namespaces: Indicates whether namespace is enabled when reading the + xml files. Type: boolean (or Expression with resultType boolean). + :type namespaces: object :param namespace_prefixes: Namespace uri to prefix mappings to override the prefixes in column names when namespace is enabled, if no prefix is defined for a namespace uri, the prefix of xml element/attribute name in @@ -33845,6 +34158,8 @@ class XmlReadSettings(FormatReadSettings): 'type': {'key': 'type', 'type': 'str'}, 'compression_properties': {'key': 'compressionProperties', 'type': 'CompressionReadSettings'}, 'validation_mode': {'key': 'validationMode', 'type': 'object'}, + 'detect_data_type': {'key': 'detectDataType', 'type': 'object'}, + 'namespaces': {'key': 'namespaces', 'type': 'object'}, 'namespace_prefixes': {'key': 'namespacePrefixes', 'type': 'object'}, } @@ -33852,6 +34167,8 @@ def __init__(self, **kwargs): super(XmlReadSettings, self).__init__(**kwargs) self.compression_properties = kwargs.get('compression_properties', None) self.validation_mode = kwargs.get('validation_mode', None) + self.detect_data_type = kwargs.get('detect_data_type', None) + self.namespaces = kwargs.get('namespaces', None) self.namespace_prefixes = kwargs.get('namespace_prefixes', None) self.type = 'XmlReadSettings' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models_py3.py index c3b41e3fa089..8723c634a3e4 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models_py3.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models_py3.py @@ -2553,8 +2553,9 @@ class StoreWriteSettings(Model): """Connector write settings. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FileServerWriteSettings, AzureDataLakeStoreWriteSettings, - AzureBlobFSWriteSettings, AzureBlobStorageWriteSettings, SftpWriteSettings + sub-classes are: AzureFileStorageWriteSettings, FileServerWriteSettings, + AzureDataLakeStoreWriteSettings, AzureBlobFSWriteSettings, + AzureBlobStorageWriteSettings, SftpWriteSettings All required parameters must be populated in order to send to Azure. @@ -2583,7 +2584,7 @@ class StoreWriteSettings(Model): } _subtype_map = { - 'type': {'FileServerWriteSettings': 'FileServerWriteSettings', 'AzureDataLakeStoreWriteSettings': 'AzureDataLakeStoreWriteSettings', 'AzureBlobFSWriteSettings': 'AzureBlobFSWriteSettings', 'AzureBlobStorageWriteSettings': 'AzureBlobStorageWriteSettings', 'SftpWriteSettings': 'SftpWriteSettings'} + 'type': {'AzureFileStorageWriteSettings': 'AzureFileStorageWriteSettings', 'FileServerWriteSettings': 'FileServerWriteSettings', 'AzureDataLakeStoreWriteSettings': 'AzureDataLakeStoreWriteSettings', 'AzureBlobFSWriteSettings': 'AzureBlobFSWriteSettings', 'AzureBlobStorageWriteSettings': 'AzureBlobStorageWriteSettings', 'SftpWriteSettings': 'SftpWriteSettings'} } def __init__(self, *, additional_properties=None, max_concurrent_connections=None, copy_behavior=None, **kwargs) -> None: @@ -4160,6 +4161,40 @@ def __init__(self, *, additional_properties=None, max_concurrent_connections=Non self.type = 'AzureFileStorageReadSettings' +class AzureFileStorageWriteSettings(StoreWriteSettings): + """Azure File Storage write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, max_concurrent_connections=None, copy_behavior=None, **kwargs) -> None: + super(AzureFileStorageWriteSettings, self).__init__(additional_properties=additional_properties, max_concurrent_connections=max_concurrent_connections, copy_behavior=copy_behavior, **kwargs) + self.type = 'AzureFileStorageWriteSettings' + + class AzureFunctionActivity(ExecutionActivity): """Azure Function activity. @@ -8189,6 +8224,40 @@ def __init__(self, *, additional_properties=None, source_retry_count=None, sourc self.type = 'ConcurSource' +class ConnectionStateProperties(Model): + """The connection state of a managed private endpoint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar actions_required: The actions required on the managed private + endpoint + :vartype actions_required: str + :ivar description: The managed private endpoint description + :vartype description: str + :ivar status: The approval status + :vartype status: str + """ + + _validation = { + 'actions_required': {'readonly': True}, + 'description': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectionStateProperties, self).__init__(**kwargs) + self.actions_required = None + self.description = None + self.status = None + + class CopyActivity(ExecutionActivity): """Copy activity. @@ -8773,6 +8842,9 @@ class CosmosDbSqlApiSource(CopySource): :param preferred_regions: Preferred regions. Type: array of strings (or Expression with resultType array of strings). :type preferred_regions: object + :param detect_datetime: Whether detect primitive values as datetime + values. Type: boolean (or Expression with resultType boolean). + :type detect_datetime: object :param additional_columns: Specifies the additional columns to be added to source data. Type: array of objects (or Expression with resultType array of objects). @@ -8793,14 +8865,16 @@ class CosmosDbSqlApiSource(CopySource): 'query': {'key': 'query', 'type': 'object'}, 'page_size': {'key': 'pageSize', 'type': 'object'}, 'preferred_regions': {'key': 'preferredRegions', 'type': 'object'}, + 'detect_datetime': {'key': 'detectDatetime', 'type': 'object'}, 'additional_columns': {'key': 'additionalColumns', 'type': '[AdditionalColumns]'}, } - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, page_size=None, preferred_regions=None, additional_columns=None, **kwargs) -> None: + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, page_size=None, preferred_regions=None, detect_datetime=None, additional_columns=None, **kwargs) -> None: super(CosmosDbSqlApiSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) self.query = query self.page_size = page_size self.preferred_regions = preferred_regions + self.detect_datetime = detect_datetime self.additional_columns = additional_columns self.type = 'CosmosDbSqlApiSource' @@ -13007,6 +13081,54 @@ def __init__(self, *, additional_properties=None, **kwargs) -> None: self.type = None +class ExposureControlBatchRequest(Model): + """A list of exposure control features. + + All required parameters must be populated in order to send to Azure. + + :param exposure_control_requests: Required. List of exposure control + features. + :type exposure_control_requests: + list[~azure.mgmt.datafactory.models.ExposureControlRequest] + """ + + _validation = { + 'exposure_control_requests': {'required': True}, + } + + _attribute_map = { + 'exposure_control_requests': {'key': 'exposureControlRequests', 'type': '[ExposureControlRequest]'}, + } + + def __init__(self, *, exposure_control_requests, **kwargs) -> None: + super(ExposureControlBatchRequest, self).__init__(**kwargs) + self.exposure_control_requests = exposure_control_requests + + +class ExposureControlBatchResponse(Model): + """A list of exposure control feature values. + + All required parameters must be populated in order to send to Azure. + + :param exposure_control_responses: Required. List of exposure control + feature values. + :type exposure_control_responses: + list[~azure.mgmt.datafactory.models.ExposureControlResponse] + """ + + _validation = { + 'exposure_control_responses': {'required': True}, + } + + _attribute_map = { + 'exposure_control_responses': {'key': 'exposureControlResponses', 'type': '[ExposureControlResponse]'}, + } + + def __init__(self, *, exposure_control_responses, **kwargs) -> None: + super(ExposureControlBatchResponse, self).__init__(**kwargs) + self.exposure_control_responses = exposure_control_responses + + class ExposureControlRequest(Model): """The exposure control request. @@ -15528,6 +15650,10 @@ class HdfsReadSettings(StoreReadSettings): :type modified_datetime_end: object :param distcp_settings: Specifies Distcp-related settings. :type distcp_settings: ~azure.mgmt.datafactory.models.DistcpSettings + :param delete_files_after_completion: Indicates whether the source files + need to be deleted after copy completion. Default is false. Type: boolean + (or Expression with resultType boolean). + :type delete_files_after_completion: object """ _validation = { @@ -15547,9 +15673,10 @@ class HdfsReadSettings(StoreReadSettings): 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, 'distcp_settings': {'key': 'distcpSettings', 'type': 'DistcpSettings'}, + 'delete_files_after_completion': {'key': 'deleteFilesAfterCompletion', 'type': 'object'}, } - def __init__(self, *, additional_properties=None, max_concurrent_connections=None, recursive=None, wildcard_folder_path=None, wildcard_file_name=None, file_list_path=None, enable_partition_discovery: bool=None, partition_root_path=None, modified_datetime_start=None, modified_datetime_end=None, distcp_settings=None, **kwargs) -> None: + def __init__(self, *, additional_properties=None, max_concurrent_connections=None, recursive=None, wildcard_folder_path=None, wildcard_file_name=None, file_list_path=None, enable_partition_discovery: bool=None, partition_root_path=None, modified_datetime_start=None, modified_datetime_end=None, distcp_settings=None, delete_files_after_completion=None, **kwargs) -> None: super(HdfsReadSettings, self).__init__(additional_properties=additional_properties, max_concurrent_connections=max_concurrent_connections, **kwargs) self.recursive = recursive self.wildcard_folder_path = wildcard_folder_path @@ -15560,6 +15687,7 @@ def __init__(self, *, additional_properties=None, max_concurrent_connections=Non self.modified_datetime_start = modified_datetime_start self.modified_datetime_end = modified_datetime_end self.distcp_settings = distcp_settings + self.delete_files_after_completion = delete_files_after_completion self.type = 'HdfsReadSettings' @@ -19248,6 +19376,12 @@ class LogStorageSettings(Model): :param path: The path to storage for storing detailed logs of activity execution. Type: string (or Expression with resultType string). :type path: object + :param log_level: Gets or sets the log level, support: Info, Warning. + Type: string (or Expression with resultType string). + :type log_level: object + :param enable_reliable_logging: Specifies whether to enable reliable + logging. Type: boolean (or Expression with resultType boolean). + :type enable_reliable_logging: object """ _validation = { @@ -19258,13 +19392,17 @@ class LogStorageSettings(Model): 'additional_properties': {'key': '', 'type': '{object}'}, 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, 'path': {'key': 'path', 'type': 'object'}, + 'log_level': {'key': 'logLevel', 'type': 'object'}, + 'enable_reliable_logging': {'key': 'enableReliableLogging', 'type': 'object'}, } - def __init__(self, *, linked_service_name, additional_properties=None, path=None, **kwargs) -> None: + def __init__(self, *, linked_service_name, additional_properties=None, path=None, log_level=None, enable_reliable_logging=None, **kwargs) -> None: super(LogStorageSettings, self).__init__(**kwargs) self.additional_properties = additional_properties self.linked_service_name = linked_service_name self.path = path + self.log_level = log_level + self.enable_reliable_logging = enable_reliable_logging class LookupActivity(ExecutionActivity): @@ -19773,6 +19911,174 @@ def __init__(self, *, additional_properties=None, **kwargs) -> None: self.type = 'Managed' +class ManagedPrivateEndpoint(Model): + """Properties of a managed private endpoint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connection_state: The managed private endpoint connection state + :type connection_state: + ~azure.mgmt.datafactory.models.ConnectionStateProperties + :param fqdns: Fully qualified domain names + :type fqdns: list[str] + :param group_id: The groupId to which the managed private endpoint is + created + :type group_id: str + :ivar is_reserved: Denotes whether the managed private endpoint is + reserved + :vartype is_reserved: bool + :param private_link_resource_id: The ARM resource ID of the resource to + which the managed private endpoint is created + :type private_link_resource_id: str + :ivar provisioning_state: The managed private endpoint provisioning state + :vartype provisioning_state: str + """ + + _validation = { + 'is_reserved': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connection_state': {'key': 'connectionState', 'type': 'ConnectionStateProperties'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'is_reserved': {'key': 'isReserved', 'type': 'bool'}, + 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, connection_state=None, fqdns=None, group_id: str=None, private_link_resource_id: str=None, **kwargs) -> None: + super(ManagedPrivateEndpoint, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.connection_state = connection_state + self.fqdns = fqdns + self.group_id = group_id + self.is_reserved = None + self.private_link_resource_id = private_link_resource_id + self.provisioning_state = None + + +class ManagedPrivateEndpointResource(SubResource): + """Managed private endpoint resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Managed private endpoint properties. + :type properties: ~azure.mgmt.datafactory.models.ManagedPrivateEndpoint + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ManagedPrivateEndpoint'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(ManagedPrivateEndpointResource, self).__init__(**kwargs) + self.properties = properties + + +class ManagedVirtualNetwork(Model): + """A managed Virtual Network associated with the Azure Data Factory. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar v_net_id: Managed Virtual Network ID. + :vartype v_net_id: str + :ivar alias: Managed Virtual Network alias. + :vartype alias: str + """ + + _validation = { + 'v_net_id': {'readonly': True}, + 'alias': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'v_net_id': {'key': 'vNetId', 'type': 'str'}, + 'alias': {'key': 'alias', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(ManagedVirtualNetwork, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.v_net_id = None + self.alias = None + + +class ManagedVirtualNetworkResource(SubResource): + """Managed Virtual Network resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Managed Virtual Network properties. + :type properties: ~azure.mgmt.datafactory.models.ManagedVirtualNetwork + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ManagedVirtualNetwork'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(ManagedVirtualNetworkResource, self).__init__(**kwargs) + self.properties = properties + + class MappingDataFlow(DataFlow): """Mapping data flow. @@ -33827,6 +34133,13 @@ class XmlReadSettings(FormatReadSettings): reading the xml files. Allowed values: 'none', 'xsd', or 'dtd'. Type: string (or Expression with resultType string). :type validation_mode: object + :param detect_data_type: Indicates whether type detection is enabled when + reading the xml files. Type: boolean (or Expression with resultType + boolean). + :type detect_data_type: object + :param namespaces: Indicates whether namespace is enabled when reading the + xml files. Type: boolean (or Expression with resultType boolean). + :type namespaces: object :param namespace_prefixes: Namespace uri to prefix mappings to override the prefixes in column names when namespace is enabled, if no prefix is defined for a namespace uri, the prefix of xml element/attribute name in @@ -33845,13 +34158,17 @@ class XmlReadSettings(FormatReadSettings): 'type': {'key': 'type', 'type': 'str'}, 'compression_properties': {'key': 'compressionProperties', 'type': 'CompressionReadSettings'}, 'validation_mode': {'key': 'validationMode', 'type': 'object'}, + 'detect_data_type': {'key': 'detectDataType', 'type': 'object'}, + 'namespaces': {'key': 'namespaces', 'type': 'object'}, 'namespace_prefixes': {'key': 'namespacePrefixes', 'type': 'object'}, } - def __init__(self, *, additional_properties=None, compression_properties=None, validation_mode=None, namespace_prefixes=None, **kwargs) -> None: + def __init__(self, *, additional_properties=None, compression_properties=None, validation_mode=None, detect_data_type=None, namespaces=None, namespace_prefixes=None, **kwargs) -> None: super(XmlReadSettings, self).__init__(additional_properties=additional_properties, **kwargs) self.compression_properties = compression_properties self.validation_mode = validation_mode + self.detect_data_type = detect_data_type + self.namespaces = namespaces self.namespace_prefixes = namespace_prefixes self.type = 'XmlReadSettings' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_paged_models.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_paged_models.py index 9a46a2afb4ca..dd21c5c251e7 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_paged_models.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_paged_models.py @@ -129,3 +129,29 @@ class DataFlowDebugSessionInfoPaged(Paged): def __init__(self, *args, **kwargs): super(DataFlowDebugSessionInfoPaged, self).__init__(*args, **kwargs) +class ManagedVirtualNetworkResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedVirtualNetworkResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedVirtualNetworkResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedVirtualNetworkResourcePaged, self).__init__(*args, **kwargs) +class ManagedPrivateEndpointResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedPrivateEndpointResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedPrivateEndpointResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedPrivateEndpointResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/__init__.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/__init__.py index 59e9feaff462..8895bb8bb30b 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/__init__.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/__init__.py @@ -24,6 +24,8 @@ from ._trigger_runs_operations import TriggerRunsOperations from ._data_flows_operations import DataFlowsOperations from ._data_flow_debug_session_operations import DataFlowDebugSessionOperations +from ._managed_virtual_networks_operations import ManagedVirtualNetworksOperations +from ._managed_private_endpoints_operations import ManagedPrivateEndpointsOperations __all__ = [ 'Operations', @@ -41,4 +43,6 @@ 'TriggerRunsOperations', 'DataFlowsOperations', 'DataFlowDebugSessionOperations', + 'ManagedVirtualNetworksOperations', + 'ManagedPrivateEndpointsOperations', ] diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_exposure_control_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_exposure_control_operations.py index 443a826821a5..94e2c5d2efab 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_exposure_control_operations.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_exposure_control_operations.py @@ -177,3 +177,73 @@ def get_feature_value_by_factory( return deserialized get_feature_value_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getFeatureValue'} + + def query_feature_values_by_factory( + self, resource_group_name, factory_name, exposure_control_requests, custom_headers=None, raw=False, **operation_config): + """Get list of exposure control features for specific factory. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param exposure_control_requests: List of exposure control features. + :type exposure_control_requests: + list[~azure.mgmt.datafactory.models.ExposureControlRequest] + :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: ExposureControlBatchResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.ExposureControlBatchResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + exposure_control_batch_request = models.ExposureControlBatchRequest(exposure_control_requests=exposure_control_requests) + + # Construct URL + url = self.query_feature_values_by_factory.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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # 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(exposure_control_batch_request, 'ExposureControlBatchRequest') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExposureControlBatchResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + query_feature_values_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryFeaturesValue'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_managed_private_endpoints_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_managed_private_endpoints_operations.py new file mode 100644 index 000000000000..18a6c84dd485 --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_managed_private_endpoints_operations.py @@ -0,0 +1,331 @@ +# 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 msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ManagedPrivateEndpointsOperations(object): + """ManagedPrivateEndpointsOperations 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. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list_by_factory( + self, resource_group_name, factory_name, managed_virtual_network_name, custom_headers=None, raw=False, **operation_config): + """Lists managed private endpoints. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param managed_virtual_network_name: Managed virtual network name + :type managed_virtual_network_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 ManagedPrivateEndpointResource + :rtype: + ~azure.mgmt.datafactory.models.ManagedPrivateEndpointResourcePaged[~azure.mgmt.datafactory.models.ManagedPrivateEndpointResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_factory.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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str', max_length=127, min_length=1, pattern=r'^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagedPrivateEndpointResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints'} + + def create_or_update( + self, resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, properties, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a managed private endpoint. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param managed_virtual_network_name: Managed virtual network name + :type managed_virtual_network_name: str + :param managed_private_endpoint_name: Managed private endpoint name + :type managed_private_endpoint_name: str + :param properties: Managed private endpoint properties. + :type properties: + ~azure.mgmt.datafactory.models.ManagedPrivateEndpoint + :param if_match: ETag of the managed private endpoint entity. Should + only be specified for update, for which it should match existing + entity or can be * for unconditional update. + :type if_match: 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: ManagedPrivateEndpointResource or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.datafactory.models.ManagedPrivateEndpointResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + managed_private_endpoint = models.ManagedPrivateEndpointResource(properties=properties) + + # 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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str', max_length=127, min_length=1, pattern=r'^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str', max_length=127, min_length=1, pattern=r'^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # 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 if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + 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(managed_private_endpoint, 'ManagedPrivateEndpointResource') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ManagedPrivateEndpointResource', 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.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} + + def get( + self, resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): + """Gets a managed private endpoint. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param managed_virtual_network_name: Managed virtual network name + :type managed_virtual_network_name: str + :param managed_private_endpoint_name: Managed private endpoint name + :type managed_private_endpoint_name: str + :param if_none_match: ETag of the managed private endpoint entity. + Should only be specified for get. If the ETag matches the existing + entity tag, or if * was provided, then no content will be returned. + :type if_none_match: 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: ManagedPrivateEndpointResource or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.datafactory.models.ManagedPrivateEndpointResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # 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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str', max_length=127, min_length=1, pattern=r'^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str', max_length=127, min_length=1, pattern=r'^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # 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 if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ManagedPrivateEndpointResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} + + def delete( + self, resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, custom_headers=None, raw=False, **operation_config): + """Deletes a managed private endpoint. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param managed_virtual_network_name: Managed virtual network name + :type managed_virtual_network_name: str + :param managed_private_endpoint_name: Managed private endpoint name + :type managed_private_endpoint_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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # 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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str', max_length=127, min_length=1, pattern=r'^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str', max_length=127, min_length=1, pattern=r'^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # 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, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_managed_virtual_networks_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_managed_virtual_networks_operations.py new file mode 100644 index 000000000000..95b8beefbcae --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_managed_virtual_networks_operations.py @@ -0,0 +1,262 @@ +# 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 msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ManagedVirtualNetworksOperations(object): + """ManagedVirtualNetworksOperations 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. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list_by_factory( + self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): + """Lists managed Virtual Networks. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_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 ManagedVirtualNetworkResource + :rtype: + ~azure.mgmt.datafactory.models.ManagedVirtualNetworkResourcePaged[~azure.mgmt.datafactory.models.ManagedVirtualNetworkResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_factory.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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagedVirtualNetworkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks'} + + def create_or_update( + self, resource_group_name, factory_name, managed_virtual_network_name, properties, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a managed Virtual Network. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param managed_virtual_network_name: Managed virtual network name + :type managed_virtual_network_name: str + :param properties: Managed Virtual Network properties. + :type properties: ~azure.mgmt.datafactory.models.ManagedVirtualNetwork + :param if_match: ETag of the managed Virtual Network entity. Should + only be specified for update, for which it should match existing + entity or can be * for unconditional update. + :type if_match: 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: ManagedVirtualNetworkResource or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.datafactory.models.ManagedVirtualNetworkResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + managed_virtual_network = models.ManagedVirtualNetworkResource(properties=properties) + + # 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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str', max_length=127, min_length=1, pattern=r'^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # 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 if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + 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(managed_virtual_network, 'ManagedVirtualNetworkResource') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ManagedVirtualNetworkResource', 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.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}'} + + def get( + self, resource_group_name, factory_name, managed_virtual_network_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): + """Gets a managed Virtual Network. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param managed_virtual_network_name: Managed virtual network name + :type managed_virtual_network_name: str + :param if_none_match: ETag of the managed Virtual Network entity. + Should only be specified for get. If the ETag matches the existing + entity tag, or if * was provided, then no content will be returned. + :type if_none_match: 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: ManagedVirtualNetworkResource or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.datafactory.models.ManagedVirtualNetworkResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # 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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str', max_length=127, min_length=1, pattern=r'^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # 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 if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ManagedVirtualNetworkResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/setup.py b/sdk/datafactory/azure-mgmt-datafactory/setup.py index 2287f0c260af..3b3fd5c68d7e 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/setup.py +++ b/sdk/datafactory/azure-mgmt-datafactory/setup.py @@ -36,7 +36,7 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') +with open(os.path.join(package_folder_path, 'version.py') if os.path.exists(os.path.join(package_folder_path, 'version.py')) else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',