ALIYUN::ResourceManager::PolicyAttachment is used to attach a policy to an object. After you attach a policy to an object, the object has the permissions to manage the resources in the current resource group or within the current Alibaba Cloud account.
Syntax
{
"Type": "ALIYUN::ResourceManager::PolicyAttachment",
"Properties": {
"PolicyType": String,
"ResourceGroupId": String,
"PolicyName": String,
"PrincipalName": String,
"PrincipalType": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
PolicyType | String | Yes | No | The policy type. | Valid values:
|
ResourceGroupId | String | No | No | The ID of the resource group or the ID of the Alibaba Cloud account. | This property indicates the resource group or the Alibaba Cloud account for which you want to grant permissions. |
PolicyName | String | Yes | No | The policy name. | The name must be 1 to 128 characters in length, and can contain letters, digits, and hyphens (-). |
PrincipalName | String | Yes | No | The name of the object to which you want to attach the policy. | None. |
PrincipalType | String | Yes | No | The type of the object to which you want to attach the policy. | Valid values:
|
Return values
Fn::GetAtt
PolicyType: the type of the object to which the policy is attached.
Description: the description of the policy.
ResourceGroupId: the ID of the resource group or the ID of the Alibaba Cloud account. This property indicates the resource group or the Alibaba Cloud account for which you want to grant permissions.
AttachDate: the time when the policy was attached.
PolicyName: the policy name.
PrincipalName: the name of the object to which the policy is attached.
PrincipalType: the type of the object to which the policy is attached.