ACS-ECS-BulkyAttachInstanceRamRole
更新時(shí)間:
模板名稱(chēng)
ACS-ECS-BulkyAttachInstanceRamRole 批量授予實(shí)例Ram角色
模板描述
批量授予實(shí)例Ram角色
模板類(lèi)型
自動(dòng)化
所有者
Alibaba Cloud
輸入?yún)?shù)
參數(shù)名稱(chēng) | 描述 | 類(lèi)型 | 是否必填 | 默認(rèn)值 | 約束 |
RamRoleName | Ram角色名稱(chēng) | String | 是 | ||
targets | 目標(biāo)實(shí)例 | Json | 是 | ||
regionId | 地域ID | String | 否 | {{ ACS::RegionId }} | |
rateControl | 任務(wù)執(zhí)行的并發(fā)比率 | Json | 否 | {‘Mode’: ‘Concurrency’, ‘MaxErrors’: 0, ‘Concurrency’: 10} | |
OOSAssumeRole | OOS扮演的RAM角色 | String | 否 | “” |
輸出參數(shù)
參數(shù)名稱(chēng) | 描述 | 類(lèi)型 |
instanceIds | List |
執(zhí)行此模板需要的權(quán)限策略
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:AttachInstanceRamRole",
"ecs:DescribeInstances"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"ram:PassRole"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳情
ACS-ECS-BulkyAttachInstanceRamRole詳情
模板內(nèi)容
FormatVersion: OOS-2019-06-01
Description:
en: Bulky attaches instance ram role
zh-cn: 批量授予實(shí)例Ram角色
name-en: ACS-ECS-BulkyAttachInstanceRamRole
name-zh-cn: 批量授予實(shí)例Ram角色
categories:
- instance_manage
Parameters:
regionId:
Type: String
Label:
en: RegionId
zh-cn: 地域ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
RamRoleName:
Label:
en: RamRoleName
zh-cn: Ram角色名稱(chēng)
Type: String
targets:
Label:
en: TargetInstance
zh-cn: 目標(biāo)實(shí)例
Type: Json
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: 'ALIYUN::ECS::Instance'
RegionId: regionId
rateControl:
Label:
en: RateControl
zh-cn: 任務(wù)執(zhí)行的并發(fā)比率
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getInstance
Description:
en: Views the ECS instances
zh-cn: 獲取ECS實(shí)例
Action: ACS::SelectTargets
Properties:
RegionId: '{{ regionId }}'
ResourceType: 'ALIYUN::ECS::Instance'
Filters:
- '{{ targets }}'
Outputs:
instanceIds:
Type: List
ValueSelector: Instances.Instance[].InstanceId
- Name: attachInstanceRamRole
Action: ACS::ExecuteApi
Description:
en: Attach instance ram role
zh-cn: 授予實(shí)例Ram角色
Properties:
Service: ECS
API: AttachInstanceRamRole
Parameters:
RegionId: '{{ regionId }}'
RamRoleName: '{{ RamRoleName }}'
InstanceIds:
- '{{ ACS::TaskLoopItem }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ getInstance.instanceIds }}'
Outputs:
instanceIds:
Type: List
Value: '{{ getInstance.instanceIds }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- RamRoleName
Label:
default:
zh-cn: 配置參數(shù)
en: Configure Parameters
- Parameters:
- regionId
- targets
Label:
default:
zh-cn: 選擇實(shí)例
en: Select Instances
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
zh-cn: 高級(jí)選項(xiàng)
en: Control Options
文檔內(nèi)容是否對(duì)您有幫助?