getPipeline method

Future<GetPipelineOutput> getPipeline({
  1. required String name,
  2. int? version,
})

Returns the metadata, structure, stages, and actions of a pipeline. Can be used to return the entire structure of a pipeline in JSON format, which can then be modified and used to update the pipeline structure with UpdatePipeline.

May throw ValidationException. May throw PipelineNotFoundException. May throw PipelineVersionNotFoundException.

Parameter name : The name of the pipeline for which you want to get information. Pipeline names must be unique under an AWS user account.

Parameter version : The version number of the pipeline. If you do not specify a version, defaults to the current version.

Implementation

Future<GetPipelineOutput> getPipeline({
  required String name,
  int? version,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    100,
    isRequired: true,
  );
  _s.validateNumRange(
    'version',
    version,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodePipeline_20150709.GetPipeline'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'name': name,
      if (version != null) 'version': version,
    },
  );

  return GetPipelineOutput.fromJson(jsonResponse.body);
}