Class: AWSCDK::Greengrass::CfnFunctionDefinitionVersion::FunctionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
greengrass/cfn_function_definition_version.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 AWS::Greengrass::FunctionDefinitionVersion resource 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:



807
808
809
810
811
812
813
814
# File 'greengrass/cfn_function_definition_version.rb', line 807

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::CfnFunctionDefinitionVersion::FunctionConfigurationProperty.new(**function_configuration.transform_keys(&:to_sym)) : function_configuration
  Jsii::Type.check_type(@function_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ncmVlbmdyYXNzLkNmbkZ1bmN0aW9uRGVmaW5pdGlvblZlcnNpb24uRnVuY3Rpb25Db25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "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.



820
821
822
# File 'greengrass/cfn_function_definition_version.rb', line 820

def function_arn
  @function_arn
end

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

The group-specific settings of the Lambda function.

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



827
828
829
# File 'greengrass/cfn_function_definition_version.rb', line 827

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:_-]+ .



834
835
836
# File 'greengrass/cfn_function_definition_version.rb', line 834

def id
  @id
end

Class Method Details

.jsii_propertiesObject



836
837
838
839
840
841
842
# File 'greengrass/cfn_function_definition_version.rb', line 836

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

Instance Method Details

#to_jsiiObject



844
845
846
847
848
849
850
851
852
# File 'greengrass/cfn_function_definition_version.rb', line 844

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