DATASOURCE::OTS::Tables は、インスタンスに作成されているすべてのテーブルの名前をクエリするために使用されます。
構文
{
"Type": "DATASOURCE::OTS::Tables",
"Properties": {
"InstanceName": String,
"TableName": String,
"RefreshOptions": String
}
}プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
InstanceName | String | はい | はい | インスタンス名。 | なし。 |
TableName | String | いいえ | はい | テーブル名。 | なし。 |
RefreshOptions | String | いいえ | はい | スタックの更新時のデータソースリソースの更新ポリシー。 | 有効な値:
|
戻り値 (Fn::GetAtt)
TableNames: テーブルの名前。
Tables: テーブルの詳細。
プロパティ | タイプ | 説明 | 制約 |
TableNames | List | テーブルの名前。 | なし。 |
Tables | List | テーブルの詳細。 | なし。 |
TableName | String | テーブル名。 | なし。 |
例
{
"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"
]
}
}
}
}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