getThirdPartyJobDetails method

Future<GetThirdPartyJobDetailsOutput> getThirdPartyJobDetails({
  1. required String clientToken,
  2. required String jobId,
})

Requests the details of a job for a third party action. Used for partner actions only.

May throw JobNotFoundException. May throw ValidationException. May throw InvalidClientTokenException. May throw InvalidJobException.

Parameter clientToken : The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.

Parameter jobId : The unique system-generated ID used for identifying the job.

Implementation

Future<GetThirdPartyJobDetailsOutput> getThirdPartyJobDetails({
  required String clientToken,
  required String jobId,
}) async {
  ArgumentError.checkNotNull(clientToken, 'clientToken');
  _s.validateStringLength(
    'clientToken',
    clientToken,
    1,
    256,
    isRequired: true,
  );
  ArgumentError.checkNotNull(jobId, 'jobId');
  _s.validateStringLength(
    'jobId',
    jobId,
    1,
    512,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodePipeline_20150709.GetThirdPartyJobDetails'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'clientToken': clientToken,
      'jobId': jobId,
    },
  );

  return GetThirdPartyJobDetailsOutput.fromJson(jsonResponse.body);
}