-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathACS-ECS-BulkyCreateInstanceDiagnosticReport.yml
72 lines (72 loc) · 1.88 KB
/
ACS-ECS-BulkyCreateInstanceDiagnosticReport.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS-ECS-BulkyCreateInstanceDiagnosticReport
name-zh-cn: 批量创建ECS的诊断报告
en: Create diagnostic report for ECS instance in bulk
zh-cn: 批量创建ECS诊断报告
Parameters:
regionId:
Type: String
Label:
en: RegionId
zh-cn: 地域ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
targets:
Type: Json
Label:
en: Targets
zh-cn: 实例ID
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: ALIYUN::ECS::Instance
RegionId: regionId
rateControl:
Label:
en: RateControl
zh-cn: 任务执行的并发比率
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
Tasks:
- Name: getInstances
Description:
en: Views the ECS instances
zh-cn: 获取ECS实例
Action: ACS::SelectTargets
Properties:
ResourceType: ALIYUN::ECS::Instance
RegionId: '{{ regionId }}'
Filters:
- '{{ targets }}'
Outputs:
instanceIds:
Type: List
ValueSelector: Instances.Instance[].InstanceId
- Name: createDiagnosticReports
Action: ACS::ECS::CreateDiagnoseReport
Description:
en: Create diagnostic report for ECS instance
zh-cn: 创建ECS实例诊断报告
Properties:
regionId: '{{ regionId }}'
resourceId: '{{ ACS::TaskLoopItem }}'
metricSetId: dms-instancedefault
Loop:
Items: '{{ getInstances.instanceIds }}'
Outputs:
metricResults:
AggregateType: Fn::ListJoin
AggregateField: metricResult
RateControl: '{{ rateControl }}'
Outputs:
metricResult:
Type: Json
ValueSelector: .metricResults
Outputs:
metricResults:
Type: Json
Value: '{{ createDiagnosticReports.metricResults }}'