Class ArtifactPath

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.codepipeline.ArtifactPath
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:37.875Z") @Stability(Stable) public class ArtifactPath extends software.amazon.jsii.JsiiObject
A specific file within an output artifact.

The most common use case for this is specifying the template file for a CloudFormation action.

Example:

 // Source stage: read from repository
 Repository repo = Repository.Builder.create(stack, "TemplateRepo")
         .repositoryName("template-repo")
         .build();
 Artifact sourceOutput = new Artifact("SourceArtifact");
 CodeCommitSourceAction source = CodeCommitSourceAction.Builder.create()
         .actionName("Source")
         .repository(repo)
         .output(sourceOutput)
         .trigger(CodeCommitTrigger.POLL)
         .build();
 Map<String, Object> sourceStage = Map.of(
         "stageName", "Source",
         "actions", List.of(source));
 // Deployment stage: create and deploy changeset with manual approval
 String stackName = "OurStack";
 String changeSetName = "StagedChangeSet";
 Map<String, Object> prodStage = Map.of(
         "stageName", "Deploy",
         "actions", List.of(
             CloudFormationCreateReplaceChangeSetAction.Builder.create()
                     .actionName("PrepareChanges")
                     .stackName(stackName)
                     .changeSetName(changeSetName)
                     .adminPermissions(true)
                     .templatePath(sourceOutput.atPath("template.yaml"))
                     .runOrder(1)
                     .build(),
             ManualApprovalAction.Builder.create()
                     .actionName("ApproveChanges")
                     .runOrder(2)
                     .build(),
             CloudFormationExecuteChangeSetAction.Builder.create()
                     .actionName("ExecuteChanges")
                     .stackName(stackName)
                     .changeSetName(changeSetName)
                     .runOrder(3)
                     .build()));
 Pipeline.Builder.create(stack, "Pipeline")
         .stages(List.of(sourceStage, prodStage))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    ArtifactPath(Artifact artifact, String fileName)
     
    protected
    ArtifactPath(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    ArtifactPath(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    artifactPath(String artifactName, String fileName)
     
     
     
     

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • ArtifactPath

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

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

      @Stability(Stable) public ArtifactPath(@NotNull Artifact artifact, @NotNull String fileName)
      Parameters:
      artifact - This parameter is required.
      fileName - This parameter is required.
  • Method Details

    • artifactPath

      @Stability(Stable) @NotNull public static ArtifactPath artifactPath(@NotNull String artifactName, @NotNull String fileName)
      Parameters:
      artifactName - This parameter is required.
      fileName - This parameter is required.
    • getArtifact

      @Stability(Stable) @NotNull public Artifact getArtifact()
    • getFileName

      @Stability(Stable) @NotNull public String getFileName()
    • getLocation

      @Stability(Stable) @NotNull public String getLocation()