Skip to content
v2.277.0

DeployCommand Struct ​

Represents a cdk deploy command.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cloud_assembly_schema } from 'aws-cdk-lib';
const deployCommand: cloud_assembly_schema.DeployCommand = {
  args: {
    all: false,
    app: 'app',
    assetMetadata: false,
    caBundlePath: 'caBundlePath',
    changeSetName: 'changeSetName',
    ci: false,
    color: false,
    concurrency: 123,
    context: {
      contextKey: 'context',
    },
    debug: false,
    ec2Creds: false,
    exclusively: false,
    execute: false,
    force: false,
    ignoreErrors: false,
    json: false,
    lookups: false,
    notices: false,
    notificationArns: ['notificationArns'],
    output: 'output',
    outputsFile: 'outputsFile',
    parameters: {
      parametersKey: 'parameters',
    },
    pathMetadata: false,
    profile: 'profile',
    proxy: 'proxy',
    requireApproval: cloud_assembly_schema.RequireApproval.NEVER,
    reuseAssets: ['reuseAssets'],
    roleArn: 'roleArn',
    rollback: false,
    stacks: ['stacks'],
    staging: false,
    strict: false,
    toolkitStackName: 'toolkitStackName',
    trace: false,
    usePreviousParameters: false,
    verbose: false,
    versionReporting: false,
  },
  enabled: false,
  expectedMessage: 'expectedMessage',
  expectError: false,
};
python
from aws_cdk.cloud_assembly_schema import DeployCommand, DeployOptions
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import cloud_assembly_schema

deploy_command = DeployCommand(
    args=DeployOptions(
        all=False,
        app="app",
        asset_metadata=False,
        ca_bundle_path="caBundlePath",
        change_set_name="changeSetName",
        ci=False,
        color=False,
        concurrency=123,
        context={
            "context_key": "context"
        },
        debug=False,
        ec2_creds=False,
        exclusively=False,
        execute=False,
        force=False,
        ignore_errors=False,
        json=False,
        lookups=False,
        notices=False,
        notification_arns=["notificationArns"],
        output="output",
        outputs_file="outputsFile",
        parameters={
            "parameters_key": "parameters"
        },
        path_metadata=False,
        profile="profile",
        proxy="proxy",
        require_approval=cloud_assembly_schema.RequireApproval.NEVER,
        reuse_assets=["reuseAssets"],
        role_arn="roleArn",
        rollback=False,
        stacks=["stacks"],
        staging=False,
        strict=False,
        toolkit_stack_name="toolkitStackName",
        trace=False,
        use_previous_parameters=False,
        verbose=False,
        version_reporting=False
    ),
    enabled=False,
    expected_message="expectedMessage",
    expect_error=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cloud_assembly_schema.*;

DeployCommand deployCommand = DeployCommand.builder()
        .args(DeployOptions.builder()
                .all(false)
                .app("app")
                .assetMetadata(false)
                .caBundlePath("caBundlePath")
                .changeSetName("changeSetName")
                .ci(false)
                .color(false)
                .concurrency(123)
                .context(Map.of(
                        "contextKey", "context"))
                .debug(false)
                .ec2Creds(false)
                .exclusively(false)
                .execute(false)
                .force(false)
                .ignoreErrors(false)
                .json(false)
                .lookups(false)
                .notices(false)
                .notificationArns(List.of("notificationArns"))
                .output("output")
                .outputsFile("outputsFile")
                .parameters(Map.of(
                        "parametersKey", "parameters"))
                .pathMetadata(false)
                .profile("profile")
                .proxy("proxy")
                .requireApproval(RequireApproval.NEVER)
                .reuseAssets(List.of("reuseAssets"))
                .roleArn("roleArn")
                .rollback(false)
                .stacks(List.of("stacks"))
                .staging(false)
                .strict(false)
                .toolkitStackName("toolkitStackName")
                .trace(false)
                .usePreviousParameters(false)
                .verbose(false)
                .versionReporting(false)
                .build())
        .enabled(false)
        .expectedMessage("expectedMessage")
        .expectError(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Cloud_assembly_schema;

var deployCommand = new DeployCommand {
    Args = new DeployOptions {
        All = false,
        App = "app",
        AssetMetadata = false,
        CaBundlePath = "caBundlePath",
        ChangeSetName = "changeSetName",
        Ci = false,
        Color = false,
        Concurrency = 123,
        Context = new Dictionary<string, string> {
            { "contextKey", "context" }
        },
        Debug = false,
        Ec2Creds = false,
        Exclusively = false,
        Execute = false,
        Force = false,
        IgnoreErrors = false,
        Json = false,
        Lookups = false,
        Notices = false,
        NotificationArns = new [] { "notificationArns" },
        Output = "output",
        OutputsFile = "outputsFile",
        Parameters = new Dictionary<string, string> {
            { "parametersKey", "parameters" }
        },
        PathMetadata = false,
        Profile = "profile",
        Proxy = "proxy",
        RequireApproval = RequireApproval.NEVER,
        ReuseAssets = new [] { "reuseAssets" },
        RoleArn = "roleArn",
        Rollback = false,
        Stacks = new [] { "stacks" },
        Staging = false,
        Strict = false,
        ToolkitStackName = "toolkitStackName",
        Trace = false,
        UsePreviousParameters = false,
        Verbose = false,
        VersionReporting = false
    },
    Enabled = false,
    ExpectedMessage = "expectedMessage",
    ExpectError = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

deployCommand := &DeployCommand{
	Args: &DeployOptions{
		All: jsii.Boolean(false),
		App: jsii.String("app"),
		AssetMetadata: jsii.Boolean(false),
		CaBundlePath: jsii.String("caBundlePath"),
		ChangeSetName: jsii.String("changeSetName"),
		Ci: jsii.Boolean(false),
		Color: jsii.Boolean(false),
		Concurrency: jsii.Number(123),
		Context: map[string]*string{
			"contextKey": jsii.String("context"),
		},
		Debug: jsii.Boolean(false),
		Ec2Creds: jsii.Boolean(false),
		Exclusively: jsii.Boolean(false),
		Execute: jsii.Boolean(false),
		Force: jsii.Boolean(false),
		IgnoreErrors: jsii.Boolean(false),
		Json: jsii.Boolean(false),
		Lookups: jsii.Boolean(false),
		Notices: jsii.Boolean(false),
		NotificationArns: []*string{
			jsii.String("notificationArns"),
		},
		Output: jsii.String("output"),
		OutputsFile: jsii.String("outputsFile"),
		Parameters: map[string]*string{
			"parametersKey": jsii.String("parameters"),
		},
		PathMetadata: jsii.Boolean(false),
		Profile: jsii.String("profile"),
		Proxy: jsii.String("proxy"),
		RequireApproval: awscdk.Cloud_assembly_schema.RequireApproval_NEVER,
		ReuseAssets: []*string{
			jsii.String("reuseAssets"),
		},
		RoleArn: jsii.String("roleArn"),
		Rollback: jsii.Boolean(false),
		Stacks: []*string{
			jsii.String("stacks"),
		},
		Staging: jsii.Boolean(false),
		Strict: jsii.Boolean(false),
		ToolkitStackName: jsii.String("toolkitStackName"),
		Trace: jsii.Boolean(false),
		UsePreviousParameters: jsii.Boolean(false),
		Verbose: jsii.Boolean(false),
		VersionReporting: jsii.Boolean(false),
	},
	Enabled: jsii.Boolean(false),
	ExpectedMessage: jsii.String("expectedMessage"),
	ExpectError: jsii.Boolean(false),
}

Properties ​

argsoptionalDeployOptionsargsoptionalDeployOptionsargsoptionalDeployOptionsArgsoptionalDeployOptionsArgsoptionalDeployOptions#
Additional arguments to pass to the command This can be used to test specific CLI functionality.

Default: only default args are used

enabledoptionalbooleanenabledoptionalboolenabledoptionalBooleanEnabledoptionalboolEnabledoptional*bool= true#
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.
expectedMessageoptionalstringexpected_messageoptionalstrexpectedMessageoptionalStringExpectedMessageoptionalstringExpectedMessageoptional*string#
This can be used in combination with `expectedError` to validate that a specific message is returned.

Default: do not validate message

expectErroroptionalbooleanexpect_erroroptionalboolexpectErroroptionalBooleanExpectErroroptionalboolExpectErroroptional*bool= false#
If the runner should expect this command to fail.