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

**************************************************
batch_update_bill_scenario_commitment_modification
**************************************************



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

  

  Update a newly added or existing commitment. You can update the commitment group based on a commitment ID and a Bill scenario ID.

   

  .. note::

    

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

    

  

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


  **Request Syntax**
  ::

    response = client.batch_update_bill_scenario_commitment_modification(
        billScenarioId='string',
        commitmentModifications=[
            {
                'id': 'string',
                'group': 'string'
            },
        ]
    )
    
  :type billScenarioId: string
  :param billScenarioId: **[REQUIRED]** 

    The ID of the Bill Scenario for which you want to modify the commitment group of a modeled commitment.

    

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

    List of commitments that you want to update in a Bill Scenario.

    

  
    - *(dict) --* 

      Represents an entry in a batch operation to update bill scenario commitment modifications.

      

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

        The unique identifier of the commitment modification to update.

        

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

        The updated group identifier for the commitment modification.

        

      
    

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

    
    ::

      {
          'items': [
              {
                  'id': 'string',
                  'usageAccountId': 'string',
                  'group': 'string',
                  'commitmentAction': {
                      'addReservedInstanceAction': {
                          'reservedInstancesOfferingId': 'string',
                          'instanceCount': 123
                      },
                      'addSavingsPlanAction': {
                          'savingsPlanOfferingId': 'string',
                          'commitment': 123.0
                      },
                      'negateReservedInstanceAction': {
                          'reservedInstancesId': 'string'
                      },
                      'negateSavingsPlanAction': {
                          'savingsPlanId': 'string'
                      }
                  }
              },
          ],
          'errors': [
              {
                  'id': 'string',
                  'errorCode': 'BAD_REQUEST'|'NOT_FOUND'|'CONFLICT'|'INTERNAL_SERVER_ERROR',
                  'errorMessage': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        Returns the list of successful commitment line items that were updated for a Bill Scenario.

        
        

        - *(dict) --* 

          Represents a commitment modification item in a bill scenario.

          
          

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

            The unique identifier of the commitment modification.

            
          

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

            The Amazon Web Services account ID associated with this commitment modification.

            
          

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

            The group identifier for the commitment modification.

            
          

          - **commitmentAction** *(dict) --* 

            The specific commitment action taken in this modification.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``addReservedInstanceAction``, ``addSavingsPlanAction``, ``negateReservedInstanceAction``, ``negateSavingsPlanAction``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **addReservedInstanceAction** *(dict) --* 

              Action to add a Reserved Instance to the scenario.

              
              

              - **reservedInstancesOfferingId** *(string) --* 

                The ID of the Reserved Instance offering to add. For more information, see `DescribeReservedInstancesOfferings <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeReservedInstancesOfferings.html>`__.

                
              

              - **instanceCount** *(integer) --* 

                The number of instances to add for this Reserved Instance offering.

                
          
            

            - **addSavingsPlanAction** *(dict) --* 

              Action to add a Savings Plan to the scenario.

              
              

              - **savingsPlanOfferingId** *(string) --* 

                The ID of the Savings Plan offering to add. For more information, see `DescribeSavingsPlansOfferings <https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DescribeSavingsPlansOfferings.html>`__.

                
              

              - **commitment** *(float) --* 

                The hourly commitment, in the same currency of the ``savingsPlanOfferingId``. This is a value between 0.001 and 1 million. You cannot specify more than five digits after the decimal point.

                
          
            

            - **negateReservedInstanceAction** *(dict) --* 

              Action to remove a Reserved Instance from the scenario.

              
              

              - **reservedInstancesId** *(string) --* 

                The ID of the Reserved Instance to remove.

                
          
            

            - **negateSavingsPlanAction** *(dict) --* 

              Action to remove a Savings Plan from the scenario.

              
              

              - **savingsPlanId** *(string) --* 

                The ID of the Savings Plan to remove.

                
          
        
      
    
      

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

        Returns the list of error reasons and commitment line item IDs that could not be updated for the Bill Scenario.

        
        

        - *(dict) --* 

          Represents an error that occurred when updating a commitment in a Bill Scenario.

          
          

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

            The ID of the error.

            
          

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

            The code associated with the error.

            
          

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

            The message that describes the error.

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

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

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

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

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

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

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

  