Use this task in an agentless job of a release pipeline to invoke an HTTP triggered function in a function app and parse the response. The function app must be created and hosted in Azure Functions.
Syntax
YAML
# Invoke Azure Function v0# Invoke Azure function as a part of your process.- task:AzureFunction@0 inputs: function:# string. Required. Azure function url. key:# string. Required. Function key. method:'POST'# 'OPTIONS' | 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'PATCH'. Required. Method. Default: POST.#headers: # string. Headers. #queryParameters: # string. Query parameters. #body: '{"JobId": "$(system.jobId)", "PlanId": "$(system.planId)", "TimelineId": "$(system.timelineId)", "ProjectId": "$(system.teamProjectId)", "VstsUrl": "$(system.CollectionUri)","AuthToken": "$(system.AccessToken)"}' # string. Optional. Use when method != GET && method != HEAD. Body. Default: {"JobId": "$(system.jobId)", "PlanId": "$(system.planId)", "TimelineId": "$(system.timelineId)", "ProjectId": "$(system.teamProjectId)", "VstsUrl": "$(system.CollectionUri)","AuthToken": "$(system.AccessToken)"}.# Completion Options waitForCompletion:'false'# 'true' | 'false'. Required. Complete based on. Default: false.#successCriteria: # string. Optional. Use when waitForCompletion = false. Success criteria.
Inputs
function - Azure function url string. Required.
The URL of the Azure function to be invoked. Example: https://azurefunctionapp.azurewebsites.net/api/HttpTriggerJS1.
key - Function key string. Required.
The function or the host key used to access and invoke the function. To keep the key secure, use a secret pipeline variable to store the function key. Example: $(myFunctionKey). myFunctionKey is an environment-level secret variable with a value as the secret key.
method - Method string. Required. Allowed values: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, PATCH. Default value: POST.
The HTTP method with which the function will be invoked.
შემოუერთდით Meetup სერიას, რათა შექმნათ მასშტაბური AI გადაწყვეტილებები რეალურ სამყაროში გამოყენების შემთხვევებზე დაყრდნობით თანამემამულე დეველოპერებთან და ექსპერტებთან.