@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:37.045Z") 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.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnAssetModel(Construct scope,
java.lang.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 |
---|---|
java.lang.Object |
getAssetModelCompositeModels()
The composite asset models that are part of this asset model.
|
java.lang.String |
getAssetModelDescription()
A description for the asset model.
|
java.lang.Object |
getAssetModelHierarchies()
The hierarchy definitions of the asset model.
|
java.lang.String |
getAssetModelName()
A unique, friendly name for the asset model.
|
java.lang.Object |
getAssetModelProperties()
The property definitions of the asset model.
|
java.lang.String |
getAttrAssetModelArn() |
java.lang.String |
getAttrAssetModelId()
The ID of the asset model.
|
protected java.util.Map<java.lang.String,java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAssetModelCompositeModels(IResolvable value)
The composite asset models that are part of this asset model.
|
void |
setAssetModelCompositeModels(java.util.List<java.lang.Object> value)
The composite asset models that are part of this asset model.
|
void |
setAssetModelDescription(java.lang.String value)
A description for the asset model.
|
void |
setAssetModelHierarchies(IResolvable value)
The hierarchy definitions of the asset model.
|
void |
setAssetModelHierarchies(java.util.List<java.lang.Object> value)
The hierarchy definitions of the asset model.
|
void |
setAssetModelName(java.lang.String value)
A unique, friendly name for the asset model.
|
void |
setAssetModelProperties(IResolvable value)
The property definitions of the asset model.
|
void |
setAssetModelProperties(java.util.List<java.lang.Object> value)
The property definitions of the asset model.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnAssetModel(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnAssetModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnAssetModel(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrAssetModelArn()
public java.lang.String getAttrAssetModelId()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
For more information, see Tagging your AWS IoT SiteWise resources in the AWS IoT SiteWise User Guide .
public java.lang.String getAssetModelName()
The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+
.
public void setAssetModelName(java.lang.String value)
The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+
.
public java.lang.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.
public void setAssetModelCompositeModels(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.
public void setAssetModelCompositeModels(java.util.List<java.lang.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.
public java.lang.String getAssetModelDescription()
public void setAssetModelDescription(java.lang.String value)
public java.lang.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 .
public void setAssetModelHierarchies(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 .
public void setAssetModelHierarchies(java.util.List<java.lang.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 .
public java.lang.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 .
public void setAssetModelProperties(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 .
public void setAssetModelProperties(java.util.List<java.lang.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 .