さまざまな Alibaba Cloud サービスのリソースにタグを追加します。
操作説明
タグはリソースを識別するために使用されます。タグを使用すると、さまざまなディメンションから同じ特性を持つリソースを分類、検索、集約できます。これにより、リソース管理が容易になります。詳細については、「タグの概要」をご参照ください。
タグをサポートする Alibaba Cloud サービスについては、「タグと連携するサービス」をご参照ください。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
tag:TagResources |
update |
*All Resource
|
なし |
|
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
必須 |
リージョン ID。
|
cn-hangzhou |
| RegionId |
string |
必須 |
リージョン ID。
|
cn-hangzhou |
| Tags |
string |
必須 |
タグのキーと値のペア。1~10 個のキーと値のペアを指定できます。 複数のタグを指定すると、システムは指定されたリソースにすべてのタグを追加します。 制限:
|
{"k1":"v1","k2":"v2"} |
| ResourceARN |
array |
必須 |
リソースの Alibaba Cloud リソース名 (ARN)。 |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
|
string |
任意 |
リソースの ARN。 N の有効な値: 1~50。 形式:
説明
ResourceARN の |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
共通リクエストパラメーターの詳細については、「共通パラメーター」をご参照ください。
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
返された結果。 |
||
| RequestId |
string |
リクエスト ID。 |
72086426-9F8C-4A60-852B-864048FD1199 |
| FailedResources |
object |
||
| FailedResource |
array<object> |
タグの追加に失敗したリソースに関する情報。 説明
|
|
|
array<object> |
タグの追加に失敗したリソースに関する情報。 |
||
| ResourceARN |
string |
リソースの ARN。 |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
| Result |
object |
エラーに関する情報。 |
|
| Code |
string |
エラーコード。 |
InvalidResourceId.NotFound |
| Message |
string |
エラーメッセージ。 |
The specified ResourceIds are not found in our records. |
例
成功レスポンス
JSONJSON
{
"RequestId": "72086426-9F8C-4A60-852B-864048FD1199",
"FailedResources": {
"FailedResource": [
{
"ResourceARN": "arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu****",
"Result": {
"Code": "InvalidResourceId.NotFound",
"Message": "The specified ResourceIds are not found in our records."
}
}
]
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidResourceARN.Region | The Region specified in the ResourceARN parameter does not match the RegionId parameter, specifically: %s. | |
| 400 | InvalidResourceARN.Account | The Account specified in the ResourceARN parameter does not match the actual account, specifically: %s. | |
| 400 | InvalidResourceARN.FormatError | The format of parameter ResourceARN: %s is not valid, for the correct format, you can refer to the Recommend. | |
| 400 | InvalidParameter.ResourceType | The parameter resource type: %s in ResourceARN is not valid or not support. | |
| 400 | InvalidParameter.ServiceCode | The parameter service code: %s in ResourceARN is not valid or not support. | |
| 400 | InvalidParameter.TagKey | The TagKey parameter is invalid. The following TagKeys are invalid: %s. | |
| 400 | InvalidParameter.TagValue | The TagValue parameter is invalid. The following TagValues are invalid: %s. | |
| 400 | InvalidParameter.Tags | The Tags parameter cannot be empty, and JSON parsing should adhere to the format of a Map. | |
| 403 | Duplicate.TagKey | The Tag.N.Key contains duplicate keys. | The Tag.N.Key contains duplicate keys. |
| 403 | InvalidParameter.Category | The specified Category is invalid. Valid values are Custom and System. | The specified Category is invalid. Valid values are Custom and System. |
| 403 | MissingParameter.Createby | You must specify Createby. | You must specify Createby. |
| 403 | MissingParameter.ResourceIds | You must specify ResourceIds. | You must specify ResourceIds. |
| 403 | NoPermission.Operator | The user is not authorized to operate on the specified resource. | The user is not authorized to operate on the specified resource. |
| 403 | NoPermissionKey.Category | Some keys cannot be modified because the user does not have permission. | Some keys cannot be modified because the user does not have permission. |
| 403 | NoPermissionKey.Operator | You are not authorized to operate the tag key. | You are not authorized to operate the tag key. |
| 403 | NumberExceed.ResourceIds | The maximum number of ResourceIds is exceeded. | The maximum number of ResourceIds is exceeded. |
| 403 | NumberExceed.Tags | The maximum number of Tags is exceeded. | The maximum number of Tags is exceeded. |
| 403 | QuotaExceed.TagsPerResource | The maximum number of tags for each resource is exceeded. | The maximum number of tags for each resource is exceeded. |
| 404 | Missing.TagKey | Tag.N.Value has been specified and you must specify Tag.N.Key. | Tag.N.Value has been specified and you must specify Tag.N.Key. |
| 404 | MissingParameter.AliUid | You must specify AliUid. | You must specify AliUid. |
| 404 | MissingParameter.Bid | You must specify Bid. | You must specify Bid. |
| 404 | MissingParameter.TagKey | You must specify TagKey. | You must specify TagKey. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。