Attaches a policy to a RAM role.
Syntax
{
"Type": "ALIYUN::RAM::AttachPolicyToRole",
"Properties": {
"PolicyName": String,
"PolicyType": String,
"RoleName": String
}
}
Properties
| Property name | Type | Required | Update allowed | Description | Constraints |
| PolicyName | String | Yes | No | The policy name. | None. |
| PolicyType | String | Yes | No | The policy type. | Valid values:
|
| RoleName | String | Yes | No | The role name. Example: dev. | None. |
Return values
Fn::GetAtt
None.
Examples
-
JSONformat{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "Role": { "Type": "String", "AssociationProperty": "ALIYUN::RAM::Role" } }, "Resources": { "AttachPolicyToRole": { "Type": "ALIYUN::RAM::AttachPolicyToRole", "Properties": { "PolicyName": "OSS-Administrator", "PolicyType": "Custom", "RoleName": { "Ref": "Role" } } } } }
该文章对您有帮助吗?