Ajoute des balises aux ressources de divers services Alibaba Cloud.
Description de l'opération
Les balises sont utilisées pour identifier les ressources. Elles permettent de catégoriser, de rechercher et de regrouper des ressources présentant les mêmes caractéristiques selon différentes dimensions. Cela facilite la gestion des ressources. Pour plus d'informations, consultez Présentation des balises.
Pour obtenir des informations sur les services Alibaba Cloud qui prennent en charge les balises, consultez Services compatibles avec les balises.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
tag:TagResources |
update |
*All Resource
|
Aucune |
|
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Oui |
L'identifiant de la région.
|
cn-hangzhou |
| RegionId |
string |
Oui |
L'identifiant de la région.
|
cn-hangzhou |
| Tags |
string |
Oui |
Les paires clé-valeur des balises. Vous pouvez spécifier de 1 à 10 paires clé-valeur. Si vous spécifiez plusieurs balises, le système ajoute toutes les balises aux ressources spécifiées. Limites :
|
{"k1":"v1","k2":"v2"} |
| ResourceARN |
array |
Oui |
Le nom de ressource Alibaba Cloud (ARN) d'une ressource. |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
|
string |
Non |
L'ARN d'une ressource. Valeurs valides de N : 1 à 50. Format :
Remarque
Vous pouvez définir |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
Pour plus d'informations sur les paramètres de requête courants, consultez Paramètres courants.
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Le résultat renvoyé. |
||
| RequestId |
string |
L'identifiant de la requête. |
72086426-9F8C-4A60-852B-864048FD1199 |
| FailedResources |
object |
||
| FailedResource |
array<object> |
Les informations sur les ressources auxquelles les balises n'ont pas pu être ajoutées. Remarque
|
|
|
array<object> |
Les informations sur les ressources auxquelles les balises n'ont pas pu être ajoutées. |
||
| ResourceARN |
string |
The ARN of the resource. |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
| Result |
object |
The information about the error. |
|
| Code |
string |
The error code. |
InvalidResourceId.NotFound |
| Message |
string |
The error message. |
The specified ResourceIds are not found in our records. |
Exemples
JSON format
{
"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."
}
}
]
}
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | InvalidResourceARN.Region | The Region specified in the ResourceARN parameter does not match the RegionId parameter, specifically: %s. | The Region in the ResourceARN does not match the parameter RegionId. They are: %s |
| 400 | InvalidResourceARN.Account | The Account specified in the ResourceARN parameter does not match the actual account, specifically: %s. | The Account in the ResourceARN do not match the actual user, namely: %s |
| 400 | InvalidResourceARN.FormatError | The format of parameter ResourceARN: %s is not valid, for the correct format, you can refer to the Recommend. | The ResourceARN format does not conform to the specification. For the correct format, please refer |
| 400 | InvalidParameter.ResourceType | The parameter resource type: %s in ResourceARN is not valid or not support. | ResourceType in ResourceARN: %s is Illegal or unsupported. |
| 400 | InvalidParameter.ServiceCode | The parameter service code: %s in ResourceARN is not valid or not support. | ServiceCode in ResourceARN: %s is Illegal or unsupported. |
| 400 | InvalidParameter.TagKey | The TagKey parameter is invalid. The following TagKeys are invalid: %s. | Illegal tag keys exist in the parameter. Illegal tag keys are as follows: %s |
| 400 | InvalidParameter.TagValue | The TagValue parameter is invalid. The following TagValues are invalid: %s. | The parameter contains illegal tag values. Illegal tag values are as follows: %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. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.