ACMPCA / Client / list_permissions

list_permissions#

ACMPCA.Client.list_permissions(**kwargs)#

List all permissions on a private CA, if any, granted 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.

Permissions can be granted with the CreatePermission action and revoked 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.

See also: AWS API Documentation

Request Syntax

response = client.list_permissions(
    CertificateAuthorityArn='string',
    NextToken='string',
    MaxResults=123
)
Parameters:
  • CertificateAuthorityArn (string) –

    [REQUIRED]

    The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA’s ARN by running the ListCertificateAuthorities action.

  • NextToken (string) – When paginating results, use this parameter 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.

  • MaxResults (integer) – When paginating results, use this parameter 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.

Return type:

dict

Returns:

Response Syntax

{
    'Permissions': [
        {
            'CertificateAuthorityArn': 'string',
            'CreatedAt': datetime(2015, 1, 1),
            'Principal': 'string',
            'SourceAccount': 'string',
            'Actions': [
                'IssueCertificate'|'GetCertificate'|'ListPermissions',
            ],
            'Policy': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Permissions (list) –

      Summary information about each permission assigned by the specified private CA, including the action enabled, the policy provided, and the time of creation.

      • (dict) –

        Permissions designate which private CA actions can be performed by an Amazon Web Services service or entity. In order for ACM to automatically renew private certificates, you must give the ACM service principal all available permissions ( IssueCertificate, GetCertificate, and ListPermissions). Permissions can be assigned with the CreatePermission action, removed with the DeletePermission action, and listed with the ListPermissions action.

        • CertificateAuthorityArn (string) –

          The Amazon Resource Number (ARN) of the private CA from which the permission was issued.

        • CreatedAt (datetime) –

          The time at which the permission was created.

        • Principal (string) –

          The Amazon Web Services service or entity that holds the permission. At this time, the only valid principal is acm.amazonaws.com.

        • SourceAccount (string) –

          The ID of the account that assigned the permission.

        • Actions (list) –

          The private CA actions that can be performed by the designated Amazon Web Services service.

          • (string) –

        • Policy (string) –

          The name of the policy that is associated with the permission.

    • NextToken (string) –

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

Exceptions