Template name
ACS-FC-InvokeFunction
Template description
Invokes a Function Compute function and returns the result.
Template type
Automated
Owner
Alibaba Cloud
Input parameters
|
Parameter |
Description |
Type |
Required |
Default value |
Limit |
|
serviceName |
The name of the Function Compute service. |
String |
Yes |
||
|
functionName |
The name of the function to invoke. |
String |
Yes |
||
|
regionId |
The ID of the region where the function resides. |
String |
No |
{{ ACS::RegionId }} |
|
|
parameters |
The parameters to pass to the function. |
String |
No |
"" |
|
|
OOSAssumeRole |
The RAM role assumed by OOS to execute the template. |
String |
No |
"" |
Output parameters
|
Parameter |
Description |
Type |
|
invokeData |
String |
Permission policy that is required to execute the template
{
"Version": "1",
"Statement": [
{
"Action": [
"fc:InvokeFunction"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
References
For more information, see ACS-FC-InvokeFunction.yml at GitHub.
Template content
FormatVersion: OOS-2019-06-01
Description:
en: Invoke the function and return the result
name-en: ACS-FC-InvokeFunction
Parameters:
regionId:
Type: String
Label:
en: RegionId
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
serviceName:
Label:
en: ServiceName
Type: String
AssociationProperty: ALIYUN::FC::Service::ServiceName
AssociationPropertyMetadata:
RegionId: regionId
functionName:
Label:
en: FunctionName
Type: String
AssociationProperty: ALIYUN::FC::Function::FunctionName
AssociationPropertyMetadata:
RegionId: regionId
ServiceName: serviceName
parameters:
Label:
en: Parameters
Type: String
Default: ''
OOSAssumeRole:
Label:
en: OOSAssumeRole
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: invokeFunction
Action: ACS::FC::InvokeFunction
Description:
en: Invoke the function
Properties:
functionName: '{{ functionName }}'
serviceName: '{{ serviceName }}'
invocationType: Sync
regionId: '{{ regionId }}'
event: '{{ parameters }}'
Outputs:
invokeData:
Type: String
ValueSelector: data
Outputs:
invokeData:
Type: String
Value: '{{ invokeFunction.invokeData }}'