Skip to content
v2.278.0

CfnThingTypeProps Struct ​

Properties for defining a CfnThingType.

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 cfnThingTypeProps: iot.CfnThingTypeProps = {
  deprecateThingType: false,
  tags: [{
    key: 'key',
    value: 'value',
  }],
  thingTypeName: 'thingTypeName',
  thingTypeProperties: {
    mqtt5Configuration: {
      propagatingAttributes: [{
        userPropertyKey: 'userPropertyKey',

        // the properties below are optional
        connectionAttribute: 'connectionAttribute',
        thingAttribute: 'thingAttribute',
      }],
    },
    searchableAttributes: ['searchableAttributes'],
    thingTypeDescription: 'thingTypeDescription',
  },
};
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_thing_type_props = iot.CfnThingTypeProps(
    deprecate_thing_type=False,
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    thing_type_name="thingTypeName",
    thing_type_properties=iot.CfnThingType.ThingTypePropertiesProperty(
        mqtt5_configuration=iot.CfnThingType.Mqtt5ConfigurationProperty(
            propagating_attributes=[iot.CfnThingType.PropagatingAttributeProperty(
                user_property_key="userPropertyKey",

                # the properties below are optional
                connection_attribute="connectionAttribute",
                thing_attribute="thingAttribute"
            )]
        ),
        searchable_attributes=["searchableAttributes"],
        thing_type_description="thingTypeDescription"
    )
)
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.*;

CfnThingTypeProps cfnThingTypeProps = CfnThingTypeProps.builder()
        .deprecateThingType(false)
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .thingTypeName("thingTypeName")
        .thingTypeProperties(ThingTypePropertiesProperty.builder()
                .mqtt5Configuration(Mqtt5ConfigurationProperty.builder()
                        .propagatingAttributes(List.of(PropagatingAttributeProperty.builder()
                                .userPropertyKey("userPropertyKey")

                                // the properties below are optional
                                .connectionAttribute("connectionAttribute")
                                .thingAttribute("thingAttribute")
                                .build()))
                        .build())
                .searchableAttributes(List.of("searchableAttributes"))
                .thingTypeDescription("thingTypeDescription")
                .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 cfnThingTypeProps = new CfnThingTypeProps {
    DeprecateThingType = false,
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    ThingTypeName = "thingTypeName",
    ThingTypeProperties = new ThingTypePropertiesProperty {
        Mqtt5Configuration = new Mqtt5ConfigurationProperty {
            PropagatingAttributes = new [] { new PropagatingAttributeProperty {
                UserPropertyKey = "userPropertyKey",

                // the properties below are optional
                ConnectionAttribute = "connectionAttribute",
                ThingAttribute = "thingAttribute"
            } }
        },
        SearchableAttributes = new [] { "searchableAttributes" },
        ThingTypeDescription = "thingTypeDescription"
    }
};
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"

cfnThingTypeProps := &CfnThingTypeProps{
	DeprecateThingType: jsii.Boolean(false),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	ThingTypeName: jsii.String("thingTypeName"),
	ThingTypeProperties: &ThingTypePropertiesProperty{
		Mqtt5Configuration: &Mqtt5ConfigurationProperty{
			PropagatingAttributes: []interface{}{
				&PropagatingAttributeProperty{
					UserPropertyKey: jsii.String("userPropertyKey"),

					// the properties below are optional
					ConnectionAttribute: jsii.String("connectionAttribute"),
					ThingAttribute: jsii.String("thingAttribute"),
				},
			},
		},
		SearchableAttributes: []*string{
			jsii.String("searchableAttributes"),
		},
		ThingTypeDescription: jsii.String("thingTypeDescription"),
	},
}

Properties ​

deprecateThingTypeoptionalboolean | IResolvabledeprecate_thing_typeoptionaltyping.Union[bool, IResolvable]deprecateThingTypeoptionalBooleanDeprecateThingTypeoptionalboolDeprecateThingTypeoptionalinterface{} #
Deprecates a thing type. You can not associate new things with deprecated thing type.

Requires permission to access the DeprecateThingType action.

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
Metadata which can be used to manage the thing type.
thingTypeNameoptionalstringthing_type_nameoptionalstrthingTypeNameoptionalStringThingTypeNameoptionalstringThingTypeNameoptional*string #
The name of the thing type.
thingTypePropertiesoptionalIResolvable | CfnThingType.ThingTypePropertiesPropertything_type_propertiesoptionaltyping.Union[IResolvable, ThingTypePropertiesProperty]thingTypePropertiesoptionalIResolvableThingTypePropertiesoptionalIResolvableThingTypePropertiesoptionalinterface{} #
The thing type properties for the thing type to create.

It contains information about the new thing type including a description, a list of searchable thing attribute names, and a list of propagating attributes. After a thing type is created, you can only update Mqtt5Configuration .