All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::OTS::VpcBinder

Last Updated:May 16, 2023

ALIYUN::OTS::VpcBinder is used to bind a Tablestore instance to a virtual private cloud (VPC).

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

Vpcs

List

Yes

Yes

The VPC binding configurations.

The element type of this property is VpcInfo.

InstanceName

String

Yes

No

The name of the Tablestore instance.

None.

Vpcs syntax

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

Vpcs properties

Property

Type

Required

Editable

Description

Constraint

VpcId

String

Yes

No

The VPC ID.

The VPC and the Tablestore instance must belong to the same account and reside in the same region.

InstanceVpcName

String

Yes

No

The custom name.

This name must be unique in the Tablestore instance.

VirtualSwitchId

String

Yes

No

The vSwitch ID.

The vSwitch must belong to the specified VPC.

Network

String

Yes

No

The network type of the Tablestore instance.

Valid values:

  • NORMAL (default): The Tablestore instance allows requests from all sources.

  • VPC: The Tablestore instance allows requests only from all VPCs to which it is bound.

  • VPC_CONSOLE: The Tablestore instance allows requests only from the Tablestore console and all VPCs to which it is bound.

Return values

Fn::GetAtt

  • Domains: the domain names that are used to access the Tablestore instance in the VPC.

  • Endpoints: the private endpoints that are used to access the Tablestore instance in the VPC.

Examples

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