Class: AWSCDK::Greengrass::CfnFunctionDefinitionVersion::EnvironmentProperty

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

Overview

The environment configuration for a Lambda function on the AWS IoT Greengrass core.

In an CloudFormation template, Environment is a property of the FunctionConfiguration property type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_sysfs: nil, execution: nil, resource_access_policies: nil, variables: nil) ⇒ EnvironmentProperty

Returns a new instance of EnvironmentProperty.

Parameters:



573
574
575
576
577
578
579
580
581
582
# File 'greengrass/cfn_function_definition_version.rb', line 573

def initialize(access_sysfs: nil, execution: nil, resource_access_policies: nil, variables: nil)
  @access_sysfs = access_sysfs
  Jsii::Type.check_type(@access_sysfs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "accessSysfs") unless @access_sysfs.nil?
  @execution = execution.is_a?(Hash) ? ::AWSCDK::Greengrass::CfnFunctionDefinitionVersion::ExecutionProperty.new(**execution.transform_keys(&:to_sym)) : execution
  Jsii::Type.check_type(@execution, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ncmVlbmdyYXNzLkNmbkZ1bmN0aW9uRGVmaW5pdGlvblZlcnNpb24uRXhlY3V0aW9uUHJvcGVydHkifV19fQ==")), "execution") unless @execution.nil?
  @resource_access_policies = resource_access_policies
  Jsii::Type.check_type(@resource_access_policies, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ3JlZW5ncmFzcy5DZm5GdW5jdGlvbkRlZmluaXRpb25WZXJzaW9uLlJlc291cmNlQWNjZXNzUG9saWN5UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "resourceAccessPolicies") unless @resource_access_policies.nil?
  @variables = variables
  Jsii::Type.check_type(@variables, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "variables") unless @variables.nil?
end

Instance Attribute Details

#access_sysfsBoolean, ... (readonly)

Indicates whether the function is allowed to access the /sys directory on the core device, which allows the read device information from /sys .

This property applies only to Lambda functions that run in a Greengrass container.



590
591
592
# File 'greengrass/cfn_function_definition_version.rb', line 590

def access_sysfs
  @access_sysfs
end

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

Settings for the Lambda execution environment in AWS IoT Greengrass .



595
596
597
# File 'greengrass/cfn_function_definition_version.rb', line 595

def execution
  @execution
end

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

A list of the resources in the group that the function can access, with the corresponding read-only or read-write permissions. The maximum is 10 resources.

This property applies only to Lambda functions that run in a Greengrass container.



602
603
604
# File 'greengrass/cfn_function_definition_version.rb', line 602

def resource_access_policies
  @resource_access_policies
end

#variablesObject? (readonly)

Environment variables for the Lambda function.



607
608
609
# File 'greengrass/cfn_function_definition_version.rb', line 607

def variables
  @variables
end

Class Method Details

.jsii_propertiesObject



609
610
611
612
613
614
615
616
# File 'greengrass/cfn_function_definition_version.rb', line 609

def self.jsii_properties
  {
    :access_sysfs => "accessSysfs",
    :execution => "execution",
    :resource_access_policies => "resourceAccessPolicies",
    :variables => "variables",
  }
end

Instance Method Details

#to_jsiiObject



618
619
620
621
622
623
624
625
626
627
# File 'greengrass/cfn_function_definition_version.rb', line 618

def to_jsii
  result = {}
  result.merge!({
    "accessSysfs" => @access_sysfs,
    "execution" => @execution,
    "resourceAccessPolicies" => @resource_access_policies,
    "variables" => @variables,
  })
  result.compact
end