interface FunctionUrlProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Lambda.FunctionUrlProps |
Java | software.amazon.awscdk.services.lambda.FunctionUrlProps |
Python | aws_cdk.aws_lambda.FunctionUrlProps |
TypeScript (source) | @aws-cdk/aws-lambda » FunctionUrlProps |
Properties for a FunctionUrl.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as lambda from '@aws-cdk/aws-lambda';
import * as cdk from '@aws-cdk/core';
declare const function_: lambda.Function;
const functionUrlProps: lambda.FunctionUrlProps = {
function: function_,
// the properties below are optional
authType: lambda.FunctionUrlAuthType.AWS_IAM,
cors: {
allowCredentials: false,
allowedHeaders: ['allowedHeaders'],
allowedMethods: [lambda.HttpMethod.GET],
allowedOrigins: ['allowedOrigins'],
exposedHeaders: ['exposedHeaders'],
maxAge: cdk.Duration.minutes(30),
},
};
Properties
Name | Type | Description |
---|---|---|
function | IFunction | The function to which this url refers. |
auth | Function | The type of authentication that your function URL uses. |
cors? | Function | The cross-origin resource sharing (CORS) settings for your function URL. |
function
Type:
IFunction
The function to which this url refers.
It can also be an Alias
but not a Version
.
authType?
Type:
Function
(optional, default: FunctionUrlAuthType.AWS_IAM)
The type of authentication that your function URL uses.
cors?
Type:
Function
(optional, default: No CORS configuration.)
The cross-origin resource sharing (CORS) settings for your function URL.