ListTags - AWS Certificate Manager Private Certificate Authority

ListTags

Lists the tags, if any, that are associated with your private CA or one that has been shared with you. Tags are labels that you can use to identify and organize your CAs. Each tag consists of a key and an optional value. Call the TagCertificateAuthority action to add one or more tags to your CA. Call the UntagCertificateAuthority action to remove tags.

Request Syntax

{ "CertificateAuthorityArn": "string", "MaxResults": number, "NextToken": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

CertificateAuthorityArn

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

Type: String

Length Constraints: Minimum length of 5. Maximum length of 200.

Pattern: arn:[\w+=/,.@-]+:[\w+=/,.@-]+:[\w+=/,.@-]*:[0-9]*:[\w+=,.@-]+(/[\w+=,.@-]+)*

Required: Yes

MaxResults

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 1000.

Required: No

NextToken

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 500.

Required: No

Response Syntax

{ "NextToken": "string", "Tags": [ { "Key": "string", "Value": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

NextToken

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 500.

Tags

The tags associated with your private CA.

Type: Array of Tag objects

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidArnException

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

HTTP Status Code: 400

InvalidStateException

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

HTTP Status Code: 400

ResourceNotFoundException

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

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of ListTags.

Sample Request

POST / HTTP/1.1 Host: acm-pca.amazonaws.com Accept-Encoding: identity Content-Length: 146 X-Amz-Target: ACMPrivateCA.ListTags X-Amz-Date: 20180226T164656Z User-Agent: aws-cli/1.14.28 Python/2.7.9 Windows/8 botocore/1.8.32 Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=Access_Key_ID/20180226/AWS_Region/acm-pca/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=59cc6594a1df0f441bd39e466755465e52545f57faa8329d907c715bc8a5f97b { "MaxResults": 10, "CertificateAuthorityArn": "arn:aws:acm-pca:region:AWS_Account:certificate-authority/12345678-1234-1234-1234-123456789012" }

Example

This example illustrates one usage of ListTags.

Sample Response

HTTP/1.1 200 OK Date: Tue, 15 May 2018 18:25:09 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 69 x-amzn-RequestId: 9893f3cb-1bd8-4a15-8394-4f5364963acf Connection: keep-alive "Tags": [{ "Key": "Admin", "Value": "Alice" }, { "Key": "Purpose", "Value": "Website" }] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: