Class DeployCommand
Represents a cdk deploy command.
Inheritance
Namespace: Amazon.CDK.CloudAssembly.Schema
Assembly: Amazon.CDK.CloudAssembly.Schema.dll
Syntax (csharp)
public class DeployCommand : Object, IDeployCommand, ICdkCommand
Syntax (vb)
Public Class DeployCommand
Inherits Object
Implements IDeployCommand, ICdkCommand
Remarks
ExampleMetadata: infused
Examples
var app = new App();
var stackUnderTest = new Stack(app, "StackUnderTest");
var stack = new Stack(app, "stack");
var testCase = new IntegTest(app, "CustomizedDeploymentWorkflow", new IntegTestProps {
TestCases = new [] { stackUnderTest },
DiffAssets = true,
StackUpdateWorkflow = true,
CdkCommandOptions = new CdkCommands {
Deploy = new DeployCommand {
Args = new DeployOptions {
RequireApproval = RequireApproval.NEVER,
Json = true
}
},
Destroy = new DestroyCommand {
Args = new DestroyOptions {
Force = true
}
}
}
});
Synopsis
Constructors
DeployCommand() |
Properties
Args | Additional arguments to pass to the command This can be used to test specific CLI functionality. |
Enabled | Whether or not to run this command as part of the workflow This can be used if you only want to test some of the workflow for example enable |
ExpectedMessage | This can be used in combination with |
ExpectError | If the runner should expect this command to fail. |
Constructors
DeployCommand()
public DeployCommand()
Properties
Args
Additional arguments to pass to the command This can be used to test specific CLI functionality.
public IDeployOptions Args { get; set; }
Property Value
Remarks
Default: - only default args are used
Enabled
Whether or not to run this command as part of the workflow This can be used if you only want to test some of the workflow for example enable synth
and disable deploy
& destroy
in order to limit the test to synthesis.
public Nullable<bool> Enabled { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
ExpectedMessage
This can be used in combination with expectedError
to validate that a specific message is returned.
public string ExpectedMessage { get; set; }
Property Value
System.String
Remarks
Default: - do not validate message
ExpectError
If the runner should expect this command to fail.
public Nullable<bool> ExpectError { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false