ALIYUN::PrivateLink::VpcEndpointService類型用於建立終端節點服務。
文法
{
"Type": "ALIYUN::PrivateLink::VpcEndpointService",
"Properties": {
"User": List,
"ServiceDescription": String,
"Resource": List,
"ConnectBandwidth": Integer,
"AutoAcceptEnabled": Boolean,
"Payer": String,
"ZoneAffinityEnabled": Boolean,
"ServiceResourceType": String,
"Tags": List,
"ResourceGroupId": String,
"DeletionForce": Boolean
}
}屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
User | List | 否 | 是 | 終端節點服務的白名單。 | 白名單中最多支援添加20個阿里雲帳號。 |
ServiceDescription | String | 否 | 是 | 終端節點服務的描述資訊。 | 長度為2~256個字元,以英文字母或漢字開頭,可包含英文字母、漢字、數字、底線(_)和短劃線(-)。 |
Resource | List | 否 | 是 | 添加到終端節點服務中的服務資源。 | 最多支援添加20個服務資源。 更多資訊,請參見Resource屬性。 |
ConnectBandwidth | Integer | 否 | 是 | 預設串連頻寬峰值。 | 取值範圍:100~1024。 單位:Mbps。 |
AutoAcceptEnabled | Boolean | 否 | 是 | 是否自動接受終端節點串連。 | 取值:
|
Payer | String | 否 | 否 | 付費方。 | 取值:
|
ZoneAffinityEnabled | Boolean | 否 | 是 | 是否支援可用性區域就近解析。 | 取值:
|
ServiceResourceType | String | 否 | 否 | 服務資源類型。 | 取值:slb ,表示服務資源類型為SLB(傳統型負載平衡CLB)。 |
Tags | List | 否 | 是 | 標籤列表。 | 最多支援20個標籤。 |
ResourceGroupId | String | 否 | 是 | 資源群組 ID。 | 無 |
DeletionForce | Boolean | 否 | 是 | 是否強制移除。 | 取值:
|
Resource文法
"Resource": [
{
"ZoneId": String,
"ResourceId": String,
"ResourceType": String
}
]Resource屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
ZoneId | String | 是 | 否 | 服務資源所屬的可用性區域。 | 無 |
ResourceId | String | 是 | 否 | 添加到終端節點服務中的服務資源。 | 無 |
ResourceType | String | 是 | 否 | 添加到終端節點服務中的服務資源的類型。 | 取值:slb,表示專用網路類型且具備PrivateLink功能的Server Load Balancer執行個體。 說明 目前僅支援專用網路類型且具備PrivateLink功能的Server Load Balancer執行個體作為終端節點服務的服務資源。 |
Tags文法
"Tags": [
{
"Value": String,
"Key": String
}
]Tags屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
Key | String | 是 | 否 | 執行個體的標籤鍵。 | 最多支援20個標籤鍵。一旦傳入該值,則不允許為空白字串。 最多支援64個字元,不能以 |
Value | String | 否 | 否 | 執行個體的標籤值。 | 最多支援20個標籤值。一旦傳入該值,可以為空白字串。 最多支援128個字元,不能以 |
傳回值
Fn::GetAtt
ServiceName:終端節點服務的名稱。
ServiceDomain:終端節點服務的服務網域名稱。
ServiceId:終端節點服務的ID。
ServiceDescription:終端節點服務的描述資訊。
MinBandwidth:端點串連的最小頻寬。
MaxBandwidth:端點串連的最大頻寬。
Arn:阿里雲資源名稱。
樣本
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 {
"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"
]
}
}
}
}