FunctionUrlArgs

data class FunctionUrlArgs(val authorizationType: Output<String>? = null, val cors: Output<FunctionUrlCorsArgs>? = null, val functionName: Output<String>? = null, val invokeMode: Output<String>? = null, val qualifier: Output<String>? = null) : ConvertibleToJava<FunctionUrlArgs>

Provides a Lambda function URL resource. A function URL is a dedicated HTTP(S) endpoint for a Lambda function. See the AWS Lambda documentation for more information.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.FunctionUrl;
import com.pulumi.aws.lambda.FunctionUrlArgs;
import com.pulumi.aws.lambda.inputs.FunctionUrlCorsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var testLatest = new FunctionUrl("testLatest", FunctionUrlArgs.builder()
.functionName(aws_lambda_function.test().function_name())
.authorizationType("NONE")
.build());
var testLive = new FunctionUrl("testLive", FunctionUrlArgs.builder()
.functionName(aws_lambda_function.test().function_name())
.qualifier("my_alias")
.authorizationType("AWS_IAM")
.cors(FunctionUrlCorsArgs.builder()
.allowCredentials(true)
.allowOrigins("*")
.allowMethods("*")
.allowHeaders(
"date",
"keep-alive")
.exposeHeaders(
"keep-alive",
"date")
.maxAge(86400)
.build())
.build());
}
}

Import

Lambda function URLs can be imported using the function_name or function_name/qualifier, e.g.,

$ pulumi import aws:lambda/functionUrl:FunctionUrl test_lambda_url my_test_lambda_function

Constructors

Link copied to clipboard
constructor(authorizationType: Output<String>? = null, cors: Output<FunctionUrlCorsArgs>? = null, functionName: Output<String>? = null, invokeMode: Output<String>? = null, qualifier: Output<String>? = null)

Properties

Link copied to clipboard
val authorizationType: Output<String>? = null

The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.

Link copied to clipboard
val cors: Output<FunctionUrlCorsArgs>? = null

The cross-origin resource sharing (CORS) settings for the function URL. Documented below.

Link copied to clipboard
val functionName: Output<String>? = null

The name (or ARN) of the Lambda function.

Link copied to clipboard
val invokeMode: Output<String>? = null

Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.

Link copied to clipboard
val qualifier: Output<String>? = null

The alias name or "$LATEST".

Functions

Link copied to clipboard
open override fun toJava(): FunctionUrlArgs