Class: AWSCDK::IoTSiteWise::CfnAssetModelProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_site_wise/cfn_asset_model_props.rb

Overview

Properties for defining a CfnAssetModel.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(asset_model_name:, asset_model_composite_models: nil, asset_model_description: nil, asset_model_external_id: nil, asset_model_hierarchies: nil, asset_model_properties: nil, asset_model_type: nil, enforced_asset_model_interface_relationships: nil, tags: nil) ⇒ CfnAssetModelProps

Returns a new instance of CfnAssetModelProps.

Parameters:



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 18

def initialize(asset_model_name:, asset_model_composite_models: nil, asset_model_description: nil, asset_model_external_id: nil, asset_model_hierarchies: nil, asset_model_properties: nil, asset_model_type: nil, enforced_asset_model_interface_relationships: nil, tags: nil)
  @asset_model_name = asset_model_name
  Jsii::Type.check_type(@asset_model_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assetModelName")
  @asset_model_composite_models = asset_model_composite_models
  Jsii::Type.check_type(@asset_model_composite_models, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW90c2l0ZXdpc2UuQ2ZuQXNzZXRNb2RlbC5Bc3NldE1vZGVsQ29tcG9zaXRlTW9kZWxQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "assetModelCompositeModels") unless @asset_model_composite_models.nil?
  @asset_model_description = asset_model_description
  Jsii::Type.check_type(@asset_model_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assetModelDescription") unless @asset_model_description.nil?
  @asset_model_external_id = asset_model_external_id
  Jsii::Type.check_type(@asset_model_external_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assetModelExternalId") unless @asset_model_external_id.nil?
  @asset_model_hierarchies = asset_model_hierarchies
  Jsii::Type.check_type(@asset_model_hierarchies, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW90c2l0ZXdpc2UuQ2ZuQXNzZXRNb2RlbC5Bc3NldE1vZGVsSGllcmFyY2h5UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "assetModelHierarchies") unless @asset_model_hierarchies.nil?
  @asset_model_properties = asset_model_properties
  Jsii::Type.check_type(@asset_model_properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW90c2l0ZXdpc2UuQ2ZuQXNzZXRNb2RlbC5Bc3NldE1vZGVsUHJvcGVydHlQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "assetModelProperties") unless @asset_model_properties.nil?
  @asset_model_type = asset_model_type
  Jsii::Type.check_type(@asset_model_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assetModelType") unless @asset_model_type.nil?
  @enforced_asset_model_interface_relationships = enforced_asset_model_interface_relationships
  Jsii::Type.check_type(@enforced_asset_model_interface_relationships, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW90c2l0ZXdpc2UuQ2ZuQXNzZXRNb2RlbC5FbmZvcmNlZEFzc2V0TW9kZWxJbnRlcmZhY2VSZWxhdGlvbnNoaXBQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "enforcedAssetModelInterfaceRelationships") unless @enforced_asset_model_interface_relationships.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#asset_model_composite_modelsAWSCDK::IResolvable, ... (readonly)

The composite models that are part of this asset model.

It groups properties (such as attributes, measurements, transforms, and metrics) and child composite models that model parts of your industrial equipment. Each composite model has a type that defines the properties that the composite model supports. Use composite models to define alarms on this asset model.

When creating custom composite models, you need to use CreateAssetModelCompositeModel . For more information, see Creating custom composite models (Components) in the AWS IoT SiteWise User Guide .



52
53
54
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 52

def asset_model_composite_models
  @asset_model_composite_models
end

#asset_model_descriptionString? (readonly)

A description for the asset model.



57
58
59
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 57

def asset_model_description
  @asset_model_description
end

#asset_model_external_idString? (readonly)

The external ID of the asset model.

For more information, see Using external IDs in the AWS IoT SiteWise User Guide .



64
65
66
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 64

def asset_model_external_id
  @asset_model_external_id
end

#asset_model_hierarchiesAWSCDK::IResolvable, ... (readonly)

The hierarchy definitions of the asset model.

Each hierarchy specifies an asset model whose assets can be children of any other assets created from this asset model. For more information, see Asset hierarchies 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 .



73
74
75
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 73

def asset_model_hierarchies
  @asset_model_hierarchies
end

#asset_model_nameString (readonly)

A unique name for the asset model.



43
44
45
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 43

def asset_model_name
  @asset_model_name
end

#asset_model_propertiesAWSCDK::IResolvable, ... (readonly)

The property definitions of the asset model.

For more information, see Asset 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 .



82
83
84
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 82

def asset_model_properties
  @asset_model_properties
end

#asset_model_typeString? (readonly)

The type of asset 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.
  • INTERFACE – An interface is a type of model that defines a standard structure that can be applied to different asset models.


91
92
93
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 91

def asset_model_type
  @asset_model_type
end

#enforced_asset_model_interface_relationshipsAWSCDK::IResolvable, ... (readonly)

a list of asset model and interface relationships.



96
97
98
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 96

def enforced_asset_model_interface_relationships
  @enforced_asset_model_interface_relationships
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

A list of key-value pairs that contain metadata for the asset.

For more information, see Tagging your AWS IoT SiteWise resources in the AWS IoT SiteWise User Guide .



103
104
105
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 103

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 105

def self.jsii_properties
  {
    :asset_model_name => "assetModelName",
    :asset_model_composite_models => "assetModelCompositeModels",
    :asset_model_description => "assetModelDescription",
    :asset_model_external_id => "assetModelExternalId",
    :asset_model_hierarchies => "assetModelHierarchies",
    :asset_model_properties => "assetModelProperties",
    :asset_model_type => "assetModelType",
    :enforced_asset_model_interface_relationships => "enforcedAssetModelInterfaceRelationships",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'io_t_site_wise/cfn_asset_model_props.rb', line 119

def to_jsii
  result = {}
  result.merge!({
    "assetModelName" => @asset_model_name,
    "assetModelCompositeModels" => @asset_model_composite_models,
    "assetModelDescription" => @asset_model_description,
    "assetModelExternalId" => @asset_model_external_id,
    "assetModelHierarchies" => @asset_model_hierarchies,
    "assetModelProperties" => @asset_model_properties,
    "assetModelType" => @asset_model_type,
    "enforcedAssetModelInterfaceRelationships" => @enforced_asset_model_interface_relationships,
    "tags" => @tags,
  })
  result.compact
end