ACS-FC3-InvokeFunction

模板名称

ACS-FC3-InvokeFunction 执行函数计算

立即执行

模板描述

执行函数计算的函数,并返回函数执行的结果

模板类型

自动化

所有者

Alibaba Cloud

输入参数

参数名称

描述

类型

是否必填

默认值

约束

functionName

函数名称

String

regionId

地域ID

String

{{ ACS::RegionId }}

parameters

函数参数

String

""

invocationType

调用类型

String

Sync

OOSAssumeRole

OOS扮演的RAM角色

String

""

输出参数

参数名称

描述

类型

invokeData

String

执行此模板需要的权限策略

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

详情

FormatVersion: OOS-2019-06-01
Description:
  en: Invoke the function and return the result
  zh-cn: 执行函数计算的函数,并返回函数执行的结果
  name-en: ACS-FC3-InvokeFunction
  name-zh-cn: 执行函数计算
Parameters:
  regionId:
    Type: String
    Label:
      en: RegionId
      zh-cn: 地域ID
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  functionName:
    Label:
      en: FunctionName
      zh-cn: 函数名称
    Type: String
    AssociationProperty: ALIYUN::FC3::Function::FunctionName
    AssociationPropertyMetadata:
      RegionId: regionId
  parameters:
    Label:
      en: Parameters
      zh-cn: 函数参数
    Type: String
    Default: ''
  invocationType:
    Description:
      en: 'If your function execution time may exceed 60s, choose asynchronous call (Async).'
      zh-cn: 如果您的函数执行时间可能超过60s,请选择异步调用(Async)。
    Label:
      en: InvocationType
      zh-cn: 调用类型
    Type: String
    AllowedValues:
      - Sync
      - Async
    Default: Sync
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: OOS扮演的RAM角色
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: invokeFunction
    Action: ACS::FC3::InvokeFunction
    Description:
      en: Invoke the function
      zh-cn: 执行函数计算
    Properties:
      functionName: '{{ functionName }}'
      invocationType: '{{ invocationType }}'
      regionId: '{{ regionId }}'
      event: '{{ parameters }}'
    Outputs:
      invokeData:
        Type: String
        ValueSelector: data
Outputs:
  invokeData:
    Type: String
    Value: '{{ invokeFunction.invokeData }}'