Class: AWSCDK::CloudFront::FunctionAttributes

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_front/function_attributes.rb

Overview

Attributes of an existing CloudFront Function to import it.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(function_arn:, function_name:, function_runtime: nil) ⇒ FunctionAttributes

Returns a new instance of FunctionAttributes.

Parameters:

  • function_arn (String)

    The ARN of the function.

  • function_name (String)

    The name of the function.

  • function_runtime (String, nil) (defaults to: nil)

    The Runtime of the function.



10
11
12
13
14
15
16
17
# File 'cloud_front/function_attributes.rb', line 10

def initialize(function_arn:, function_name:, function_runtime: nil)
  @function_arn = function_arn
  Jsii::Type.check_type(@function_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionArn")
  @function_name = function_name
  Jsii::Type.check_type(@function_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionName")
  @function_runtime = function_runtime
  Jsii::Type.check_type(@function_runtime, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionRuntime") unless @function_runtime.nil?
end

Instance Attribute Details

#function_arnString (readonly)

The ARN of the function.

Returns:

  • (String)


22
23
24
# File 'cloud_front/function_attributes.rb', line 22

def function_arn
  @function_arn
end

#function_nameString (readonly)

The name of the function.

Returns:

  • (String)


26
27
28
# File 'cloud_front/function_attributes.rb', line 26

def function_name
  @function_name
end

#function_runtimeString? (readonly)

Note:

Default: FunctionRuntime.JS_1_0

The Runtime of the function.

Returns:

  • (String, nil)


31
32
33
# File 'cloud_front/function_attributes.rb', line 31

def function_runtime
  @function_runtime
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
39
# File 'cloud_front/function_attributes.rb', line 33

def self.jsii_properties
  {
    :function_arn => "functionArn",
    :function_name => "functionName",
    :function_runtime => "functionRuntime",
  }
end

Instance Method Details

#to_jsiiObject



41
42
43
44
45
46
47
48
49
# File 'cloud_front/function_attributes.rb', line 41

def to_jsii
  result = {}
  result.merge!({
    "functionArn" => @function_arn,
    "functionName" => @function_name,
    "functionRuntime" => @function_runtime,
  })
  result.compact
end