From 2610e15ef21b3c798e69ec3b8936e9f7a0ed0f89 Mon Sep 17 00:00:00 2001 From: Haoran Sun Date: Wed, 3 Mar 2021 17:22:03 +0800 Subject: [PATCH 1/3] Add AAD auth for CosmosDb --- .../2018-06-01/entityTypes/LinkedService.json | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json index e6212bc72ecb..4cbad1aff18d 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json @@ -521,6 +521,46 @@ "$ref": "../datafactory.json#/definitions/SecretBase", "description": "The account key of the Azure CosmosDB account. Type: SecureString or AzureKeyVaultSecretReference." }, + "servicePrincipalId": { + "type": "object", + "description": "The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string)." + }, + "servicePrincipalCredentialType": { + "x-ms-enum": { + "name": "CosmosDbServicePrincipalCredentialType", + "modelAsString": true + }, + "enum": [ + "ServicePrincipalKey", + "ServicePrincipalCert" + ], + "type": "object", + "description": "The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string)." + }, + "servicePrincipalCredential": { + "$ref": "../datafactory.json#/definitions/SecretBase", + "description": "The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference." + }, + "tenant": { + "type": "object", + "description": "The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string)." + }, + "azureCloudType": { + "type": "object", + "description": "Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’s cloud type. Type: string (or Expression with resultType string)." + }, + "connectionMode": { + "description": "The connection mode used to access CosmosDB account. Type: string (or Expression with resultType string).", + "type": "object", + "enum": [ + "Gateway", + "Direct" + ], + "x-ms-enum": { + "name": "CosmosDbConnectionMode", + "modelAsString": true + } + }, "encryptedCredential": { "type": "object", "description": "The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string)." From 225485358a79a8399558f23c831a0711a2e24b43 Mon Sep 17 00:00:00 2001 From: Haoran Sun Date: Wed, 3 Mar 2021 18:36:28 +0800 Subject: [PATCH 2/3] spell fix --- .../stable/2018-06-01/entityTypes/LinkedService.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json index 4cbad1aff18d..2246d407a0be 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json @@ -547,7 +547,7 @@ }, "azureCloudType": { "type": "object", - "description": "Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’s cloud type. Type: string (or Expression with resultType string)." + "description": "Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string)." }, "connectionMode": { "description": "The connection mode used to access CosmosDB account. Type: string (or Expression with resultType string).", From 23af44a9c83cc63713f1fa6171ab1c0588ec6f95 Mon Sep 17 00:00:00 2001 From: rickysun93 Date: Thu, 4 Mar 2021 11:31:36 +0800 Subject: [PATCH 3/3] change enum type to string --- .../stable/2018-06-01/entityTypes/LinkedService.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json index 2246d407a0be..ad4e743a571d 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json @@ -534,7 +534,7 @@ "ServicePrincipalKey", "ServicePrincipalCert" ], - "type": "object", + "type": "string", "description": "The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string)." }, "servicePrincipalCredential": { @@ -551,7 +551,7 @@ }, "connectionMode": { "description": "The connection mode used to access CosmosDB account. Type: string (or Expression with resultType string).", - "type": "object", + "type": "string", "enum": [ "Gateway", "Direct"