:doc:`ACMPCA <../../acm-pca>` / Client / list_permissions

****************
list_permissions
****************



.. py:method:: 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 <https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreatePermission.html>`__ action and revoked with the `DeletePermission <https://docs.aws.amazon.com/privateca/latest/APIReference/API_DeletePermission.html>`__ 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 <https://docs.aws.amazon.com/privateca/latest/userguide/pca-rbp.html>`__.
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListPermissions>`_  


  **Request Syntax**
  ::

    response = client.list_permissions(
        MaxResults=123,
        NextToken='string',
        CertificateAuthorityArn='string'
    )
    
  :type MaxResults: integer
  :param MaxResults: 

    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.

    

  
  :type NextToken: string
  :param NextToken: 

    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.

    

  
  :type CertificateAuthorityArn: string
  :param CertificateAuthorityArn: **[REQUIRED]** 

    The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the `ListCertificateAuthorities <https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html>`__ 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 <https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html>`__ action.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

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

    

    - *(dict) --* 
      

      - **NextToken** *(string) --* 

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

        
      

      - **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 <https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreatePermission.html>`__ action, removed with the `DeletePermission <https://docs.aws.amazon.com/privateca/latest/APIReference/API_DeletePermission.html>`__ action, and listed with the `ListPermissions <https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListPermissions.html>`__ 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.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`ACMPCA.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`ACMPCA.Client.exceptions.InvalidArnException`

  
  *   :py:class:`ACMPCA.Client.exceptions.InvalidStateException`

  
  *   :py:class:`ACMPCA.Client.exceptions.RequestFailedException`

  
  *   :py:class:`ACMPCA.Client.exceptions.InvalidNextTokenException`

  