Class: AWSCDK::Lambda::FunctionURLOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lambda/function_url_options.rb

Overview

Options to add a url to a Lambda function.

Direct Known Subclasses

FunctionURLProps

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auth_type: nil, cors: nil, invoke_mode: nil) ⇒ FunctionURLOptions

Returns a new instance of FunctionURLOptions.

Parameters:



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_typeAWSCDK::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

#corsAWSCDK::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_modeAWSCDK::Lambda::InvokeMode? (readonly)

Note:

Default: InvokeMode.BUFFERED

The type of invocation mode that your Lambda function uses.

Returns:



33
34
35
# File 'lambda/function_url_options.rb', line 33

def invoke_mode
  @invoke_mode
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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