Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::PrivateLink::VpcEndpoint

Última atualização: Jun 27, 2026

Crie um endpoint do PrivateLink.

Sintaxe

{
  "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,
    "Tags": List
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

VpcId

String

Sim

Não

ID da Virtual Private Cloud (VPC) à qual o endpoint pertence.

Nenhuma.

EndpointName

String

Não

Sim

Nome do endpoint.

Deve ter de 2 a 128 caracteres. Comece com uma letra e inclua letras, dígitos, hifens (-) ou sublinhados (_).

ServiceName

String

Não

Não

Nome do serviço de endpoint associado.

Nenhuma.

Zone

List

Não

Sim

Zonas.

Especifique até 10 zonas.

Para mais informações, consulte Propriedades de Zone.

SecurityGroupId

List

Não

Sim

IDs dos grupos de segurança das interfaces de rede elástica (ENIs) do endpoint. Esses grupos controlam a comunicação de dados entre a VPC e as ENIs do endpoint.

Máximo de 10 grupos de segurança por ENI de endpoint.

EndpointDescription

String

Não

Sim

Descrição do endpoint.

Deve ter de 2 a 256 caracteres. Não comece com http:// ou https://.

ServiceId

String

Não

Não

ID do serviço de endpoint associado.

Nenhuma.

ProtectedEnabled

Boolean

Não

Não

Indica se a autenticação de usuário está ativada.

Aplica-se apenas no modo Security Token Service (STS). Valores válidos:

  • true: ative a autenticação de usuário. Somente o criador do endpoint pode modifique ou exclua o endpoint no modo STS.

  • false (padrão): desativa a autenticação de usuário.

ZonePrivateIpAddressCount

Number

Não

Não

Número de endereços IP privados atribuídos a uma ENI por zona.

Defina o valor como 1.

EndpointType

String

Não

Não

Tipo do endpoint.

Defina o valor como Interface. Essa configuração permite usar instâncias do Classic Load Balancer (CLB) como recursos de serviço para o serviço de endpoint.

Tags

List

Não

Sim

Tags do endpoint.

Adicione até 20 tags.

Sintaxe de Zone

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

Propriedades de Zone

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

ZoneId

String

Não

Não

ID da zona do serviço de endpoint.

Nenhuma.

VSwitchId

String

Não

Não

ID do vSwitch da ENI do endpoint nesta zona.

Nenhuma.

Ip

String

Não

Não

Endereço IP do endpoint nesta zona.

Nenhuma.

Sintaxe de Tags

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

Propriedades de Tags

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

Key

String

Sim

Não

Chave da tag.

Máximo de 20 chaves. Não pode estar vazia.

Comprimento máximo de 64 caracteres. Não pode conter http:// ou https://. Não pode começar com aliyun ou acs:.

Value

String

Não

Não

Valor da tag.

Máximo de 20 valores. Pode estar vazio.

Comprimento máximo de 128 caracteres. Não pode conter http:// ou https://. Não pode começar com aliyun ou acs:.

Valores de retorno

Fn::GetAtt

  • EndpointDomain: domínio do endpoint.

  • Bandwidth: largura de banda do endpoint.

  • EndpointId: ID do endpoint.

  • EndpointName: nome do endpoint.

  • VpcId: ID da VPC do endpoint.

  • ServiceName: nome do serviço de endpoint associado.

  • ServiceId: ID do serviço de endpoint associado.

  • ZoneDomains: domínios das zonas.

  • Arn: Alibaba Cloud Resource Name (ARN).

Exemplos

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                   
{
  "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"
        ]
      }
    }
  }
}