All Products
Search
Document Center

Tablestore:Integrate Tablestore by using ROS

Last Updated:Jul 23, 2025

This topic takes instance creation as an example to explain how to use Tablestore through Resource Orchestration Service (ROS).

Prerequisites

Tablestore is activated.

Procedure

  1. Go to the Stacks page.

    1. Log on to the ROS console.

    2. In the navigation pane on the left, choose Deploy > Stacks.

    3. In the top navigation bar, select a region.

  2. Create a stack.

    1. On the Stacks page, click Create Stack.

    2. In the Specify Template section, click Select an Existing Template, and set Template Import Method to Enter Template Content.

    3. On the Template Content section's ROS tab, enter the template in YAML or JSON format, then click Next.

      V2 (recommended)

      The following is a V2 template example for creating a Tablestore instance. For more information, see ALIYUN::OTS::InstanceV2.

      JSON format

      {
        "ROSTemplateFormatVersion": "2015-09-01",
        "Parameters": {
          "InstanceName": {
            "Type": "String",
            "Description": {
              "en": "Instance name.The naming specifications for instances are as follows:\nMust consist of English letters, numbers or dash lines (-).\nThe first character must be in English letters.\nThe end character cannot be a dash (-).\nInsensitive case.\nThe length is between 3 and 16 characters.\n"
            },
            "Required": true,
            "AllowedPattern": "[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9]$",
            "MinLength": 3,
            "MaxLength": 16
          },
          "ClusterType": {
            "Type": "String",
            "Description": {
              "en": "Cluster type (i.e. instance specification).\nEnumeration values:\nSSD: High performance.\nHYBRID: Capacity type."
            },
            "AllowedValues": [
              "SSD",
              "HYBRID"
            ],
            "Required": true
          }
        },
        "Resources": {
          "InstanceV2": {
            "Type": "ALIYUN::OTS::InstanceV2",
            "Properties": {
              "InstanceName": {
                "Ref": "InstanceName"
              },
              "InstanceDescription": "The description of the instance.",
              "ClusterType": {
                "Ref": "ClusterType"
              },
              "NetworkSourceACL": [
                "TRUST_PROXY"
              ],
              "NetworkTypeACL": [
                "INTERNET",
                "VPC",
                "CLASSIC"
              ],
              "Tags": [
                {
                  "Key": "environment",
                  "Value": "testing"
                }
              ]
            }
          }
        },
        "Outputs": {
          "InstanceName": {
            "Description": "Name of the tablestore instance.",
            "Value": {
              "Fn::GetAtt": [
                "InstanceV2",
                "InstanceName"
              ]
            }
          }
        }
      }

      YAML format

      ROSTemplateFormatVersion: '2015-09-01'
      Parameters:
        InstanceName:
          Type: String
          Description:
            en: |
              Instance name.The naming specifications for instances are as follows:
              Must consist of English letters, numbers or dash lines (-).
              The first character must be in English letters.
              The end character cannot be a dash (-).
              Insensitive case.
              The length is between 3 and 16 characters.
          Required: true
          AllowedPattern: '[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9]$'
          MinLength: 3
          MaxLength: 16
        ClusterType:
          Type: String
          Description:
            en: |-
              Cluster type (i.e. instance specification).
              Enumeration values:
              SSD: High performance.
              HYBRID: Capacity type.
          AllowedValues:
            - SSD
            - HYBRID
          Required: true
      Resources:
        InstanceV2:
          Type: ALIYUN::OTS::InstanceV2
          Properties:
            InstanceName:
              Ref: InstanceName
            InstanceDescription: The description of the instance.
            ClusterType:
              Ref: ClusterType
            NetworkSourceACL: 
              - TRUST_PROXY
            NetworkTypeACL:
              - INTERNET
              - VPC
              - CLASSIC
            Tags:
              - Key: "environment"
                Value: "testing"
      Outputs:
        InstanceName:
          Description: Name of the tablestore instance.
          Value:
            Fn::GetAtt:
              - InstanceV2
              - InstanceName

      V1

      The following is a V1 template example for creating a Tablestore instance. For more information, see ALIYUN::OTS::Instance.

      JSON format

      {
        "ROSTemplateFormatVersion": "2015-09-01",
        "Parameters": {
        },
        "Resources": {
          "Instance": {
            "Type": "ALIYUN::OTS::Instance",
            "Properties": {
              "InstanceName": "instance-demo",
              "Description": "The description of the instance.",
              "ClusterType": "SSD",
              "Network": "NORMAL"
            }
          }
        },
        "Outputs": {
          "InstanceName": {
            "Description": "Instance name",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "InstanceName"
              ]
            }
          },
          "VpcEndpoint": {
            "Description": "Vpc endpoint",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "VpcEndpoint"
              ]
            }
          },
          "PublicEndpoint": {
            "Description": "Public endpoint",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "PublicEndpoint"
              ]
            }
          },
          "PrivateEndpoint": {
            "Description": "Private endpoint",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "PrivateEndpoint"
              ]
            }
          }
        }
      }

      YAML format

      ROSTemplateFormatVersion: '2015-09-01'
      Parameters: {}
      Resources:
        Instance:
          Type: ALIYUN::OTS::Instance
          Properties:
            InstanceName: instance-demo
            Description: The description of the instance.
            ClusterType: SSD
            Network: NORMAL
      Outputs:
        InstanceName:
          Description: Instance name
          Value:
            Fn::GetAtt:
              - Instance
              - InstanceName
        VpcEndpoint:
          Description: Vpc endpoint
          Value:
            Fn::GetAtt:
              - Instance
              - VpcEndpoint
        PublicEndpoint:
          Description: Public endpoint
          Value:
            Fn::GetAtt:
              - Instance
              - PublicEndpoint
        PrivateEndpoint:
          Description: Private endpoint
          Value:
            Fn::GetAtt:
              - Instance
              - PrivateEndpoint
    4. In the Configure Parameters step, enter a stack name. For V2, you also need to enter an instance name (InstanceName) and select an instance type (ClusterType). For more information, see Stack configuration parameters.

    5. Click Create.

      After the stack is created, the Status column on the Stack Information tab will display Successful Creation.

      image

  3. View the stack.

    Click the Resources tab to view the Resource ID (Tablestore instance name).

    image

    You can log on to the Tablestore console to view the created instance.

    image

References