Topik ini menjelaskan cara menggunakan Tablestore melalui Resource Orchestration Service (ROS), dengan pembuatan instans sebagai contoh.
Prasyarat
Prosedur
Buka halaman Stacks.
Masuk ke Konsol ROS.
Di panel navigasi kiri, pilih .
Di bilah navigasi atas, pilih wilayah.
Buat stack.
Di halaman Stacks, klik Create Stack.
Di bagian Specify Template, klik Select an Existing Template, dan atur Template Import Method menjadi Enter Template Content.
Di tab ROS pada bagian Template Content, masukkan templat dalam format
YAMLatauJSON, 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 YAMLROSTemplateFormatVersion: '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 - InstanceNameV1
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 YAMLROSTemplateFormatVersion: '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 - PrivateEndpointDi 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.
Klik Create.
Setelah stack dibuat, kolom Status di tab Stack Information akan menampilkan Successful Creation.

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

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