Class: AWSCDK::Lambda::FunctionURLProps

Inherits:
FunctionURLOptions
  • Object
show all
Defined in:
lambda/function_url_props.rb

Overview

Properties for a FunctionUrl.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auth_type: nil, cors: nil, invoke_mode: nil, function:) ⇒ FunctionURLProps

Returns a new instance of FunctionURLProps.

Parameters:



11
12
13
14
15
16
17
18
19
20
# File 'lambda/function_url_props.rb', line 11

def initialize(auth_type: nil, cors: nil, invoke_mode: nil, function:)
  @auth_type = auth_type
  Jsii::Type.check_type(@auth_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkZ1bmN0aW9uVXJsQXV0aFR5cGUifQ==")), "authType") unless @auth_type.nil?
  @cors = cors.is_a?(Hash) ? ::AWSCDK::Lambda::FunctionURLCorsOptions.new(**cors.transform_keys(&:to_sym)) : cors
  Jsii::Type.check_type(@cors, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkZ1bmN0aW9uVXJsQ29yc09wdGlvbnMifQ==")), "cors") unless @cors.nil?
  @invoke_mode = invoke_mode
  Jsii::Type.check_type(@invoke_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkludm9rZU1vZGUifQ==")), "invokeMode") unless @invoke_mode.nil?
  @function = function
  Jsii::Type.check_type(@function, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "function")
end

Instance Attribute Details

#auth_typeAWSCDK::Lambda::FunctionURLAuthType? (readonly)

Note:

Default: FunctionUrlAuthType.AWS_IAM

The type of authentication that your function URL uses.



26
27
28
# File 'lambda/function_url_props.rb', line 26

def auth_type
  @auth_type
end

#corsAWSCDK::Lambda::FunctionURLCorsOptions? (readonly)

Note:

Default: - No CORS configuration.

The cross-origin resource sharing (CORS) settings for your function URL.



31
32
33
# File 'lambda/function_url_props.rb', line 31

def cors
  @cors
end

#functionAWSCDK::Lambda::IFunction (readonly)

The function to which this url refers.

It can also be an Alias but not a Version.



42
43
44
# File 'lambda/function_url_props.rb', line 42

def function
  @function
end

#invoke_modeAWSCDK::Lambda::InvokeMode? (readonly)

Note:

Default: InvokeMode.BUFFERED

The type of invocation mode that your Lambda function uses.

Returns:



36
37
38
# File 'lambda/function_url_props.rb', line 36

def invoke_mode
  @invoke_mode
end

Class Method Details

.jsii_propertiesObject



44
45
46
47
48
49
50
51
# File 'lambda/function_url_props.rb', line 44

def self.jsii_properties
  {
    :auth_type => "authType",
    :cors => "cors",
    :invoke_mode => "invokeMode",
    :function => "function",
  }
end

Instance Method Details

#to_jsiiObject



53
54
55
56
57
58
59
60
61
62
63
# File 'lambda/function_url_props.rb', line 53

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "authType" => @auth_type,
    "cors" => @cors,
    "invokeMode" => @invoke_mode,
    "function" => @function,
  })
  result.compact
end