ALIYUN::PrivateLink::VpcEndpoint を使用してエンドポイントを作成できます。
構文
{
"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
}
}プロパティ
プロパティ名 | タイプ | 必須 | 更新を許可 | 説明 | 制約 |
VpcId | String | はい | いいえ | エンドポイントが属する仮想プライベートクラウド (VPC) の ID。 | なし |
EndpointName | String | いいえ | はい | エンドポイントの名前。 | 名前は 2~128 文字で、文字または漢字で始まる必要があります。文字、漢字、数字、ハイフン (-)、アンダースコア (_) を含めることができます。 |
ServiceName | String | いいえ | いいえ | エンドポイントに関連付けられているエンドポイントサービスの名前。 | なし |
Zone | List | いいえ | はい | ゾーン。 | 最大 10 個のゾーンを指定できます。 詳細については、「ゾーンのプロパティ」をご参照ください。 |
SecurityGroupId | List | いいえ | はい | エンドポイントの Elastic Network Interface (ENI) に関連付けるセキュリティグループの ID。セキュリティグループは、VPC からエンドポイント ENI へのデータ通信を制御します。 | エンドポイントを最大 10 個のセキュリティグループに関連付けることができます。 |
EndpointDescription | String | いいえ | はい | エンドポイントの説明。 | 説明は 2~256 文字で、 |
ServiceId | String | いいえ | いいえ | エンドポイントに関連付けるエンドポイントサービスの ID。 | なし |
ProtectedEnabled | Boolean | いいえ | いいえ | エンドポイントのマネージド保護を有効にするかどうかを指定します。 | このパラメーターは、セキュリティトークンサービス (STS) トークンを使用して操作を呼び出す場合にのみ有効です。有効な値:
|
ZonePrivateIpAddressCount | Number | いいえ | いいえ | 各ゾーンのエンドポイント ENI に割り当てることができるプライベート IP アドレスの数。 | 値は 1 である必要があります。 |
EndpointType | String | いいえ | いいえ | エンドポイントのタイプ。 | 値を Interface に設定します。この値は、サービスリソースとして Classic Load Balancer (CLB) インスタンスを使用するインターフェイスエンドポイントを指定します。 |
Tags | List | いいえ | はい | タグ | 最大 20 個のタグを追加できます。 |
ゾーンの構文
"Zone": [
{
"ZoneId": String,
"VSwitchId": String,
"Ip": String
}
]ゾーンのプロパティ
プロパティ名 | タイプ | 必須 | 更新を許可 | 説明 | 制約 |
ZoneId | String | いいえ | いいえ | エンドポイントサービスがデプロイされているゾーンの ID。 | なし |
VSwitchId | String | いいえ | いいえ | エンドポイント ENI を作成するゾーン内の vSwitch の ID。 | なし |
Ip | String | いいえ | いいえ | ゾーン内のエンドポイント ENI のプライベート IP アドレス。 | なし |
タグの構文
"Tags": [
{
"Value": String,
"Key": String
}
]タグのプロパティ
プロパティ名 | タイプ | 必須 | 更新を許可 | 説明 | 制約 |
Key | String | はい | いいえ | タグキー。 | 最大 20 個のタグキーを追加できます。タグキーを空の文字列にすることはできません。 キーは最大 64 文字です。 |
Value | String | いいえ | いいえ | タグの値。 | 最大 20 個のタグ値を追加できます。タグ値は空の文字列にすることができます。 値は最大 128 文字です。 |
戻り値
Fn::GetAtt
EndpointDomain: エンドポイントのドメイン名。
Bandwidth: エンドポイントの接続帯域幅。
EndpointId: エンドポイントの ID。
EndpointName: エンドポイントの名前。
VpcId: エンドポイントが属する VPC の ID。
ServiceName: エンドポイントに関連付けられているエンドポイントサービスの名前。
ServiceId: エンドポイントに関連付けられているエンドポイントサービスの ID。
ZoneDomains: 各ゾーンのドメイン名。
Arn: エンドポイントの Alibaba Cloud リソースネーム (ARN)。
例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
MasterZoneId:
Type: String
Description: ロードバランサーインスタンスを作成するマスターゾーン ID。
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
SlaveZoneId:
Type: String
Description: ロードバランサーインスタンスを作成するスレーブゾーン ID。
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
VpcId:
Type: String
Description: ロードバランサーインスタンスを作成する VPC ID。VPC ネットワークの場合のみ。
AssociationProperty: ALIYUN::ECS::VPC::VPCId
VSwitchId:
Type: String
Description: ロードバランサーインスタンスを作成する VSwitch ID。VPC ネットワークの場合のみ。
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${MasterZoneId}
SecurityGroupId:
Type: CommaDelimitedList
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
AssociationPropertyMetadata:
VpcId: ${VpcId}
Description: エンドポイントネットワークインターフェースに関連付けられているセキュリティグループ。セキュリティグループは、VPC からエンドポイントネットワークインターフェースへのデータ通信を制御できます。
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: エンドポイントサービスの名前。
Value:
Fn::GetAtt:
- VpcEndpointService
- ServiceName
ServiceDomain:
Description: エンドポイントサービスのドメイン名。
Value:
Fn::GetAtt:
- VpcEndpointService
- ServiceDomain
ServiceId:
Description: エンドポイントサービスの ID。
Value:
Fn::GetAtt:
- VpcEndpointService
- ServiceId
EndpointDomain:
Description: エンドポイントのドメイン名。
Value:
Fn::GetAtt:
- VpcEndpoint
- EndpointDomain
Bandwidth:
Description: エンドポイントの帯域幅。
Value:
Fn::GetAtt:
- VpcEndpoint
- Bandwidth
EndpointId:
Description: エンドポイントの ID。
Value:
Fn::GetAtt:
- VpcEndpoint
- EndpointId {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"MasterZoneId": {
"Type": "String",
"Description": "ロードバランサーインスタンスを作成するマスターゾーン ID。",
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
},
"SlaveZoneId": {
"Type": "String",
"Description": "ロードバランサーインスタンスを作成するスレーブゾーン ID。",
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
},
"VpcId": {
"Type": "String",
"Description": "ロードバランサーインスタンスを作成する VPC ID。VPC ネットワークの場合のみ。",
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
},
"VSwitchId": {
"Type": "String",
"Description": "ロードバランサーインスタンスを作成する VSwitch ID。VPC ネットワークの場合のみ。",
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${MasterZoneId}"
}
},
"SecurityGroupId": {
"Type": "CommaDelimitedList",
"AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}"
},
"Description": "エンドポイントネットワークインターフェースに関連付けられているセキュリティグループ。セキュリティグループは、VPC からエンドポイントネットワークインターフェースへのデータ通信を制御できます。",
"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": "エンドポイントサービスの名前。",
"Value": {
"Fn::GetAtt": [
"VpcEndpointService",
"ServiceName"
]
}
},
"ServiceDomain": {
"Description": "エンドポイントサービスのドメイン名。",
"Value": {
"Fn::GetAtt": [
"VpcEndpointService",
"ServiceDomain"
]
}
},
"ServiceId": {
"Description": "エンドポイントサービスの ID。",
"Value": {
"Fn::GetAtt": [
"VpcEndpointService",
"ServiceId"
]
}
},
"EndpointDomain": {
"Description": "エンドポイントのドメイン名。",
"Value": {
"Fn::GetAtt": [
"VpcEndpoint",
"EndpointDomain"
]
}
},
"Bandwidth": {
"Description": "エンドポイントの帯域幅。",
"Value": {
"Fn::GetAtt": [
"VpcEndpoint",
"Bandwidth"
]
}
},
"EndpointId": {
"Description": "エンドポイントの ID。",
"Value": {
"Fn::GetAtt": [
"VpcEndpoint",
"EndpointId"
]
}
}
}
}