From 9ca19ed452a3a50ab0a555f81c7093571f808aeb Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 23 May 2018 05:07:06 +0000 Subject: [PATCH] Generated from 5dc066ec0112cfbcbb2b9e40f1cc21e734e1035d Add APIs for integration runtime sharing feature. Add two fields 'pushedVersion' 'latestVersion' into SelfHostedIntegrationRuntimeStatus Fixed issue https://github.com/Azure/azure-rest-api-specs/issues/2057 --- .../azure/mgmt/datafactory/models/__init__.py | 9 ++ .../data_factory_management_client_enums.py | 1 + .../models/factory_list_response.py | 39 +++++ .../models/factory_list_response_py3.py | 39 +++++ .../integration_runtime_list_response.py | 40 ++++++ .../integration_runtime_list_response_py3.py | 40 ++++++ .../integration_runtime_permission_request.py | 34 +++++ ...egration_runtime_permission_request_py3.py | 34 +++++ .../models/integration_runtime_status.py | 2 +- .../models/integration_runtime_status_py3.py | 2 +- .../models/linked_integration_runtime_key.py | 4 +- .../linked_integration_runtime_key_py3.py | 4 +- .../linked_integration_runtime_properties.py | 2 +- ...nked_integration_runtime_properties_py3.py | 2 +- .../models/linked_integration_runtime_rbac.py | 6 +- .../linked_integration_runtime_rbac_py3.py | 6 +- .../models/managed_integration_runtime.py | 2 +- .../models/managed_integration_runtime_py3.py | 2 +- .../managed_integration_runtime_status.py | 2 +- .../managed_integration_runtime_status_py3.py | 2 +- .../models/quick_books_linked_service.py | 21 ++- .../models/quick_books_linked_service_py3.py | 23 ++- .../self_hosted_integration_runtime_status.py | 13 +- ...f_hosted_integration_runtime_status_py3.py | 13 +- .../models/service_now_linked_service.py | 2 +- .../models/service_now_linked_service_py3.py | 2 +- .../operations/factories_operations.py | 127 ++++++++++++++++ .../integration_runtimes_operations.py | 136 +++++++++++++++++- 28 files changed, 575 insertions(+), 34 deletions(-) create mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_list_response.py create mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_list_response_py3.py create mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_list_response.py create mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_list_response_py3.py create mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_permission_request.py create mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_permission_request_py3.py diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py index ed790633bf18..66eefff68e2b 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py @@ -20,14 +20,17 @@ from .factory_identity_py3 import FactoryIdentity from .factory_vsts_configuration_py3 import FactoryVSTSConfiguration from .factory_py3 import Factory + from .factory_list_response_py3 import FactoryListResponse from .integration_runtime_py3 import IntegrationRuntime from .integration_runtime_resource_py3 import IntegrationRuntimeResource + from .integration_runtime_list_response_py3 import IntegrationRuntimeListResponse from .integration_runtime_reference_py3 import IntegrationRuntimeReference from .integration_runtime_status_py3 import IntegrationRuntimeStatus from .integration_runtime_status_response_py3 import IntegrationRuntimeStatusResponse from .integration_runtime_status_list_response_py3 import IntegrationRuntimeStatusListResponse from .update_integration_runtime_request_py3 import UpdateIntegrationRuntimeRequest from .update_integration_runtime_node_request_py3 import UpdateIntegrationRuntimeNodeRequest + from .integration_runtime_permission_request_py3 import IntegrationRuntimePermissionRequest from .parameter_specification_py3 import ParameterSpecification from .linked_service_py3 import LinkedService from .linked_service_resource_py3 import LinkedServiceResource @@ -347,14 +350,17 @@ from .factory_identity import FactoryIdentity from .factory_vsts_configuration import FactoryVSTSConfiguration from .factory import Factory + from .factory_list_response import FactoryListResponse from .integration_runtime import IntegrationRuntime from .integration_runtime_resource import IntegrationRuntimeResource + from .integration_runtime_list_response import IntegrationRuntimeListResponse from .integration_runtime_reference import IntegrationRuntimeReference from .integration_runtime_status import IntegrationRuntimeStatus from .integration_runtime_status_response import IntegrationRuntimeStatusResponse from .integration_runtime_status_list_response import IntegrationRuntimeStatusListResponse from .update_integration_runtime_request import UpdateIntegrationRuntimeRequest from .update_integration_runtime_node_request import UpdateIntegrationRuntimeNodeRequest + from .integration_runtime_permission_request import IntegrationRuntimePermissionRequest from .parameter_specification import ParameterSpecification from .linked_service import LinkedService from .linked_service_resource import LinkedServiceResource @@ -743,14 +749,17 @@ 'FactoryIdentity', 'FactoryVSTSConfiguration', 'Factory', + 'FactoryListResponse', 'IntegrationRuntime', 'IntegrationRuntimeResource', + 'IntegrationRuntimeListResponse', 'IntegrationRuntimeReference', 'IntegrationRuntimeStatus', 'IntegrationRuntimeStatusResponse', 'IntegrationRuntimeStatusListResponse', 'UpdateIntegrationRuntimeRequest', 'UpdateIntegrationRuntimeNodeRequest', + 'IntegrationRuntimePermissionRequest', 'ParameterSpecification', 'LinkedService', 'LinkedServiceResource', diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py index fb948ae66a19..982d53167033 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py @@ -23,6 +23,7 @@ class IntegrationRuntimeState(str, Enum): online = "Online" limited = "Limited" offline = "Offline" + access_denied = "AccessDenied" class IntegrationRuntimeAutoUpdate(str, Enum): diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_list_response.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_list_response.py new file mode 100644 index 000000000000..9b91c0088f3c --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_list_response.py @@ -0,0 +1,39 @@ +# 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 + + +class FactoryListResponse(Model): + """A list of factory resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of factories. + :type value: list[~azure.mgmt.datafactory.models.Factory] + :param next_link: The link to the next page of results, if any remaining + results exist. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Factory]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FactoryListResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_list_response_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_list_response_py3.py new file mode 100644 index 000000000000..f5a9769d744f --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_list_response_py3.py @@ -0,0 +1,39 @@ +# 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 + + +class FactoryListResponse(Model): + """A list of factory resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of factories. + :type value: list[~azure.mgmt.datafactory.models.Factory] + :param next_link: The link to the next page of results, if any remaining + results exist. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Factory]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, next_link: str=None, **kwargs) -> None: + super(FactoryListResponse, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_list_response.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_list_response.py new file mode 100644 index 000000000000..9d9805fa985c --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_list_response.py @@ -0,0 +1,40 @@ +# 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 + + +class IntegrationRuntimeListResponse(Model): + """A list of integration runtime resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of integration runtimes. + :type value: + list[~azure.mgmt.datafactory.models.IntegrationRuntimeResource] + :param next_link: The link to the next page of results, if any remaining + results exist. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IntegrationRuntimeResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeListResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_list_response_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_list_response_py3.py new file mode 100644 index 000000000000..f235fdb03228 --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_list_response_py3.py @@ -0,0 +1,40 @@ +# 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 + + +class IntegrationRuntimeListResponse(Model): + """A list of integration runtime resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of integration runtimes. + :type value: + list[~azure.mgmt.datafactory.models.IntegrationRuntimeResource] + :param next_link: The link to the next page of results, if any remaining + results exist. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IntegrationRuntimeResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, next_link: str=None, **kwargs) -> None: + super(IntegrationRuntimeListResponse, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_permission_request.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_permission_request.py new file mode 100644 index 000000000000..0d1f16d7429a --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_permission_request.py @@ -0,0 +1,34 @@ +# 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 + + +class IntegrationRuntimePermissionRequest(Model): + """Grant or revoke access to integration runtime request. + + All required parameters must be populated in order to send to Azure. + + :param factory_identity: Required. The data factory identity. + :type factory_identity: str + """ + + _validation = { + 'factory_identity': {'required': True}, + } + + _attribute_map = { + 'factory_identity': {'key': 'factoryIdentity', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimePermissionRequest, self).__init__(**kwargs) + self.factory_identity = kwargs.get('factory_identity', None) diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_permission_request_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_permission_request_py3.py new file mode 100644 index 000000000000..f70fcc767c68 --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_permission_request_py3.py @@ -0,0 +1,34 @@ +# 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 + + +class IntegrationRuntimePermissionRequest(Model): + """Grant or revoke access to integration runtime request. + + All required parameters must be populated in order to send to Azure. + + :param factory_identity: Required. The data factory identity. + :type factory_identity: str + """ + + _validation = { + 'factory_identity': {'required': True}, + } + + _attribute_map = { + 'factory_identity': {'key': 'factoryIdentity', 'type': 'str'}, + } + + def __init__(self, *, factory_identity: str, **kwargs) -> None: + super(IntegrationRuntimePermissionRequest, self).__init__(**kwargs) + self.factory_identity = factory_identity diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status.py index 987fd8c7e0c4..64da6347f9ed 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status.py @@ -32,7 +32,7 @@ class IntegrationRuntimeStatus(Model): :vartype data_factory_name: str :ivar state: The state of integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline' + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' :vartype state: str or ~azure.mgmt.datafactory.models.IntegrationRuntimeState :param type: Required. Constant filled by server. diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_py3.py index 0f41e6f73f72..8541e04dc679 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_py3.py @@ -32,7 +32,7 @@ class IntegrationRuntimeStatus(Model): :vartype data_factory_name: str :ivar state: The state of integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline' + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' :vartype state: str or ~azure.mgmt.datafactory.models.IntegrationRuntimeState :param type: Required. Constant filled by server. diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key.py index cbecfb9afae4..0edf29ac9a36 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key.py @@ -13,13 +13,13 @@ class LinkedIntegrationRuntimeKey(LinkedIntegrationRuntimeProperties): - """The base definition of a secret type. + """The key authorization type. All required parameters must be populated in order to send to Azure. :param authorization_type: Required. Constant filled by server. :type authorization_type: str - :param key: Required. Type of the secret. + :param key: Required. The key used for authorization. :type key: ~azure.mgmt.datafactory.models.SecureString """ diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key_py3.py index c223b18281cd..e93c5979ef13 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key_py3.py @@ -13,13 +13,13 @@ class LinkedIntegrationRuntimeKey(LinkedIntegrationRuntimeProperties): - """The base definition of a secret type. + """The key authorization type. All required parameters must be populated in order to send to Azure. :param authorization_type: Required. Constant filled by server. :type authorization_type: str - :param key: Required. Type of the secret. + :param key: Required. The key used for authorization. :type key: ~azure.mgmt.datafactory.models.SecureString """ diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_properties.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_properties.py index 20a80b23277c..1f6880dc9e9c 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_properties.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_properties.py @@ -13,7 +13,7 @@ class LinkedIntegrationRuntimeProperties(Model): - """The base definition of a secret type. + """The base definition of a linked integration runtime properties. You probably want to use the sub-classes and not this class directly. Known sub-classes are: LinkedIntegrationRuntimeRbac, LinkedIntegrationRuntimeKey diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_properties_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_properties_py3.py index da73c9b6b95a..1f7a782e9135 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_properties_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_properties_py3.py @@ -13,7 +13,7 @@ class LinkedIntegrationRuntimeProperties(Model): - """The base definition of a secret type. + """The base definition of a linked integration runtime properties. You probably want to use the sub-classes and not this class directly. Known sub-classes are: LinkedIntegrationRuntimeRbac, LinkedIntegrationRuntimeKey diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac.py index 3c7235ecc279..78451b0153f5 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac.py @@ -13,14 +13,14 @@ class LinkedIntegrationRuntimeRbac(LinkedIntegrationRuntimeProperties): - """The base definition of a secret type. + """The role based access control (RBAC) authorization type. All required parameters must be populated in order to send to Azure. :param authorization_type: Required. Constant filled by server. :type authorization_type: str - :param resource_id: Required. The resource ID of the integration runtime - to be shared. + :param resource_id: Required. The resource identifier of the integration + runtime to be shared. :type resource_id: str """ diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac_py3.py index 24d2b946d97e..b7c7f66e0e71 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac_py3.py @@ -13,14 +13,14 @@ class LinkedIntegrationRuntimeRbac(LinkedIntegrationRuntimeProperties): - """The base definition of a secret type. + """The role based access control (RBAC) authorization type. All required parameters must be populated in order to send to Azure. :param authorization_type: Required. Constant filled by server. :type authorization_type: str - :param resource_id: Required. The resource ID of the integration runtime - to be shared. + :param resource_id: Required. The resource identifier of the integration + runtime to be shared. :type resource_id: str """ diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime.py index 6d2afaffd90a..9cbc9e94e7c3 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime.py @@ -31,7 +31,7 @@ class ManagedIntegrationRuntime(IntegrationRuntime): :ivar state: Integration runtime state, only valid for managed dedicated integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', - 'Limited', 'Offline' + 'Limited', 'Offline', 'AccessDenied' :vartype state: str or ~azure.mgmt.datafactory.models.IntegrationRuntimeState :param compute_properties: The compute resource for managed integration diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_py3.py index 741564e6e531..0e71d8b09f4e 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_py3.py @@ -31,7 +31,7 @@ class ManagedIntegrationRuntime(IntegrationRuntime): :ivar state: Integration runtime state, only valid for managed dedicated integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', - 'Limited', 'Offline' + 'Limited', 'Offline', 'AccessDenied' :vartype state: str or ~azure.mgmt.datafactory.models.IntegrationRuntimeState :param compute_properties: The compute resource for managed integration diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status.py index 9ebe40deae74..17d21775f09f 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status.py @@ -28,7 +28,7 @@ class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): :vartype data_factory_name: str :ivar state: The state of integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline' + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' :vartype state: str or ~azure.mgmt.datafactory.models.IntegrationRuntimeState :param type: Required. Constant filled by server. diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status_py3.py index 873c885e7c5d..03d9451045bd 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status_py3.py @@ -28,7 +28,7 @@ class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): :vartype data_factory_name: str :ivar state: The state of integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline' + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' :vartype state: str or ~azure.mgmt.datafactory.models.IntegrationRuntimeState :param type: Required. Constant filled by server. diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service.py index a199f9763f70..c2ca123e5409 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service.py @@ -39,10 +39,17 @@ class QuickBooksLinkedService(LinkedService): :param company_id: Required. The company ID of the QuickBooks company to authorize. :type company_id: object - :param access_token: The access token for OAuth 1.0 authentication. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param access_token_secret: The access token secret for OAuth 1.0 + :param consumer_key: Required. The consumer key for OAuth 1.0 + authentication. + :type consumer_key: object + :param consumer_secret: Required. The consumer secret for OAuth 1.0 authentication. + :type consumer_secret: ~azure.mgmt.datafactory.models.SecretBase + :param access_token: Required. The access token for OAuth 1.0 + authentication. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param access_token_secret: Required. The access token secret for OAuth + 1.0 authentication. :type access_token_secret: ~azure.mgmt.datafactory.models.SecretBase :param use_encrypted_endpoints: Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. @@ -57,6 +64,10 @@ class QuickBooksLinkedService(LinkedService): 'type': {'required': True}, 'endpoint': {'required': True}, 'company_id': {'required': True}, + 'consumer_key': {'required': True}, + 'consumer_secret': {'required': True}, + 'access_token': {'required': True}, + 'access_token_secret': {'required': True}, } _attribute_map = { @@ -68,6 +79,8 @@ class QuickBooksLinkedService(LinkedService): 'type': {'key': 'type', 'type': 'str'}, 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, 'company_id': {'key': 'typeProperties.companyId', 'type': 'object'}, + 'consumer_key': {'key': 'typeProperties.consumerKey', 'type': 'object'}, + 'consumer_secret': {'key': 'typeProperties.consumerSecret', 'type': 'SecretBase'}, 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, 'access_token_secret': {'key': 'typeProperties.accessTokenSecret', 'type': 'SecretBase'}, 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, @@ -78,6 +91,8 @@ def __init__(self, **kwargs): super(QuickBooksLinkedService, self).__init__(**kwargs) self.endpoint = kwargs.get('endpoint', None) self.company_id = kwargs.get('company_id', None) + self.consumer_key = kwargs.get('consumer_key', None) + self.consumer_secret = kwargs.get('consumer_secret', None) self.access_token = kwargs.get('access_token', None) self.access_token_secret = kwargs.get('access_token_secret', None) self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service_py3.py index 8c23934112bd..7ba9f145c26e 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service_py3.py @@ -39,10 +39,17 @@ class QuickBooksLinkedService(LinkedService): :param company_id: Required. The company ID of the QuickBooks company to authorize. :type company_id: object - :param access_token: The access token for OAuth 1.0 authentication. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param access_token_secret: The access token secret for OAuth 1.0 + :param consumer_key: Required. The consumer key for OAuth 1.0 + authentication. + :type consumer_key: object + :param consumer_secret: Required. The consumer secret for OAuth 1.0 authentication. + :type consumer_secret: ~azure.mgmt.datafactory.models.SecretBase + :param access_token: Required. The access token for OAuth 1.0 + authentication. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param access_token_secret: Required. The access token secret for OAuth + 1.0 authentication. :type access_token_secret: ~azure.mgmt.datafactory.models.SecretBase :param use_encrypted_endpoints: Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. @@ -57,6 +64,10 @@ class QuickBooksLinkedService(LinkedService): 'type': {'required': True}, 'endpoint': {'required': True}, 'company_id': {'required': True}, + 'consumer_key': {'required': True}, + 'consumer_secret': {'required': True}, + 'access_token': {'required': True}, + 'access_token_secret': {'required': True}, } _attribute_map = { @@ -68,16 +79,20 @@ class QuickBooksLinkedService(LinkedService): 'type': {'key': 'type', 'type': 'str'}, 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, 'company_id': {'key': 'typeProperties.companyId', 'type': 'object'}, + 'consumer_key': {'key': 'typeProperties.consumerKey', 'type': 'object'}, + 'consumer_secret': {'key': 'typeProperties.consumerSecret', 'type': 'SecretBase'}, 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, 'access_token_secret': {'key': 'typeProperties.accessTokenSecret', 'type': 'SecretBase'}, 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, } - def __init__(self, *, endpoint, company_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, access_token=None, access_token_secret=None, use_encrypted_endpoints=None, encrypted_credential=None, **kwargs) -> None: + def __init__(self, *, endpoint, company_id, consumer_key, consumer_secret, access_token, access_token_secret, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, use_encrypted_endpoints=None, encrypted_credential=None, **kwargs) -> None: super(QuickBooksLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) self.endpoint = endpoint self.company_id = company_id + self.consumer_key = consumer_key + self.consumer_secret = consumer_secret self.access_token = access_token self.access_token_secret = access_token_secret self.use_encrypted_endpoints = use_encrypted_endpoints diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status.py index 7bd67718e078..c1ad1df7deda 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status.py @@ -28,7 +28,7 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): :vartype data_factory_name: str :ivar state: The state of integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline' + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' :vartype state: str or ~azure.mgmt.datafactory.models.IntegrationRuntimeState :param type: Required. Constant filled by server. @@ -72,6 +72,11 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): :param links: The list of linked integration runtimes that are created to share with this integration runtime. :type links: list[~azure.mgmt.datafactory.models.LinkedIntegrationRuntime] + :ivar pushed_version: The version that the integration runtime is going to + update to. + :vartype pushed_version: str + :ivar latest_version: The latest version on download center. + :vartype latest_version: str """ _validation = { @@ -89,6 +94,8 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): 'service_urls': {'readonly': True}, 'auto_update': {'readonly': True}, 'version_status': {'readonly': True}, + 'pushed_version': {'readonly': True}, + 'latest_version': {'readonly': True}, } _attribute_map = { @@ -109,6 +116,8 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): 'auto_update': {'key': 'typeProperties.autoUpdate', 'type': 'str'}, 'version_status': {'key': 'typeProperties.versionStatus', 'type': 'str'}, 'links': {'key': 'typeProperties.links', 'type': '[LinkedIntegrationRuntime]'}, + 'pushed_version': {'key': 'typeProperties.pushedVersion', 'type': 'str'}, + 'latest_version': {'key': 'typeProperties.latestVersion', 'type': 'str'}, } def __init__(self, **kwargs): @@ -126,4 +135,6 @@ def __init__(self, **kwargs): self.auto_update = None self.version_status = None self.links = kwargs.get('links', None) + self.pushed_version = None + self.latest_version = None self.type = 'SelfHosted' diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status_py3.py index 07362ed1835a..100cc77982ff 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status_py3.py @@ -28,7 +28,7 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): :vartype data_factory_name: str :ivar state: The state of integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline' + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' :vartype state: str or ~azure.mgmt.datafactory.models.IntegrationRuntimeState :param type: Required. Constant filled by server. @@ -72,6 +72,11 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): :param links: The list of linked integration runtimes that are created to share with this integration runtime. :type links: list[~azure.mgmt.datafactory.models.LinkedIntegrationRuntime] + :ivar pushed_version: The version that the integration runtime is going to + update to. + :vartype pushed_version: str + :ivar latest_version: The latest version on download center. + :vartype latest_version: str """ _validation = { @@ -89,6 +94,8 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): 'service_urls': {'readonly': True}, 'auto_update': {'readonly': True}, 'version_status': {'readonly': True}, + 'pushed_version': {'readonly': True}, + 'latest_version': {'readonly': True}, } _attribute_map = { @@ -109,6 +116,8 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): 'auto_update': {'key': 'typeProperties.autoUpdate', 'type': 'str'}, 'version_status': {'key': 'typeProperties.versionStatus', 'type': 'str'}, 'links': {'key': 'typeProperties.links', 'type': '[LinkedIntegrationRuntime]'}, + 'pushed_version': {'key': 'typeProperties.pushedVersion', 'type': 'str'}, + 'latest_version': {'key': 'typeProperties.latestVersion', 'type': 'str'}, } def __init__(self, *, additional_properties=None, nodes=None, links=None, **kwargs) -> None: @@ -126,4 +135,6 @@ def __init__(self, *, additional_properties=None, nodes=None, links=None, **kwar self.auto_update = None self.version_status = None self.links = links + self.pushed_version = None + self.latest_version = None self.type = 'SelfHosted' diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service.py index 0e180ce83506..c433366826b8 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service.py @@ -34,7 +34,7 @@ class ServiceNowLinkedService(LinkedService): :param type: Required. Constant filled by server. :type type: str :param endpoint: Required. The endpoint of the ServiceNow server. (i.e. - ServiceNowData.com) + .service-now.com) :type endpoint: object :param authentication_type: Required. The authentication type to use. Possible values include: 'Basic', 'OAuth2' diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service_py3.py index 854468f281c0..cdd9e8ebb718 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service_py3.py @@ -34,7 +34,7 @@ class ServiceNowLinkedService(LinkedService): :param type: Required. Constant filled by server. :type type: str :param endpoint: Required. The endpoint of the ServiceNow server. (i.e. - ServiceNowData.com) + .service-now.com) :type endpoint: object :param authentication_type: Required. The authentication type to use. Possible values include: 'Basic', 'OAuth2' diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/factories_operations.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/factories_operations.py index 0a64dbac9083..e3818fa94a78 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/factories_operations.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/factories_operations.py @@ -484,6 +484,133 @@ def delete( return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}'} + def list_shared_factory( + self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): + """List data factories which the given data factory has access. + + :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: FactoryListResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.FactoryListResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_shared_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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('FactoryListResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_shared_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/sharedFactory'} + + def list_shared_integration_runtime( + self, resource_group_name, factory_name, data_factory_resource_id=None, custom_headers=None, raw=False, **operation_config): + """List integration runtimes which the given data factory has access. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param data_factory_resource_id: The factory resource identifier. + :type data_factory_resource_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: IntegrationRuntimeListResponse or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeListResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_shared_integration_runtime.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 = {} + if data_factory_resource_id is not None: + query_parameters['dataFactoryResourceId'] = self._serialize.query("data_factory_resource_id", data_factory_resource_id, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeListResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_shared_integration_runtime.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/sharedIntegrationRuntime'} + def cancel_pipeline_run( self, resource_group_name, factory_name, run_id, custom_headers=None, raw=False, **operation_config): """Cancel a pipeline run by its run ID. diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtimes_operations.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtimes_operations.py index 6790452bfc6f..b7181ecf411f 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtimes_operations.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtimes_operations.py @@ -275,10 +275,8 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: IntegrationRuntimeStatusResponse or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse or + :return: IntegrationRuntimeResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeResource or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` @@ -323,7 +321,7 @@ def update( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) + deserialized = self._deserialize('IntegrationRuntimeResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -1089,3 +1087,131 @@ def upgrade( client_raw_response = ClientRawResponse(None, response) return client_raw_response upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/upgrade'} + + def grant_access( + self, resource_group_name, factory_name, integration_runtime_name, factory_identity, custom_headers=None, raw=False, **operation_config): + """Grant integration runtime access to other data 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 integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param factory_identity: The data factory identity. + :type factory_identity: 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:`ErrorResponseException` + """ + integration_runtime_permission_request = models.IntegrationRuntimePermissionRequest(factory_identity=factory_identity) + + # Construct URL + url = self.grant_access.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]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_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['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(integration_runtime_permission_request, 'IntegrationRuntimePermissionRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/grantAccess'} + + def revoke_access( + self, resource_group_name, factory_name, integration_runtime_name, factory_identity, custom_headers=None, raw=False, **operation_config): + """Revoke the integration runtime access from other data 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 integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param factory_identity: The data factory identity. + :type factory_identity: 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:`ErrorResponseException` + """ + integration_runtime_permission_request = models.IntegrationRuntimePermissionRequest(factory_identity=factory_identity) + + # Construct URL + url = self.revoke_access.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]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_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['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(integration_runtime_permission_request, 'IntegrationRuntimePermissionRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/revokeAccess'}