Class PipelineProps.Builder

java.lang.Object
software.amazon.awscdk.services.codepipeline.PipelineProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<PipelineProps>
Enclosing interface:
PipelineProps

@Stability(Stable) public static final class PipelineProps.Builder extends Object implements software.amazon.jsii.Builder<PipelineProps>
A builder for PipelineProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • artifactBucket

      @Stability(Stable) public PipelineProps.Builder artifactBucket(IBucket artifactBucket)
      Parameters:
      artifactBucket - The S3 bucket used by this Pipeline to store artifacts.
      Returns:
      this
    • crossAccountKeys

      @Stability(Stable) public PipelineProps.Builder crossAccountKeys(Boolean crossAccountKeys)
      Parameters:
      crossAccountKeys - Create KMS keys for cross-account deployments. This controls whether the pipeline is enabled for cross-account deployments.

      By default cross-account deployments are enabled, but this feature requires that KMS Customer Master Keys are created which have a cost of $1/month.

      If you do not need cross-account deployments, you can set this to false to not create those keys and save on that cost (the artifact bucket will be encrypted with an AWS-managed key). However, cross-account deployments will no longer be possible.

      Returns:
      this
    • crossRegionReplicationBuckets

      @Stability(Stable) public PipelineProps.Builder crossRegionReplicationBuckets(Map<String,? extends IBucket> crossRegionReplicationBuckets)
      Parameters:
      crossRegionReplicationBuckets - A map of region to S3 bucket name used for cross-region CodePipeline. For every Action that you specify targeting a different region than the Pipeline itself, if you don't provide an explicit Bucket for that region using this property, the construct will automatically create a Stack containing an S3 Bucket in that region.
      Returns:
      this
    • enableKeyRotation

      @Stability(Stable) public PipelineProps.Builder enableKeyRotation(Boolean enableKeyRotation)
      Parameters:
      enableKeyRotation - Enable KMS key rotation for the generated KMS keys. By default KMS key rotation is disabled, but will add an additional $1/month for each year the key exists when enabled.
      Returns:
      this
    • executionMode

      @Stability(Stable) public PipelineProps.Builder executionMode(ExecutionMode executionMode)
      Parameters:
      executionMode - The method that the pipeline will use to handle multiple executions.
      Returns:
      this
    • pipelineName

      @Stability(Stable) public PipelineProps.Builder pipelineName(String pipelineName)
      Parameters:
      pipelineName - Name of the pipeline.
      Returns:
      this
    • pipelineType

      @Stability(Stable) public PipelineProps.Builder pipelineType(PipelineType pipelineType)
      Parameters:
      pipelineType - Type of the pipeline.
      Returns:
      this
    • restartExecutionOnUpdate

      @Stability(Stable) public PipelineProps.Builder restartExecutionOnUpdate(Boolean restartExecutionOnUpdate)
      Parameters:
      restartExecutionOnUpdate - Indicates whether to rerun the AWS CodePipeline pipeline after you update it.
      Returns:
      this
    • reuseCrossRegionSupportStacks

      @Stability(Stable) public PipelineProps.Builder reuseCrossRegionSupportStacks(Boolean reuseCrossRegionSupportStacks)
      Parameters:
      reuseCrossRegionSupportStacks - Reuse the same cross region support stack for all pipelines in the App.
      Returns:
      this
    • role

      @Stability(Stable) public PipelineProps.Builder role(IRole role)
      Sets the value of PipelineProps.getRole()
      Parameters:
      role - The IAM role to be assumed by this Pipeline.
      Returns:
      this
    • stages

      @Stability(Stable) public PipelineProps.Builder stages(List<? extends StageProps> stages)
      Sets the value of PipelineProps.getStages()
      Parameters:
      stages - The list of Stages, in order, to create this Pipeline with. You can always add more Stages later by calling Pipeline#addStage.
      Returns:
      this
    • triggers

      @Stability(Stable) public PipelineProps.Builder triggers(List<? extends TriggerProps> triggers)
      Sets the value of PipelineProps.getTriggers()
      Parameters:
      triggers - The trigger configuration specifying a type of event, such as Git tags, that starts the pipeline. When a trigger configuration is specified, default change detection for repository and branch commits is disabled.

      triggers can only be used when pipelineType is set to PipelineType.V2. You can always add more triggers later by calling Pipeline#addTrigger.

      Returns:
      this
    • variables

      @Stability(Stable) public PipelineProps.Builder variables(List<? extends Variable> variables)
      Parameters:
      variables - A list that defines the pipeline variables for a pipeline resource. variables can only be used when pipelineType is set to PipelineType.V2. You can always add more variables later by calling Pipeline#addVariable.
      Returns:
      this
    • build

      @Stability(Stable) public PipelineProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<PipelineProps>
      Returns:
      a new instance of PipelineProps
      Throws:
      NullPointerException - if any required attribute was not provided