Skip to content

create_pipeline

create_pipeline(
    pipeline: PipelineDeclaration,
    *,
    config_overrides: Optional[CodePipelineClientConfig] = None,
    tags: Optional[TagList] = None,
) -> CreatePipelineOutput

Creates a pipeline.

In the pipeline structure, you must include either artifactStore or artifactStores in your pipeline, but you cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores.

Parameters:

  • pipeline (PipelineDeclaration) –

    Represents the structure of actions and stages to be performed in the pipeline.

  • tags (Optional[TagList], default: None ) –

    The tags for the pipeline.

Raises:

Source code in docs_src/capo_codepipeline/_services/code_pipeline.py
def create_pipeline(
    self,
    pipeline: "capo_codepipeline.types.pipeline_declaration.PipelineDeclaration",
    *,
    config_overrides: Optional[CodePipelineClientConfig] = None,
    tags: Optional["capo_codepipeline.types.tag_list.TagList"] = None,
) -> "capo_codepipeline.types.create_pipeline_output.CreatePipelineOutput":
    """<p>Creates a pipeline.</p> <note> <p>In the pipeline structure, you must include either <code>artifactStore</code> or <code>artifactStores</code> in your pipeline, but you cannot use both. If you create a cross-region action in your pipeline, you must use <code>artifactStores</code>.</p> </note>

    Args:
        pipeline: <p>Represents the structure of actions and stages to be performed in the pipeline. </p>
        tags: <p>The tags for the pipeline.</p>

    Raises:
        capo_codepipeline.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Unable to modify the tag due to a simultaneous update request.</p>
        capo_codepipeline.errors.invalid_action_declaration_exception.InvalidActionDeclarationException: <p>The action declaration was specified in an invalid format.</p>
        capo_codepipeline.errors.invalid_blocker_declaration_exception.InvalidBlockerDeclarationException: <p>Reserved for future use.</p>
        capo_codepipeline.errors.invalid_stage_declaration_exception.InvalidStageDeclarationException: <p>The stage declaration was specified in an invalid format.</p>
        capo_codepipeline.errors.invalid_structure_exception.InvalidStructureException: <p>The structure was specified in an invalid format.</p>
        capo_codepipeline.errors.invalid_tags_exception.InvalidTagsException: <p>The specified resource tags are invalid.</p>
        capo_codepipeline.errors.limit_exceeded_exception.LimitExceededException: <p>The number of pipelines associated with the Amazon Web Services account has exceeded the limit allowed for the account.</p>
        capo_codepipeline.errors.pipeline_name_in_use_exception.PipelineNameInUseException: <p>The specified pipeline name is already in use.</p>
        capo_codepipeline.errors.too_many_tags_exception.TooManyTagsException: <p>The tags limit for a resource has been exceeded.</p>
        capo_codepipeline.errors.validation_exception.ValidationException: <p>The validation was specified in an invalid format.</p>
        capo_codepipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codepipeline.types.create_pipeline_input.CreatePipelineInput]",
    ) -> OperationResponse[
        "capo_codepipeline.types.create_pipeline_output.CreatePipelineOutput"
    ]:
        import capo_codepipeline._operations.code_pipeline_20150709.create_pipeline

        output, http_response = (
            capo_codepipeline._operations.code_pipeline_20150709.create_pipeline.create_pipeline(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePipeline")
    )
    input_: capo_codepipeline.types.create_pipeline_input.CreatePipelineInput = {
        "pipeline": pipeline
    }
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output