ICodePipelineActionFactory

class aws_cdk.pipelines.ICodePipelineActionFactory(*args, **kwds)

Bases: Protocol

Factory for explicit CodePipeline Actions.

If you have specific types of Actions you want to add to a CodePipeline, write a subclass of Step that implements this interface, and add the action or actions you want in the produce method.

There needs to be a level of indirection here, because some aspects of the Action creation need to be controlled by the workflow engine (name and runOrder). All the rest of the properties are controlled by the factory.

Methods

produce_action(stage, *, action_name, artifacts, pipeline, run_order, scope, before_self_mutation=None, code_build_defaults=None, fallback_artifact=None, variables_namespace=None)

Create the desired Action and add it to the pipeline.

Parameters
  • stage (IStage) –

  • action_name (str) – Name the action should get.

  • artifacts (ArtifactMap) – Helper object to translate FileSets to CodePipeline Artifacts.

  • pipeline (CodePipeline) – The pipeline the action is being generated for.

  • run_order (Union[int, float]) – RunOrder the action should get.

  • scope (Construct) – Scope in which to create constructs.

  • before_self_mutation (Optional[bool]) – Whether or not this action is inserted before self mutation. If it is, the action should take care to reflect some part of its own definition in the pipeline action definition, to trigger a restart after self-mutation (if necessary). Default: false

  • code_build_defaults (Union[CodeBuildOptions, Dict[str, Any], None]) – If this action factory creates a CodeBuild step, default options to inherit. Default: - No CodeBuild project defaults

  • fallback_artifact (Optional[Artifact]) – An input artifact that CodeBuild projects that don’t actually need an input artifact can use. CodeBuild Projects MUST have an input artifact in order to be added to the Pipeline. If the Project doesn’t actually care about its input (it can be anything), it can use the Artifact passed here. Default: - A fallback artifact does not exist

  • variables_namespace (Optional[str]) – If this step is producing outputs, the variables namespace assigned to it. Pass this on to the Action you are creating. Default: - Step doesn’t produce any outputs

Return type

CodePipelineActionFactoryResult