Skip to content

Instantly share code, notes, and snippets.

@DaveRuijter
Last active December 24, 2018 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DaveRuijter/7daeacc3fc13ccce22739e634ec826ab to your computer and use it in GitHub Desktop.
Save DaveRuijter/7daeacc3fc13ccce22739e634ec826ab to your computer and use it in GitHub Desktop.
Azure Data Factory pipeline definition with a Web Activity to scale an Azure Analysis Services server. The pipeline is parameterized. The call to AAS is synchronous, hence it waits for the scale operation to complete.
{
"name": "ADF_Scale_Azure_AS",
"properties": {
"activities": [
{
"name": "00_Scale_Azure_AS",
"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.AnalysisServices/servers/',pipeline().parameters.AzureASServerName,'?api-version=2017-08-01-beta')",
"type": "Expression"
},
"method": "PUT",
"headers": {
"Content-Type": "application/json"
},
"body": {
"value": "@json(concat('{\"sku\":{ \"capacity\": 1,\"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": "Basic"
},
"ComputeSize": {
"type": "String",
"defaultValue": "B1"
},
"AzureASServerName": {
"type": "String",
"defaultValue": "<specifyDefaultASServer>"
},
"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