全部产品
Search
文档中心

资源编排:ALIYUN::PrivateLink::VpcEndpointServiceAttachment

更新时间:Jul 13, 2023

ALIYUN::PrivateLink::VpcEndpointServiceAttachment类型用于为终端节点服务添加服务资源。

语法

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

属性

属性名称

类型

必须

允许更新

描述

约束

ResourceId

String

服务资源ID。

ResourceType

String

服务资源类型。

取值:

  • slb:表示服务资源类型为传统型负载均衡CLB(Classic Load Balancer)。

  • alb:表示服务资源类型为应用型负载均衡ALB(Application Load Balancer)。

  • nlb:表示服务资源类型为网络型负载均衡NLB(Network Load Balancer )。

ServiceId

String

要添加服务资源的终端节点服务ID。

返回值

Fn::GetAtt

  • ResourceId:服务资源ID。

  • ServiceId:与终端节点关联的终端节点服务ID。

  • ResourceType:服务资源类型。

示例

YAML格式

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

JSON格式

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