:doc:`CostOptimizationHub <../../cost-optimization-hub>` / Client / list_enrollment_statuses

************************
list_enrollment_statuses
************************



.. py:method:: CostOptimizationHub.Client.list_enrollment_statuses(**kwargs)

  

  Retrieves the enrollment status for an account. It can also return the list of accounts that are enrolled under the organization.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cost-optimization-hub-2022-07-26/ListEnrollmentStatuses>`_  


  **Request Syntax**
  ::

    response = client.list_enrollment_statuses(
        includeOrganizationInfo=True|False,
        accountId='string',
        nextToken='string',
        maxResults=123
    )
    
  :type includeOrganizationInfo: boolean
  :param includeOrganizationInfo: 

    Indicates whether to return the enrollment status for the organization.

    

  
  :type accountId: string
  :param accountId: 

    The account ID of a member account in the organization.

    

  
  :type nextToken: string
  :param nextToken: 

    The token to retrieve the next set of results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of objects that are returned for the request.

    

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

    
    ::

      {
          'items': [
              {
                  'accountId': 'string',
                  'status': 'Active'|'Inactive',
                  'lastUpdatedTimestamp': datetime(2015, 1, 1),
                  'createdTimestamp': datetime(2015, 1, 1)
              },
          ],
          'includeMemberAccounts': True|False,
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **items** *(list) --* 

        The enrollment status of a specific account ID, including creation and last updated timestamps.

        
        

        - *(dict) --* 

          Describes the enrollment status of an organization's member accounts in Cost Optimization Hub.

          
          

          - **accountId** *(string) --* 

            The Amazon Web Services account ID.

            
          

          - **status** *(string) --* 

            The account enrollment status.

            
          

          - **lastUpdatedTimestamp** *(datetime) --* 

            The time when the account enrollment status was last updated.

            
          

          - **createdTimestamp** *(datetime) --* 

            The time when the account enrollment status was created.

            
      
    
      

      - **includeMemberAccounts** *(boolean) --* 

        The enrollment status of all member accounts in the organization if the account is the management account or delegated administrator.

        
      

      - **nextToken** *(string) --* 

        The token to retrieve the next set of results.

        
  
  **Exceptions**
  
  *   :py:class:`CostOptimizationHub.Client.exceptions.ValidationException`

  
  *   :py:class:`CostOptimizationHub.Client.exceptions.InternalServerException`

  
  *   :py:class:`CostOptimizationHub.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`CostOptimizationHub.Client.exceptions.ThrottlingException`

  