:doc:`ComputeOptimizer <../../compute-optimizer>` / Client / get_enrollment_statuses_for_organization

****************************************
get_enrollment_statuses_for_organization
****************************************



.. py:method:: ComputeOptimizer.Client.get_enrollment_statuses_for_organization(**kwargs)

  

  Returns the Compute Optimizer enrollment (opt-in) status of organization member accounts, if your account is an organization management account.

   

  To get the enrollment status of standalone accounts, use the  GetEnrollmentStatus action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEnrollmentStatusesForOrganization>`_  


  **Request Syntax**
  ::

    response = client.get_enrollment_statuses_for_organization(
        filters=[
            {
                'name': 'Status',
                'values': [
                    'string',
                ]
            },
        ],
        nextToken='string',
        maxResults=123
    )
    
  :type filters: list
  :param filters: 

    An array of objects to specify a filter that returns a more specific list of account enrollment statuses.

    

  
    - *(dict) --* 

      Describes a filter that returns a more specific list of account enrollment statuses. Use this filter with the  GetEnrollmentStatusesForOrganization action.

      

    
      - **name** *(string) --* 

        The name of the filter.

         

        Specify ``Status`` to return accounts with a specific enrollment status (for example, ``Active``).

        

      
      - **values** *(list) --* 

        The value of the filter.

         

        The valid values are ``Active``, ``Inactive``, ``Pending``, and ``Failed``.

        

      
        - *(string) --* 

        
    
    

  :type nextToken: string
  :param nextToken: 

    The token to advance to the next page of account enrollment statuses.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of account enrollment statuses to return with a single request. You can specify up to 100 statuses to return with each request.

     

    To retrieve the remaining results, make another request with the returned ``nextToken`` value.

    

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

    
    ::

      {
          'accountEnrollmentStatuses': [
              {
                  'accountId': 'string',
                  'status': 'Active'|'Inactive'|'Pending'|'Failed',
                  'statusReason': 'string',
                  'lastUpdatedTimestamp': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **accountEnrollmentStatuses** *(list) --* 

        An array of objects that describe the enrollment statuses of organization member accounts.

        
        

        - *(dict) --* 

          Describes the enrollment status of an organization's member accounts in Compute Optimizer.

          
          

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

            The Amazon Web Services account ID.

            
          

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

            The account enrollment status.

            
          

          - **statusReason** *(string) --* 

            The reason for the account enrollment status.

             

            For example, an account might show a status of ``Pending`` because member accounts of an organization require more time to be enrolled in the service.

            
          

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

            The Unix epoch timestamp, in seconds, of when the account enrollment status was last updated.

            
      
    
      

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

        The token to use to advance to the next page of account enrollment statuses.

         

        This value is null when there are no more pages of account enrollment statuses to return.

        
  
  **Exceptions**
  
  *   :py:class:`ComputeOptimizer.Client.exceptions.InternalServerException`

  
  *   :py:class:`ComputeOptimizer.Client.exceptions.ServiceUnavailableException`

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

  
  *   :py:class:`ComputeOptimizer.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`ComputeOptimizer.Client.exceptions.MissingAuthenticationToken`

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

  