startAutomationJob method

Future<StartAutomationJobResponse> startAutomationJob({
  1. required String automationGroupId,
  2. required String automationId,
  3. required String awsAccountId,
  4. String? inputPayload,
})

Starts a new job for a specified automation. The job runs the automation with the provided input payload.

May throw AccessDeniedException. May throw InternalFailureException. May throw InvalidParameterValueException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter automationGroupId : The ID of the automation group that contains the automation to run.

Parameter automationId : The ID of the automation to run.

Parameter awsAccountId : The ID of the Amazon Web Services account that contains the automation.

Parameter inputPayload : The input payload for the automation job, provided as a JSON string.

Implementation

Future<StartAutomationJobResponse> startAutomationJob({
  required String automationGroupId,
  required String automationId,
  required String awsAccountId,
  String? inputPayload,
}) async {
  final $payload = <String, dynamic>{
    if (inputPayload != null) 'InputPayload': inputPayload,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/automation-groups/${Uri.encodeComponent(automationGroupId)}/automations/${Uri.encodeComponent(automationId)}/jobs',
    exceptionFnMap: _exceptionFns,
  );
  return StartAutomationJobResponse.fromJson(response);
}