DATASOURCE::OTS::Tables is used to query the names of all tables that are created in a Tablestore instance.

Syntax

{
  "Type": "DATASOURCE::OTS::Tables",
  "Properties": {
    "InstanceName": String,
    "TableName": String
  }
}

Properties

Property Type Required Editable Description Constraint
InstanceName String Yes Yes The name of the instance. None.
TableName String No Yes The name of the table. None.

Return values (Fn::GetAtt)

  • TableNames: the names of the tables.
  • Tables: details of the tables.
Parameter Type Description Constraint
TableNames List The names of the tables. None.
Tables List Details of the tables. None.
TableName String The name of the table. None.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "InstanceName": {
          "Type": "String",
          "Description": "The name of the instance to which the table belongs."
        }
      },
      "Resources": {
        "Tables": {
          "Type": "DATASOURCE::OTS::Tables",
          "Properties": {
            "InstanceName": {
              "Ref": "InstanceName"
            }
          }
        }
      },
      "Outputs": {
        "TableNames": {
          "Description": "The list of table names.",
          "Value": {
            "Fn::GetAtt": [
              "Tables",
              "TableNames"
            ]
          }
        },
        "Tables": {
          "Description": "The list of tables.",
          "Value": {
            "Fn::GetAtt": [
              "Tables",
              "Tables"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      InstanceName:
        Type: String
        Description: The name of the instance to which the table belongs.
    Resources:
      Tables:
        Type: DATASOURCE::OTS::Tables
        Properties:
          InstanceName:
            Ref: InstanceName
    Outputs:
      TableNames:
        Description: The list of table names.
        Value:
          Fn::GetAtt:
            - Tables
            - TableNames
      Tables:
        Description: The list of tables.
        Value:
          Fn::GetAtt:
            - Tables
            - Tables