このトピックでは、Resource Orchestration Service (ROS) テンプレートを使用してTablestore インスタンスを作成する方法を説明します。
前提条件
Tablestore を有効化していること。
手順
-
スタックページに移動します。
-
ROS コンソールにログインします。
-
左側のナビゲーションペインで、デプロイ > [スタック] を選択します。
-
上部メニューで、リージョンを選択します。
-
-
スタックを作成します。
-
スタックページで、[スタックの作成] をクリックします。
-
テンプレートの指定 セクションで、既存テンプレートの使用をクリックし、テンプレートのインポート方法をテンプレート内容の入力に設定します。
-
テンプレートコンテンツセクションの Ros タブで、テンプレートを
YAMLまたはJSON形式で入力し、[次へ] をクリックします。V2 (推奨)
次のテンプレートは、V2 Tablestore インスタンスを作成する例です。構文、パラメータ、および例の詳細については、「ALIYUN::OTS::InstanceV2」をご参照ください。
JSON{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "InstanceName": { "Type": "String", "Description": { "en": "Specify the instance name. The name must meet the following requirements:\\n- It must be 3 to 16 characters in length.\\n- It can contain only letters, digits, and hyphens (-).\\n- It must start with a letter.\\n- It cannot end with a hyphen (-).\\n- It is not case-sensitive." }, "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": "インスタンスの説明", "ClusterType": { "Ref": "ClusterType" }, "NetworkSourceACL": [ "TRUST_PROXY" ], "NetworkTypeACL": [ "INTERNET", "VPC", "CLASSIC" ], "Tags": [ { "Key": "environment", "Value": "testing" } ] } } }, "Outputs": { "InstanceName": { "Description": "Tablestore インスタンスの名前", "Value": { "Fn::GetAtt": [ "InstanceV2", "InstanceName" ] } } } }YAMLROSTemplateFormatVersion: '2015-09-01' Parameters: InstanceName: Type: String Description: en: | Specify the instance name. The name must meet the following requirements: - It must be 3 to 16 characters in length. - It can contain only letters, digits, and hyphens (-). - It must start with a letter. - It cannot end with a hyphen (-). - It is not case-sensitive. 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: インスタンスの説明 ClusterType: Ref: ClusterType NetworkSourceACL: - TRUST_PROXY NetworkTypeACL: - INTERNET - VPC - CLASSIC Tags: - Key: "environment" Value: "testing" Outputs: InstanceName: Description: Tablestore インスタンスの名前 Value: Fn::GetAtt: - InstanceV2 - InstanceNameV1
次のテンプレートは、V1 Tablestore インスタンスを作成する例です。構文、パラメータ、および例の詳細については、「ALIYUN::OTS::Instance」をご参照ください。
JSON{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { }, "Resources": { "Instance": { "Type": "ALIYUN::OTS::Instance", "Properties": { "InstanceName": "instance-demo", "Description": "インスタンスの説明", "ClusterType": "SSD", "Network": "NORMAL" } } }, "Outputs": { "InstanceName": { "Description": "インスタンス名", "Value": { "Fn::GetAtt": [ "Instance", "InstanceName" ] } }, "VpcEndpoint": { "Description": "VPC エンドポイント", "Value": { "Fn::GetAtt": [ "Instance", "VpcEndpoint" ] } }, "PublicEndpoint": { "Description": "パブリックエンドポイント", "Value": { "Fn::GetAtt": [ "Instance", "PublicEndpoint" ] } }, "PrivateEndpoint": { "Description": "プライベートエンドポイント", "Value": { "Fn::GetAtt": [ "Instance", "PrivateEndpoint" ] } } } }YAMLROSTemplateFormatVersion: '2015-09-01' Parameters: {} Resources: Instance: Type: ALIYUN::OTS::Instance Properties: InstanceName: instance-demo Description: インスタンスの説明 ClusterType: SSD Network: NORMAL Outputs: InstanceName: Description: インスタンス名 Value: Fn::GetAtt: - Instance - InstanceName VpcEndpoint: Description: VPC エンドポイント Value: Fn::GetAtt: - Instance - VpcEndpoint PublicEndpoint: Description: パブリックエンドポイント Value: Fn::GetAtt: - Instance - PublicEndpoint PrivateEndpoint: Description: プライベートエンドポイント Value: Fn::GetAtt: - Instance - PrivateEndpoint -
[パラメータの設定] ステップで、[スタック名] を入力します。V2 テンプレートの場合は、[InstanceName] と [ClusterType] も指定します。スタック設定の詳細については、「スタック設定パラメータ」をご参照ください。
-
[作成] をクリックします。
スタックが作成されると、[スタック情報] タブの [ステータス] が [作成成功] と表示されます。
-
-
デプロイを確認します。
リソース タブをクリックして、Tablestore インスタンスの名前である [リソース ID] を確認します。
Tablestore コンソールにログインして、新しいインスタンスを確認できます。
[インスタンスリスト] ページで、新しいインスタンス (
instance-demoなど) を見つけ、そのステータスが [実行中] であることを確認します。[インスタンスのエイリアス/名前] 列の名前は、スタックのリソース ID です。