java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IAction, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:14.388Z") @Stability(Stable) public class EcrSourceAction extends Action
The ECR Repository source CodePipeline Action.

Will trigger the pipeline as soon as the target tag in the repository changes, but only if there is a CloudTrail Trail in the account that captures the ECR event.

Example:

 import software.amazon.awscdk.services.ecr.*;
 Repository ecrRepository;
 Pipeline pipeline = new Pipeline(this, "MyPipeline");
 Artifact sourceOutput = new Artifact();
 EcrSourceAction sourceAction = EcrSourceAction.Builder.create()
         .actionName("ECR")
         .repository(ecrRepository)
         .imageTag("some-tag") // optional, default: 'latest'
         .output(sourceOutput)
         .build();
 pipeline.addStage(StageOptions.builder()
         .stageName("Source")
         .actions(List.of(sourceAction))
         .build());
 
  • Constructor Details

    • EcrSourceAction

      protected EcrSourceAction(software.amazon.jsii.JsiiObjectRef objRef)
    • EcrSourceAction

      protected EcrSourceAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • EcrSourceAction

      @Stability(Stable) public EcrSourceAction(@NotNull EcrSourceActionProps props)
      Parameters:
      props - This parameter is required.
  • Method Details

    • bound

      @Stability(Stable) @NotNull protected ActionConfig bound(@NotNull software.constructs.Construct scope, @NotNull IStage stage, @NotNull ActionBindOptions options)
      This is a renamed version of the IAction.bind method.

      Specified by:
      bound in class Action
      Parameters:
      scope - This parameter is required.
      stage - This parameter is required.
      options - This parameter is required.
    • getVariables

      @Stability(Stable) @NotNull public EcrSourceVariables getVariables()
      The variables emitted by this action.