Class CfnAssetModelPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.iotsitewise.CfnAssetModelPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:20:00.442Z") @Stability(Stable) public class CfnAssetModelPropsMixin extends Mixin implements software.constructs.IMixin
Creates an asset model from specified property and hierarchy definitions.

You create assets from asset models. With asset models, you can easily create assets of the same type that have standardized definitions. Each asset created from a model inherits the asset model's property and hierarchy definitions. For more information, see Defining asset models in the AWS IoT SiteWise User Guide .

You can create three types of asset models, ASSET_MODEL , COMPONENT_MODEL , or an INTERFACE .

  • ASSET_MODEL – (default) An asset model that you can use to create assets. Can't be included as a component in another asset model.
  • COMPONENT_MODEL – A reusable component that you can include in the composite models of other asset models. You can't create assets directly from this type of asset model.
  • INTERFACE – An interface is a type of model that defines a standard structure that can be applied to different asset models.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.iotsitewise.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnAssetModelPropsMixin cfnAssetModelPropsMixin = CfnAssetModelPropsMixin.Builder.create(CfnAssetModelMixinProps.builder()
         .assetModelCompositeModels(List.of(AssetModelCompositeModelProperty.builder()
                 .composedAssetModelId("composedAssetModelId")
                 .compositeModelProperties(List.of(AssetModelPropertyProperty.builder()
                         .dataType("dataType")
                         .dataTypeSpec("dataTypeSpec")
                         .externalId("externalId")
                         .id("id")
                         .logicalId("logicalId")
                         .name("name")
                         .type(PropertyTypeProperty.builder()
                                 .attribute(AttributeProperty.builder()
                                         .defaultValue("defaultValue")
                                         .build())
                                 .metric(MetricProperty.builder()
                                         .expression("expression")
                                         .variables(List.of(ExpressionVariableProperty.builder()
                                                 .name("name")
                                                 .value(VariableValueProperty.builder()
                                                         .hierarchyExternalId("hierarchyExternalId")
                                                         .hierarchyId("hierarchyId")
                                                         .hierarchyLogicalId("hierarchyLogicalId")
                                                         .propertyExternalId("propertyExternalId")
                                                         .propertyId("propertyId")
                                                         .propertyLogicalId("propertyLogicalId")
                                                         .propertyPath(List.of(PropertyPathDefinitionProperty.builder()
                                                                 .name("name")
                                                                 .build()))
                                                         .build())
                                                 .build()))
                                         .window(MetricWindowProperty.builder()
                                                 .tumbling(TumblingWindowProperty.builder()
                                                         .interval("interval")
                                                         .offset("offset")
                                                         .build())
                                                 .build())
                                         .build())
                                 .transform(TransformProperty.builder()
                                         .expression("expression")
                                         .variables(List.of(ExpressionVariableProperty.builder()
                                                 .name("name")
                                                 .value(VariableValueProperty.builder()
                                                         .hierarchyExternalId("hierarchyExternalId")
                                                         .hierarchyId("hierarchyId")
                                                         .hierarchyLogicalId("hierarchyLogicalId")
                                                         .propertyExternalId("propertyExternalId")
                                                         .propertyId("propertyId")
                                                         .propertyLogicalId("propertyLogicalId")
                                                         .propertyPath(List.of(PropertyPathDefinitionProperty.builder()
                                                                 .name("name")
                                                                 .build()))
                                                         .build())
                                                 .build()))
                                         .build())
                                 .typeName("typeName")
                                 .build())
                         .unit("unit")
                         .build()))
                 .description("description")
                 .externalId("externalId")
                 .id("id")
                 .name("name")
                 .parentAssetModelCompositeModelExternalId("parentAssetModelCompositeModelExternalId")
                 .path(List.of("path"))
                 .type("type")
                 .build()))
         .assetModelDescription("assetModelDescription")
         .assetModelExternalId("assetModelExternalId")
         .assetModelHierarchies(List.of(AssetModelHierarchyProperty.builder()
                 .childAssetModelId("childAssetModelId")
                 .externalId("externalId")
                 .id("id")
                 .logicalId("logicalId")
                 .name("name")
                 .build()))
         .assetModelName("assetModelName")
         .assetModelProperties(List.of(AssetModelPropertyProperty.builder()
                 .dataType("dataType")
                 .dataTypeSpec("dataTypeSpec")
                 .externalId("externalId")
                 .id("id")
                 .logicalId("logicalId")
                 .name("name")
                 .type(PropertyTypeProperty.builder()
                         .attribute(AttributeProperty.builder()
                                 .defaultValue("defaultValue")
                                 .build())
                         .metric(MetricProperty.builder()
                                 .expression("expression")
                                 .variables(List.of(ExpressionVariableProperty.builder()
                                         .name("name")
                                         .value(VariableValueProperty.builder()
                                                 .hierarchyExternalId("hierarchyExternalId")
                                                 .hierarchyId("hierarchyId")
                                                 .hierarchyLogicalId("hierarchyLogicalId")
                                                 .propertyExternalId("propertyExternalId")
                                                 .propertyId("propertyId")
                                                 .propertyLogicalId("propertyLogicalId")
                                                 .propertyPath(List.of(PropertyPathDefinitionProperty.builder()
                                                         .name("name")
                                                         .build()))
                                                 .build())
                                         .build()))
                                 .window(MetricWindowProperty.builder()
                                         .tumbling(TumblingWindowProperty.builder()
                                                 .interval("interval")
                                                 .offset("offset")
                                                 .build())
                                         .build())
                                 .build())
                         .transform(TransformProperty.builder()
                                 .expression("expression")
                                 .variables(List.of(ExpressionVariableProperty.builder()
                                         .name("name")
                                         .value(VariableValueProperty.builder()
                                                 .hierarchyExternalId("hierarchyExternalId")
                                                 .hierarchyId("hierarchyId")
                                                 .hierarchyLogicalId("hierarchyLogicalId")
                                                 .propertyExternalId("propertyExternalId")
                                                 .propertyId("propertyId")
                                                 .propertyLogicalId("propertyLogicalId")
                                                 .propertyPath(List.of(PropertyPathDefinitionProperty.builder()
                                                         .name("name")
                                                         .build()))
                                                 .build())
                                         .build()))
                                 .build())
                         .typeName("typeName")
                         .build())
                 .unit("unit")
                 .build()))
         .assetModelType("assetModelType")
         .enforcedAssetModelInterfaceRelationships(List.of(EnforcedAssetModelInterfaceRelationshipProperty.builder()
                 .interfaceAssetModelId("interfaceAssetModelId")
                 .propertyMappings(List.of(EnforcedAssetModelInterfacePropertyMappingProperty.builder()
                         .assetModelPropertyExternalId("assetModelPropertyExternalId")
                         .assetModelPropertyLogicalId("assetModelPropertyLogicalId")
                         .interfaceAssetModelPropertyExternalId("interfaceAssetModelPropertyExternalId")
                         .build()))
                 .build()))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnAssetModelPropsMixin

      protected CfnAssetModelPropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnAssetModelPropsMixin

      protected CfnAssetModelPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnAssetModelPropsMixin

      @Stability(Stable) public CfnAssetModelPropsMixin(@NotNull CfnAssetModelMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::IoTSiteWise::AssetModel.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnAssetModelPropsMixin

      @Stability(Stable) public CfnAssetModelPropsMixin(@NotNull CfnAssetModelMixinProps props)
      Create a mixin to apply properties to AWS::IoTSiteWise::AssetModel.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnAssetModelMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()