:doc:`CostExplorer <../../ce>` / Client / start_commitment_purchase_analysis

**********************************
start_commitment_purchase_analysis
**********************************



.. py:method:: CostExplorer.Client.start_commitment_purchase_analysis(**kwargs)

  

  Specifies the parameters of a planned commitment purchase and starts the generation of the analysis. This enables you to estimate the cost, coverage, and utilization impact of your planned commitment purchases.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/StartCommitmentPurchaseAnalysis>`_  


  **Request Syntax**
  ::

    response = client.start_commitment_purchase_analysis(
        CommitmentPurchaseAnalysisConfiguration={
            'SavingsPlansPurchaseAnalysisConfiguration': {
                'AccountScope': 'PAYER'|'LINKED',
                'AccountId': 'string',
                'AnalysisType': 'MAX_SAVINGS'|'CUSTOM_COMMITMENT',
                'SavingsPlansToAdd': [
                    {
                        'PaymentOption': 'NO_UPFRONT'|'PARTIAL_UPFRONT'|'ALL_UPFRONT'|'LIGHT_UTILIZATION'|'MEDIUM_UTILIZATION'|'HEAVY_UTILIZATION',
                        'SavingsPlansType': 'COMPUTE_SP'|'EC2_INSTANCE_SP'|'SAGEMAKER_SP'|'DATABASE_SP',
                        'Region': 'string',
                        'InstanceFamily': 'string',
                        'TermInYears': 'ONE_YEAR'|'THREE_YEARS',
                        'SavingsPlansCommitment': 123.0,
                        'OfferingId': 'string'
                    },
                ],
                'SavingsPlansToExclude': [
                    'string',
                ],
                'LookBackTimePeriod': {
                    'Start': 'string',
                    'End': 'string'
                }
            }
        }
    )
    
  :type CommitmentPurchaseAnalysisConfiguration: dict
  :param CommitmentPurchaseAnalysisConfiguration: **[REQUIRED]** 

    The configuration for the commitment purchase analysis.

    

  
    - **SavingsPlansPurchaseAnalysisConfiguration** *(dict) --* 

      The configuration for the Savings Plans purchase analysis.

      

    
      - **AccountScope** *(string) --* 

        The account scope that you want your analysis for.

        

      
      - **AccountId** *(string) --* 

        The account that the analysis is for.

        

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

        The type of analysis.

        

      
      - **SavingsPlansToAdd** *(list) --* **[REQUIRED]** 

        Savings Plans to include in the analysis.

        

      
        - *(dict) --* 

          The Savings Plans commitment details.

          

        
          - **PaymentOption** *(string) --* 

            The payment option for the Savings Plans commitment.

            

          
          - **SavingsPlansType** *(string) --* 

            The Savings Plans type.

            

          
          - **Region** *(string) --* 

            The Region associated with the Savings Plans commitment.

            

          
          - **InstanceFamily** *(string) --* 

            The instance family of the Savings Plans commitment.

            

          
          - **TermInYears** *(string) --* 

            The term that you want the Savings Plans commitment for.

            

          
          - **SavingsPlansCommitment** *(float) --* 

            The Savings Plans commitment.

            

          
          - **OfferingId** *(string) --* 

            The unique ID that's used to distinguish Savings Plans commitments from one another.

            

          
        
    
      - **SavingsPlansToExclude** *(list) --* 

        Savings Plans to exclude from the analysis.

        

      
        - *(string) --* 

        
    
      - **LookBackTimePeriod** *(dict) --* **[REQUIRED]** 

        The time period associated with the analysis.

        

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

          The beginning of the time period. The start date is inclusive. For example, if ``start`` is ``2017-01-01``, Amazon Web Services retrieves cost and usage data starting at ``2017-01-01`` up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.

          

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

          The end of the time period. The end date is exclusive. For example, if ``end`` is ``2017-05-01``, Amazon Web Services retrieves cost and usage data from the start date up to, but not including, ``2017-05-01``.

          

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

    
    ::

      {
          'AnalysisId': 'string',
          'AnalysisStartedTime': 'string',
          'EstimatedCompletionTime': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **AnalysisId** *(string) --* 

        The analysis ID that's associated with the commitment purchase analysis.

        
      

      - **AnalysisStartedTime** *(string) --* 

        The start time of the analysis.

        
      

      - **EstimatedCompletionTime** *(string) --* 

        The estimated time for when the analysis will complete.

        
  
  **Exceptions**
  
  *   :py:class:`CostExplorer.Client.exceptions.LimitExceededException`

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

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

  
  *   :py:class:`CostExplorer.Client.exceptions.GenerationExistsException`

  