FunctionUrlProps¶
-
class
aws_cdk.aws_lambda.
FunctionUrlProps
(*, auth_type=None, cors=None, function)¶ Bases:
aws_cdk.aws_lambda.FunctionUrlOptions
Properties for a FunctionUrl.
- Parameters
auth_type (
Optional
[FunctionUrlAuthType
]) – The type of authentication that your function URL uses. Default: FunctionUrlAuthType.AWS_IAMcors (
Optional
[FunctionUrlCorsOptions
]) – The cross-origin resource sharing (CORS) settings for your function URL. Default: - No CORS configuration.function (
IFunction
) – The function to which this url refers. It can also be anAlias
but not aVersion
.
- ExampleMetadata
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_lambda as lambda_ import aws_cdk.core as cdk # function_: lambda.Function function_url_props = lambda.FunctionUrlProps( function=function_, # the properties below are optional auth_type=lambda_.FunctionUrlAuthType.AWS_IAM, cors=lambda.FunctionUrlCorsOptions( allow_credentials=False, allowed_headers=["allowedHeaders"], allowed_methods=[lambda_.HttpMethod.GET], allowed_origins=["allowedOrigins"], exposed_headers=["exposedHeaders"], max_age=cdk.Duration.minutes(30) ) )
Attributes
-
auth_type
¶ The type of authentication that your function URL uses.
- Default
FunctionUrlAuthType.AWS_IAM
- Return type
Optional
[FunctionUrlAuthType
]
-
cors
¶ The cross-origin resource sharing (CORS) settings for your function URL.
- Default
No CORS configuration.
- Return type
Optional
[FunctionUrlCorsOptions
]