ALIYUN::HBR::CrossAccount类型用于创建跨账号。
语法
{
"Type": "ALIYUN::HBR::CrossAccount",
"Properties": {
"Alias": String,
"CrossAccountUserId": Integer,
"CrossAccountRoleName": String,
"CrossAccountType": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Alias |
String |
否 |
否 |
跨账号授权的别名。 |
无 |
|
CrossAccountRoleName |
String |
否 |
否 |
用于向被授权账号授予权限的RAM角色名称。 |
无 |
|
CrossAccountType |
String |
否 |
否 |
跨账号授权的类型。 |
有效值:
|
|
CrossAccountUserId |
Integer |
否 |
否 |
您要授权备份数据的账号的用户ID。 |
无 |
返回值
Fn::GetAtt
无
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
CrossAccountUserId:
Type: Number
Description:
en: The user ID of the account that you want to authorize to back up data in your account.
Required: false
CrossAccountRoleName:
Type: String
Description:
en: The name of the RAM role that is used to grant permissions to the authorized account.
Required: false
Alias:
Type: String
Description:
en: The alias of the cross-account authorization.
Required: false
CrossAccountType:
Type: String
Description:
en: 'The type of the cross-account authorization. Valid values: CROSS_ACCOUNT, CROSS_ACCOUNT_BY_RD.'
AllowedValues:
- CROSS_ACCOUNT
- CROSS_ACCOUNT_BY_RD
Required: false
Resources:
CrossAccount:
Type: ALIYUN::HBR::CrossAccount
Properties:
CrossAccountUserId:
Ref: CrossAccountUserId
CrossAccountRoleName:
Ref: CrossAccountRoleName
Alias:
Ref: Alias
CrossAccountType:
Ref: CrossAccountType
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"CrossAccountUserId": {
"Type": "Number",
"Description": {
"en": "The user ID of the account that you want to authorize to back up data in your account."
},
"Required": false
},
"CrossAccountRoleName": {
"Type": "String",
"Description": {
"en": "The name of the RAM role that is used to grant permissions to the authorized account."
},
"Required": false
},
"Alias": {
"Type": "String",
"Description": {
"en": "The alias of the cross-account authorization."
},
"Required": false
},
"CrossAccountType": {
"Type": "String",
"Description": {
"en": "The type of the cross-account authorization. Valid values: CROSS_ACCOUNT, CROSS_ACCOUNT_BY_RD."
},
"AllowedValues": [
"CROSS_ACCOUNT",
"CROSS_ACCOUNT_BY_RD"
],
"Required": false
}
},
"Resources": {
"CrossAccount": {
"Type": "ALIYUN::HBR::CrossAccount",
"Properties": {
"CrossAccountUserId": {
"Ref": "CrossAccountUserId"
},
"CrossAccountRoleName": {
"Ref": "CrossAccountRoleName"
},
"Alias": {
"Ref": "Alias"
},
"CrossAccountType": {
"Ref": "CrossAccountType"
}
}
}
}
}该文章对您有帮助吗?