ACS-FC3-InvokeFunction

更新时间:
复制 MD 格式

Template name

ACS-FC3-InvokeFunction: Invokes a function in Function Compute.

Execute now

Template description

Invokes a function in Function Compute and returns the result.

Template type

Automation

Owner

Alibaba Cloud

Input parameters

Parameter name

Description

Type

Required

Default value

Constraints

functionName

The function name.

String

Yes

regionId

The region ID.

String

No

{{ ACS::RegionId }}

parameters

The function parameters.

String

No

""

invocationType

The invocation type.

String

No

Sync

OOSAssumeRole

The RAM role that OOS assumes.

String

No

""

Output parameters

Parameter name

Description

Type

invokeData

String

Required access policy for this template

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "fc:GetAsyncTask",
                "fc:InvokeFunction"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Details

FormatVersion: OOS-2019-06-01
Description:
  en: Invoke the function and return the result
  name-en: ACS-FC3-InvokeFunction
Parameters:
  regionId:
    Type: String
    Label:
      en: RegionId
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  functionName:
    Label:
      en: FunctionName
    Type: String
    AssociationProperty: ALIYUN::FC3::Function::FunctionName
    AssociationPropertyMetadata:
      RegionId: regionId
  parameters:
    Label:
      en: Parameters
    Type: String
    Default: ''
  invocationType:
    Description:
      en: 'If your function running time may exceed 60s, choose asynchronous invocation (Async).'
    Label:
      en: InvocationType
    Type: String
    AllowedValues:
      - Sync
      - Async
    Default: Sync
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: invokeFunction
    Action: ACS::FC3::InvokeFunction
    Description:
      en: Invoke the function
    Properties:
      functionName: '{{ functionName }}'
      invocationType: '{{ invocationType }}'
      regionId: '{{ regionId }}'
      event: '{{ parameters }}'
    Outputs:
      invokeData:
        Type: String
        ValueSelector: data
Outputs:
  invokeData:
    Type: String
    Value: '{{ invokeFunction.invokeData }}'