ALIYUN::PrivateLink::VpcEndpointService is used to create an endpoint service.

Syntax

{
  "Type": "ALIYUN::PrivateLink::VpcEndpointService",
  "Properties": {
    "User": List,
    "ServiceDescription": String,
    "Resource": List,
    "ConnectBandwidth": Integer,
    "AutoAcceptEnabled": Boolean,
    "Payer": String,
    "ZoneAffinityEnabled": Boolean,
    "ServiceResourceType": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
UserListNoYesThe Alibaba Cloud accounts in the whitelist of the endpoint service. You can add up to 20 Alibaba Cloud accounts to the whitelist.
ServiceDescriptionStringNoYesThe description of the endpoint service. The description must be 2 to 256 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The description must start with a letter.
ResourceListNoYesThe list of one or more service resources that you want to add to the endpoint service. You can add up to 20 service resources to the endpoint service.

For more information, see Resource properties.

ConnectBandwidthIntegerNoYesThe default maximum bandwidth. Valid values: 100 to 1024.

Unit: Mbit/s.

AutoAcceptEnabledBooleanNoYesSpecifies whether to automatically accept endpoint connection requests. Default value: false. Valid values:
  • true: automatically accepts endpoint connection requests.
  • false: does not automatically accept endpoint connection requests.
PayerStringNoNoThe payer. Valid values:
  • Endpoint: the service consumer
  • EndpointService: the service provider
ZoneAffinityEnabledBooleanNoYesSpecifies whether to resolve domain names to IP addresses in the nearest zone. Default value: false. Valid values:
  • true: resolves domain names to IP addresses in the nearest zone.
  • false: does not resolve domain names to IP addresses in the nearest zone.
ServiceResourceTypeStringNoNoThe type of the service resource. Set the value to slb, which specifies Classic Load Balancer (CLB).

Resource syntax

"Resource": [
  {
    "ZoneId": String,
    "ResourceId": String,
    "ResourceType": String
  }
]

Resource properties

PropertyTypeRequiredEditableDescriptionConstraint
ZoneIdStringYesNoThe zone to which the service resource belongs. None
ResourceIdStringYesNoThe list of one or more service resources that are added to the endpoint service. None
ResourceTypeStringYesNoThe type of the service resource that you want to add to the endpoint service. Set the value to slb, which specifies the VPC-type Server Load Balancer (SLB) instances that support PrivateLink.
Note Only SLB instances that support PrivateLink can serve as service resources for endpoint services.

Return values

Fn::GetAtt

  • ServiceName: the name of the endpoint service.
  • ServiceDomain: the domain name of the endpoint service.
  • ServiceId: the ID of the endpoint service.
  • ServiceDescription: the description of the endpoint service.
  • MinBandwidth: the minimum bandwidth of the endpoint connection.
  • MaxBandwidth: the maximum bandwidth of the endpoint connection.

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
    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                    
  • 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"
          }
        }
      },
      "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"
            ]
          }
        }
      }
    }