全部产品
Search
文档中心

Resource Orchestration Service:ALIYUN::OTS::VpcBinder

更新时间:Jun 26, 2025

ALIYUN::OTS::VpcBinder digunakan untuk mengikat instance Tablestore ke Virtual Private Cloud (VPC).

Sintaksis

{
  "Type": "ALIYUN::OTS::VpcBinder",
  "Properties": {
    "Vpcs": List,
    "InstanceName": String
  }
}            

Properti

Properti

Tipe

Diperlukan

Dapat Diedit

Deskripsi

Kendala

Vpcs

List

Ya

Ya

Konfigurasi pengikatan VPC.

Tipe elemen dari properti ini adalah VpcInfo.

InstanceName

String

Ya

Tidak

Nama instance Tablestore.

Tidak ada.

Sintaksis Vpcs

"Vpcs":[
  {
    "VpcId":String,
    "InstanceVpcName":String,
    "VirtualSwitchId": String,
    "Network": String
  }
]           

Properti Vpcs

Properti

Tipe

Diperlukan

Dapat Diedit

Deskripsi

Kendala

VpcId

String

Ya

Tidak

ID VPC.

VPC dan instance Tablestore harus milik akun yang sama dan berada di wilayah yang sama.

InstanceVpcName

String

Ya

Tidak

Nama kustom.

Nama ini harus unik dalam instance Tablestore.

VirtualSwitchId

String

Ya

Tidak

ID vSwitch.

vSwitch harus milik VPC yang ditentukan.

Network

String

Ya

Tidak

Tipe jaringan dari instance Tablestore.

Nilai valid:

  • NORMAL (default): Instance Tablestore mengizinkan permintaan dari semua sumber.

  • VPC: Instance Tablestore hanya mengizinkan permintaan dari semua VPC yang terikat padanya.

  • VPC_CONSOLE: Instance Tablestore hanya mengizinkan permintaan dari konsol Tablestore dan semua VPC yang terikat padanya.

Nilai kembali

Fn::GetAtt

  • Domains: Nama domain yang digunakan untuk mengakses instance Tablestore di VPC.

  • Endpoints: Titik akhir privat yang digunakan untuk mengakses instance Tablestore di VPC.

Contoh

YAML Format

ROSTemplateFormatVersion: '2015-09-01'
Description: Test Tablestore, a Tablestore instance, and VPC binding
Parameters:
  InstanceName:
    Type: String
    Description: OTS Instance name
    Default: mytest
  InstanceVpcName:
    Type: String
    Description: Instance name
    Default: mytest
  VSwitchZoneId:
    Type: String
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
    Description: Availability ID for existing switches
    Label: VSwitch Zone ID
  VpcId:
    Type: String
    Default: Null
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Description: Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud
    Label: Existing VPC ID
  VSwitchId:
    Type: String
    Default: Null
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    Description: Please search the business VSwitch ID starts with(vsw-xxx)from console-Virtual Private Cloud-VSwitches
    Label: VSwitch ID
    AssociationPropertyMetadata:
      ZoneId: ${VSwitchZoneId}
      VpcId: ${VpcId}
Resources:
  VpcBinder:
    Type: ALIYUN::OTS::VpcBinder
    Properties:
      InstanceName:
        Ref: InstanceName
      Vpcs:
        - VpcId:
            Ref: VpcId
          InstanceVpcName:
            Ref: InstanceVpcName
          VirtualSwitchId:
            Ref: VSwitchZoneId
          Network: NORMAL
Outputs:
  Domains:
    Value:
      Fn::GetAtt:
        - VpcBinder
        - Domains
  Endpoints:
    Value:
      Fn::GetAtt:
        - VpcBinder
        - Endpoints

JSON Format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "Test Tablestore, a Tablestore instance, and VPC binding",
  "Parameters": {
    "InstanceName": {
      "Type": "String",
      "Description": "OTS Instance name",
      "Default": "mytest"
    },
    "InstanceVpcName": {
      "Type": "String",
      "Description": "Instance name",
      "Default": "mytest"
    },
    "VSwitchZoneId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "Description": "Availability ID for existing switches",
      "Label": "VSwitch Zone ID"
    },
    "VpcId": {
      "Type": "String",
      "Default": null,
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Description": "Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud",
      "Label": "Existing VPC ID"
    },
    "VSwitchId": {
      "Type": "String",
      "Default": null,
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "Description": "Please search the business VSwitch ID starts with(vsw-xxx)from console-Virtual Private Cloud-VSwitches",
      "Label": "VSwitch ID",
      "AssociationPropertyMetadata": {
        "ZoneId": "${VSwitchZoneId}",
        "VpcId": "${VpcId}"
      }
    }
  },
  "Resources": {
    "VpcBinder": {
      "Type": "ALIYUN::OTS::VpcBinder",
      "Properties": {
        "InstanceName": {
          "Ref": "InstanceName"
        },
        "Vpcs": [
          {
            "VpcId": {
              "Ref": "VpcId"
            },
            "InstanceVpcName": {
              "Ref": "InstanceVpcName"
            },
            "VirtualSwitchId": {
              "Ref": "VSwitchZoneId"
            },
            "Network": "NORMAL"
          }
        ]
      }
    }
  },
  "Outputs": {
    "Domains": {
      "Value": {
        "Fn::GetAtt": [
          "VpcBinder",
          "Domains"
        ]
      }
    },
    "Endpoints": {
      "Value": {
        "Fn::GetAtt": [
          "VpcBinder",
          "Endpoints"
        ]
      }
    }
  }
}