Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class AddTagsToCertificateCommandProtected

Adds one or more tags to an ACM certificate. Tags are labels that you can use to identify and organize your Amazon Web Services resources. Each tag consists of a key and an optional value. You specify the certificate on input by its Amazon Resource Name (ARN). You specify the tag by using a key-value pair.

You can apply a tag to just one certificate if you want to identify a specific characteristic of that certificate, or you can apply the same tag to multiple certificates if you want to filter for a common relationship among those certificates. Similarly, you can apply the same tag to multiple resources if you want to specify a relationship among those resources. For example, you can add the same tag to an ACM certificate and an Elastic Load Balancing load balancer to indicate that they are both used by the same website. For more information, see Tagging ACM certificates.

To remove one or more tags, use the RemoveTagsFromCertificate action. To view all of the tags that have been applied to the certificate, use the ListTagsForCertificate action.

Example

Use a bare-bones client and the command you need to make an API call.

import { ACMClient, AddTagsToCertificateCommand } from "@aws-sdk/client-acm"; // ES Modules import
// const { ACMClient, AddTagsToCertificateCommand } = require("@aws-sdk/client-acm"); // CommonJS import
const client = new ACMClient(config);
const input = { // AddTagsToCertificateRequest
CertificateArn: "STRING_VALUE", // required
Tags: [ // TagList // required
{ // Tag
Key: "STRING_VALUE", // required
Value: "STRING_VALUE",
},
],
};
const command = new AddTagsToCertificateCommand(input);
const response = await client.send(command);
// {};

Param

AddTagsToCertificateCommandInput

Returns

AddTagsToCertificateCommandOutput

See

Throws

InvalidArnException (client fault)

The requested Amazon Resource Name (ARN) does not refer to an existing resource.

Throws

InvalidParameterException (client fault)

An input parameter was invalid.

Throws

InvalidTagException (client fault)

One or both of the values that make up the key-value pair is not valid. For example, you cannot specify a tag value that begins with aws:.

Throws

ResourceNotFoundException (client fault)

The specified certificate cannot be found in the caller's account or the caller's account cannot be found.

Throws

TagPolicyException (client fault)

A specified tag did not comply with an existing tag policy and was rejected.

Throws

ThrottlingException (client fault)

The request was denied because it exceeded a quota.

Throws

TooManyTagsException (client fault)

The request contains too many tags. Try the request again with fewer tags.

Throws

ACMServiceException

Base exception class for all service exceptions from ACM service.

Hierarchy

Constructors

Properties

Methods