ALIYUN::VPC::VpcGatewayEndpoint

更新时间:2025-03-31 01:42:36

ALIYUN::VPC::VpcGatewayEndpoint类型用于创建网关终端节点。

语法

{
  "Type": "ALIYUN::VPC::VpcGatewayEndpoint",
  "Properties": {
    "ServiceName": String,
    "VpcId": String,
    "EndpointName": String,
    "EndpointDescription": String,
    "PolicyDocument": String,
    "ResourceGroupId": String,
    "Tags": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

属性名称

类型

必须

允许更新

描述

约束

ServiceName

String

终端节点服务名称。

VpcId

String

要创建网关终端节点的 VPC ID。

EndpointName

String

网关终端节点的名称。

名称的长度在 1~128 个字符之间。

EndpointDescription

String

网关终端节点的描述信息。

描述信息的长度在 1~255 个字符之间。

PolicyDocument

String

云服务的访问策略。

关于访问策略的语法和结构,请参见权限策略语法和结构

说明
  • 当选择的终端节点服务支持设置访问策略时,该字段必填;

  • 当选择的终端节点服务不支持设置访问策略时,该字段必须为空。

  • 终端节点服务是否支持设置访问策略,可通过 ListVpcEndpointServicesByEndUser - 查询可使用的终端节点服务接口获取,SupportPolicy 为 true 表明支持,否则不支持

ResourceGroupId

String

网关终端节点所属的资源组 ID。

Tags

List

资源绑定的标签。

最多支持配置20组标签,更多信息,请参见Tags属性

Tags语法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

属性名称

类型

必须

允许更新

描述

约束

Key

String

资源的标签键。

如需传入该值,则不能输入空字符串。

一个标签键最多支持 128 个字符,不能以aliyunacs:开头,不能包含http://或者https://

Value

String

资源的标签值。

如需传入该值,可以输入空字符串。

最多支持 128 个字符,不能以aliyunacs:开头,不能包含http://或者https://

返回值

Fn::GetAtt

EndpointId:网关终端节点实例 ID。

示例

YAML
JSON
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  VpcId:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      en: |-
        The VPC ID of the gateway endpoint is to be created.
        The VPC must be in the same region as the gateway endpoint.
    Required: true
  ServiceName:
    Type: String
    Description:
      en: Terminal service name.
    Required: true
Resources:
  VpcGatewayEndpoint:
    Type: ALIYUN::VPC::VpcGatewayEndpoint
    Properties:
      VpcId:
        Ref: VpcId
      ServiceName:
        Ref: ServiceName
Outputs:
  EndpointId:
    Description: Gateway endpoint instance ID.
    Value:
      Fn::GetAtt:
        - VpcGatewayEndpoint
        - EndpointId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VpcId": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": {
        "en": "The VPC ID of the gateway endpoint is to be created.\nThe VPC must be in the same region as the gateway endpoint."
      },
      "Required": true
    },
    "ServiceName": {
      "Type": "String",
      "Description": {
        "en": "Terminal service name."
      },
      "Required": true
    }
  },
  "Resources": {
    "VpcGatewayEndpoint": {
      "Type": "ALIYUN::VPC::VpcGatewayEndpoint",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "ServiceName": {
          "Ref": "ServiceName"
        }
      }
    }
  },
  "Outputs": {
    "EndpointId": {
      "Description": "Gateway endpoint instance ID.",
      "Value": {
        "Fn::GetAtt": [
          "VpcGatewayEndpoint",
          "EndpointId"
        ]
      }
    }
  }
}
                        
  • 本页导读 (1)
  • 语法
  • 属性
  • Tags语法
  • Tags属性
  • 返回值
  • 示例