Skip to content

Commit 65cf7f8

Browse files
zhangyan133SDKAutoHaoran SunYan Zhang (WICRESOFT NORTH AMERICA LTD)
authored
T1 datafactory 2021 03 09 (Azure#17183)
* CodeGen from PR 13257 in Azure/azure-rest-api-specs [Data Factory]Add AAD auth for CosmosDb to ADF public swagger (Azure#13257) * Add AAD auth for CosmosDb * spell fix * change enum type to string Co-authored-by: Haoran Sun <haorsun@microsoft.com> * test,version,CHANGELOG Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: Haoran Sun <haorsun@microsoft.com> Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) <v-yanzhang@microsoft.com>
1 parent a2ec4c6 commit 65cf7f8

File tree

6 files changed

+203
-31
lines changed

6 files changed

+203
-31
lines changed

sdk/datafactory/azure-mgmt-datafactory/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Release History
22

3+
## 0.17.0 (2021-03-09)
4+
5+
**Features**
6+
7+
- Model HttpLinkedService has a new parameter auth_headers
8+
- Model CosmosDbLinkedService has a new parameter service_principal_credential_type
9+
- Model CosmosDbLinkedService has a new parameter service_principal_credential
10+
- Model CosmosDbLinkedService has a new parameter azure_cloud_type
11+
- Model CosmosDbLinkedService has a new parameter service_principal_id
12+
- Model CosmosDbLinkedService has a new parameter tenant
13+
- Model CosmosDbLinkedService has a new parameter connection_mode
14+
- Model RestServiceLinkedService has a new parameter auth_headers
15+
- Model ODataLinkedService has a new parameter auth_headers
16+
317
## 0.16.0 (2021-02-24)
418

519
**Features**

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,7 @@
12931293
from ._paged_models import PipelineResourcePaged
12941294
from ._paged_models import TriggerResourcePaged
12951295
from ._data_factory_management_client_enums import (
1296+
FactoryIdentityType,
12961297
GlobalParameterType,
12971298
PublicNetworkAccess,
12981299
IntegrationRuntimeState,
@@ -1334,6 +1335,8 @@
13341335
SybaseAuthenticationType,
13351336
DynamicsDeploymentType,
13361337
DynamicsAuthenticationType,
1338+
CosmosDbServicePrincipalCredentialType,
1339+
CosmosDbConnectionMode,
13371340
OrcCompressionCodec,
13381341
AvroCompressionCodec,
13391342
TumblingWindowFrequency,
@@ -2023,6 +2026,7 @@
20232026
'DataFlowDebugSessionInfoPaged',
20242027
'ManagedVirtualNetworkResourcePaged',
20252028
'ManagedPrivateEndpointResourcePaged',
2029+
'FactoryIdentityType',
20262030
'GlobalParameterType',
20272031
'PublicNetworkAccess',
20282032
'IntegrationRuntimeState',
@@ -2064,6 +2068,8 @@
20642068
'SybaseAuthenticationType',
20652069
'DynamicsDeploymentType',
20662070
'DynamicsAuthenticationType',
2071+
'CosmosDbServicePrincipalCredentialType',
2072+
'CosmosDbConnectionMode',
20672073
'OrcCompressionCodec',
20682074
'AvroCompressionCodec',
20692075
'TumblingWindowFrequency',

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_data_factory_management_client_enums.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
from enum import Enum
1313

1414

15+
class FactoryIdentityType(str, Enum):
16+
17+
system_assigned = "SystemAssigned"
18+
user_assigned = "UserAssigned"
19+
system_assigned_user_assigned = "SystemAssigned,UserAssigned"
20+
21+
1522
class GlobalParameterType(str, Enum):
1623

1724
object_enum = "Object"
@@ -245,6 +252,7 @@ class SftpAuthenticationType(str, Enum):
245252

246253
basic = "Basic"
247254
ssh_public_key = "SshPublicKey"
255+
multi_factor = "MultiFactor"
248256

249257

250258
class FtpAuthenticationType(str, Enum):
@@ -321,6 +329,18 @@ class DynamicsAuthenticationType(str, Enum):
321329
aad_service_principal = "AADServicePrincipal"
322330

323331

332+
class CosmosDbServicePrincipalCredentialType(str, Enum):
333+
334+
service_principal_key = "ServicePrincipalKey"
335+
service_principal_cert = "ServicePrincipalCert"
336+
337+
338+
class CosmosDbConnectionMode(str, Enum):
339+
340+
gateway = "Gateway"
341+
direct = "Direct"
342+
343+
324344
class OrcCompressionCodec(str, Enum):
325345

326346
none = "none"

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models.py

Lines changed: 78 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8947,6 +8947,39 @@ class CosmosDbLinkedService(LinkedService):
89478947
:param account_key: The account key of the Azure CosmosDB account. Type:
89488948
SecureString or AzureKeyVaultSecretReference.
89498949
:type account_key: ~azure.mgmt.datafactory.models.SecretBase
8950+
:param service_principal_id: The client ID of the application in Azure
8951+
Active Directory used for Server-To-Server authentication. Type: string
8952+
(or Expression with resultType string).
8953+
:type service_principal_id: object
8954+
:param service_principal_credential_type: The service principal credential
8955+
type to use in Server-To-Server authentication. 'ServicePrincipalKey' for
8956+
key/secret, 'ServicePrincipalCert' for certificate. Type: string (or
8957+
Expression with resultType string). Possible values include:
8958+
'ServicePrincipalKey', 'ServicePrincipalCert'
8959+
:type service_principal_credential_type: str or
8960+
~azure.mgmt.datafactory.models.CosmosDbServicePrincipalCredentialType
8961+
:param service_principal_credential: The credential of the service
8962+
principal object in Azure Active Directory. If
8963+
servicePrincipalCredentialType is 'ServicePrincipalKey',
8964+
servicePrincipalCredential can be SecureString or
8965+
AzureKeyVaultSecretReference. If servicePrincipalCredentialType is
8966+
'ServicePrincipalCert', servicePrincipalCredential can only be
8967+
AzureKeyVaultSecretReference.
8968+
:type service_principal_credential:
8969+
~azure.mgmt.datafactory.models.SecretBase
8970+
:param tenant: The name or ID of the tenant to which the service principal
8971+
belongs. Type: string (or Expression with resultType string).
8972+
:type tenant: object
8973+
:param azure_cloud_type: Indicates the azure cloud type of the service
8974+
principle auth. Allowed values are AzurePublic, AzureChina,
8975+
AzureUsGovernment, AzureGermany. Default value is the data factory
8976+
regions’ cloud type. Type: string (or Expression with resultType string).
8977+
:type azure_cloud_type: object
8978+
:param connection_mode: The connection mode used to access CosmosDB
8979+
account. Type: string (or Expression with resultType string). Possible
8980+
values include: 'Gateway', 'Direct'
8981+
:type connection_mode: str or
8982+
~azure.mgmt.datafactory.models.CosmosDbConnectionMode
89508983
:param encrypted_credential: The encrypted credential used for
89518984
authentication. Credentials are encrypted using the integration runtime
89528985
credential manager. Type: string (or Expression with resultType string).
@@ -8968,6 +9001,12 @@ class CosmosDbLinkedService(LinkedService):
89689001
'account_endpoint': {'key': 'typeProperties.accountEndpoint', 'type': 'object'},
89699002
'database': {'key': 'typeProperties.database', 'type': 'object'},
89709003
'account_key': {'key': 'typeProperties.accountKey', 'type': 'SecretBase'},
9004+
'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'},
9005+
'service_principal_credential_type': {'key': 'typeProperties.servicePrincipalCredentialType', 'type': 'str'},
9006+
'service_principal_credential': {'key': 'typeProperties.servicePrincipalCredential', 'type': 'SecretBase'},
9007+
'tenant': {'key': 'typeProperties.tenant', 'type': 'object'},
9008+
'azure_cloud_type': {'key': 'typeProperties.azureCloudType', 'type': 'object'},
9009+
'connection_mode': {'key': 'typeProperties.connectionMode', 'type': 'str'},
89719010
'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'},
89729011
}
89739012

@@ -8977,6 +9016,12 @@ def __init__(self, **kwargs):
89779016
self.account_endpoint = kwargs.get('account_endpoint', None)
89789017
self.database = kwargs.get('database', None)
89799018
self.account_key = kwargs.get('account_key', None)
9019+
self.service_principal_id = kwargs.get('service_principal_id', None)
9020+
self.service_principal_credential_type = kwargs.get('service_principal_credential_type', None)
9021+
self.service_principal_credential = kwargs.get('service_principal_credential', None)
9022+
self.tenant = kwargs.get('tenant', None)
9023+
self.azure_cloud_type = kwargs.get('azure_cloud_type', None)
9024+
self.connection_mode = kwargs.get('connection_mode', None)
89809025
self.encrypted_credential = kwargs.get('encrypted_credential', None)
89819026
self.type = 'CosmosDb'
89829027

@@ -14195,8 +14240,9 @@ class FactoryIdentity(Model):
1419514240

1419614241
All required parameters must be populated in order to send to Azure.
1419714242

14198-
:ivar type: Required. The identity type. Default value: "SystemAssigned" .
14199-
:vartype type: str
14243+
:param type: Required. The identity type. Possible values include:
14244+
'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned'
14245+
:type type: str or ~azure.mgmt.datafactory.models.FactoryIdentityType
1420014246
:ivar principal_id: The principal id of the identity.
1420114247
:vartype principal_id: str
1420214248
:ivar tenant_id: The client tenant id of the identity.
@@ -14207,7 +14253,7 @@ class FactoryIdentity(Model):
1420714253
"""
1420814254

1420914255
_validation = {
14210-
'type': {'required': True, 'constant': True},
14256+
'type': {'required': True},
1421114257
'principal_id': {'readonly': True},
1421214258
'tenant_id': {'readonly': True},
1421314259
}
@@ -14219,10 +14265,9 @@ class FactoryIdentity(Model):
1421914265
'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{object}'},
1422014266
}
1422114267

14222-
type = "SystemAssigned"
14223-
1422414268
def __init__(self, **kwargs):
1422514269
super(FactoryIdentity, self).__init__(**kwargs)
14270+
self.type = kwargs.get('type', None)
1422614271
self.principal_id = None
1422714272
self.tenant_id = None
1422814273
self.user_assigned_identities = kwargs.get('user_assigned_identities', None)
@@ -17643,6 +17688,10 @@ class HttpLinkedService(LinkedService):
1764317688
:param password: Password for Basic, Digest, Windows, or ClientCertificate
1764417689
with EmbeddedCertData authentication.
1764517690
:type password: ~azure.mgmt.datafactory.models.SecretBase
17691+
:param auth_headers: The additional HTTP headers in the request to RESTful
17692+
API used for authorization. Type: object (or Expression with resultType
17693+
object).
17694+
:type auth_headers: object
1764617695
:param embedded_cert_data: Base64 encoded certificate data for
1764717696
ClientCertificate authentication. For on-premises copy with
1764817697
ClientCertificate authentication, either CertThumbprint or
@@ -17681,6 +17730,7 @@ class HttpLinkedService(LinkedService):
1768117730
'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'},
1768217731
'user_name': {'key': 'typeProperties.userName', 'type': 'object'},
1768317732
'password': {'key': 'typeProperties.password', 'type': 'SecretBase'},
17733+
'auth_headers': {'key': 'typeProperties.authHeaders', 'type': 'object'},
1768417734
'embedded_cert_data': {'key': 'typeProperties.embeddedCertData', 'type': 'object'},
1768517735
'cert_thumbprint': {'key': 'typeProperties.certThumbprint', 'type': 'object'},
1768617736
'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'},
@@ -17693,6 +17743,7 @@ def __init__(self, **kwargs):
1769317743
self.authentication_type = kwargs.get('authentication_type', None)
1769417744
self.user_name = kwargs.get('user_name', None)
1769517745
self.password = kwargs.get('password', None)
17746+
self.auth_headers = kwargs.get('auth_headers', None)
1769617747
self.embedded_cert_data = kwargs.get('embedded_cert_data', None)
1769717748
self.cert_thumbprint = kwargs.get('cert_thumbprint', None)
1769817749
self.encrypted_credential = kwargs.get('encrypted_credential', None)
@@ -22629,6 +22680,10 @@ class ODataLinkedService(LinkedService):
2262922680
:type user_name: object
2263022681
:param password: Password of the OData service.
2263122682
:type password: ~azure.mgmt.datafactory.models.SecretBase
22683+
:param auth_headers: The additional HTTP headers in the request to RESTful
22684+
API used for authorization. Type: object (or Expression with resultType
22685+
object).
22686+
:type auth_headers: object
2263222687
:param tenant: Specify the tenant information (domain name or tenant ID)
2263322688
under which your application resides. Type: string (or Expression with
2263422689
resultType string).
@@ -22688,6 +22743,7 @@ class ODataLinkedService(LinkedService):
2268822743
'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'},
2268922744
'user_name': {'key': 'typeProperties.userName', 'type': 'object'},
2269022745
'password': {'key': 'typeProperties.password', 'type': 'SecretBase'},
22746+
'auth_headers': {'key': 'typeProperties.authHeaders', 'type': 'object'},
2269122747
'tenant': {'key': 'typeProperties.tenant', 'type': 'object'},
2269222748
'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'},
2269322749
'azure_cloud_type': {'key': 'typeProperties.azureCloudType', 'type': 'object'},
@@ -22705,6 +22761,7 @@ def __init__(self, **kwargs):
2270522761
self.authentication_type = kwargs.get('authentication_type', None)
2270622762
self.user_name = kwargs.get('user_name', None)
2270722763
self.password = kwargs.get('password', None)
22764+
self.auth_headers = kwargs.get('auth_headers', None)
2270822765
self.tenant = kwargs.get('tenant', None)
2270922766
self.service_principal_id = kwargs.get('service_principal_id', None)
2271022767
self.azure_cloud_type = kwargs.get('azure_cloud_type', None)
@@ -26582,6 +26639,10 @@ class RestServiceLinkedService(LinkedService):
2658226639
:type user_name: object
2658326640
:param password: The password used in Basic authentication type.
2658426641
:type password: ~azure.mgmt.datafactory.models.SecretBase
26642+
:param auth_headers: The additional HTTP headers in the request to RESTful
26643+
API used for authorization. Type: object (or Expression with resultType
26644+
object).
26645+
:type auth_headers: object
2658526646
:param service_principal_id: The application's client ID used in
2658626647
AadServicePrincipal authentication type.
2658726648
:type service_principal_id: object
@@ -26624,6 +26685,7 @@ class RestServiceLinkedService(LinkedService):
2662426685
'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'},
2662526686
'user_name': {'key': 'typeProperties.userName', 'type': 'object'},
2662626687
'password': {'key': 'typeProperties.password', 'type': 'SecretBase'},
26688+
'auth_headers': {'key': 'typeProperties.authHeaders', 'type': 'object'},
2662726689
'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'},
2662826690
'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'},
2662926691
'tenant': {'key': 'typeProperties.tenant', 'type': 'object'},
@@ -26639,6 +26701,7 @@ def __init__(self, **kwargs):
2663926701
self.authentication_type = kwargs.get('authentication_type', None)
2664026702
self.user_name = kwargs.get('user_name', None)
2664126703
self.password = kwargs.get('password', None)
26704+
self.auth_headers = kwargs.get('auth_headers', None)
2664226705
self.service_principal_id = kwargs.get('service_principal_id', None)
2664326706
self.service_principal_key = kwargs.get('service_principal_key', None)
2664426707
self.tenant = kwargs.get('tenant', None)
@@ -30015,7 +30078,8 @@ class SftpServerLinkedService(LinkedService):
3001530078
resultType integer), minimum: 0.
3001630079
:type port: object
3001730080
:param authentication_type: The authentication type to be used to connect
30018-
to the FTP server. Possible values include: 'Basic', 'SshPublicKey'
30081+
to the FTP server. Possible values include: 'Basic', 'SshPublicKey',
30082+
'MultiFactor'
3001930083
:type authentication_type: str or
3002030084
~azure.mgmt.datafactory.models.SftpAuthenticationType
3002130085
:param user_name: The username used to log on to the SFTP server. Type:
@@ -34723,14 +34787,16 @@ class WebActivityAuthentication(Model):
3472334787
for ServicePrincipal
3472434788
:type pfx: ~azure.mgmt.datafactory.models.SecretBase
3472534789
:param username: Web activity authentication user name for basic
34726-
authentication or ClientID when used for ServicePrincipal
34727-
:type username: str
34790+
authentication or ClientID when used for ServicePrincipal. Type: string
34791+
(or Expression with resultType string).
34792+
:type username: object
3472834793
:param password: Password for the PFX file or basic authentication /
3472934794
Secret when used for ServicePrincipal
3473034795
:type password: ~azure.mgmt.datafactory.models.SecretBase
3473134796
:param resource: Resource for which Azure Auth token will be requested
34732-
when using MSI Authentication.
34733-
:type resource: str
34797+
when using MSI Authentication. Type: string (or Expression with resultType
34798+
string).
34799+
:type resource: object
3473434800
:param user_tenant: TenantId for which Azure Auth token will be requested
3473534801
when using ServicePrincipal Authentication. Type: string (or Expression
3473634802
with resultType string).
@@ -34744,9 +34810,9 @@ class WebActivityAuthentication(Model):
3474434810
_attribute_map = {
3474534811
'type': {'key': 'type', 'type': 'str'},
3474634812
'pfx': {'key': 'pfx', 'type': 'SecretBase'},
34747-
'username': {'key': 'username', 'type': 'str'},
34813+
'username': {'key': 'username', 'type': 'object'},
3474834814
'password': {'key': 'password', 'type': 'SecretBase'},
34749-
'resource': {'key': 'resource', 'type': 'str'},
34815+
'resource': {'key': 'resource', 'type': 'object'},
3475034816
'user_tenant': {'key': 'userTenant', 'type': 'object'},
3475134817
}
3475234818

0 commit comments

Comments
 (0)