Class StackOutputReference
A Reference to a Stack Output.
Inheritance
Namespace: Amazon.CDK.Pipelines
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class StackOutputReference : DeputyBase
Syntax (vb)
Public Class StackOutputReference
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
class MyLambdaStep : Step, ICodePipelineActionFactory
{
private StackOutputReference stackOutputReference;
public MyLambdaStep(Function fn, CfnOutput stackOutput) : base("MyLambdaStep")
{
stackOutputReference = StackOutputReference.FromCfnOutput(stackOutput);
}
public CodePipelineActionFactoryResult ProduceAction(IStage stage, ProduceActionOptions options)
{
stage.AddAction(new LambdaInvokeAction(new LambdaInvokeActionProps {
ActionName = options.ActionName,
RunOrder = options.RunOrder,
// Map the reference to the variable name the CDK has generated for you.
UserParameters = new Dictionary<string, object> { { "stackOutput", options.StackOutputsMap.ToCodePipeline(stackOutputReference) } },
Lambda = Fn
}));
return new CodePipelineActionFactoryResult { RunOrdersConsumed = 1 };
}public get consumedStackOutputs(): pipelines.StackOutputReference[] {
return [this.stackOutputReference];
}
}
Synopsis
Constructors
StackOutputReference(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
StackOutputReference(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
OutputName | Output name of the producing stack. |
StackDescription | A human-readable description of the producing stack. |
Methods
FromCfnOutput(CfnOutput) | Create a StackOutputReference that references the given CfnOutput. |
IsProducedBy(StackDeployment) | Whether or not this stack output is being produced by the given Stack deployment. |
Constructors
StackOutputReference(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected StackOutputReference(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
StackOutputReference(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected StackOutputReference(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
OutputName
Output name of the producing stack.
public virtual string OutputName { get; }
Property Value
System.String
StackDescription
A human-readable description of the producing stack.
public virtual string StackDescription { get; }
Property Value
System.String
Methods
FromCfnOutput(CfnOutput)
Create a StackOutputReference that references the given CfnOutput.
public static StackOutputReference FromCfnOutput(CfnOutput output)
Parameters
- output CfnOutput
Returns
IsProducedBy(StackDeployment)
Whether or not this stack output is being produced by the given Stack deployment.
public virtual bool IsProducedBy(StackDeployment stack)
Parameters
- stack StackDeployment
Returns
System.Boolean