Show / Hide Table of Contents

Class VariableProps

Properties of pipeline-level variable.

Inheritance
object
VariableProps
Implements
IVariableProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.CodePipeline
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class VariableProps : IVariableProps
Syntax (vb)
Public Class VariableProps Implements IVariableProps
Remarks

ExampleMetadata: infused

Examples
S3SourceAction sourceAction;
            Artifact sourceOutput;
            Bucket deployBucket;


            // Pipeline-level variable
            var variable = new Variable(new VariableProps {
                VariableName = "bucket-var",
                Description = "description",
                DefaultValue = "sample"
            });

            new Pipeline(this, "Pipeline", new PipelineProps {
                PipelineType = PipelineType.V2,
                Variables = new [] { variable },
                Stages = new [] { new StageProps {
                    StageName = "Source",
                    Actions = new [] { sourceAction }
                }, new StageProps {
                    StageName = "Deploy",
                    Actions = new [] {
                        new S3DeployAction(new S3DeployActionProps {
                            ActionName = "DeployAction",
                            // can reference the variables
                            ObjectKey = $"{variable.reference()}.txt",
                            Input = sourceOutput,
                            Bucket = deployBucket
                        }) }
                } }
            });

Synopsis

Constructors

VariableProps()

Properties of pipeline-level variable.

Properties

DefaultValue

The default value of a pipeline-level variable.

Description

The description of a pipeline-level variable.

VariableName

The name of a pipeline-level variable.

Constructors

VariableProps()

Properties of pipeline-level variable.

public VariableProps()
Remarks

ExampleMetadata: infused

Examples
S3SourceAction sourceAction;
            Artifact sourceOutput;
            Bucket deployBucket;


            // Pipeline-level variable
            var variable = new Variable(new VariableProps {
                VariableName = "bucket-var",
                Description = "description",
                DefaultValue = "sample"
            });

            new Pipeline(this, "Pipeline", new PipelineProps {
                PipelineType = PipelineType.V2,
                Variables = new [] { variable },
                Stages = new [] { new StageProps {
                    StageName = "Source",
                    Actions = new [] { sourceAction }
                }, new StageProps {
                    StageName = "Deploy",
                    Actions = new [] {
                        new S3DeployAction(new S3DeployActionProps {
                            ActionName = "DeployAction",
                            // can reference the variables
                            ObjectKey = $"{variable.reference()}.txt",
                            Input = sourceOutput,
                            Bucket = deployBucket
                        }) }
                } }
            });

Properties

DefaultValue

The default value of a pipeline-level variable.

public string? DefaultValue { get; set; }
Property Value

string

Remarks

Default: - No default value.

Description

The description of a pipeline-level variable.

public string? Description { get; set; }
Property Value

string

Remarks

It's used to add additional context about the variable, and not being used at time when pipeline executes.

Default: - No description.

VariableName

The name of a pipeline-level variable.

public string VariableName { get; set; }
Property Value

string

Remarks

ExampleMetadata: infused

Implements

IVariableProps
Back to top Generated by DocFX