Class: AWSCDK::IoTSiteWise::CfnAssetProps

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

Overview

Properties for defining a CfnAsset.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(asset_model_id:, asset_name:, asset_description: nil, asset_external_id: nil, asset_hierarchies: nil, asset_properties: nil, tags: nil) ⇒ CfnAssetProps

Returns a new instance of CfnAssetProps.

Parameters:



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'io_t_site_wise/cfn_asset_props.rb', line 16

def initialize(asset_model_id:, asset_name:, asset_description: nil, asset_external_id: nil, asset_hierarchies: nil, asset_properties: nil, tags: nil)
  @asset_model_id = asset_model_id
  Jsii::Type.check_type(@asset_model_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pb3RzaXRld2lzZS5JQXNzZXRNb2RlbFJlZiJ9XX19")), "assetModelId")
  @asset_name = asset_name
  Jsii::Type.check_type(@asset_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assetName")
  @asset_description = asset_description
  Jsii::Type.check_type(@asset_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assetDescription") unless @asset_description.nil?
  @asset_external_id = asset_external_id
  Jsii::Type.check_type(@asset_external_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assetExternalId") unless @asset_external_id.nil?
  @asset_hierarchies = asset_hierarchies
  Jsii::Type.check_type(@asset_hierarchies, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW90c2l0ZXdpc2UuQ2ZuQXNzZXQuQXNzZXRIaWVyYXJjaHlQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "assetHierarchies") unless @asset_hierarchies.nil?
  @asset_properties = asset_properties
  Jsii::Type.check_type(@asset_properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW90c2l0ZXdpc2UuQ2ZuQXNzZXQuQXNzZXRQcm9wZXJ0eVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "assetProperties") unless @asset_properties.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_descriptionString? (readonly)

The ID of the asset, in UUID format.



49
50
51
# File 'io_t_site_wise/cfn_asset_props.rb', line 49

def asset_description
  @asset_description
end

#asset_external_idString? (readonly)

The external ID of the asset model composite model.

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



56
57
58
# File 'io_t_site_wise/cfn_asset_props.rb', line 56

def asset_external_id
  @asset_external_id
end

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

A list of asset hierarchies that each contain a hierarchyId .

A hierarchy specifies allowed parent/child asset relationships.



63
64
65
# File 'io_t_site_wise/cfn_asset_props.rb', line 63

def asset_hierarchies
  @asset_hierarchies
end

#asset_model_idString, AWSCDK::Interfaces::AWSIotsitewise::IAssetModelRef (readonly)

The ID of the asset model from which to create the asset.

This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one. For more information, see Referencing objects with external IDs in the AWS IoT SiteWise User Guide .



39
40
41
# File 'io_t_site_wise/cfn_asset_props.rb', line 39

def asset_model_id
  @asset_model_id
end

#asset_nameString (readonly)

A friendly name for the asset.



44
45
46
# File 'io_t_site_wise/cfn_asset_props.rb', line 44

def asset_name
  @asset_name
end

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

The list of asset properties for the asset.

This object doesn't include properties that you define in composite models. You can find composite model properties in the asset_composite_models object.



70
71
72
# File 'io_t_site_wise/cfn_asset_props.rb', line 70

def asset_properties
  @asset_properties
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 .



77
78
79
# File 'io_t_site_wise/cfn_asset_props.rb', line 77

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



79
80
81
82
83
84
85
86
87
88
89
# File 'io_t_site_wise/cfn_asset_props.rb', line 79

def self.jsii_properties
  {
    :asset_model_id => "assetModelId",
    :asset_name => "assetName",
    :asset_description => "assetDescription",
    :asset_external_id => "assetExternalId",
    :asset_hierarchies => "assetHierarchies",
    :asset_properties => "assetProperties",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'io_t_site_wise/cfn_asset_props.rb', line 91

def to_jsii
  result = {}
  result.merge!({
    "assetModelId" => @asset_model_id,
    "assetName" => @asset_name,
    "assetDescription" => @asset_description,
    "assetExternalId" => @asset_external_id,
    "assetHierarchies" => @asset_hierarchies,
    "assetProperties" => @asset_properties,
    "tags" => @tags,
  })
  result.compact
end