Skip to content
v2.278.0

CfnCommandProps Struct ​

Properties for defining a CfnCommand.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
const cfnCommandProps: iot.CfnCommandProps = {
  commandId: 'commandId',

  // the properties below are optional
  createdAt: 'createdAt',
  deprecated: false,
  description: 'description',
  displayName: 'displayName',
  lastUpdatedAt: 'lastUpdatedAt',
  mandatoryParameters: [{
    name: 'name',

    // the properties below are optional
    defaultValue: {
      b: false,
      bin: 'bin',
      d: 123,
      i: 123,
      l: 'l',
      s: 's',
      ul: 'ul',
    },
    description: 'description',
    type: 'type',
    value: {
      b: false,
      bin: 'bin',
      d: 123,
      i: 123,
      l: 'l',
      s: 's',
      ul: 'ul',
    },
    valueConditions: [{
      comparisonOperator: 'comparisonOperator',
      operand: {
        number: 'number',
        numberRange: {
          max: 'max',
          min: 'min',
        },
        numbers: ['numbers'],
        string: 'string',
        strings: ['strings'],
      },
    }],
  }],
  namespace: 'namespace',
  payload: {
    content: 'content',
    contentType: 'contentType',
  },
  payloadTemplate: 'payloadTemplate',
  pendingDeletion: false,
  preprocessor: {
    awsJsonSubstitution: {
      outputFormat: 'outputFormat',
    },
  },
  roleArn: 'roleArn',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

cfn_command_props = iot.CfnCommandProps(
    command_id="commandId",

    # the properties below are optional
    created_at="createdAt",
    deprecated=False,
    description="description",
    display_name="displayName",
    last_updated_at="lastUpdatedAt",
    mandatory_parameters=[iot.CfnCommand.CommandParameterProperty(
        name="name",

        # the properties below are optional
        default_value=iot.CfnCommand.CommandParameterValueProperty(
            b=False,
            bin="bin",
            d=123,
            i=123,
            l="l",
            s="s",
            ul="ul"
        ),
        description="description",
        type="type",
        value=iot.CfnCommand.CommandParameterValueProperty(
            b=False,
            bin="bin",
            d=123,
            i=123,
            l="l",
            s="s",
            ul="ul"
        ),
        value_conditions=[iot.CfnCommand.CommandParameterValueConditionProperty(
            comparison_operator="comparisonOperator",
            operand=iot.CfnCommand.CommandParameterValueComparisonOperandProperty(
                number="number",
                number_range=iot.CfnCommand.CommandParameterValueNumberRangeProperty(
                    max="max",
                    min="min"
                ),
                numbers=["numbers"],
                string="string",
                strings=["strings"]
            )
        )]
    )],
    namespace="namespace",
    payload=iot.CfnCommand.CommandPayloadProperty(
        content="content",
        content_type="contentType"
    ),
    payload_template="payloadTemplate",
    pending_deletion=False,
    preprocessor=iot.CfnCommand.CommandPreprocessorProperty(
        aws_json_substitution=iot.CfnCommand.AwsJsonSubstitutionCommandPreprocessorConfigProperty(
            output_format="outputFormat"
        )
    ),
    role_arn="roleArn",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;

CfnCommandProps cfnCommandProps = CfnCommandProps.builder()
        .commandId("commandId")

        // the properties below are optional
        .createdAt("createdAt")
        .deprecated(false)
        .description("description")
        .displayName("displayName")
        .lastUpdatedAt("lastUpdatedAt")
        .mandatoryParameters(List.of(CommandParameterProperty.builder()
                .name("name")

                // the properties below are optional
                .defaultValue(CommandParameterValueProperty.builder()
                        .b(false)
                        .bin("bin")
                        .d(123)
                        .i(123)
                        .l("l")
                        .s("s")
                        .ul("ul")
                        .build())
                .description("description")
                .type("type")
                .value(CommandParameterValueProperty.builder()
                        .b(false)
                        .bin("bin")
                        .d(123)
                        .i(123)
                        .l("l")
                        .s("s")
                        .ul("ul")
                        .build())
                .valueConditions(List.of(CommandParameterValueConditionProperty.builder()
                        .comparisonOperator("comparisonOperator")
                        .operand(CommandParameterValueComparisonOperandProperty.builder()
                                .number("number")
                                .numberRange(CommandParameterValueNumberRangeProperty.builder()
                                        .max("max")
                                        .min("min")
                                        .build())
                                .numbers(List.of("numbers"))
                                .string("string")
                                .strings(List.of("strings"))
                                .build())
                        .build()))
                .build()))
        .namespace("namespace")
        .payload(CommandPayloadProperty.builder()
                .content("content")
                .contentType("contentType")
                .build())
        .payloadTemplate("payloadTemplate")
        .pendingDeletion(false)
        .preprocessor(CommandPreprocessorProperty.builder()
                .awsJsonSubstitution(AwsJsonSubstitutionCommandPreprocessorConfigProperty.builder()
                        .outputFormat("outputFormat")
                        .build())
                .build())
        .roleArn("roleArn")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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.AWS.IoT;

var cfnCommandProps = new CfnCommandProps {
    CommandId = "commandId",

    // the properties below are optional
    CreatedAt = "createdAt",
    Deprecated = false,
    Description = "description",
    DisplayName = "displayName",
    LastUpdatedAt = "lastUpdatedAt",
    MandatoryParameters = new [] { new CommandParameterProperty {
        Name = "name",

        // the properties below are optional
        DefaultValue = new CommandParameterValueProperty {
            B = false,
            Bin = "bin",
            D = 123,
            I = 123,
            L = "l",
            S = "s",
            Ul = "ul"
        },
        Description = "description",
        Type = "type",
        Value = new CommandParameterValueProperty {
            B = false,
            Bin = "bin",
            D = 123,
            I = 123,
            L = "l",
            S = "s",
            Ul = "ul"
        },
        ValueConditions = new [] { new CommandParameterValueConditionProperty {
            ComparisonOperator = "comparisonOperator",
            Operand = new CommandParameterValueComparisonOperandProperty {
                Number = "number",
                NumberRange = new CommandParameterValueNumberRangeProperty {
                    Max = "max",
                    Min = "min"
                },
                Numbers = new [] { "numbers" },
                String = "string",
                Strings = new [] { "strings" }
            }
        } }
    } },
    Namespace = "namespace",
    Payload = new CommandPayloadProperty {
        Content = "content",
        ContentType = "contentType"
    },
    PayloadTemplate = "payloadTemplate",
    PendingDeletion = false,
    Preprocessor = new CommandPreprocessorProperty {
        AwsJsonSubstitution = new AwsJsonSubstitutionCommandPreprocessorConfigProperty {
            OutputFormat = "outputFormat"
        }
    },
    RoleArn = "roleArn",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
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"

cfnCommandProps := &CfnCommandProps{
	CommandId: jsii.String("commandId"),

	// the properties below are optional
	CreatedAt: jsii.String("createdAt"),
	Deprecated: jsii.Boolean(false),
	Description: jsii.String("description"),
	DisplayName: jsii.String("displayName"),
	LastUpdatedAt: jsii.String("lastUpdatedAt"),
	MandatoryParameters: []interface{}{
		&CommandParameterProperty{
			Name: jsii.String("name"),

			// the properties below are optional
			DefaultValue: &CommandParameterValueProperty{
				B: jsii.Boolean(false),
				Bin: jsii.String("bin"),
				D: jsii.Number(123),
				I: jsii.Number(123),
				L: jsii.String("l"),
				S: jsii.String("s"),
				Ul: jsii.String("ul"),
			},
			Description: jsii.String("description"),
			Type: jsii.String("type"),
			Value: &CommandParameterValueProperty{
				B: jsii.Boolean(false),
				Bin: jsii.String("bin"),
				D: jsii.Number(123),
				I: jsii.Number(123),
				L: jsii.String("l"),
				S: jsii.String("s"),
				Ul: jsii.String("ul"),
			},
			ValueConditions: []interface{}{
				&CommandParameterValueConditionProperty{
					ComparisonOperator: jsii.String("comparisonOperator"),
					Operand: &CommandParameterValueComparisonOperandProperty{
						Number: jsii.String("number"),
						NumberRange: &CommandParameterValueNumberRangeProperty{
							Max: jsii.String("max"),
							Min: jsii.String("min"),
						},
						Numbers: []*string{
							jsii.String("numbers"),
						},
						String: jsii.String("string"),
						Strings: []*string{
							jsii.String("strings"),
						},
					},
				},
			},
		},
	},
	Namespace: jsii.String("namespace"),
	Payload: &CommandPayloadProperty{
		Content: jsii.String("content"),
		ContentType: jsii.String("contentType"),
	},
	PayloadTemplate: jsii.String("payloadTemplate"),
	PendingDeletion: jsii.Boolean(false),
	Preprocessor: &CommandPreprocessorProperty{
		AwsJsonSubstitution: &AwsJsonSubstitutionCommandPreprocessorConfigProperty{
			OutputFormat: jsii.String("outputFormat"),
		},
	},
	RoleArn: jsii.String("roleArn"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

commandIdstringcommand_idstrcommandIdStringCommandIdstringCommandId*string required #
The unique identifier of the command.
createdAtoptionalstringcreated_atoptionalstrcreatedAtoptionalStringCreatedAtoptionalstringCreatedAtoptional*string #
The timestamp, when the command was created.
deprecatedoptionalboolean | IResolvabledeprecatedoptionaltyping.Union[bool, IResolvable]deprecatedoptionalBooleanDeprecatedoptionalboolDeprecatedoptionalinterface{} #
Indicates whether the command has been deprecated.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
The description of the command parameter.
displayNameoptionalstringdisplay_nameoptionalstrdisplayNameoptionalStringDisplayNameoptionalstringDisplayNameoptional*string #
The display name of the command.
lastUpdatedAtoptionalstringlast_updated_atoptionalstrlastUpdatedAtoptionalStringLastUpdatedAtoptionalstringLastUpdatedAtoptional*string #
The timestamp, when the command was last updated.
mandatoryParametersoptionalIResolvable | IResolvable | CfnCommand.CommandParameterProperty[]mandatory_parametersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CommandParameterProperty]]]mandatoryParametersoptionalIResolvableMandatoryParametersoptionalIResolvableMandatoryParametersoptionalinterface{} #
namespaceoptionalstringnamespaceoptionalstrnamespaceoptionalStringNamespaceoptionalstringNamespaceoptional*string #
The namespace to which the command belongs.
payloadoptionalIResolvable | CfnCommand.CommandPayloadPropertypayloadoptionaltyping.Union[IResolvable, CommandPayloadProperty]payloadoptionalIResolvablePayloadoptionalIResolvablePayloadoptionalinterface{} #
payloadTemplateoptionalstringpayload_templateoptionalstrpayloadTemplateoptionalStringPayloadTemplateoptionalstringPayloadTemplateoptional*string #
The payload template associated with the command.
pendingDeletionoptionalboolean | IResolvablepending_deletionoptionaltyping.Union[bool, IResolvable]pendingDeletionoptionalBooleanPendingDeletionoptionalboolPendingDeletionoptionalinterface{} #
Indicates whether the command is pending deletion.
preprocessoroptionalIResolvable | CfnCommand.CommandPreprocessorPropertypreprocessoroptionaltyping.Union[IResolvable, CommandPreprocessorProperty]preprocessoroptionalIResolvablePreprocessoroptionalIResolvablePreprocessoroptionalinterface{} #
roleArnoptionalstringrole_arnoptionalstrroleArnoptionalStringRoleArnoptionalstringRoleArnoptional*string #
The customer role associated with the command.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
The tags to be associated with the command.