ALIYUN::PrivateLink::VpcEndpointService类型用于创建终端节点服务。
语法
{
  "Type": "ALIYUN::PrivateLink::VpcEndpointService",
  "Properties": {
    "User": List,
    "ServiceDescription": String,
    "Resource": List,
    "ConnectBandwidth": Integer,
    "AutoAcceptEnabled": Boolean,
    "Payer": String,
    "ZoneAffinityEnabled": Boolean,
    "ServiceResourceType": String,
    "Tags": List,
    "ResourceGroupId": String,
    "DeletionForce": Boolean
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| User | List | 否 | 是 | 终端节点服务的白名单。 | 白名单中最多支持添加20个阿里云账号。 | 
| ServiceDescription | String | 否 | 是 | 终端节点服务的描述信息。 | 长度为2~256个字符,以英文字母或汉字开头,可包含英文字母、汉字、数字、下划线(_)和短划线(-)。 | 
| Resource | List | 否 | 是 | 添加到终端节点服务中的服务资源。 | 最多支持添加20个服务资源。 更多信息,请参见Resource属性。 | 
| ConnectBandwidth | Integer | 否 | 是 | 默认连接带宽峰值。 | 取值范围:100~1024。 单位:Mbps。 | 
| AutoAcceptEnabled | Boolean | 否 | 是 | 是否自动接受终端节点连接。 | 取值: 
 | 
| Payer | String | 否 | 否 | 付费方。 | 取值: 
 | 
| ZoneAffinityEnabled | Boolean | 否 | 是 | 是否支持可用区就近解析。 | 取值: 
 | 
| ServiceResourceType | String | 否 | 否 | 服务资源类型。 | 取值:slb ,表示服务资源类型为SLB(传统型负载均衡CLB)。 | 
| Tags | List | 否 | 是 | 标签列表。 | 最多支持20个标签。 | 
| ResourceGroupId | String | 否 | 是 | 资源组 ID。 | 无 | 
| DeletionForce | Boolean | 否 | 是 | 是否强制删除。 | 取值: 
 | 
Resource语法
"Resource": [
  {
    "ZoneId": String,
    "ResourceId": String,
    "ResourceType": String
  }
]Resource属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| ZoneId | String | 是 | 否 | 服务资源所属的可用区。 | 无 | 
| ResourceId | String | 是 | 否 | 添加到终端节点服务中的服务资源。 | 无 | 
| ResourceType | String | 是 | 否 | 添加到终端节点服务中的服务资源的类型。 | 取值:slb,表示专有网络类型且具备PrivateLink功能的负载均衡实例。 说明  目前仅支持专有网络类型且具备PrivateLink功能的负载均衡实例作为终端节点服务的服务资源。 | 
Tags语法
"Tags": [
  {
    "Value": String,
    "Key": String
  }
]Tags属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Key | String | 是 | 否 | 实例的标签键。 | 最多支持20个标签键。一旦传入该值,则不允许为空字符串。 最多支持64个字符,不能以 | 
| Value | String | 否 | 否 | 实例的标签值。 | 最多支持20个标签值。一旦传入该值,可以为空字符串。 最多支持128个字符,不能以 | 
返回值
Fn::GetAtt
- ServiceName:终端节点服务的名称。 
- ServiceDomain:终端节点服务的服务域名。 
- ServiceId:终端节点服务的ID。 
- ServiceDescription:终端节点服务的描述信息。 
- MinBandwidth:端点连接的最小带宽。 
- MaxBandwidth:端点连接的最大带宽。 
- Arn:阿里云资源名称。 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  MasterZoneId:
    Type: String
    Description: The master zone id to create load balancer instance.
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
  SlaveZoneId:
    Type: String
    Description: The slave zone id to create load balancer instance.
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
  VpcId:
    Type: String
    Description: The VPC id to create load balancer instance. For VPC network only.
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  VSwitchId:
    Type: String
    Description: The VSwitch id to create load balancer instance. For VPC network only.
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: VpcId
      ZoneId: MasterZoneId
Resources:
  LoadBalancer:
    Type: ALIYUN::SLB::LoadBalancer
    Properties:
      SupportPrivateLink: true
      PayType: PayOnDemand
      VpcId:
        Ref: VpcId
      VSwitchId:
        Ref: VSwitchId
      LoadBalancerSpec: slb.s1.small
      LoadBalancerName: mytest
      AddressType: intranet
      MasterZoneId:
        Ref: MasterZoneId
      SlaveZoneId:
        Ref: SlaveZoneId
  VpcEndpointService:
    DependsOn: LoadBalancer
    Type: ALIYUN::PrivateLink::VpcEndpointService
    Properties:
      User:
        - Ref: ALIYUN::AccountId
      ServiceDescription: test service endpoint
      Resource:
        - ZoneId:
            Ref: MasterZoneId
          ResourceId:
            Ref: LoadBalancer
          ResourceType: slb
      ConnectBandwidth: 100
      AutoAcceptEnabled: true
Outputs:
  ServiceName:
    Description: The name of the endpoint service.
    Value:
      Fn::GetAtt:
        - VpcEndpointService
        - ServiceName
  ServiceDomain:
    Description: The domain name of the endpoint service.
    Value:
      Fn::GetAtt:
        - VpcEndpointService
        - ServiceDomain
  ServiceId:
    Description: The ID of the endpoint service.
    Value:
      Fn::GetAtt:
        - VpcEndpointService
        - ServiceId                    {
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "MasterZoneId": {
      "Type": "String",
      "Description": "The master zone id to create load balancer instance.",
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
    },
    "SlaveZoneId": {
      "Type": "String",
      "Description": "The slave zone id to create load balancer instance.",
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
    },
    "VpcId": {
      "Type": "String",
      "Description": "The VPC id to create load balancer instance. For VPC network only.",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "The VSwitch id to create load balancer instance. For VPC network only.",
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "VpcId",
        "ZoneId": "MasterZoneId"
      }
    }
  },
  "Resources": {
    "LoadBalancer": {
      "Type": "ALIYUN::SLB::LoadBalancer",
      "Properties": {
        "SupportPrivateLink": true,
        "PayType": "PayOnDemand",
        "VpcId": {
          "Ref": "VpcId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "LoadBalancerSpec": "slb.s1.small",
        "LoadBalancerName": "mytest",
        "AddressType": "intranet",
        "MasterZoneId": {
          "Ref": "MasterZoneId"
        },
        "SlaveZoneId": {
          "Ref": "SlaveZoneId"
        }
      }
    },
    "VpcEndpointService": {
      "DependsOn": "LoadBalancer",
      "Type": "ALIYUN::PrivateLink::VpcEndpointService",
      "Properties": {
        "User": [
          {
            "Ref": "ALIYUN::AccountId"
          }
        ],
        "ServiceDescription": "test service endpoint",
        "Resource": [
          {
            "ZoneId": {
              "Ref": "MasterZoneId"
            },
            "ResourceId": {
              "Ref": "LoadBalancer"
            },
            "ResourceType": "slb"
          }
        ],
        "ConnectBandwidth": 100,
        "AutoAcceptEnabled": true
      }
    }
  },
  "Outputs": {
    "ServiceName": {
      "Description": "The name of the endpoint service.",
      "Value": {
        "Fn::GetAtt": [
          "VpcEndpointService",
          "ServiceName"
        ]
      }
    },
    "ServiceDomain": {
      "Description": "The domain name of the endpoint service.",
      "Value": {
        "Fn::GetAtt": [
          "VpcEndpointService",
          "ServiceDomain"
        ]
      }
    },
    "ServiceId": {
      "Description": "The ID of the endpoint service.",
      "Value": {
        "Fn::GetAtt": [
          "VpcEndpointService",
          "ServiceId"
        ]
      }
    }
  }
}