-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest
119 lines (119 loc) · 2.48 KB
/
test
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
"Comment": "Using Maps state in Inline mode",
"StartAt": "Pass",
"States": {
"Pass": {
"Type": "Pass",
"Next": "Map demo",
"Result": {
"foo": "bar",
"colors": [
"red",
"green",
"blue",
"yellow",
"white"
]
}
},
"Map demo": {
"Type": "Map",
"ItemsPath": "$.colors",
"ItemProcessor": {
"ProcessorConfig": {
"Mode": "INLINE"
},
"StartAt": "ECS RunTask",
"States": {
"ECS RunTask": {
"Type": "Task",
"Resource": "arn:aws:states:::ecs:runTask.sync",
"Parameters": {
"LaunchType": "FARGATE",
"Cluster": "arn:aws:ecs:us-east-1:782698772065:cluster/python-ecs",
"TaskDefinition": "arn:aws:ecs:us-east-1:782698772065:task-definition/python-ecs:2",
"NetworkConfiguration": {
"AwsvpcConfiguration": {
"AssignPublicIp": "ENABLED",
"SecurityGroups": [
"sg-068bee7274856b8a6"
],
"Subnets": [
"subnet-59639278"
]
}
},
"Overrides": {
"ContainerOverrides": [
{
"Name": "python-ecs",
"Environment": [
{
"Name": "START_DATE",
"Value": "2024-10-01"
},
{
"Name": "END_DATE",
"Value": "2024-10-02"
},
{
"Name": "TABLE_NAME",
"Value": "TABLE02"
},
{
"Name": "GRPNAME",
"Value.$": "$"
}
]
}
]
}
},
"Catch": [
{
"ErrorEquals": [
"States.ALL"
],
"ResultPath": "$.errorDetails",
"Next": "FailureAccumulator"
}
],
"End": true
},
"FailureAccumulator": {
"Type": "Pass",
"ResultPath": "$.failures",
"Next": "EndIteration"
},
"EndIteration": {
"Type": "Succeed"
}
}
},
"Next": "CheckFailures"
},
"CheckFailures": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.failures",
"IsPresent": true,
"Next": "SendFailureNotification"
}
],
"Default": "Success"
},
"SendFailureNotification": {
"Type": "Task",
"Resource": "arn:aws:states:::sns:publish",
"Parameters": {
"Message": "Some ECS tasks in the Map iteration have failed. Here are the details: $.failures",
"TopicArn": "arn:aws:sns:REGION:ACCOUNT_ID:YourTopicName"
},
"End": true
},
"Success": {
"Type": "Succeed"
}
}
}