Alibaba Cloud Invoke

Alibaba Cloud Invoke

Certified

Invoke a Function Compute function

Invokes an Alibaba Cloud Function Compute 3.0 function synchronously or asynchronously and outputs the response status and body. Fails on a non-2xx response, and when the function itself throws (status 200 with an X-Fc-Error-Type header). A call waits for the response up to 90% of the task timeout, so the plugin error is shown instead of the generic Kestra timeout, or 10 minutes when it is not set.

yaml
type: io.kestra.plugin.alibaba.fc.Invoke

Invoke a function synchronously and log its response

yaml
id: fc_invoke
namespace: company.team

tasks:
  - id: invoke
    type: io.kestra.plugin.alibaba.fc.Invoke
    accessKeyId: "{{ secret('ALIBABA_ACCESS_KEY_ID') }}"
    accessKeySecret: "{{ secret('ALIBABA_ACCESS_KEY_SECRET') }}"
    region: cn-hangzhou
    accountId: "{{ secret('ALIBABA_ACCOUNT_ID') }}"
    functionName: resize-image
    payload:
      key: landing/photo.png

  - id: log_response
    type: io.kestra.plugin.core.log.Log
    message: "{{ outputs.invoke.body }}"

Invoke a function asynchronously

yaml
id: fc_invoke_async
namespace: company.team

tasks:
  - id: invoke
    type: io.kestra.plugin.alibaba.fc.Invoke
    accessKeyId: "{{ secret('ALIBABA_ACCESS_KEY_ID') }}"
    accessKeySecret: "{{ secret('ALIBABA_ACCESS_KEY_SECRET') }}"
    region: cn-hangzhou
    accountId: "{{ secret('ALIBABA_ACCOUNT_ID') }}"
    functionName: send-report
    invocationType: ASYNC
    payload:
      reportId: "{{ execution.id }}"
Properties

AccessKey ID

The AccessKey ID used to authenticate against Alibaba Cloud.

AccessKey secret

The AccessKey secret paired with the AccessKey ID.

Function name

The name of the function to invoke.

Account ID

The Alibaba Cloud account ID, used to derive the default endpoint <accountId>.<region>.fc.aliyuncs.com. Not needed when endpointOverride is set.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Endpoint override

Custom http or https endpoint URL. When set, it takes precedence over the endpoint derived from region.

DefaultSYNC
Possible Values
SYNCASYNC

Invocation type

SYNC waits for the function result, ASYNC queues the event and returns immediately with an empty body.

Payload

The event sent to the function. A map, list, number or boolean is serialized as JSON, and a string is sent as is, so a rendered JSON text or plain text event can be passed directly.

Qualifier

The version or alias of the function to invoke. Defaults to LATEST.

Region

The Alibaba Cloud region ID, for example cn-hangzhou. The service endpoint is derived from it unless endpointOverride is set.

Security token

Optional Security Token Service (STS) token, required when using temporary credentials.

Response body as text

Only set when the response is at most 512 KB, use uri for larger responses. Empty for asynchronous invocations.

Function Compute request ID

HTTP status code returned by Function Compute

Formaturi

URI of the response body in Kestra internal storage