全部產品
Search
文件中心

:ALIYUN::PrivateLink::VpcEndpointServiceAttachment

更新時間:Apr 29, 2025

ALIYUN::PrivateLink::VpcEndpointServiceAttachment類型用於為終端節點服務添加服務資源。

文法

{
  "Type": "ALIYUN::PrivateLink::VpcEndpointServiceAttachment",
  "Properties": {
    "ResourceId": String,
    "ResourceType": String,
    "ServiceId": String,
    "ZoneId": String
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

ResourceId

String

服務資源ID。

ResourceType

String

服務資源類型。

取值:

  • slb:表示服務資源類型為傳統型負載平衡CLB(Classic Load Balancer)。

  • alb:表示服務資源類型為應用型負載平衡ALB(Application Load Balancer)。

  • nlb:表示服務資源類型為網路型負載平衡NLB(Network Load Balancer )。

ServiceId

String

要添加服務資源的終端節點服務ID。

ZoneId

String

服務資源所屬的可用性區域。

傳回值

Fn::GetAtt

  • ResourceId:服務資源ID。

  • ServiceId:與終端節點關聯的終端節點服務ID。

  • ResourceType:服務資源類型。

樣本

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ResourceId:
    Description: 'The resource id. '
    Type: String
  ResourceType:
    Description: 'The resource type. '
    Type: String
  ServiceId:
    Description: 'The endpoint service that is associated with the endpoint. '
    Type: String
Resources:
  VpcEndpointServiceAttachment:
    Properties:
      ResourceId:
        Ref: ResourceId
      ResourceType:
        Ref: ResourceType
      ServiceId:
        Ref: ServiceId
    Type: ALIYUN::PrivateLink::VpcEndpointServiceAttachment
Outputs:
  ResourceId:
    Description: 'The resource id. '
    Value:
      Fn::GetAtt:
      - VpcEndpointServiceAttachment
      - ResourceId
  ResourceType:
    Description: 'The resource type. '
    Value:
      Fn::GetAtt:
      - VpcEndpointServiceAttachment
      - ResourceType
  ServiceId:
    Description: 'The endpoint service that is associated with the endpoint. '
    Value:
      Fn::GetAtt:
      - VpcEndpointServiceAttachment
      - ServiceId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ResourceId": {
      "Type": "String",
      "Description": "The resource id. "
    },
    "ResourceType": {
      "Type": "String",
      "Description": "The resource type. "
    },
    "ServiceId": {
      "Type": "String",
      "Description": "The endpoint service that is associated with the endpoint. "
    }
  },
  "Resources": {
    "VpcEndpointServiceAttachment": {
      "Type": "ALIYUN::PrivateLink::VpcEndpointServiceAttachment",
      "Properties": {
        "ResourceId": {
          "Ref": "ResourceId"
        },
        "ResourceType": {
          "Ref": "ResourceType"
        },
        "ServiceId": {
          "Ref": "ServiceId"
        }
      }
    }
  },
  "Outputs": {
    "ResourceId": {
      "Description": "The resource id. ",
      "Value": {
        "Fn::GetAtt": [
          "VpcEndpointServiceAttachment",
          "ResourceId"
        ]
      }
    },
    "ResourceType": {
      "Description": "The resource type. ",
      "Value": {
        "Fn::GetAtt": [
          "VpcEndpointServiceAttachment",
          "ResourceType"
        ]
      }
    },
    "ServiceId": {
      "Description": "The endpoint service that is associated with the endpoint. ",
      "Value": {
        "Fn::GetAtt": [
          "VpcEndpointServiceAttachment",
          "ServiceId"
        ]
      }
    }
  }
}