:doc:`BillingConductor <../../billingconductor>` / Client / list_billing_groups

*******************
list_billing_groups
*******************



.. py:method:: BillingConductor.Client.list_billing_groups(**kwargs)

  

  A paginated call to retrieve a list of billing groups for the given billing period. If you don't provide a billing group, the current billing period is used.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/billingconductor-2021-07-30/ListBillingGroups>`_  


  **Request Syntax**
  ::

    response = client.list_billing_groups(
        BillingPeriod='string',
        MaxResults=123,
        NextToken='string',
        Filters={
            'Arns': [
                'string',
            ],
            'PricingPlan': 'string',
            'Statuses': [
                'ACTIVE'|'PRIMARY_ACCOUNT_MISSING'|'PENDING',
            ],
            'AutoAssociate': True|False,
            'PrimaryAccountIds': [
                'string',
            ],
            'BillingGroupTypes': [
                'STANDARD'|'TRANSFER_BILLING',
            ],
            'Names': [
                {
                    'SearchOption': 'STARTS_WITH',
                    'SearchValue': 'string'
                },
            ],
            'ResponsibilityTransferArns': [
                'string',
            ]
        }
    )
    
  :type BillingPeriod: string
  :param BillingPeriod: 

    The preferred billing period to get billing groups.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of billing groups to retrieve.

    

  
  :type NextToken: string
  :param NextToken: 

    The pagination token that's used on subsequent calls to get billing groups.

    

  
  :type Filters: dict
  :param Filters: 

    A ``ListBillingGroupsFilter`` that specifies the billing group and pricing plan to retrieve billing group information.

    

  
    - **Arns** *(list) --* 

      The list of billing group Amazon Resource Names (ARNs) to retrieve information.

      

    
      - *(string) --* 

      
  
    - **PricingPlan** *(string) --* 

      The pricing plan Amazon Resource Names (ARNs) to retrieve information.

      

    
    - **Statuses** *(list) --* 

      A list of billing groups to retrieve their current status for a specific time range

      

    
      - *(string) --* 

      
  
    - **AutoAssociate** *(boolean) --* 

      Specifies if this billing group will automatically associate newly added Amazon Web Services accounts that join your consolidated billing family.

      

    
    - **PrimaryAccountIds** *(list) --* 

      A list of primary account IDs to filter the billing groups.

      

    
      - *(string) --* 

      
  
    - **BillingGroupTypes** *(list) --* 

      Filter billing groups by their type.

      

    
      - *(string) --* 

      
  
    - **Names** *(list) --* 

      Filter billing groups by their names.

      

    
      - *(dict) --* 

        A structure that defines string search parameters.

        

      
        - **SearchOption** *(string) --* **[REQUIRED]** 

          The search option to be applied when performing the string search.

          

        
        - **SearchValue** *(string) --* **[REQUIRED]** 

          The value to search for within the specified string field.

          

        
      
  
    - **ResponsibilityTransferArns** *(list) --* 

      Filter billing groups by their responsibility transfer ARNs.

      

    
      - *(string) --* 

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

    
    ::

      {
          'BillingGroups': [
              {
                  'Name': 'string',
                  'Arn': 'string',
                  'Description': 'string',
                  'PrimaryAccountId': 'string',
                  'ComputationPreference': {
                      'PricingPlanArn': 'string'
                  },
                  'Size': 123,
                  'CreationTime': 123,
                  'LastModifiedTime': 123,
                  'Status': 'ACTIVE'|'PRIMARY_ACCOUNT_MISSING'|'PENDING',
                  'StatusReason': 'string',
                  'AccountGrouping': {
                      'AutoAssociate': True|False,
                      'ResponsibilityTransferArn': 'string'
                  },
                  'BillingGroupType': 'STANDARD'|'TRANSFER_BILLING'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **BillingGroups** *(list) --* 

        A list of ``BillingGroupListElement`` retrieved.

        
        

        - *(dict) --* 

          A representation of a billing group.

          
          

          - **Name** *(string) --* 

            The name of the billing group.

            
          

          - **Arn** *(string) --* 

            The Amazon Resource Number (ARN) that can be used to uniquely identify the billing group.

            
          

          - **Description** *(string) --* 

            The description of the billing group.

            
          

          - **PrimaryAccountId** *(string) --* 

            The account ID that serves as the main account in a billing group.

            
          

          - **ComputationPreference** *(dict) --* 

            The preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.

            
            

            - **PricingPlanArn** *(string) --* 

              The Amazon Resource Name (ARN) of the pricing plan that's used to compute the Amazon Web Services charges for a billing group.

              
        
          

          - **Size** *(integer) --* 

            The number of accounts in the particular billing group.

            
          

          - **CreationTime** *(integer) --* 

            The time when the billing group was created.

            
          

          - **LastModifiedTime** *(integer) --* 

            The most recent time when the billing group was modified.

            
          

          - **Status** *(string) --* 

            The billing group status. Only one of the valid values can be used.

            
          

          - **StatusReason** *(string) --* 

            The reason why the billing group is in its current status.

            
          

          - **AccountGrouping** *(dict) --* 

            Specifies if the billing group has automatic account association ( ``AutoAssociate``) enabled.

            
            

            - **AutoAssociate** *(boolean) --* 

              Specifies if this billing group will automatically associate newly added Amazon Web Services accounts that join your consolidated billing family.

              
            

            - **ResponsibilityTransferArn** *(string) --* 

              The Amazon Resource Name (ARN) that identifies the transfer relationship for the billing group.

              
        
          

          - **BillingGroupType** *(string) --* 

            The type of billing group.

            
      
    
      

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

        The pagination token that's used on subsequent calls to get billing groups.

        
  
  **Exceptions**
  
  *   :py:class:`BillingConductor.Client.exceptions.ThrottlingException`

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

  
  *   :py:class:`BillingConductor.Client.exceptions.ValidationException`

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

  
  *   :py:class:`BillingConductor.Client.exceptions.ResourceNotFoundException`

  