@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.034Z") @Stability(value=Stable) public class CfnAssetModel extends CfnResource implements IInspectable
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 .
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
.compositeModelProperties(List.of(AssetModelPropertyProperty.builder()
.dataType("dataType")
.logicalId("logicalId")
.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()
.propertyLogicalId("propertyLogicalId")
// the properties below are optional
.hierarchyLogicalId("hierarchyLogicalId")
.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()
.propertyLogicalId("propertyLogicalId")
// the properties below are optional
.hierarchyLogicalId("hierarchyLogicalId")
.build())
.build()))
.build())
.build())
// the properties below are optional
.dataTypeSpec("dataTypeSpec")
.unit("unit")
.build()))
.description("description")
.build()))
.assetModelDescription("assetModelDescription")
.assetModelHierarchies(List.of(AssetModelHierarchyProperty.builder()
.childAssetModelId("childAssetModelId")
.logicalId("logicalId")
.name("name")
.build()))
.assetModelProperties(List.of(AssetModelPropertyProperty.builder()
.dataType("dataType")
.logicalId("logicalId")
.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()
.propertyLogicalId("propertyLogicalId")
// the properties below are optional
.hierarchyLogicalId("hierarchyLogicalId")
.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()
.propertyLogicalId("propertyLogicalId")
// the properties below are optional
.hierarchyLogicalId("hierarchyLogicalId")
.build())
.build()))
.build())
.build())
// the properties below are optional
.dataTypeSpec("dataTypeSpec")
.unit("unit")
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnAssetModel.AssetModelCompositeModelProperty
Contains information about a composite model in an asset model.
|
static interface |
CfnAssetModel.AssetModelHierarchyProperty
Describes an asset hierarchy that contains a hierarchy's name, `LogicalID` , and child asset model ID that specifies the type of asset that can be in this hierarchy.
|
static interface |
CfnAssetModel.AssetModelPropertyProperty
Contains information about an asset model property.
|
static interface |
CfnAssetModel.AttributeProperty
Contains an asset attribute property.
|
static class |
CfnAssetModel.Builder
A fluent builder for
CfnAssetModel. |
static interface |
CfnAssetModel.ExpressionVariableProperty
Contains expression variable information.
|
static interface |
CfnAssetModel.MetricProperty
Contains an asset metric property.
|
static interface |
CfnAssetModel.MetricWindowProperty
Contains a time interval window used for data aggregate computations (for example, average, sum, count, and so on).
|
static interface |
CfnAssetModel.PropertyTypeProperty
Contains a property type, which can be one of `Attribute` , `Measurement` , `Metric` , or `Transform` .
|
static interface |
CfnAssetModel.TransformProperty
Contains an asset transform property.
|
static interface |
CfnAssetModel.TumblingWindowProperty
Contains a tumbling window, which is a repeating fixed-sized, non-overlapping, and contiguous time window.
|
static interface |
CfnAssetModel.VariableValueProperty
Identifies a property value used in an expression.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnAssetModel(software.constructs.Construct scope,
String id,
CfnAssetModelProps props)
Create a new `AWS::IoTSiteWise::AssetModel`.
|
protected |
CfnAssetModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnAssetModel(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAssetModelCompositeModels()
The composite asset models that are part of this asset model.
|
String |
getAssetModelDescription()
A description for the asset model.
|
Object |
getAssetModelHierarchies()
The hierarchy definitions of the asset model.
|
String |
getAssetModelName()
A unique, friendly name for the asset model.
|
Object |
getAssetModelProperties()
The property definitions of the asset model.
|
String |
getAttrAssetModelArn() |
String |
getAttrAssetModelId()
The ID of the asset model.
|
protected Map<String,Object> |
getCfnProperties() |
TagManager |
getTags()
A list of key-value pairs that contain metadata for the asset.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAssetModelCompositeModels(IResolvable value)
The composite asset models that are part of this asset model.
|
void |
setAssetModelCompositeModels(List<Object> value)
The composite asset models that are part of this asset model.
|
void |
setAssetModelDescription(String value)
A description for the asset model.
|
void |
setAssetModelHierarchies(IResolvable value)
The hierarchy definitions of the asset model.
|
void |
setAssetModelHierarchies(List<Object> value)
The hierarchy definitions of the asset model.
|
void |
setAssetModelName(String value)
A unique, friendly name for the asset model.
|
void |
setAssetModelProperties(IResolvable value)
The property definitions of the asset model.
|
void |
setAssetModelProperties(List<Object> value)
The property definitions of the asset model.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnAssetModel(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnAssetModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnAssetModel(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnAssetModelProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrAssetModelArn()
@Stability(value=Stable) @NotNull public String getAttrAssetModelId()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
For more information, see Tagging your AWS IoT SiteWise resources in the AWS IoT SiteWise User Guide .
@Stability(value=Stable) @NotNull public String getAssetModelName()
The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+ .
@Stability(value=Stable)
public void setAssetModelName(@NotNull
String value)
The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+ .
@Stability(value=Stable) @Nullable public Object getAssetModelCompositeModels()
Composite asset models are asset models that contain specific properties. Each composite model has a type that defines the properties that the composite model supports. You can use composite asset models to define alarms on this asset model.
@Stability(value=Stable)
public void setAssetModelCompositeModels(@Nullable
IResolvable value)
Composite asset models are asset models that contain specific properties. Each composite model has a type that defines the properties that the composite model supports. You can use composite asset models to define alarms on this asset model.
@Stability(value=Stable)
public void setAssetModelCompositeModels(@Nullable
List<Object> value)
Composite asset models are asset models that contain specific properties. Each composite model has a type that defines the properties that the composite model supports. You can use composite asset models to define alarms on this asset model.
@Stability(value=Stable) @Nullable public String getAssetModelDescription()
@Stability(value=Stable)
public void setAssetModelDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getAssetModelHierarchies()
Each hierarchy specifies an asset model whose assets can be children of any other assets created from this asset model. For more information, see Defining relationships between assets in the AWS IoT SiteWise User Guide .
You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the AWS IoT SiteWise User Guide .
@Stability(value=Stable)
public void setAssetModelHierarchies(@Nullable
IResolvable value)
Each hierarchy specifies an asset model whose assets can be children of any other assets created from this asset model. For more information, see Defining relationships between assets in the AWS IoT SiteWise User Guide .
You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the AWS IoT SiteWise User Guide .
@Stability(value=Stable)
public void setAssetModelHierarchies(@Nullable
List<Object> value)
Each hierarchy specifies an asset model whose assets can be children of any other assets created from this asset model. For more information, see Defining relationships between assets in the AWS IoT SiteWise User Guide .
You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the AWS IoT SiteWise User Guide .
@Stability(value=Stable) @Nullable public Object getAssetModelProperties()
For more information, see Defining data properties in the AWS IoT SiteWise User Guide .
You can specify up to 200 properties per asset model. For more information, see Quotas in the AWS IoT SiteWise User Guide .
@Stability(value=Stable)
public void setAssetModelProperties(@Nullable
IResolvable value)
For more information, see Defining data properties in the AWS IoT SiteWise User Guide .
You can specify up to 200 properties per asset model. For more information, see Quotas in the AWS IoT SiteWise User Guide .
@Stability(value=Stable)
public void setAssetModelProperties(@Nullable
List<Object> value)
For more information, see Defining data properties in the AWS IoT SiteWise User Guide .
You can specify up to 200 properties per asset model. For more information, see Quotas in the AWS IoT SiteWise User Guide .
Copyright © 2022. All rights reserved.