Class: AWSCDK::Lambda::FunctionURLOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::FunctionURLOptions
- Defined in:
- lambda/function_url_options.rb
Overview
Options to add a url to a Lambda function.
Direct Known Subclasses
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.
-
#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) ⇒ FunctionURLOptions
constructor
A new instance of FunctionURLOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auth_type: nil, cors: nil, invoke_mode: nil) ⇒ FunctionURLOptions
Returns a new instance of FunctionURLOptions.
10 11 12 13 14 15 16 17 |
# File 'lambda/function_url_options.rb', line 10 def initialize(auth_type: nil, cors: nil, invoke_mode: nil) @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? end |
Instance Attribute Details
#auth_type ⇒ AWSCDK::Lambda::FunctionURLAuthType? (readonly)
Note:
Default: FunctionUrlAuthType.AWS_IAM
The type of authentication that your function URL uses.
23 24 25 |
# File 'lambda/function_url_options.rb', line 23 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.
28 29 30 |
# File 'lambda/function_url_options.rb', line 28 def cors @cors end |
#invoke_mode ⇒ AWSCDK::Lambda::InvokeMode? (readonly)
Note:
Default: InvokeMode.BUFFERED
The type of invocation mode that your Lambda function uses.
33 34 35 |
# File 'lambda/function_url_options.rb', line 33 def invoke_mode @invoke_mode end |
Class Method Details
.jsii_properties ⇒ Object
35 36 37 38 39 40 41 |
# File 'lambda/function_url_options.rb', line 35 def self.jsii_properties { :auth_type => "authType", :cors => "cors", :invoke_mode => "invokeMode", } end |
Instance Method Details
#to_jsii ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lambda/function_url_options.rb', line 43 def to_jsii result = {} result.merge!({ "authType" => @auth_type, "cors" => @cors, "invokeMode" => @invoke_mode, }) result.compact end |