ALIYUN::RAM::AttachPolicyToRole is used to attach an authorization policy to a specified role.
Syntax
{
"Type": "ALIYUN::RAM::AttachPolicyToRole",
"Properties": {
"PolicyName": String,
"PolicyType": String,
"RoleName": String
}
}
Properties
Name | Type | Required | Editable | Description | Validity |
---|---|---|---|---|---|
PolicyName | String | Yes | No | The name of the authorization policy. | None |
PolicyType | String | Yes | No | The type of the authorization policy. | Valid values: System and Custom .
|
RoleName | String | Yes | No | The name of the RAM role, such as dev. | None |
Response parameters
Fn::GetAtt
None
Examples
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"AttachPolicyToRole": {
"Type": "ALIYUN::RAM::AttachPolicyToRole",
"Properties": {
"PolicyName": "OSS-Administrator",
"PolicyType": "Custom",
"RoleName": "OSSAdminRole"
}
}
}
}