notifyTerminateProvisionedProductEngineWorkflowResult method

Future<void> notifyTerminateProvisionedProductEngineWorkflowResult({
  1. required String recordId,
  2. required EngineWorkflowStatus status,
  3. required String workflowToken,
  4. String? failureReason,
  5. String? idempotencyToken,
})

Notifies the result of the terminate engine execution.

May throw InvalidParametersException. May throw ResourceNotFoundException.

Parameter recordId : The identifier of the record.

Parameter status : The status of the terminate engine execution.

Parameter workflowToken : The encrypted contents of the terminate engine execution payload that Service Catalog sends after the Terraform product terminate workflow starts.

Parameter failureReason : The reason why the terminate engine execution failed.

Parameter idempotencyToken : The idempotency token that identifies the terminate engine execution.

Implementation

Future<void> notifyTerminateProvisionedProductEngineWorkflowResult({
  required String recordId,
  required EngineWorkflowStatus status,
  required String workflowToken,
  String? failureReason,
  String? idempotencyToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'AWS242ServiceCatalogService.NotifyTerminateProvisionedProductEngineWorkflowResult'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'RecordId': recordId,
      'Status': status.value,
      'WorkflowToken': workflowToken,
      if (failureReason != null) 'FailureReason': failureReason,
      'IdempotencyToken': idempotencyToken ?? _s.generateIdempotencyToken(),
    },
  );
}