forked from aliyun/oos-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathACS::FC::InvokeFunction.yml
52 lines (52 loc) · 1.27 KB
/
ACS::FC::InvokeFunction.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FormatVersion: OOS-2019-06-01
Description: Invoke Created Function.
Parameters:
regionId:
Description: The region id.
Type: String
Default: '{{ ACS::RegionId }}'
functionName:
Description: Function name To Invoke.
Type: String
serviceName:
Description: Service name To Invoke.
Type: String
invocationType:
Description: Invocation Type.
Type: String
AllowedValues:
- Sync
- Async
Default: Sync
event:
Description: The parameters of the function are inside the event.
Type: String
Default: ''
OOSAssumeRole:
Description: The RAM role to be assumed by OOS.
Type: String
Default: OOSServiceRole
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: invokeFunction
Action: 'ACS::ExecuteAPI'
Description: invoke function.
Properties:
Service: FC
API: InvokeFunction
Method: POST
URI: '/services/{{serviceName}}/functions/{{functionName}}/invocations'
Headers:
X-Fc-Invocation-Type: '{{ invocationType }}'
Parameters:
AccountId: '{{ acs::accountid }}'
RegionId: '{{ regionId }}'
Body: '{{event}}'
Outputs:
data:
Type: String
ValueSelector: .data
Outputs:
data:
Type: String
Value: '{{ invokeFunction.data }}'