createPipeline method
Future<CreatePipelineOutput>
createPipeline({
- required PipelineDeclaration pipeline,
- List<
Tag> ? tags,
Creates a pipeline.
May throw ValidationException. May throw PipelineNameInUseException. May throw InvalidStageDeclarationException. May throw InvalidActionDeclarationException. May throw InvalidBlockerDeclarationException. May throw InvalidStructureException. May throw LimitExceededException. May throw TooManyTagsException. May throw InvalidTagsException. May throw ConcurrentModificationException.
Parameter pipeline
:
Represents the structure of actions and stages to be performed in the
pipeline.
Parameter tags
:
The tags for the pipeline.
Implementation
Future<CreatePipelineOutput> createPipeline({
required PipelineDeclaration pipeline,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(pipeline, 'pipeline');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodePipeline_20150709.CreatePipeline'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'pipeline': pipeline,
if (tags != null) 'tags': tags,
},
);
return CreatePipelineOutput.fromJson(jsonResponse.body);
}