本文以建立執行個體為例介紹如何通過Resource Orchestration Service使用Tablestore。
前提條件
操作步驟
進入資源棧頁面。
在左側導覽列,選擇。
在頂部功能表列,選擇地區。
建立資源棧。
在資源棧列表頁面,單擊建立資源棧。
在指定模板地區,單擊選擇已有模板,並選擇模板錄入方式為輸入模板。
在模板內容地區的ROS頁簽輸入
YAML或JSON格式的模板,然後單擊下一步。V2(推薦)
以下是V2版建立Table Store執行個體的樣本模板。更多文法、參數和樣本資訊,請參見ALIYUN::OTS::InstanceV2。
JSON格式{ "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格式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 - InstanceNameV1
以下是V1版建立Table Store執行個體的樣本模板。更多文法、參數和樣本資訊,請參見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": "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格式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在配置參數步驟,填寫資源棧名稱,V2版本還需填寫執行個體名稱(InstanceName)並選擇執行個體規格(ClusterType)。更多資源棧配置請參見資源棧配置項說明。
單擊建立。
建立成功後,在資源棧資訊頁簽的狀態列將顯示建立成功。

查看資源棧。
單擊資源頁簽,查看資源ID(即Table Store的執行個體名稱)。

您可以登入Table Store控制台,查看建立的執行個體。
