全部产品
Search
文档中心

Tablestore:Integrasikan Tablestore menggunakan ROS

更新时间:Jul 24, 2025

Topik ini menjelaskan cara menggunakan Tablestore melalui Resource Orchestration Service (ROS), dengan pembuatan instans sebagai contoh.

Prasyarat

Tablestore telah diaktifkan.

Prosedur

  1. Buka halaman Stacks.

    1. Masuk ke Konsol ROS.

    2. Di panel navigasi kiri, pilih Deploy > Stacks.

    3. Di bilah navigasi atas, pilih wilayah.

  2. Buat stack.

    1. Di halaman Stacks, klik Create Stack.

    2. Di bagian Specify Template, klik Select an Existing Template, dan atur Template Import Method menjadi Enter Template Content.

    3. Di tab ROS pada bagian Template Content, masukkan templat dalam format YAML atau JSON, lalu klik Next.

      V2 (disarankan)

      Berikut adalah contoh templat V2 untuk membuat instans Tablestore. Untuk informasi lebih lanjut, lihat ALIYUN::OTS::InstanceV2.

      Format JSON

      {
        "ROSTemplateFormatVersion": "2015-09-01",
        "Parameters": {
          "InstanceName": {
            "Type": "String",
            "Description": {
              "en": "Nama instans. Spesifikasi penamaan untuk instans adalah sebagai berikut:\nHarus terdiri dari huruf Inggris, angka, atau tanda hubung (-).\nKarakter pertama harus huruf Inggris.\nKarakter terakhir tidak boleh tanda hubung (-).\nHuruf besar kecil tidak sensitif.\nPanjangnya antara 3 hingga 16 karakter.\n"
            },
            "Required": true,
            "AllowedPattern": "[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9]$",
            "MinLength": 3,
            "MaxLength": 16
          },
          "ClusterType": {
            "Type": "String",
            "Description": {
              "en": "Jenis kluster (yaitu spesifikasi instans).\nNilai enumerasi:\nSSD: Kinerja tinggi.\nHYBRID: Tipe kapasitas."
            },
            "AllowedValues": [
              "SSD",
              "HYBRID"
            ],
            "Required": true
          }
        },
        "Resources": {
          "InstanceV2": {
            "Type": "ALIYUN::OTS::InstanceV2",
            "Properties": {
              "InstanceName": {
                "Ref": "InstanceName"
              },
              "InstanceDescription": "Deskripsi dari instans.",
              "ClusterType": {
                "Ref": "ClusterType"
              },
              "NetworkSourceACL": [
                "TRUST_PROXY"
              ],
              "NetworkTypeACL": [
                "INTERNET",
                "VPC",
                "CLASSIC"
              ],
              "Tags": [
                {
                  "Key": "environment",
                  "Value": "testing"
                }
              ]
            }
          }
        },
        "Outputs": {
          "InstanceName": {
            "Description": "Nama instans tablestore.",
            "Value": {
              "Fn::GetAtt": [
                "InstanceV2",
                "InstanceName"
              ]
            }
          }
        }
      }

      Format YAML

      ROSTemplateFormatVersion: '2015-09-01'
      Parameters:
        InstanceName:
          Type: String
          Description:
            en: |
              Nama instans. Spesifikasi penamaan untuk instans adalah sebagai berikut:
              Harus terdiri dari huruf Inggris, angka, atau tanda hubung (-).
              Karakter pertama harus huruf Inggris.
              Karakter terakhir tidak boleh tanda hubung (-).
              Huruf besar kecil tidak sensitif.
              Panjangnya antara 3 hingga 16 karakter.
          Required: true
          AllowedPattern: '[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9]$'
          MinLength: 3
          MaxLength: 16
        ClusterType:
          Type: String
          Description:
            en: |-
              Jenis kluster (yaitu spesifikasi instans).
              Nilai enumerasi:
              SSD: Kinerja tinggi.
              HYBRID: Tipe kapasitas.
          AllowedValues:
            - SSD
            - HYBRID
          Required: true
      Resources:
        InstanceV2:
          Type: ALIYUN::OTS::InstanceV2
          Properties:
            InstanceName:
              Ref: InstanceName
            InstanceDescription: Deskripsi dari instans.
            ClusterType:
              Ref: ClusterType
            NetworkSourceACL: 
              - TRUST_PROXY
            NetworkTypeACL:
              - INTERNET
              - VPC
              - CLASSIC
            Tags:
              - Key: "environment"
                Value: "testing"
      Outputs:
        InstanceName:
          Description: Nama instans tablestore.
          Value:
            Fn::GetAtt:
              - InstanceV2
              - InstanceName

      V1

      Berikut adalah contoh templat V1 untuk membuat instans Tablestore. Untuk informasi lebih lanjut, lihat ALIYUN::OTS::Instance.

      Format JSON

      {
        "ROSTemplateFormatVersion": "2015-09-01",
        "Parameters": {
        },
        "Resources": {
          "Instance": {
            "Type": "ALIYUN::OTS::Instance",
            "Properties": {
              "InstanceName": "instance-demo",
              "Description": "Deskripsi dari instans.",
              "ClusterType": "SSD",
              "Network": "NORMAL"
            }
          }
        },
        "Outputs": {
          "InstanceName": {
            "Description": "Nama instans",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "InstanceName"
              ]
            }
          },
          "VpcEndpoint": {
            "Description": "Titik akhir VPC",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "VpcEndpoint"
              ]
            }
          },
          "PublicEndpoint": {
            "Description": "Titik akhir publik",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "PublicEndpoint"
              ]
            }
          },
          "PrivateEndpoint": {
            "Description": "Titik akhir pribadi",
            "Value": {
              "Fn::GetAtt": [
                "Instance",
                "PrivateEndpoint"
              ]
            }
          }
        }
      }

      Format YAML

      ROSTemplateFormatVersion: '2015-09-01'
      Parameters: {}
      Resources:
        Instance:
          Type: ALIYUN::OTS::Instance
          Properties:
            InstanceName: instance-demo
            Description: Deskripsi dari instans.
            ClusterType: SSD
            Network: NORMAL
      Outputs:
        InstanceName:
          Description: Nama instans
          Value:
            Fn::GetAtt:
              - Instance
              - InstanceName
        VpcEndpoint:
          Description: Titik akhir VPC
          Value:
            Fn::GetAtt:
              - Instance
              - VpcEndpoint
        PublicEndpoint:
          Description: Titik akhir publik
          Value:
            Fn::GetAtt:
              - Instance
              - PublicEndpoint
        PrivateEndpoint:
          Description: Titik akhir pribadi
          Value:
            Fn::GetAtt:
              - Instance
              - PrivateEndpoint
    4. Di langkah Configure Parameters, masukkan nama stack. Untuk V2, Anda juga perlu memasukkan nama instans (InstanceName) dan memilih tipe instans (ClusterType). Untuk informasi lebih lanjut, lihat Parameter Konfigurasi Stack.

    5. Klik Create.

      Setelah stack dibuat, kolom Status di tab Stack Information akan menampilkan Successful Creation.

      image

  3. Lihat stack.

    Klik tab Resources untuk melihat Resource ID (nama instans Tablestore).

    image

    Anda dapat masuk ke Konsol Tablestore untuk melihat instans yang telah dibuat.

    image

Referensi