ALIYUN::CR::InstanceEndpointAclPolicy類型用於為公網執行個體訪問入口建立白名單策略。
文法
{
"Type": "ALIYUN::CR::InstanceEndpointAclPolicy",
"Properties": {
"Comment": String,
"Entry": String,
"InstanceId": String,
"ModuleName": String,
"EndpointType": String,
"RegionId": String
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
Comment | String | 否 | 否 | 說明。 | 無 |
Entry | String | 是 | 否 | 允許訪問的IP網段,例如192.168.1.1/32。 | 無 |
InstanceId | String | 是 | 否 | 執行個體ID。 | 無 |
ModuleName | String | 否 | 否 | 需要設定存取原則的模組。 | 取值:
|
EndpointType | String | 否 | 否 | 訪問入口類型。 | 取值: internet(公網)。 |
RegionId | String | 否 | 否 | 地區ID。 | 預設為資源棧地區ID。 |
傳回值
Fn::GetAtt
Entry:允許訪問的IP網段。
InstanceId:執行個體ID。
樣本
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Entry": {
"Type": "String",
"Description": "The IP address range that is allowed to access the instance.",
"Default": "192.168.1.1/32"
},
"InstanceId": {
"Type": "String",
"Description": "The ID of the instance."
}
},
"Resources": {
"InstanceEndpointAclPolicy": {
"Type": "ALIYUN::CR::InstanceEndpointAclPolicy",
"Properties": {
"Entry": {
"Ref": "Entry"
},
"InstanceId": {
"Ref": "InstanceId"
}
}
}
},
"Outputs": {
"Entry": {
"Description": "The IP address range that is allowed to access the instance.",
"Value": {
"Fn::GetAtt": [
"InstanceEndpointAclPolicy",
"Entry"
]
}
},
"InstanceId": {
"Description": "The ID of the instance.",
"Value": {
"Fn::GetAtt": [
"InstanceEndpointAclPolicy",
"InstanceId"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Entry:
Type: String
Description: The IP address range that is allowed to access the instance.
Default: 192.168.1.1/32
InstanceId:
Type: String
Description: The ID of the instance.
Resources:
InstanceEndpointAclPolicy:
Type: 'ALIYUN::CR::InstanceEndpointAclPolicy'
Properties:
Entry:
Ref: Entry
InstanceId:
Ref: InstanceId
Outputs:
Entry:
Description: The IP address range that is allowed to access the instance.
Value:
'Fn::GetAtt':
- InstanceEndpointAclPolicy
- Entry
InstanceId:
Description: The ID of the instance.
Value:
'Fn::GetAtt':
- InstanceEndpointAclPolicy
- InstanceId