SQL 文を実行して、アカウント間でリソースをクエリします。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
resourcecenter:ExecuteMultiAccountSQLQuery |
list |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| Expression |
string |
必須 |
実行する SQL 文。 SQL 文の文字数は 2,000 文字未満である必要があります。 SQL 構文の詳細については、「基本的な SQL 構文」をご参照ください。 |
SELECT * FROM resources LIMIT 100; |
| Scope |
string |
必須 |
検索範囲。このパラメーターの値は、次のいずれかの項目です。
リソースディレクトリ、Root フォルダ、フォルダ、メンバー、またはリソースグループの ID を取得する方法の詳細については、「GetResourceDirectory」、「ListFoldersForParent」、「ListFoldersForParent」、「ListAccounts」、または「ListResourceGroups」をご参照ください。 |
rd-r4**** |
| MaxResults |
integer |
任意 |
各ページで返すエントリの最大数。 有効値:1~1000。 デフォルト値:1000。 |
1000 |
| NextToken |
string |
任意 |
結果の新しいページを取得するために、次のリクエストで使用するページネーショントークンです。最初のリクエストでこのパラメーターを指定する必要はありません。NextToken の値として、前のクエリから取得したトークンを指定する必要があります。 |
eyJzZWFyY2hBZnRlcnMiOlsiMTAwMTU2Nzk4MTU1OSJd**** |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
返される結果。 |
||
| Columns |
array<object> |
カラム。 |
|
|
object |
|||
| Name |
string |
カラムの名前。 |
resource_id |
| Type |
string |
カラムのタイプ。 |
varchar |
| MaxResults |
integer |
ページごとのエントリ数。 |
1000 |
| NextToken |
string |
ページネーショントークンです。次のリクエストで、結果の新しいページを取得するために使用できます。 |
eyJzZWFyY2hBZnRlcnMiOlsiMTAwMTU2Nzk4MTU1OSJd**** |
| RequestId |
string |
リクエスト ID。 |
44C8A952-D6B0-5BC8-82D5-93BA02E26F2E |
| Rows |
array |
検索結果の配列。 |
|
|
any |
行に関する情報。 |
[ "vsw-xxx“ ] |
例
成功レスポンス
JSONJSON
{
"Columns": [
{
"Name": "resource_id",
"Type": "varchar"
}
],
"MaxResults": 1000,
"NextToken": "eyJzZWFyY2hBZnRlcnMiOlsiMTAwMTU2Nzk4MTU1OSJd****\n",
"RequestId": "44C8A952-D6B0-5BC8-82D5-93BA02E26F2E",
"Rows": [
"[\n \"vsw-xxx“\n]"
]
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | NoPermission | You are not authorized to perform this operation. | |
| 403 | NoPermission.AccountScope | The operator is not permitted for this account scope. | |
| 404 | NotExists.ResourceDirectory | The resource directory for the account is not enabled. | |
| 404 | NotExists.ResourceDirectory.FolderId | The specified folder does not exist. | |
| 409 | ExceedLimit.ExecuteTime | The execution time has exceeded the limit. Please check for complex queries or large data volume, and optimize accordingly. | |
| 409 | SQLExecuteError | Failed to execute the SQL statement. | |
| 409 | InvalidSearch.SQL | Error: %s | |
| 409 | InvalidParameter.Scope | The Scope is invalid. | |
| 409 | ServiceNotEnabled.SpecifiedAccount | ResourceCenter service of the specified account is not enabled. | |
| 409 | InvalidParameter.NextToken | The specified parameter NextToken is not valid. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。