Jump to Content

Class TagCertificateAuthorityCommandProtected

Adds one or more tags to your private CA. 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 private CA 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 private CA if you want to identify a specific characteristic of that CA, or you can apply the same tag to multiple private CAs if you want to filter for a common relationship among those CAs. To remove one or more tags, use the UntagCertificateAuthority action. Call the ListTags action to see what tags are associated with your CA.

To attach tags to a private CA during the creation procedure, a CA administrator must first associate an inline IAM policy with the CreateCertificateAuthority action and explicitly allow tagging. For more information, see Attaching tags to a CA at the time of creation.

Example

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

import { ACMPCAClient, TagCertificateAuthorityCommand } from "@aws-sdk/client-acm-pca"; // ES Modules import
// const { ACMPCAClient, TagCertificateAuthorityCommand } = require("@aws-sdk/client-acm-pca"); // CommonJS import
const client = new ACMPCAClient(config);
const command = new TagCertificateAuthorityCommand(input);
const response = await client.send(command);

See

Throws

InvalidArnException (client fault)

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

Throws

InvalidStateException (client fault)

The state of the private CA does not allow this action to occur.

Throws

InvalidTagException (client fault)

The tag associated with the CA is not valid. The invalid argument is contained in the message field.

Throws

ResourceNotFoundException (client fault)

A resource such as a private CA, S3 bucket, certificate, audit report, or policy cannot be found.

Throws

TooManyTagsException (client fault)

You can associate up to 50 tags with a private CA. Exception information is contained in the exception message field.

Hierarchy

Constructors

Properties

Methods