Attache une politique à un rôle RAM.
Syntaxe
{
"Type": "ALIYUN::RAM::AttachPolicyToRole",
"Properties": {
"PolicyName": String,
"PolicyType": String,
"RoleName": String
}
}
Propriétés
| Nom de la propriété | Type | Obligatoire | Mise à jour autorisée | Description | Contraintes |
| PolicyName | String | Oui | Non | Nom de la politique. | Aucune. |
| PolicyType | String | Oui | Non | Type de politique. | Valeurs valides :
|
| RoleName | String | Oui | Non | Nom du rôle. Exemple : dev. | Aucune. |
Valeurs de retour
Fn::GetAtt
Aucune.
Exemples
-
Format
YAMLROSTemplateFormatVersion: '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 -
Format
JSON{ "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" } } } } }