全部產品
Search
文件中心

:ALIYUN::CR::InstanceEndpointAclPolicy

更新時間:Aug 13, 2024

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

需要設定存取原則的模組。

取值:

  • Registry

  • Chart

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