Queries the tag-resource relationships for one or more resources.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
oos:ListTagResources |
get |
Execution
Template
StateConfiguration
Parameter
SecretParameter
OpsItem
PatchBaseline
Execution
Template
OpsItem
SecretParameter
PatchBaseline
StateConfiguration
Parameter
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| ResourceIds |
object |
No |
The resource IDs. You can specify 1 to 50 resource IDs. |
["templateNam1","templateName2"] |
| ResourceType |
string |
Yes |
The resource type. Valid values: template execution |
template |
| Tags |
object |
No |
The tag keys and values. You can specify 1 to 20 key-value pairs. |
{"k1":"v2","k2":"v2"} |
| NextToken |
string |
No |
A pagination token. It can be used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. |
MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
A pagination token that can be used in the next request to retrieve a new page of results. If this parameter is empty, no more pages are available. |
MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ |
| RequestId |
string |
The request ID. |
A5EF78C1-67FC-4E36-A6A8-7DF9C51726DF |
| TagResources |
object |
||
| TagResource |
array<object> |
The resources and their associated tags. |
|
|
object |
|||
| ResourceType |
string |
The resource type. |
template |
| TagValue |
string |
The tag value. |
v1 |
| ResourceId |
string |
The resource ID. |
TagTest2 |
| TagKey |
string |
The tag key. |
k1 |
Examples
Success response
JSON format
{
"NextToken": "MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ",
"RequestId": "A5EF78C1-67FC-4E36-A6A8-7DF9C51726DF",
"TagResources": {
"TagResource": [
{
"ResourceType": "template",
"TagValue": "v1",
"ResourceId": "TagTest2",
"TagKey": "k1"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.