ALIYUN::PrivateLink::VpcEndpoint is used to create an endpoint.

Syntax

{
  "Type": "ALIYUN::PrivateLink::VpcEndpoint",
  "Properties": {
    "VpcId": String,
    "EndpointName": String,
    "ServiceName": String,
    "Zone": List,
    "SecurityGroupId": List,
    "EndpointDescription": String,
    "ServiceId": String,
    "ProtectedEnabled": Boolean,
    "ZonePrivateIpAddressCount": Number,
    "EndpointType": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
VpcIdStringYesNoThe ID of the virtual private cloud (VPC) to which the endpoint belongs. None.
EndpointNameStringNoYesThe name of the endpoint. The name must be 2 to 128 characters in length and must start with a letter. The name can contain letters, digits, hyphens (-), and underscores (_).
ServiceNameStringNoNoThe name of the endpoint service that is associated with the endpoint. None.
ZoneListNoYesThe ID of the zone. You can specify up to 10 zones.

For more information, see Zone properties.

SecurityGroupIdListYesYesThe list of one or more security groups that are associated with the elastic network interfaces (ENIs) for the endpoint. Security groups can be used to control data communication between the VPC and the ENIs. The endpoint can be associated with up to 10 security groups.
EndpointDescriptionStringNoYesThe description of the endpoint. The description must be 2 to 256 characters in length. The description cannot start with http:// or https://.
ServiceIdStringNoNoThe ID of the endpoint service that is associated with the endpoint. None.
ProtectedEnabledBooleanNoNoSpecifies whether to enable user authentication. This property takes effect in Security Token Service (STS) mode. Default value: false. Valid values:
  • true: enables user authentication. After user authentication is enabled, only the user who creates the endpoint can modify or delete the endpoint in STS mode.
  • false: does not enable user authentication.
ZonePrivateIpAddressCountNumberNoNoThe number of private IP addresses that are assigned to an elastic network interface (ENI) in each zone. Set the value to 1.
EndpointTypeStringNoNoThe type of the endpoint. Set the value to Interface. In this case, you can specify Classic Load Balancer (CLB) instances as service resources of endpoint services.

Zone syntax

"Zone": [
  {
    "ZoneId": String,
    "VSwitchId": String,
    "Ip": String
  }
]

Zone properties

PropertyTypeRequiredEditableDescriptionConstraint
ZoneIdStringNoNoThe ID of the zone to which the endpoint service belongs. None.
VSwitchIdStringNoNoThe ID of the vSwitch for which you want to create an ENI. None.
IpStringNoNoThe IP address of the zone in which the endpoint is deployed. None.

Return values

Fn::GetAtt

  • EndpointDomain: the domain name of the endpoint.
  • Bandwidth: the bandwidth of the endpoint.
  • EndpointId: the ID of the endpoint.
  • EndpointName: the name of the endpoint.
  • VpcId: the VPC ID of the endpoint.
  • ServiceName: the name of the endpoint service that is associated with the endpoint.
  • ServiceId: the ID of the endpoint service that is associated with the endpoint.
  • ZoneDomains: the domain names of the zone.

Examples

  • YAMLformat

    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}
      SecurityGroupId:
        Type: CommaDelimitedList
        AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
        AssociationPropertyMetadata:
          VpcId: ${VpcId}
        Description: The security group associated with the endpoint network interface. The security group can control the data communication from the VPC to the endpoint network interface.
        MinLength: 1
        MaxLength: 10
    Resources:
      LoadBalancer:
        Type: ALIYUN::SLB::LoadBalancer
        Properties:
          SupportPrivateLink: true
          PayType: PayOnDemand
          VpcId:
            Ref: VpcId
          VSwitchId:
            Ref: VSwitchId
          LoadBalancerSpec: slb.s1.small
          LoadBalancerName: TestLoadBalancer
          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
      VpcEndpoint:
        DependsOn: VpcEndpointService
        Type: ALIYUN::PrivateLink::VpcEndpoint
        Properties:
          VpcId:
            Ref: VpcId
          EndpointName: TestEndpoint
          Zone:
            - ZoneId:
                Ref: MasterZoneId
              VSwitchId:
                Ref: VSwitchId
          SecurityGroupId:
            Ref: SecurityGroupId
          ServiceId:
            Ref: VpcEndpointService
    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
      EndpointDomain:
        Description: The domain name of the endpoint.
        Value:
          Fn::GetAtt:
            - VpcEndpoint
            - EndpointDomain
      Bandwidth:
        Description: The bandwidth of the endpoint.
        Value:
          Fn::GetAtt:
            - VpcEndpoint
            - Bandwidth
      EndpointId:
        Description: The ID of the endpoint.
        Value:
          Fn::GetAtt:
            - VpcEndpoint
            - EndpointId                   
  • JSONformat

    {
      "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}"
          }
        },
        "SecurityGroupId": {
          "Type": "CommaDelimitedList",
          "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
          "AssociationPropertyMetadata": {
            "VpcId": "${VpcId}"
          },
          "Description": "The security group associated with the endpoint network interface. The security group can control the data communication from the VPC to the endpoint network interface.",
          "MinLength": 1,
          "MaxLength": 10
        }
      },
      "Resources": {
        "LoadBalancer": {
          "Type": "ALIYUN::SLB::LoadBalancer",
          "Properties": {
            "SupportPrivateLink": true,
            "PayType": "PayOnDemand",
            "VpcId": {
              "Ref": "VpcId"
            },
            "VSwitchId": {
              "Ref": "VSwitchId"
            },
            "LoadBalancerSpec": "slb.s1.small",
            "LoadBalancerName": "TestLoadBalancer",
            "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
          }
        },
        "VpcEndpoint": {
          "DependsOn": "VpcEndpointService",
          "Type": "ALIYUN::PrivateLink::VpcEndpoint",
          "Properties": {
            "VpcId": {
              "Ref": "VpcId"
            },
            "EndpointName": "TestEndpoint",
            "Zone": [
              {
                "ZoneId": {
                  "Ref": "MasterZoneId"
                },
                "VSwitchId": {
                  "Ref": "VSwitchId"
                }
              }
            ],
            "SecurityGroupId": {
              "Ref": "SecurityGroupId"
            },
            "ServiceId": {
              "Ref": "VpcEndpointService"
            }
          }
        }
      },
      "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"
            ]
          }
        },
        "EndpointDomain": {
          "Description": "The domain name of the endpoint.",
          "Value": {
            "Fn::GetAtt": [
              "VpcEndpoint",
              "EndpointDomain"
            ]
          }
        },
        "Bandwidth": {
          "Description": "The bandwidth of the endpoint.",
          "Value": {
            "Fn::GetAtt": [
              "VpcEndpoint",
              "Bandwidth"
            ]
          }
        },
        "EndpointId": {
          "Description": "The ID of the endpoint.",
          "Value": {
            "Fn::GetAtt": [
              "VpcEndpoint",
              "EndpointId"
            ]
          }
        }
      }
    }