Class: AWSCDK::IoT::CfnThingPrincipalAttachmentProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_thing_principal_attachment_props.rb

Overview

Properties for defining a CfnThingPrincipalAttachment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(principal:, thing_name:, thing_principal_type: nil) ⇒ CfnThingPrincipalAttachmentProps

Returns a new instance of CfnThingPrincipalAttachmentProps.

Parameters:

  • principal (String)

    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.

  • thing_name (String)

    The name of the AWS IoT thing.

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


12
13
14
15
16
17
18
19
# File 'io_t/cfn_thing_principal_attachment_props.rb', line 12

def initialize(principal:, thing_name:, thing_principal_type: nil)
  @principal = principal
  Jsii::Type.check_type(@principal, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "principal")
  @thing_name = thing_name
  Jsii::Type.check_type(@thing_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "thingName")
  @thing_principal_type = thing_principal_type
  Jsii::Type.check_type(@thing_principal_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "thingPrincipalType") unless @thing_principal_type.nil?
end

Instance Attribute Details

#principalString (readonly)

The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.



25
26
27
# File 'io_t/cfn_thing_principal_attachment_props.rb', line 25

def principal
  @principal
end

#thing_nameString (readonly)

The name of the AWS IoT thing.



30
31
32
# File 'io_t/cfn_thing_principal_attachment_props.rb', line 30

def thing_name
  @thing_name
end

#thing_principal_typeString? (readonly)



33
34
35
# File 'io_t/cfn_thing_principal_attachment_props.rb', line 33

def thing_principal_type
  @thing_principal_type
end

Class Method Details

.jsii_propertiesObject



35
36
37
38
39
40
41
# File 'io_t/cfn_thing_principal_attachment_props.rb', line 35

def self.jsii_properties
  {
    :principal => "principal",
    :thing_name => "thingName",
    :thing_principal_type => "thingPrincipalType",
  }
end

Instance Method Details

#to_jsiiObject



43
44
45
46
47
48
49
50
51
# File 'io_t/cfn_thing_principal_attachment_props.rb', line 43

def to_jsii
  result = {}
  result.merge!({
    "principal" => @principal,
    "thingName" => @thing_name,
    "thingPrincipalType" => @thing_principal_type,
  })
  result.compact
end