executeProvisionedProductPlan method

Future<ExecuteProvisionedProductPlanOutput> executeProvisionedProductPlan({
  1. required String planId,
  2. String? acceptLanguage,
  3. String? idempotencyToken,
})

Provisions or modifies a product based on the resource changes for the specified plan.

May throw InvalidParametersException. May throw ResourceNotFoundException. May throw InvalidStateException.

Parameter planId : The plan identifier.

Parameter acceptLanguage : The language code.

  • en - English (default)
  • jp - Japanese
  • zh - Chinese

Parameter idempotencyToken : A unique identifier that you provide to ensure idempotency. If multiple requests differ only by the idempotency token, the same response is returned for each repeated request.

Implementation

Future<ExecuteProvisionedProductPlanOutput> executeProvisionedProductPlan({
  required String planId,
  String? acceptLanguage,
  String? idempotencyToken,
}) async {
  ArgumentError.checkNotNull(planId, 'planId');
  _s.validateStringLength(
    'planId',
    planId,
    1,
    100,
    isRequired: true,
  );
  _s.validateStringLength(
    'acceptLanguage',
    acceptLanguage,
    0,
    100,
  );
  _s.validateStringLength(
    'idempotencyToken',
    idempotencyToken,
    1,
    128,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'AWS242ServiceCatalogService.ExecuteProvisionedProductPlan'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'PlanId': planId,
      if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
      'IdempotencyToken': idempotencyToken ?? _s.generateIdempotencyToken(),
    },
  );

  return ExecuteProvisionedProductPlanOutput.fromJson(jsonResponse.body);
}