Class: AWSCDK::Greengrass::CfnDeviceDefinition::DeviceProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
greengrass/cfn_device_definition.rb

Overview

A device is an AWS IoT device (thing) that's added to a Greengrass group.

Greengrass devices can communicate with the Greengrass core in the same group. For more information, see What Is AWS IoT Greengrass ? in the Developer Guide .

In an CloudFormation template, the Devices property of the DeviceDefinitionVersion property type contains a list of Device property types.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(certificate_arn:, id:, thing_arn:, sync_shadow: nil) ⇒ DeviceProperty

Returns a new instance of DeviceProperty.

Parameters:

  • certificate_arn (String)

    The Amazon Resource Name (ARN) of the device certificate for the device.

  • id (String)

    A descriptive or arbitrary ID for the device.

  • thing_arn (String)

    The ARN of the device, which is an AWS IoT device (thing).

  • sync_shadow (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether the device's local shadow is synced with the cloud automatically.



645
646
647
648
649
650
651
652
653
654
# File 'greengrass/cfn_device_definition.rb', line 645

def initialize(certificate_arn:, id:, thing_arn:, sync_shadow: nil)
  @certificate_arn = certificate_arn
  Jsii::Type.check_type(@certificate_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "certificateArn")
  @id = id
  Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  @thing_arn = thing_arn
  Jsii::Type.check_type(@thing_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "thingArn")
  @sync_shadow = sync_shadow
  Jsii::Type.check_type(@sync_shadow, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "syncShadow") unless @sync_shadow.nil?
end

Instance Attribute Details

#certificate_arnString (readonly)

The Amazon Resource Name (ARN) of the device certificate for the device.

This X.509 certificate is used to authenticate the device with AWS IoT and AWS IoT Greengrass services.



662
663
664
# File 'greengrass/cfn_device_definition.rb', line 662

def certificate_arn
  @certificate_arn
end

#idString (readonly)

A descriptive or arbitrary ID for the device.

This value must be unique within the device definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+ .



669
670
671
# File 'greengrass/cfn_device_definition.rb', line 669

def id
  @id
end

#sync_shadowBoolean, ... (readonly)

Indicates whether the device's local shadow is synced with the cloud automatically.



679
680
681
# File 'greengrass/cfn_device_definition.rb', line 679

def sync_shadow
  @sync_shadow
end

#thing_arnString (readonly)

The ARN of the device, which is an AWS IoT device (thing).



674
675
676
# File 'greengrass/cfn_device_definition.rb', line 674

def thing_arn
  @thing_arn
end

Class Method Details

.jsii_propertiesObject



681
682
683
684
685
686
687
688
# File 'greengrass/cfn_device_definition.rb', line 681

def self.jsii_properties
  {
    :certificate_arn => "certificateArn",
    :id => "id",
    :thing_arn => "thingArn",
    :sync_shadow => "syncShadow",
  }
end

Instance Method Details

#to_jsiiObject



690
691
692
693
694
695
696
697
698
699
# File 'greengrass/cfn_device_definition.rb', line 690

def to_jsii
  result = {}
  result.merge!({
    "certificateArn" => @certificate_arn,
    "id" => @id,
    "thingArn" => @thing_arn,
    "syncShadow" => @sync_shadow,
  })
  result.compact
end