Class: AWSCDK::Greengrass::CfnFunctionDefinition::FunctionProperty

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

Overview

A function is a Lambda function that's referenced from an AWS IoT Greengrass group.

The function is deployed to a Greengrass core where it runs locally. For more information, see Run Lambda Functions on the AWS IoT Greengrass Core in the Developer Guide .

In an CloudFormation template, the Functions property of the FunctionDefinitionVersion property type contains a list of Function property types.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(function_arn:, function_configuration:, id:) ⇒ FunctionProperty

Returns a new instance of FunctionProperty.

Parameters:



926
927
928
929
930
931
932
933
# File 'greengrass/cfn_function_definition.rb', line 926

def initialize(function_arn:, function_configuration:, id:)
  @function_arn = function_arn
  Jsii::Type.check_type(@function_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionArn")
  @function_configuration = function_configuration.is_a?(Hash) ? ::AWSCDK::Greengrass::CfnFunctionDefinition::FunctionConfigurationProperty.new(**function_configuration.transform_keys(&:to_sym)) : function_configuration
  Jsii::Type.check_type(@function_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ncmVlbmdyYXNzLkNmbkZ1bmN0aW9uRGVmaW5pdGlvbi5GdW5jdGlvbkNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "functionConfiguration")
  @id = id
  Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
end

Instance Attribute Details

#function_arnString (readonly)

The Amazon Resource Name (ARN) of the alias (recommended) or version of the referenced Lambda function.



939
940
941
# File 'greengrass/cfn_function_definition.rb', line 939

def function_arn
  @function_arn
end

#function_configurationAWSCDK::IResolvable, AWSCDK::Greengrass::CfnFunctionDefinition::FunctionConfigurationProperty (readonly)

The group-specific settings of the Lambda function.

These settings configure the function's behavior in the Greengrass group.



946
947
948
# File 'greengrass/cfn_function_definition.rb', line 946

def function_configuration
  @function_configuration
end

#idString (readonly)

A descriptive or arbitrary ID for the function.

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



953
954
955
# File 'greengrass/cfn_function_definition.rb', line 953

def id
  @id
end

Class Method Details

.jsii_propertiesObject



955
956
957
958
959
960
961
# File 'greengrass/cfn_function_definition.rb', line 955

def self.jsii_properties
  {
    :function_arn => "functionArn",
    :function_configuration => "functionConfiguration",
    :id => "id",
  }
end

Instance Method Details

#to_jsiiObject



963
964
965
966
967
968
969
970
971
# File 'greengrass/cfn_function_definition.rb', line 963

def to_jsii
  result = {}
  result.merge!({
    "functionArn" => @function_arn,
    "functionConfiguration" => @function_configuration,
    "id" => @id,
  })
  result.compact
end