-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR datafactory/resource-manager] [Datafactory] Add Azure Functio…
…n to Swagger (#4146) * Generated from fe85d670b4a1a49325414614087c0c4558353da6 Azure Function changes * Generated from 19263c53213686a6807712e57fb85b1ab1840266 update defn * Generated from 41fb59ae051421c105bddd407e98a3605d17e297 update object to secret base
- Loading branch information
1 parent
a220bc0
commit 97918c8
Showing
10 changed files
with
375 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_activity.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# 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 .execution_activity import ExecutionActivity | ||
|
||
|
||
class AzureFunctionActivity(ExecutionActivity): | ||
"""Azure Function activity. | ||
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 name: Required. Activity name. | ||
:type name: str | ||
:param description: Activity description. | ||
:type description: str | ||
:param depends_on: Activity depends on condition. | ||
:type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] | ||
:param user_properties: Activity user properties. | ||
:type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] | ||
:param type: Required. Constant filled by server. | ||
:type type: str | ||
:param linked_service_name: Linked service reference. | ||
:type linked_service_name: | ||
~azure.mgmt.datafactory.models.LinkedServiceReference | ||
:param policy: Activity policy. | ||
:type policy: ~azure.mgmt.datafactory.models.ActivityPolicy | ||
:param method: Required. Rest API method for target endpoint. Possible | ||
values include: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE' | ||
:type method: str or | ||
~azure.mgmt.datafactory.models.AzureFunctionActivityMethod | ||
:param function_name: Required. Name of the Function that the Azure | ||
Function Activity will call. Type: string (or Expression with resultType | ||
string) | ||
:type function_name: object | ||
:param headers: Represents the headers that will be sent to the request. | ||
For example, to set the language and type on a request: "headers" : { | ||
"Accept-Language": "en-us", "Content-Type": "application/json" }. Type: | ||
string (or Expression with resultType string). | ||
:type headers: object | ||
:param body: Represents the payload that will be sent to the endpoint. | ||
Required for POST/PUT method, not allowed for GET method Type: string (or | ||
Expression with resultType string). | ||
:type body: object | ||
""" | ||
|
||
_validation = { | ||
'name': {'required': True}, | ||
'type': {'required': True}, | ||
'method': {'required': True}, | ||
'function_name': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'additional_properties': {'key': '', 'type': '{object}'}, | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'description': {'key': 'description', 'type': 'str'}, | ||
'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, | ||
'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, | ||
'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, | ||
'method': {'key': 'typeProperties.method', 'type': 'str'}, | ||
'function_name': {'key': 'typeProperties.functionName', 'type': 'object'}, | ||
'headers': {'key': 'typeProperties.headers', 'type': 'object'}, | ||
'body': {'key': 'typeProperties.body', 'type': 'object'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(AzureFunctionActivity, self).__init__(**kwargs) | ||
self.method = kwargs.get('method', None) | ||
self.function_name = kwargs.get('function_name', None) | ||
self.headers = kwargs.get('headers', None) | ||
self.body = kwargs.get('body', None) | ||
self.type = 'AzureFunctionActivity' |
85 changes: 85 additions & 0 deletions
85
azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_activity_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# 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 .execution_activity_py3 import ExecutionActivity | ||
|
||
|
||
class AzureFunctionActivity(ExecutionActivity): | ||
"""Azure Function activity. | ||
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 name: Required. Activity name. | ||
:type name: str | ||
:param description: Activity description. | ||
:type description: str | ||
:param depends_on: Activity depends on condition. | ||
:type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] | ||
:param user_properties: Activity user properties. | ||
:type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] | ||
:param type: Required. Constant filled by server. | ||
:type type: str | ||
:param linked_service_name: Linked service reference. | ||
:type linked_service_name: | ||
~azure.mgmt.datafactory.models.LinkedServiceReference | ||
:param policy: Activity policy. | ||
:type policy: ~azure.mgmt.datafactory.models.ActivityPolicy | ||
:param method: Required. Rest API method for target endpoint. Possible | ||
values include: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE' | ||
:type method: str or | ||
~azure.mgmt.datafactory.models.AzureFunctionActivityMethod | ||
:param function_name: Required. Name of the Function that the Azure | ||
Function Activity will call. Type: string (or Expression with resultType | ||
string) | ||
:type function_name: object | ||
:param headers: Represents the headers that will be sent to the request. | ||
For example, to set the language and type on a request: "headers" : { | ||
"Accept-Language": "en-us", "Content-Type": "application/json" }. Type: | ||
string (or Expression with resultType string). | ||
:type headers: object | ||
:param body: Represents the payload that will be sent to the endpoint. | ||
Required for POST/PUT method, not allowed for GET method Type: string (or | ||
Expression with resultType string). | ||
:type body: object | ||
""" | ||
|
||
_validation = { | ||
'name': {'required': True}, | ||
'type': {'required': True}, | ||
'method': {'required': True}, | ||
'function_name': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'additional_properties': {'key': '', 'type': '{object}'}, | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'description': {'key': 'description', 'type': 'str'}, | ||
'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, | ||
'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, | ||
'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, | ||
'method': {'key': 'typeProperties.method', 'type': 'str'}, | ||
'function_name': {'key': 'typeProperties.functionName', 'type': 'object'}, | ||
'headers': {'key': 'typeProperties.headers', 'type': 'object'}, | ||
'body': {'key': 'typeProperties.body', 'type': 'object'}, | ||
} | ||
|
||
def __init__(self, *, name: str, method, function_name, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, headers=None, body=None, **kwargs) -> None: | ||
super(AzureFunctionActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) | ||
self.method = method | ||
self.function_name = function_name | ||
self.headers = headers | ||
self.body = body | ||
self.type = 'AzureFunctionActivity' |
69 changes: 69 additions & 0 deletions
69
azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_linked_service.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from .linked_service import LinkedService | ||
|
||
|
||
class AzureFunctionLinkedService(LinkedService): | ||
"""Azure Function linked service. | ||
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 connect_via: The integration runtime reference. | ||
:type connect_via: | ||
~azure.mgmt.datafactory.models.IntegrationRuntimeReference | ||
:param description: Linked service description. | ||
:type description: str | ||
:param parameters: Parameters for linked service. | ||
:type parameters: dict[str, | ||
~azure.mgmt.datafactory.models.ParameterSpecification] | ||
:param annotations: List of tags that can be used for describing the | ||
Dataset. | ||
:type annotations: list[object] | ||
:param type: Required. Constant filled by server. | ||
:type type: str | ||
:param function_app_url: Required. The endpoint of the Azure Function App. | ||
URL will be in the format https://<accountName>.azurewebsites.net. | ||
:type function_app_url: object | ||
:param function_key: Function or Host key for Azure Function App. | ||
:type function_key: ~azure.mgmt.datafactory.models.SecretBase | ||
:param encrypted_credential: The encrypted credential used for | ||
authentication. Credentials are encrypted using the integration runtime | ||
credential manager. Type: string (or Expression with resultType string). | ||
:type encrypted_credential: object | ||
""" | ||
|
||
_validation = { | ||
'type': {'required': True}, | ||
'function_app_url': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'additional_properties': {'key': '', 'type': '{object}'}, | ||
'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, | ||
'description': {'key': 'description', 'type': 'str'}, | ||
'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, | ||
'annotations': {'key': 'annotations', 'type': '[object]'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'function_app_url': {'key': 'typeProperties.functionAppUrl', 'type': 'object'}, | ||
'function_key': {'key': 'typeProperties.functionKey', 'type': 'SecretBase'}, | ||
'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(AzureFunctionLinkedService, self).__init__(**kwargs) | ||
self.function_app_url = kwargs.get('function_app_url', None) | ||
self.function_key = kwargs.get('function_key', None) | ||
self.encrypted_credential = kwargs.get('encrypted_credential', None) | ||
self.type = 'AzureFunction' |
69 changes: 69 additions & 0 deletions
69
azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_linked_service_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from .linked_service_py3 import LinkedService | ||
|
||
|
||
class AzureFunctionLinkedService(LinkedService): | ||
"""Azure Function linked service. | ||
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 connect_via: The integration runtime reference. | ||
:type connect_via: | ||
~azure.mgmt.datafactory.models.IntegrationRuntimeReference | ||
:param description: Linked service description. | ||
:type description: str | ||
:param parameters: Parameters for linked service. | ||
:type parameters: dict[str, | ||
~azure.mgmt.datafactory.models.ParameterSpecification] | ||
:param annotations: List of tags that can be used for describing the | ||
Dataset. | ||
:type annotations: list[object] | ||
:param type: Required. Constant filled by server. | ||
:type type: str | ||
:param function_app_url: Required. The endpoint of the Azure Function App. | ||
URL will be in the format https://<accountName>.azurewebsites.net. | ||
:type function_app_url: object | ||
:param function_key: Function or Host key for Azure Function App. | ||
:type function_key: ~azure.mgmt.datafactory.models.SecretBase | ||
:param encrypted_credential: The encrypted credential used for | ||
authentication. Credentials are encrypted using the integration runtime | ||
credential manager. Type: string (or Expression with resultType string). | ||
:type encrypted_credential: object | ||
""" | ||
|
||
_validation = { | ||
'type': {'required': True}, | ||
'function_app_url': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'additional_properties': {'key': '', 'type': '{object}'}, | ||
'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, | ||
'description': {'key': 'description', 'type': 'str'}, | ||
'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, | ||
'annotations': {'key': 'annotations', 'type': '[object]'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'function_app_url': {'key': 'typeProperties.functionAppUrl', 'type': 'object'}, | ||
'function_key': {'key': 'typeProperties.functionKey', 'type': 'SecretBase'}, | ||
'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, | ||
} | ||
|
||
def __init__(self, *, function_app_url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, function_key=None, encrypted_credential=None, **kwargs) -> None: | ||
super(AzureFunctionLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) | ||
self.function_app_url = function_app_url | ||
self.function_key = function_key | ||
self.encrypted_credential = encrypted_credential | ||
self.type = 'AzureFunction' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.