Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class CreatePermissionCommandProtected

Grants one or more permissions on a private CA to the Certificate Manager (ACM) service principal (acm.amazonaws.com). These permissions allow ACM to issue and renew ACM certificates that reside in the same Amazon Web Services account as the CA.

You can list current permissions with the ListPermissions action and revoke them with the DeletePermission action.

About Permissions

  • If the private CA and the certificates it issues reside in the same account, you can use CreatePermission to grant permissions for ACM to carry out automatic certificate renewals.

  • For automatic certificate renewal to succeed, the ACM service principal needs permissions to create, retrieve, and list certificates.

  • If the private CA and the ACM certificates reside in different accounts, then permissions cannot be used to enable automatic renewals. Instead, the ACM certificate owner must set up a resource-based policy to enable cross-account issuance and renewals. For more information, see Using a Resource Based Policy with Amazon Web Services Private CA.

Example

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

import { ACMPCAClient, CreatePermissionCommand } from "@aws-sdk/client-acm-pca"; // ES Modules import
// const { ACMPCAClient, CreatePermissionCommand } = require("@aws-sdk/client-acm-pca"); // CommonJS import
const client = new ACMPCAClient(config);
const input = { // CreatePermissionRequest
CertificateAuthorityArn: "STRING_VALUE", // required
Principal: "STRING_VALUE", // required
SourceAccount: "STRING_VALUE",
Actions: [ // ActionList // required
"IssueCertificate" || "GetCertificate" || "ListPermissions",
],
};
const command = new CreatePermissionCommand(input);
const response = await client.send(command);
// {};

Param

CreatePermissionCommandInput

Returns

CreatePermissionCommandOutput

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

LimitExceededException (client fault)

An Amazon Web Services Private CA quota has been exceeded. See the exception message returned to determine the quota that was exceeded.

Throws

PermissionAlreadyExistsException (client fault)

The designated permission has already been given to the user.

Throws

RequestFailedException (client fault)

The request has failed for an unspecified reason.

Throws

ResourceNotFoundException (client fault)

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

Throws

ACMPCAServiceException

Base exception class for all service exceptions from ACMPCA service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods