Utility: Azure function

VSTS

icon   Invoke a HTTP triggered function in an Azure function app and parse the response.

Demands

Can be used in only an agentless phase of a release definition.

Arguments

Parameter Comments
Azure function URL Required. The URL of the Azure function to be invoked.
Function key Required. The value of the available function or the host key for the function to be invoked. Should be secured by using a hidden variable.
Headers Optional. The header in JSON format to be attached to the request sent to the function.
Request body Optional. The request body for the Azure function call.
Execution mode Required. Synchronous mode (the default), or Asynchronous call where the Azure function calls back to update the timeline record.
Response parse expression Optional. How to parse the response body for success.
Control options See Control options

Succeeds if the function returns success and the response body parsing is successful.

For more information about using this task, see Approvals and gates overview.

Also see this task on GitHub.

YAML snippet

(VSTS-only)

- task: AzureFunction@1
  inputs:
    function:
    key:
#   method: POST # OPTIONS, GET, HEAD, POST (default), PUT, DELETE, TRACE, PATCH
#   headers: {Content-Type:application/json, PlanUrl: $(system.CollectionUri), ProjectId: $(system.TeamProjectId), HubName: $(system.HostType), PlanId: $(system.PlanId), JobId: $(system.JobId), TimelineId: $(system.TimelineId), TaskInstanceId: $(system.TaskInstanceId), AuthToken: $(system.AccessToken)}
    queryParameters:
    body:
#   waitForCompletion: false # true, false (default)
    successCriteria: