首页 Tablestore Developer Reference IaC Tools ROS Create a Tablestore instance with ROS

Create a Tablestore instance with ROS

更新时间: 2026-05-21 03:40:25

This topic describes how to use a Resource Orchestration Service (ROS) template to create a Tablestore instance.

Prerequisites

You have activated Tablestore.

Procedure

  1. Go to the Stacks page.

    1. Log on to the ROS console.

    2. In the left-side navigation pane, choose Deployment > 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. In the Template Content section, on the ROS tab, enter the template in YAML or JSON format, and then click Next.

      V2 (recommended)

      The following template is an example of how to create a V2 Tablestore instance. For more information about the syntax, parameters, and examples, see ALIYUN::OTS::InstanceV2.

      JSON

      {
        "ROSTemplateFormatVersion": "2015-09-01",
        "Parameters": {
          "InstanceName": {
            "Type": "String",
            "Description": {
              "en": "Specifies the instance name. The name must meet the following requirements:\n- Be 3 to 16 characters long.\n- Contain only letters, numbers, and dashes (-).\n- Start with a letter.\n- Not end with a dash (-).\n- Be case-insensitive."
            },
            "Required": true,
            "AllowedPattern": "[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9]$",
            "MinLength": 3,
            "MaxLength": 16
          },
          "ClusterType": {
            "Type": "String",
            "Description": {
              "en": "The cluster type, which corresponds to the instance type.\nValid values:\n- SSD: High-performance\n- HYBRID: Capacity"
            },
            "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": "The name of the Tablestore instance.",
            "Value": {
              "Fn::GetAtt": [
                "InstanceV2",
                "InstanceName"
              ]
            }
          }
        }
      }

      YAML

      ROSTemplateFormatVersion: '2015-09-01'
      Parameters:
        InstanceName:
          Type: String
          Description:
            en: |
              Specifies the instance name. The name must meet the following requirements:
                - Be 3 to 16 characters long.
                - Contain only letters, numbers, and dashes (-).
                - Start with a letter.
                - Not end with a dash (-).
                - Be case-insensitive.
          Required: true
          AllowedPattern: '[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9]$'
          MinLength: 3
          MaxLength: 16
        ClusterType:
          Type: String
          Description:
            en: |-
              The cluster type, which corresponds to the instance type.
              Valid values:
                - SSD: High-performance
                - HYBRID: Capacity
          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: The name of the Tablestore instance.
          Value:
            Fn::GetAtt:
              - InstanceV2
              - InstanceName

      V1

      The following template is an example of how to create a V1 Tablestore instance. For more information about the syntax, parameters, and examples, see ALIYUN::OTS::Instance.

      JSON

      {
        "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": "The instance name.",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "InstanceName"
              ]
            }
          },
          "VpcEndpoint": {
            "Description": "The VPC endpoint.",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "VpcEndpoint"
              ]
            }
          },
          "PublicEndpoint": {
            "Description": "The public endpoint.",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "PublicEndpoint"
              ]
            }
          },
          "PrivateEndpoint": {
            "Description": "The private endpoint.",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "PrivateEndpoint"
              ]
            }
          }
        }
      }

      YAML

      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: The instance name.
          Value:
            Fn::GetAtt:
              - Instance
              - InstanceName
        VpcEndpoint:
          Description: The VPC endpoint.
          Value:
            Fn::GetAtt:
              - Instance
              - VpcEndpoint
        PublicEndpoint:
          Description: The public endpoint.
          Value:
            Fn::GetAtt:
              - Instance
              - PublicEndpoint
        PrivateEndpoint:
          Description: The private endpoint.
          Value:
            Fn::GetAtt:
              - Instance
              - PrivateEndpoint
    4. In the Configure Parameters step, enter a Stack Name. For V2 templates, also specify the InstanceName and ClusterType. For more information about stack configurations, see Stack configuration parameters.

    5. Click Create.

      When the stack is created, its Status on the Stack Information tab is Creation successful.

  3. Verify the deployment.

    Click the Resources tab to view the Resource ID , which is the name of the Tablestore instance.

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

    On the Instance List page, find the new instance, such as instance-demo, and confirm that its status is Running. The name in the Instance Alias/Name column is the resource ID from the stack.

References

上一篇: ROS resource reference 下一篇: API Reference (Instance Management)
阿里云首页 表格存储 相关技术圈