Class StackOutputReference

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.pipelines.StackOutputReference
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:15.301Z") @Stability(Stable) public class StackOutputReference extends software.amazon.jsii.JsiiObject
A Reference to a Stack Output.

Example:

 public class MyLambdaStep extends Step implements ICodePipelineActionFactory {
     private StackOutputReference stackOutputReference;
     public MyLambdaStep(Function fn, CfnOutput stackOutput) {
         super("MyLambdaStep");
         this.stackOutputReference = StackOutputReference.fromCfnOutput(stackOutput);
     }
     public CodePipelineActionFactoryResult produceAction(IStage stage, ProduceActionOptions options) {
         stage.addAction(LambdaInvokeAction.Builder.create()
                 .actionName(options.getActionName())
                 .runOrder(options.getRunOrder())
                 // Map the reference to the variable name the CDK has generated for you.
                 .userParameters(Map.of("stackOutput", options.stackOutputsMap.toCodePipeline(this.stackOutputReference)))
                 .lambda(this.fn)
                 .build());
         return CodePipelineActionFactoryResult.builder().runOrdersConsumed(1).build();
     }public get consumedStackOutputs(): pipelines.StackOutputReference[] {
         return [this.stackOutputReference];
       }
 }
 
  • Nested Class Summary

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

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

    Constructors
    Modifier
    Constructor
    Description
    protected
    StackOutputReference(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    StackOutputReference(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Create a StackOutputReference that references the given CfnOutput.
    Output name of the producing stack.
    A human-readable description of the producing stack.
    Whether or not this stack output is being produced by the given Stack deployment.

    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

    • StackOutputReference

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

      protected StackOutputReference(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • fromCfnOutput

      @Stability(Stable) @NotNull public static StackOutputReference fromCfnOutput(@NotNull CfnOutput output)
      Create a StackOutputReference that references the given CfnOutput.

      Parameters:
      output - This parameter is required.
    • isProducedBy

      @Stability(Stable) @NotNull public Boolean isProducedBy(@NotNull StackDeployment stack)
      Whether or not this stack output is being produced by the given Stack deployment.

      Parameters:
      stack - This parameter is required.
    • getOutputName

      @Stability(Stable) @NotNull public String getOutputName()
      Output name of the producing stack.
    • getStackDescription

      @Stability(Stable) @NotNull public String getStackDescription()
      A human-readable description of the producing stack.