0
votes

I would like to pass parameters in between linked services. I did not find anything for that in the documentation.

My first linked service is a Parametrized Keyvault.

{
    "name": "ParametrizedAzureKeyVault",
    "properties": {
        "type": "KeyvaultName",
        "typeProperties": {
            "baseUrl": "https://@{linkedService().KeyvaultName}.vault.azure.net/"
        },
        "parameters": {
            "KeyvaultName": {
                "type": "String"
            }
        }
    }
}

My second linked service is a sftp connection ( i know here it is just the host, port,password and user are missing). You can see i added this "subparameters" that i invented. It does not exists and obviously does not work. Just added it to explain what i am aiming at.

{
    "properties": {
        "parameters": {
            "KeyvaultName": {
                "type": "string",
                "defaultValue": "defaultValue"
            },
        "type": "Sftp",
        "typeProperties": {
            "host": {
                "type": "AzureKeyVaultSecret",
                "store": {
                    "referenceName": "ParametrizedAzureKeyVault",
                    "type": "LinkedServiceReference",
                "subparameters":"@{linkedService().KeyvaultName}"
                },
                "secretName": "secretServer"
            },
            "skipHostKeyValidation": true
        },
        "annotations": []
    }
}

The idea is to pass my keyvault as a parameter : enter image description here

I see that the keyvault is called from the sftp linked service. But how do I add a parameter there so i can use the parametrizedkeyvault ?Is it possible ? Otherwise any suggestion or observation would be much appreciated. Thanks in advance!

1

1 Answers

1
votes

You can parameterize the LS as mentioned in the below link: Parameterize Self hosted integration runtime in ADF ARM Template

enter image description here

w.r.t SFTP :

{
    "properties": {
        "type": "Sftp",
        "annotations": [],
        "parameters": {
            "Host": {
                "type": "string",
                "defaultValue": ""
            },
            "Port": {
                "type": "string",
                "defaultValue": ""
            },
            "UserNm": {
                "type": "string",
                "defaultValue": ""
            },
            "SecretNm": {
                "type": "string",
                "defaultValue": ""
            }
        },
        "typeProperties": {
            "host": "@linkedService().Host",
            "port": "@linkedService().Port",
            "skipHostKeyValidation": true,
            "authenticationType": "Basic",
            "userName": "@linkedService().UserNm",
            "password": {
                "type": "AzureKeyVaultSecret",
                "store": {
                    "referenceName": "LS_AzureKeyvault_AEAP_Core",
                    "type": "LinkedServiceReference"
                },
                "secretName": "@linkedService().SecretNm"
            }
        },
        "connectVia": {
            "referenceName": "IR-Ava",
            "type": "IntegrationRuntimeReference"
        }
    }
}

This part is under dynamic content in linked service.

enter image description here