:doc:`Inspector2 <../../inspector2>` / Client / list_usage_totals

*****************
list_usage_totals
*****************



.. py:method:: Inspector2.Client.list_usage_totals(**kwargs)

  

  Lists the Amazon Inspector usage totals over the last 30 days.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/inspector2-2020-06-08/ListUsageTotals>`_  


  **Request Syntax**
  ::

    response = client.list_usage_totals(
        maxResults=123,
        nextToken='string',
        accountIds=[
            'string',
        ]
    )
    
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results the response can return. If your request would return more than the maximum the response will return a ``nextToken`` value, use this value when you call the action again to get the remaining results.

    

  
  :type nextToken: string
  :param nextToken: 

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. If your response returns more than the ``maxResults`` maximum value it will also return a ``nextToken`` value. For subsequent calls, use the ``nextToken`` value returned from the previous request to continue listing results after the first page.

    

  
  :type accountIds: list
  :param accountIds: 

    The Amazon Web Services account IDs to retrieve usage totals for.

    

  
    - *(string) --* 

    

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

    
    ::

      {
          'nextToken': 'string',
          'totals': [
              {
                  'accountId': 'string',
                  'usage': [
                      {
                          'type': 'EC2_INSTANCE_HOURS'|'ECR_INITIAL_SCAN'|'ECR_RESCAN'|'LAMBDA_FUNCTION_HOURS'|'LAMBDA_FUNCTION_CODE_HOURS'|'CODE_REPOSITORY_SAST'|'CODE_REPOSITORY_IAC'|'CODE_REPOSITORY_SCA'|'EC2_AGENTLESS_INSTANCE_HOURS',
                          'total': 123.0,
                          'estimatedMonthlyCost': 123.0,
                          'currency': 'USD'
                      },
                  ]
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The pagination parameter to be used on the next list operation to retrieve more items.

        
      

      - **totals** *(list) --* 

        An object with details on the total usage for the requested account.

        
        

        - *(dict) --* 

          The total of usage for an account ID.

          
          

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

            The account ID of the account that usage data was retrieved for.

            
          

          - **usage** *(list) --* 

            An object representing the total usage for an account.

            
            

            - *(dict) --* 

              Contains usage information about the cost of Amazon Inspector operation.

              
              

              - **type** *(string) --* 

                The type scan.

                
              

              - **total** *(float) --* 

                The total of usage.

                
              

              - **estimatedMonthlyCost** *(float) --* 

                The estimated monthly cost of Amazon Inspector.

                
              

              - **currency** *(string) --* 

                The currency type used when calculating usage data.

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

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

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

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

  