getPipelineState method

Future<GetPipelineStateOutput> getPipelineState({
  1. required String name,
})

Returns information about the state of a pipeline, including the stages and actions.

May throw ValidationException. May throw PipelineNotFoundException.

Parameter name : The name of the pipeline about which you want to get information.

Implementation

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

  return GetPipelineStateOutput.fromJson(jsonResponse.body);
}