Class: AWSCDK::Greengrass::CfnResourceDefinition::LocalVolumeResourceDataProperty

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

Overview

Settings for a local volume resource, which represents a file or directory on the root file system.

For more information, see Access Local Resources with Lambda Functions in the Developer Guide .

In an CloudFormation template, LocalVolumeResourceData can be used in the ResourceDataContainer property type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(destination_path:, source_path:, group_owner_setting: nil) ⇒ LocalVolumeResourceDataProperty

Returns a new instance of LocalVolumeResourceDataProperty.

Parameters:



707
708
709
710
711
712
713
714
# File 'greengrass/cfn_resource_definition.rb', line 707

def initialize(destination_path:, source_path:, group_owner_setting: nil)
  @destination_path = destination_path
  Jsii::Type.check_type(@destination_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationPath")
  @source_path = source_path
  Jsii::Type.check_type(@source_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourcePath")
  @group_owner_setting = group_owner_setting.is_a?(Hash) ? ::AWSCDK::Greengrass::CfnResourceDefinition::GroupOwnerSettingProperty.new(**group_owner_setting.transform_keys(&:to_sym)) : group_owner_setting
  Jsii::Type.check_type(@group_owner_setting, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ncmVlbmdyYXNzLkNmblJlc291cmNlRGVmaW5pdGlvbi5Hcm91cE93bmVyU2V0dGluZ1Byb3BlcnR5In1dfX0=")), "groupOwnerSetting") unless @group_owner_setting.nil?
end

Instance Attribute Details

#destination_pathString (readonly)

The absolute local path of the resource in the Lambda environment.



720
721
722
# File 'greengrass/cfn_resource_definition.rb', line 720

def destination_path
  @destination_path
end

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

Settings that define additional Linux OS group permissions to give to the Lambda function process.



732
733
734
# File 'greengrass/cfn_resource_definition.rb', line 732

def group_owner_setting
  @group_owner_setting
end

#source_pathString (readonly)

The local absolute path of the volume resource on the host.

The source path for a volume resource type cannot start with /sys .



727
728
729
# File 'greengrass/cfn_resource_definition.rb', line 727

def source_path
  @source_path
end

Class Method Details

.jsii_propertiesObject



734
735
736
737
738
739
740
# File 'greengrass/cfn_resource_definition.rb', line 734

def self.jsii_properties
  {
    :destination_path => "destinationPath",
    :source_path => "sourcePath",
    :group_owner_setting => "groupOwnerSetting",
  }
end

Instance Method Details

#to_jsiiObject



742
743
744
745
746
747
748
749
750
# File 'greengrass/cfn_resource_definition.rb', line 742

def to_jsii
  result = {}
  result.merge!({
    "destinationPath" => @destination_path,
    "sourcePath" => @source_path,
    "groupOwnerSetting" => @group_owner_setting,
  })
  result.compact
end