Class: AWSCDK::Lambda::FunctionURLProps
- Inherits:
-
FunctionURLOptions
- Object
- FunctionURLOptions
- AWSCDK::Lambda::FunctionURLProps
- Defined in:
- lambda/function_url_props.rb
Overview
Properties for a FunctionUrl.
Instance Attribute Summary collapse
-
#auth_type ⇒ AWSCDK::Lambda::FunctionURLAuthType?
readonly
The type of authentication that your function URL uses.
-
#cors ⇒ AWSCDK::Lambda::FunctionURLCorsOptions?
readonly
The cross-origin resource sharing (CORS) settings for your function URL.
-
#function ⇒ AWSCDK::Lambda::IFunction
readonly
The function to which this url refers.
-
#invoke_mode ⇒ AWSCDK::Lambda::InvokeMode?
readonly
The type of invocation mode that your Lambda function uses.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auth_type: nil, cors: nil, invoke_mode: nil, function:) ⇒ FunctionURLProps
constructor
A new instance of FunctionURLProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auth_type: nil, cors: nil, invoke_mode: nil, function:) ⇒ FunctionURLProps
Returns a new instance of FunctionURLProps.
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_type ⇒ AWSCDK::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 |
#cors ⇒ AWSCDK::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 |
#function ⇒ AWSCDK::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_mode ⇒ AWSCDK::Lambda::InvokeMode? (readonly)
Note:
Default: InvokeMode.BUFFERED
The type of invocation mode that your Lambda function uses.
36 37 38 |
# File 'lambda/function_url_props.rb', line 36 def invoke_mode @invoke_mode end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |