Class VariableProps
Properties of pipeline-level variable.
Inheritance
System.Object
VariableProps
Implements
Namespace: Amazon.CDK.AWS.CodePipeline
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class VariableProps : Object, IVariableProps
Syntax (vb)
Public Class VariableProps
Inherits Object
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
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()
public VariableProps()
Properties
DefaultValue
The default value of a pipeline-level variable.
public string DefaultValue { get; set; }
Property Value
System.String
Remarks
Default: - No default value.
Description
The description of a pipeline-level variable.
public string Description { get; set; }
Property Value
System.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
System.String