Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Azure Data Factory pipeline definition with a Web Activity to scale an Azure SQL Database. The pipeline is parameterized. The call to Azure SQL is synchronous, hence it waits for the db scale operation to complete.
{
"name": "ADF_Scale_Azure_SQLDB",
"properties": {
"activities": [
{
"name": "ADF_Scale_Azure_SQLDB",
"type": "WebActivity",
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"typeProperties": {
"url": {
"value": "@concat('https://management.azure.com/subscriptions/', pipeline().parameters.SubscriptionID, '/resourceGroups/', pipeline().parameters.ResourceGroupName, '/providers/Microsoft.Sql/servers/',pipeline().parameters.AzureSQLServerName,'/databases/',pipeline().parameters.AzureSQLDatabaseName,'?api-version=2017-10-01-preview')",
"type": "Expression"
},
"method": "PUT",
"headers": {
"Content-Type": "application/json"
},
"body": {
"value": "@json(concat('{\"sku\":{\"name\":\"', pipeline().parameters.ComputeSize, '\",\"tier\":\"', pipeline().parameters.ServiceTier, '\"}, \"location\": \"', pipeline().parameters.AzureRegionName, ' \"}' ) )",
"type": "Expression"
},
"authentication": {
"type": "MSI",
"resource": "https://management.azure.com/"
}
}
}
],
"parameters": {
"ServiceTier": {
"type": "String",
"defaultValue": "Standard"
},
"ComputeSize": {
"type": "String",
"defaultValue": "S0"
},
"AzureSQLServerName": {
"type": "String",
"defaultValue": "<specifyDefaultSQLServer>"
},
"AzureSQLDatabaseName": {
"type": "String",
"defaultValue": "<specifyDefaultSQLDB>"
},
"SubscriptionID": {
"type": "String",
"defaultValue": "<specifyDefaultSubscriptionID>"
},
"ResourceGroupName": {
"type": "String",
"defaultValue": "<specifyDefaultRG>"
},
"AzureRegionName": {
"type": "String",
"defaultValue": "West Europe"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.