startCommitmentPurchaseAnalysis method

Future<StartCommitmentPurchaseAnalysisResponse> startCommitmentPurchaseAnalysis({
  1. required CommitmentPurchaseAnalysisConfiguration commitmentPurchaseAnalysisConfiguration,
})

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.

May throw DataUnavailableException. May throw GenerationExistsException. May throw LimitExceededException. May throw ServiceQuotaExceededException.

Parameter commitmentPurchaseAnalysisConfiguration : The configuration for the commitment purchase analysis.

Implementation

Future<StartCommitmentPurchaseAnalysisResponse>
    startCommitmentPurchaseAnalysis({
  required CommitmentPurchaseAnalysisConfiguration
      commitmentPurchaseAnalysisConfiguration,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSInsightsIndexService.StartCommitmentPurchaseAnalysis'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'CommitmentPurchaseAnalysisConfiguration':
          commitmentPurchaseAnalysisConfiguration,
    },
  );

  return StartCommitmentPurchaseAnalysisResponse.fromJson(jsonResponse.body);
}