Class: AWSCDK::Greengrass::CfnCoreDefinition::CoreProperty

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

Overview

A core is an AWS IoT device that runs the AWS IoT Greengrass core software and manages local processes for a Greengrass group.

For more information, see What Is AWS IoT Greengrass ? in the Developer Guide .

In an CloudFormation template, the Cores property of the CoreDefinitionVersion property type contains a list of Core property types. Currently, the list can contain only one core.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of CoreProperty.

Parameters:

  • certificate_arn (String)

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

  • id (String)

    A descriptive or arbitrary ID for the core.

  • thing_arn (String)

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

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

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



647
648
649
650
651
652
653
654
655
656
# File 'greengrass/cfn_core_definition.rb', line 647

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 core.

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



664
665
666
# File 'greengrass/cfn_core_definition.rb', line 664

def certificate_arn
  @certificate_arn
end

#idString (readonly)

A descriptive or arbitrary ID for the core.

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



671
672
673
# File 'greengrass/cfn_core_definition.rb', line 671

def id
  @id
end

#sync_shadowBoolean, ... (readonly)

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

The default is false.



683
684
685
# File 'greengrass/cfn_core_definition.rb', line 683

def sync_shadow
  @sync_shadow
end

#thing_arnString (readonly)

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



676
677
678
# File 'greengrass/cfn_core_definition.rb', line 676

def thing_arn
  @thing_arn
end

Class Method Details

.jsii_propertiesObject



685
686
687
688
689
690
691
692
# File 'greengrass/cfn_core_definition.rb', line 685

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

Instance Method Details

#to_jsiiObject



694
695
696
697
698
699
700
701
702
703
# File 'greengrass/cfn_core_definition.rb', line 694

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