ALIYUN::ResourceManager::ControlPolicyAttachment digunakan untuk melampirkan kebijakan kontrol kustom.
Sintaksis
{
"Type": "ALIYUN::ResourceManager::ControlPolicyAttachment",
"Properties": {
"TargetId": String,
"PolicyId": String
}
}Properti
| Properti | Tipe | Diperlukan | Dapat Diedit | Deskripsi | Kendala |
| TargetId | String | Ya | Tidak | ID objek yang ingin Anda lampirkan kebijakan kontrolnya. | Nilai yang valid:
|
| PolicyId | String | Ya | Tidak | ID kebijakan kontrol. | Tidak ada |
Parameter respons
Fn::GetAtt
- PolicyType: Jenis kebijakan kontrol.
- Description: Deskripsi kebijakan kontrol.
- AttachDate: Waktu ketika kebijakan kontrol dilampirkan.
- PolicyName: Nama kebijakan kontrol.
- TargetId: ID objek yang menjadi target pelampiran kebijakan kontrol.
- PolicyId: ID kebijakan kontrol.
Contoh
JSON Format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TargetId": {
"Type": "String",
"Description": "TargetId"
},
"PolicyId": {
"Type": "String",
"Description": "PolicyId"
}
},
"Resources": {
"ResourceManagerControlPolicyAttachment": {
"Type": "ALIYUN::ResourceManager::ControlPolicyAttachment",
"Properties": {
"TargetId": {
"Ref": "TargetId"
},
"PolicyId": {
"Ref": "PolicyId"
}
}
}
},
"Outputs": {
"PolicyType": {
"Description": "PolicyType",
"Value": {
"Fn::GetAtt": [
"ResourceManagerControlPolicyAttachment",
"PolicyType"
]
}
},
"Description": {
"Description": "Description",
"Value": {
"Fn::GetAtt": [
"ResourceManagerControlPolicyAttachment",
"Description"
]
}
},
"AttachDate": {
"Description": "AttachDate",
"Value": {
"Fn::GetAtt": [
"ResourceManagerControlPolicyAttachment",
"AttachDate"
]
}
},
"PolicyName": {
"Description": "PolicyName",
"Value": {
"Fn::GetAtt": [
"ResourceManagerControlPolicyAttachment",
"PolicyName"
]
}
},
"TargetId": {
"Description": "TargetId",
"Value": {
"Fn::GetAtt": [
"ResourceManagerControlPolicyAttachment",
"TargetId"
]
}
},
"PolicyId": {
"Description": "PolicyId",
"Value": {
"Fn::GetAtt": [
"ResourceManagerControlPolicyAttachment",
"PolicyId"
]
}
}
}
}YAML Format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
PolicyId:
Description: PolicyId
Type: String
TargetId:
Description: TargetId
Type: String
Resources:
ResourceManagerControlPolicyAttachment:
Properties:
PolicyId:
Ref: PolicyId
TargetId:
Ref: TargetId
Type: ALIYUN::ResourceManager::ControlPolicyAttachment
Outputs:
AttachDate:
Description: AttachDate
Value:
Fn::GetAtt:
- ResourceManagerControlPolicyAttachment
- AttachDate
Description:
Description: Description
Value:
Fn::GetAtt:
- ResourceManagerControlPolicyAttachment
- Description
PolicyId:
Description: PolicyId
Value:
Fn::GetAtt:
- ResourceManagerControlPolicyAttachment
- PolicyId
PolicyName:
Description: PolicyName
Value:
Fn::GetAtt:
- ResourceManagerControlPolicyAttachment
- PolicyName
PolicyType:
Description: PolicyType
Value:
Fn::GetAtt:
- ResourceManagerControlPolicyAttachment
- PolicyType
TargetId:
Description: TargetId
Value:
Fn::GetAtt:
- ResourceManagerControlPolicyAttachment
- TargetId