1 つ以上の ECS リソースにバインドされているタグを照会します。
操作説明
操作の説明
クエリのオブジェクトを決定するために、リクエストで以下のパラメーターのうち少なくとも 1 つを指定してください。
ResourceId.NTag.N(Tag.N.KeyおよびTag.N.Value)TagFilter.N
以下のパラメーターを同時に指定した場合、応答には両方の条件を満たす ECS リソースのみが含まれます。
Tag.NおよびResourceId.NTagFilter.NおよびResourceId.N
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ecs:ListTagResources |
get |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
必須 |
リソースのリージョン ID。最新のリージョンリストをクエリするには、 DescribeRegions を呼び出します。 |
cn-hangzhou |
| RegionId |
string |
必須 |
リソースのリージョン ID。最新のリージョンリストをクエリするには、 DescribeRegions を呼び出します。 |
cn-hangzhou |
| NextToken |
string |
任意 |
次のクエリを開始するために使用されるトークン。 |
caeba0bbb2be03f84eb48b699f0a4883 |
| ResourceType |
string |
必須 |
リソースタイプ。有効な値:
|
instance |
| ResourceId |
array |
任意 |
ECS リソースの ID。N の有効値: 1~50。 |
i-bp1j6qtvdm8w0z1o**** |
|
string |
任意 |
ECS リソースの ID。N の有効値: 1~50。 |
i-bp1j6qtvdm8w0z1o**** |
|
| Tag |
array<object> |
任意 |
タグ。 |
|
|
object |
任意 |
タグ。 |
||
| Key |
string |
任意 |
ECS リソースの完全一致検索を実行するために使用されるタグキー。タグキーの長さは 1~128 文字である必要があります。N の有効値: 1~20。
|
TestKey |
| Value |
string |
任意 |
ECS リソースの完全一致検索を実行するために使用されるタグ値。タグ値の長さは 1~128 文字である必要があります。N の有効値: 1~20。 説明
|
TestValue |
| TagFilter |
array<object> |
任意 |
タグフィルタールール。 説明
このパラメーターは招待プレビュー中であり、一般公開されていません。 |
|
|
object |
任意 |
タグフィルタールール。 |
||
| TagValues |
array |
任意 |
ECS リソースのあいまい検索を実行するために使用されるタグ値。タグ値の長さは 1~128 文字である必要があります。N の有効値: 1~5。メトリックの説明については、 |
TestTagFilter |
|
string |
任意 |
ECS リソースのあいまい検索を実行するために使用されるタグ値。タグ値の長さは 1~128 文字である必要があります。N の有効値: 1~5。メトリックの説明については、 |
TestTagFilter |
|
| TagKey |
string |
任意 |
ECS リソースのあいまい検索を実行するために使用されるタグキー。タグキーの長さは 1~128 文字である必要があります。N の有効値: 1~5。
説明
|
env |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| NextToken |
string |
次のクエリを開始するために使用されるトークン。 |
caeba0bbb2be03f84eb48b699f0a4883 |
| RequestId |
string |
リクエスト ID |
484256DA-D816-44D2-9D86-B6EE4D5BA78C |
| TagResources |
object |
||
| TagResource |
array<object> |
リソースとそのタグのコレクション。リソース ID、リソースタイプ、タグキーと値のペアなどの情報が含まれます。 |
|
|
object |
|||
| TagValue |
string |
タグ値です。 |
TestValue |
| ResourceType |
string |
リソースタイプです。有効な値:
|
instance |
| ResourceId |
string |
リソース ID です。 |
i-bp1j6qtvdm8w0z1o**** |
| TagKey |
string |
タグキーです。 |
TestKey |
例
成功レスポンス
JSONJSON
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
"RequestId": "484256DA-D816-44D2-9D86-B6EE4D5BA78C",
"TagResources": {
"TagResource": [
{
"TagValue": "TestValue",
"ResourceType": "instance",
"ResourceId": "i-bp1j6qtvdm8w0z1o****",
"TagKey": "TestKey"
}
]
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidDefaultResourceGroup.NotSupported | The specified parameter Tag is not support for default resource group. | |
| 400 | InvalidTag.NotSupported | You can only specify Tag for either resource tag or resource group. | |
| 400 | NumberExceed.ResourceIds | The ResourceIds parameter's number is exceed , Valid : 50. | |
| 400 | NumberExceed.Tags | The Tags parameter's number is exceed , Valid : 20. | |
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | |
| 400 | OperationDenied.QuotaExceed | The quota of tags on resource is beyond permitted range. | |
| 400 | InvalidTag.Mismatch | The specified Tag.n.Key and Tag.n.Value are not match. | |
| 400 | InvalidTagCount | The specified tags are beyond the permitted range. | |
| 400 | Invalid.Scope | The specified scope is invalid. | |
| 400 | InvalidTags.MalFormed | The tags must be empty, when the tagFilters is not empty. | |
| 500 | ServiceUnavailable | The service is unavailable, please try again later. | |
| 500 | InternalError | The process of creating snapshot has failed due to some unknown error. | |
| 403 | PermissionDenied.TagOwnerBid | The specified operator not have permission to set TagOwnerBid value. | |
| 403 | PermissionDenied.TagOwnerUid | The specified operator not have permission to set TagOwnerUid value. | |
| 403 | PermissionDenied.Scope | The specified operator not have permission to set Scope value. | |
| 403 | InvalidResourceId.NotSupported | The specified ResourceId does not support tagging. | |
| 403 | NoPermission.Tag | The operator is not permission for the tag. | |
| 403 | BothEmpty.TagsAndResources | The specified Tags and ResourcesIds are not allow to both empty. | |
| 403 | PermissionDenied.TagsFuzzyQuery | The specified operator has not permission to query fuzzy tags. | |
| 403 | NumberExceed.TagValues | The number of the specified TagValues is beyond permitted range, the max is 5. | |
| 403 | InvalidFilter.Malformed | The specified Filter is not valid. | |
| 403 | InvalidTagFilter.Malformed | The specified TagFilter is not valid. | |
| 403 | Invalid.NextToken | The specified NextToken is not valid. | |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | |
| 404 | MissingParameter.ResourceIds | The parameter - ResourceIds.N should not be null. | |
| 404 | MissingParameter.TagOwnerUid | The parameter - TagOwnerUid should not be null. | |
| 404 | MissingParameter.TagOwnerBid | The parameter - TagOwnerBid should not be null. | |
| 404 | MissingParameter.ResourceType | The parameter - ResourceType should not be null. | |
| 404 | MissingParameter.Tags | The parameter - Tags should not be null. | |
| 404 | MissingParameter.RegionId | The parameter - RegionId should not be null. | |
| 404 | InvalidResourceId.NotFound | The specified ResourceIds are not found in our records. | |
| 404 | InvalidResourceType.NotFound | The ResourceType provided does not exist in our records. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。