Class: AWSCDK::Lambda::CfnURLProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::CfnURLProps
- Defined in:
- lambda/cfn_url_props.rb
Overview
Properties for defining a CfnUrl.
Instance Attribute Summary collapse
-
#auth_type ⇒ String
readonly
The type of authentication that your function URL uses.
-
#cors ⇒ AWSCDK::IResolvable, ...
readonly
The Cross-Origin Resource Sharing (CORS) settings for your function URL.
-
#invoke_mode ⇒ String?
readonly
Use one of the following options:.
-
#qualifier ⇒ String?
readonly
The alias name.
-
#target_function_arn ⇒ String, AWSCDK::Interfaces::AWSLambda::IFunctionRef
readonly
The name of the Lambda function.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auth_type:, target_function_arn:, cors: nil, invoke_mode: nil, qualifier: nil) ⇒ CfnURLProps
constructor
A new instance of CfnURLProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auth_type:, target_function_arn:, cors: nil, invoke_mode: nil, qualifier: nil) ⇒ CfnURLProps
Returns a new instance of CfnURLProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lambda/cfn_url_props.rb', line 14 def initialize(auth_type:, target_function_arn:, cors: nil, invoke_mode: nil, qualifier: nil) @auth_type = auth_type Jsii::Type.check_type(@auth_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authType") @target_function_arn = target_function_arn Jsii::Type.check_type(@target_function_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sYW1iZGEuSUZ1bmN0aW9uUmVmIn1dfX0=")), "targetFunctionArn") @cors = cors.is_a?(Hash) ? ::AWSCDK::Lambda::CfnURL::CorsProperty.new(**cors.transform_keys(&:to_sym)) : cors Jsii::Type.check_type(@cors, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuVXJsLkNvcnNQcm9wZXJ0eSJ9XX19")), "cors") unless @cors.nil? @invoke_mode = invoke_mode Jsii::Type.check_type(@invoke_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "invokeMode") unless @invoke_mode.nil? @qualifier = qualifier Jsii::Type.check_type(@qualifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "qualifier") unless @qualifier.nil? end |
Instance Attribute Details
#auth_type ⇒ String (readonly)
The type of authentication that your function URL uses.
Set to AWS_IAM if you want to restrict access to authenticated users only. Set to NONE if you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs .
33 34 35 |
# File 'lambda/cfn_url_props.rb', line 33 def auth_type @auth_type end |
#cors ⇒ AWSCDK::IResolvable, ... (readonly)
The Cross-Origin Resource Sharing (CORS) settings for your function URL.
50 51 52 |
# File 'lambda/cfn_url_props.rb', line 50 def cors @cors end |
#invoke_mode ⇒ String? (readonly)
Use one of the following options:.
BUFFERED– This is the default option. Lambda invokes your function using theInvokeAPI operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB.RESPONSE_STREAM– Your function streams payload results as they become available. Lambda invokes your function using theInvokeWithResponseStreamAPI operation. The maximum response payload size is 200 MB.
58 59 60 |
# File 'lambda/cfn_url_props.rb', line 58 def invoke_mode @invoke_mode end |
#qualifier ⇒ String? (readonly)
The alias name.
63 64 65 |
# File 'lambda/cfn_url_props.rb', line 63 def qualifier @qualifier end |
#target_function_arn ⇒ String, AWSCDK::Interfaces::AWSLambda::IFunctionRef (readonly)
The name of the Lambda function.
Name formats - Function name - my-function .
- Function ARN -
lambda: : :function:my-function. - Partial ARN -
:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
45 46 47 |
# File 'lambda/cfn_url_props.rb', line 45 def target_function_arn @target_function_arn end |
Class Method Details
.jsii_properties ⇒ Object
65 66 67 68 69 70 71 72 73 |
# File 'lambda/cfn_url_props.rb', line 65 def self.jsii_properties { :auth_type => "authType", :target_function_arn => "targetFunctionArn", :cors => "cors", :invoke_mode => "invokeMode", :qualifier => "qualifier", } end |
Instance Method Details
#to_jsii ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lambda/cfn_url_props.rb', line 75 def to_jsii result = {} result.merge!({ "authType" => @auth_type, "targetFunctionArn" => @target_function_arn, "cors" => @cors, "invokeMode" => @invoke_mode, "qualifier" => @qualifier, }) result.compact end |