Class: AWSCDK::IoTSiteWise::CfnProjectProps

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

Overview

Properties for defining a CfnProject.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(portal_id:, project_name:, asset_ids: nil, project_description: nil, tags: nil) ⇒ CfnProjectProps

Returns a new instance of CfnProjectProps.

Parameters:

  • portal_id (String)

    The ID of the portal in which to create the project.

  • project_name (String)

    A friendly name for the project.

  • asset_ids (Array<String>, nil) (defaults to: nil)

    A list that contains the IDs of each asset associated with the project.

  • project_description (String, nil) (defaults to: nil)

    A description for the project.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

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



14
15
16
17
18
19
20
21
22
23
24
25
# File 'io_t_site_wise/cfn_project_props.rb', line 14

def initialize(portal_id:, project_name:, asset_ids: nil, project_description: nil, tags: nil)
  @portal_id = portal_id
  Jsii::Type.check_type(@portal_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "portalId")
  @project_name = project_name
  Jsii::Type.check_type(@project_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "projectName")
  @asset_ids = asset_ids
  Jsii::Type.check_type(@asset_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "assetIds") unless @asset_ids.nil?
  @project_description = project_description
  Jsii::Type.check_type(@project_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "projectDescription") unless @project_description.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_idsArray<String>? (readonly)

A list that contains the IDs of each asset associated with the project.



41
42
43
# File 'io_t_site_wise/cfn_project_props.rb', line 41

def asset_ids
  @asset_ids
end

#portal_idString (readonly)

The ID of the portal in which to create the project.



31
32
33
# File 'io_t_site_wise/cfn_project_props.rb', line 31

def portal_id
  @portal_id
end

#project_descriptionString? (readonly)

A description for the project.



46
47
48
# File 'io_t_site_wise/cfn_project_props.rb', line 46

def project_description
  @project_description
end

#project_nameString (readonly)

A friendly name for the project.



36
37
38
# File 'io_t_site_wise/cfn_project_props.rb', line 36

def project_name
  @project_name
end

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

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

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



53
54
55
# File 'io_t_site_wise/cfn_project_props.rb', line 53

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



55
56
57
58
59
60
61
62
63
# File 'io_t_site_wise/cfn_project_props.rb', line 55

def self.jsii_properties
  {
    :portal_id => "portalId",
    :project_name => "projectName",
    :asset_ids => "assetIds",
    :project_description => "projectDescription",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



65
66
67
68
69
70
71
72
73
74
75
# File 'io_t_site_wise/cfn_project_props.rb', line 65

def to_jsii
  result = {}
  result.merge!({
    "portalId" => @portal_id,
    "projectName" => @project_name,
    "assetIds" => @asset_ids,
    "projectDescription" => @project_description,
    "tags" => @tags,
  })
  result.compact
end