Class CfnAssetModel
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.iotsitewise.CfnAssetModel
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:03.232Z")
@Stability(Stable)
public class CfnAssetModel
extends CfnResource
implements IInspectable, ITaggable
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 two types of asset models, ASSET_MODEL
or COMPONENT_MODEL
.
- 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.iotsitewise.*; CfnAssetModel cfnAssetModel = CfnAssetModel.Builder.create(this, "MyCfnAssetModel") .assetModelName("assetModelName") // the properties below are optional .assetModelCompositeModels(List.of(AssetModelCompositeModelProperty.builder() .name("name") .type("type") // the properties below are optional .composedAssetModelId("composedAssetModelId") .compositeModelProperties(List.of(AssetModelPropertyProperty.builder() .dataType("dataType") .name("name") .type(PropertyTypeProperty.builder() .typeName("typeName") // the properties below are optional .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") // the properties below are optional .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()) .build()) // the properties below are optional .dataTypeSpec("dataTypeSpec") .externalId("externalId") .id("id") .logicalId("logicalId") .unit("unit") .build())) .description("description") .externalId("externalId") .id("id") .parentAssetModelCompositeModelExternalId("parentAssetModelCompositeModelExternalId") .path(List.of("path")) .build())) .assetModelDescription("assetModelDescription") .assetModelExternalId("assetModelExternalId") .assetModelHierarchies(List.of(AssetModelHierarchyProperty.builder() .childAssetModelId("childAssetModelId") .name("name") // the properties below are optional .externalId("externalId") .id("id") .logicalId("logicalId") .build())) .assetModelProperties(List.of(AssetModelPropertyProperty.builder() .dataType("dataType") .name("name") .type(PropertyTypeProperty.builder() .typeName("typeName") // the properties below are optional .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") // the properties below are optional .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()) .build()) // the properties below are optional .dataTypeSpec("dataTypeSpec") .externalId("externalId") .id("id") .logicalId("logicalId") .unit("unit") .build())) .assetModelType("assetModelType") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Contains information about a composite model in an asset model.static interface
Describes an asset hierarchy that contains a hierarchy's name, ID, and child asset model ID that specifies the type of asset that can be in this hierarchy.static interface
Contains information about an asset model property.static interface
Contains an asset attribute property.static final class
A fluent builder forCfnAssetModel
.static interface
Contains expression variable information.static interface
Contains an asset metric property.static interface
Contains a time interval window used for data aggregate computations (for example, average, sum, count, and so on).static interface
Represents one level between a composite model and the root of the asset model.static interface
Contains a property type, which can be one ofattribute
,measurement
,metric
, ortransform
.static interface
Contains an asset transform property.static interface
Contains a tumbling window, which is a repeating fixed-sized, non-overlapping, and contiguous time window.static interface
Identifies a property value used in an expression.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnAssetModel
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnAssetModel
(software.amazon.jsii.JsiiObjectRef objRef) CfnAssetModel
(software.constructs.Construct scope, String id, CfnAssetModelProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe composite models that are part of this asset model.A description for the asset model.The external ID of the asset model.The hierarchy definitions of the asset model.A unique name for the asset model.The property definitions of the asset model.The type of asset model.The ARN of the asset model, which has the following format.The ID of the asset model.getTags()
Tag Manager which manages the tags for this resource.A list of key-value pairs that contain metadata for the asset.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAssetModelCompositeModels
(List<Object> value) The composite models that are part of this asset model.void
The composite models that are part of this asset model.void
setAssetModelDescription
(String value) A description for the asset model.void
setAssetModelExternalId
(String value) The external ID of the asset model.void
setAssetModelHierarchies
(List<Object> value) The hierarchy definitions of the asset model.void
The hierarchy definitions of the asset model.void
setAssetModelName
(String value) A unique name for the asset model.void
setAssetModelProperties
(List<Object> value) The property definitions of the asset model.void
The property definitions of the asset model.void
setAssetModelType
(String value) The type of asset model.void
setTagsRaw
(List<CfnTag> value) A list of key-value pairs that contain metadata for the asset.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnAssetModel
protected CfnAssetModel(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAssetModel
protected CfnAssetModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAssetModel
@Stability(Stable) public CfnAssetModel(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAssetModelProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrAssetModelArn
The ARN of the asset model, which has the following format. -
getAttrAssetModelId
The ID of the asset model. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getAssetModelName
A unique name for the asset model. -
setAssetModelName
A unique name for the asset model. -
getAssetModelCompositeModels
The composite models that are part of this asset model. -
setAssetModelCompositeModels
The composite models that are part of this asset model. -
setAssetModelCompositeModels
The composite models that are part of this asset model. -
getAssetModelDescription
A description for the asset model. -
setAssetModelDescription
A description for the asset model. -
getAssetModelExternalId
The external ID of the asset model. -
setAssetModelExternalId
The external ID of the asset model. -
getAssetModelHierarchies
The hierarchy definitions of the asset model. -
setAssetModelHierarchies
The hierarchy definitions of the asset model. -
setAssetModelHierarchies
The hierarchy definitions of the asset model. -
getAssetModelProperties
The property definitions of the asset model. -
setAssetModelProperties
The property definitions of the asset model. -
setAssetModelProperties
The property definitions of the asset model. -
getAssetModelType
The type of asset model. -
setAssetModelType
The type of asset model. -
getTagsRaw
A list of key-value pairs that contain metadata for the asset. -
setTagsRaw
A list of key-value pairs that contain metadata for the asset.
-