すべてのプロダクト
Search
ドキュメントセンター

Tablestore:ROS を使用した Tablestore の統合

最終更新日:Jul 24, 2025

このトピックでは、インスタンスの作成を例に、Resource Orchestration Service (ROS) を介して Tablestore を使用する方法について説明します。

前提条件

Tablestore がアクティブ化されている

手順

  1. スタックページに移動します。

    1. ROS コンソール にログインします。

    2. 左側のナビゲーションウィンドウで、[デプロイ] > [スタック] を選択します。

    3. 上部のナビゲーションバーで、リージョンを選択します。

  2. スタックを作成します。

    1. スタックページで、[スタックの作成] をクリックします。

    2. [テンプレートの指定] セクションで、[既存のテンプレートを選択] をクリックし、[テンプレートのインポート方法][テンプレートコンテンツの入力] に設定します。

    3. [テンプレートコンテンツ] セクションの [ROS] タブで、YAML または JSON 形式でテンプレートを入力し、[次へ] をクリックします。

      V2 (推奨)

      Tablestore インスタンスを作成するための V2 テンプレートの例を以下に示します。詳細については、「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" // インスタンス名の命名規則は以下のとおりです。\n英字、数字、またはダッシュ記号 (-) で構成されている必要があります。\n最初の文字は英字である必要があります。\n最後の文字はダッシュ (-) にすることはできません。\n大文字と小文字は区別されません。\n長さは 3 ~ 16 文字です。\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." // クラスタタイプ (つまり、インスタンス仕様)。\n列挙値:\nSSD: 高性能。\nHYBRID: 容量タイプ。
            },
            "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.", // Tablestore インスタンスの名前。
            "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. // 長さは 3 ~ 16 文字です。
          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. // SSD: 高性能。
              HYBRID: Capacity type. // HYBRID: 容量タイプ。
          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. // Tablestore インスタンスの名前。
          Value:
            Fn::GetAtt:
              - InstanceV2
              - InstanceName

      V1

      Tablestore インスタンスを作成するための V1 テンプレートの例を以下に示します。詳細については、「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", // VPC エンドポイント
            "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 // VPC エンドポイント
          Value:
            Fn::GetAtt:
              - Instance
              - VpcEndpoint
        PublicEndpoint:
          Description: Public endpoint // パブリックエンドポイント
          Value:
            Fn::GetAtt:
              - Instance
              - PublicEndpoint
        PrivateEndpoint:
          Description: Private endpoint // プライベートエンドポイント
          Value:
            Fn::GetAtt:
              - Instance
              - PrivateEndpoint
    4. [パラメータの設定] ステップで、スタック名を入力します。V2 の場合は、インスタンス名 ([InstanceName]) を入力し、インスタンスタイプ ([ClusterType]) を選択する必要もあります。詳細については、「スタック構成パラメータ」をご参照ください。

    5. [作成] をクリックします。

      スタックが作成されると、[スタック情報] タブの [ステータス] 列に [作成成功] と表示されます。

      image

  3. スタックを表示します。

    [リソース] タブをクリックして、[リソース ID] (Tablestore インスタンス名) を表示します。

    image

    Tablestore コンソール にログインして、作成されたインスタンスを表示できます。

    image

参考資料