:doc:`BillingandCostManagementPricingCalculator <../../bcm-pricing-calculator>` / Client / batch_update_workload_estimate_usage

************************************
batch_update_workload_estimate_usage
************************************



.. py:method:: BillingandCostManagementPricingCalculator.Client.batch_update_workload_estimate_usage(**kwargs)

  

  Update a newly added or existing usage lines. You can update the usage amounts and usage group based on a usage ID and a Workload estimate ID.

   

  .. note::

    

    The ``BatchUpdateWorkloadEstimateUsage`` operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission ``bcm-pricing-calculator:UpdateWorkloadEstimateUsage`` in your policies.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bcm-pricing-calculator-2024-06-19/BatchUpdateWorkloadEstimateUsage>`_  


  **Request Syntax**
  ::

    response = client.batch_update_workload_estimate_usage(
        workloadEstimateId='string',
        usage=[
            {
                'id': 'string',
                'group': 'string',
                'amount': 123.0
            },
        ]
    )
    
  :type workloadEstimateId: string
  :param workloadEstimateId: **[REQUIRED]** 

    The ID of the Workload estimate for which you want to modify the usage lines.

    

  
  :type usage: list
  :param usage: **[REQUIRED]** 

    List of usage line amounts and usage group that you want to update in a Workload estimate identified by the usage ID.

    

  
    - *(dict) --* 

      Represents an entry in a batch operation to update workload estimate usage.

      

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

        The unique identifier of the usage estimate to update.

        

      
      - **group** *(string) --* 

        The updated group identifier for the usage estimate.

        

      
      - **amount** *(float) --* 

        The updated estimated usage amount.

        

      
    

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

    
    ::

      {
          'items': [
              {
                  'serviceCode': 'string',
                  'usageType': 'string',
                  'operation': 'string',
                  'location': 'string',
                  'id': 'string',
                  'usageAccountId': 'string',
                  'group': 'string',
                  'quantity': {
                      'unit': 'string',
                      'amount': 123.0
                  },
                  'cost': 123.0,
                  'currency': 'USD',
                  'status': 'VALID'|'INVALID'|'STALE',
                  'historicalUsage': {
                      'serviceCode': 'string',
                      'usageType': 'string',
                      'operation': 'string',
                      'location': 'string',
                      'usageAccountId': 'string',
                      'billInterval': {
                          'start': datetime(2015, 1, 1),
                          'end': datetime(2015, 1, 1)
                      },
                      'filterExpression': {
                          'and': [
                              {'... recursive ...'},
                          ],
                          'or': [
                              {'... recursive ...'},
                          ],
                          'not': {'... recursive ...'},
                          'costCategories': {
                              'key': 'string',
                              'matchOptions': [
                                  'string',
                              ],
                              'values': [
                                  'string',
                              ]
                          },
                          'dimensions': {
                              'key': 'string',
                              'matchOptions': [
                                  'string',
                              ],
                              'values': [
                                  'string',
                              ]
                          },
                          'tags': {
                              'key': 'string',
                              'matchOptions': [
                                  'string',
                              ],
                              'values': [
                                  'string',
                              ]
                          }
                      }
                  }
              },
          ],
          'errors': [
              {
                  'id': 'string',
                  'errorMessage': 'string',
                  'errorCode': 'BAD_REQUEST'|'NOT_FOUND'|'CONFLICT'|'INTERNAL_SERVER_ERROR'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        Returns the list of successful usage line items that were updated for a Workload estimate.

        
        

        - *(dict) --* 

          Represents a usage item in a workload estimate.

          
          

          - **serviceCode** *(string) --* 

            The Amazon Web Services service code associated with this usage item.

            
          

          - **usageType** *(string) --* 

            The type of usage for this item.

            
          

          - **operation** *(string) --* 

            The specific operation associated with this usage item.

            
          

          - **location** *(string) --* 

            The location associated with this usage item.

            
          

          - **id** *(string) --* 

            The unique identifier of this usage item.

            
          

          - **usageAccountId** *(string) --* 

            The Amazon Web Services account ID associated with this usage item.

            
          

          - **group** *(string) --* 

            The group identifier for this usage item.

            
          

          - **quantity** *(dict) --* 

            The estimated usage quantity for this item.

            
            

            - **unit** *(string) --* 

              The unit of measurement for the usage quantity.

              
            

            - **amount** *(float) --* 

              The numeric value of the usage quantity.

              
        
          

          - **cost** *(float) --* 

            The estimated cost for this usage item.

            
          

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

            The currency of the estimated cost.

            
          

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

            The current status of this usage item.

            
          

          - **historicalUsage** *(dict) --* 

            Historical usage data associated with this item, if available.

            
            

            - **serviceCode** *(string) --* 

              The Amazon Web Services service code associated with the usage.

              
            

            - **usageType** *(string) --* 

              The type of usage.

              
            

            - **operation** *(string) --* 

              The specific operation associated with the usage.

              
            

            - **location** *(string) --* 

              The location associated with the usage.

              
            

            - **usageAccountId** *(string) --* 

              The Amazon Web Services account ID associated with the usage.

              
            

            - **billInterval** *(dict) --* 

              The time interval for the historical usage data.

              
              

              - **start** *(datetime) --* 

                The start date and time of the interval.

                
              

              - **end** *(datetime) --* 

                The end date and time of the interval.

                
          
            

            - **filterExpression** *(dict) --* 

              An optional filter expression to apply to the historical usage data.

              
              

              - **and** *(list) --* 

                A list of expressions to be combined with AND logic.

                
                

                - *(dict) --* 

                  Represents a complex filtering expression for cost and usage data.

                  
            
              

              - **or** *(list) --* 

                A list of expressions to be combined with OR logic.

                
                

                - *(dict) --* 

                  Represents a complex filtering expression for cost and usage data.

                  
            
              

              - **not** *(dict) --* 

                An expression to be negated.

                
              

              - **costCategories** *(dict) --* 

                Filters based on cost categories.

                
                

                - **key** *(string) --* 

                  The key or attribute to filter on.

                  
                

                - **matchOptions** *(list) --* 

                  The match options for the filter (e.g., equals, contains).

                  
                  

                  - *(string) --* 
              
                

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

                  The values to match against.

                  
                  

                  - *(string) --* 
              
            
              

              - **dimensions** *(dict) --* 

                Filters based on dimensions (e.g., service, operation).

                
                

                - **key** *(string) --* 

                  The key or attribute to filter on.

                  
                

                - **matchOptions** *(list) --* 

                  The match options for the filter (e.g., equals, contains).

                  
                  

                  - *(string) --* 
              
                

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

                  The values to match against.

                  
                  

                  - *(string) --* 
              
            
              

              - **tags** *(dict) --* 

                Filters based on resource tags.

                
                

                - **key** *(string) --* 

                  The key or attribute to filter on.

                  
                

                - **matchOptions** *(list) --* 

                  The match options for the filter (e.g., equals, contains).

                  
                  

                  - *(string) --* 
              
                

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

                  The values to match against.

                  
                  

                  - *(string) --* 
              
            
          
        
      
    
      

      - **errors** *(list) --* 

        Returns the list of error reasons and usage line item IDs that could not be updated for the Workload estimate.

        
        

        - *(dict) --* 

          Represents an error that occurred when updating usage in a workload estimate.

          
          

          - **id** *(string) --* 

            The ID of the error.

            
          

          - **errorMessage** *(string) --* 

            The message that describes the error.

            
          

          - **errorCode** *(string) --* 

            The code associated with the error.

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

  
  *   :py:class:`BillingandCostManagementPricingCalculator.Client.exceptions.DataUnavailableException`

  
  *   :py:class:`BillingandCostManagementPricingCalculator.Client.exceptions.ServiceQuotaExceededException`

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

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

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

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

  