AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi
aws.lambda.getFunctionUrl
Explore with Pulumi AI
Provides information about a Lambda function URL.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const functionName = config.require("functionName");
const existing = aws.lambda.getFunctionUrl({
functionName: functionName,
});
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
function_name = config.require("functionName")
existing = aws.lambda.get_function_url(function_name=function_name)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
functionName := cfg.Require("functionName")
_, err := lambda.LookupFunctionUrl(ctx, &lambda.LookupFunctionUrlArgs{
FunctionName: functionName,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var functionName = config.Require("functionName");
var existing = Aws.Lambda.GetFunctionUrl.Invoke(new()
{
FunctionName = functionName,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.LambdaFunctions;
import com.pulumi.aws.lambda.inputs.GetFunctionUrlArgs;
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) {
final var config = ctx.config();
final var functionName = config.get("functionName");
final var existing = LambdaFunctions.getFunctionUrl(GetFunctionUrlArgs.builder()
.functionName(functionName)
.build());
}
}
configuration:
functionName:
type: string
variables:
existing:
fn::invoke:
Function: aws:lambda:getFunctionUrl
Arguments:
functionName: ${functionName}
Using getFunctionUrl
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFunctionUrl(args: GetFunctionUrlArgs, opts?: InvokeOptions): Promise<GetFunctionUrlResult>
function getFunctionUrlOutput(args: GetFunctionUrlOutputArgs, opts?: InvokeOptions): Output<GetFunctionUrlResult>
def get_function_url(function_name: Optional[str] = None,
qualifier: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFunctionUrlResult
def get_function_url_output(function_name: Optional[pulumi.Input[str]] = None,
qualifier: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFunctionUrlResult]
func LookupFunctionUrl(ctx *Context, args *LookupFunctionUrlArgs, opts ...InvokeOption) (*LookupFunctionUrlResult, error)
func LookupFunctionUrlOutput(ctx *Context, args *LookupFunctionUrlOutputArgs, opts ...InvokeOption) LookupFunctionUrlResultOutput
> Note: This function is named LookupFunctionUrl
in the Go SDK.
public static class GetFunctionUrl
{
public static Task<GetFunctionUrlResult> InvokeAsync(GetFunctionUrlArgs args, InvokeOptions? opts = null)
public static Output<GetFunctionUrlResult> Invoke(GetFunctionUrlInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFunctionUrlResult> getFunctionUrl(GetFunctionUrlArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:lambda/getFunctionUrl:getFunctionUrl
arguments:
# arguments dictionary
The following arguments are supported:
- Function
Name string - The name (or ARN) of the Lambda function.
- Qualifier string
- Alias name or
"$LATEST"
.
- Function
Name string - The name (or ARN) of the Lambda function.
- Qualifier string
- Alias name or
"$LATEST"
.
- function
Name String - The name (or ARN) of the Lambda function.
- qualifier String
- Alias name or
"$LATEST"
.
- function
Name string - The name (or ARN) of the Lambda function.
- qualifier string
- Alias name or
"$LATEST"
.
- function_
name str - The name (or ARN) of the Lambda function.
- qualifier str
- Alias name or
"$LATEST"
.
- function
Name String - The name (or ARN) of the Lambda function.
- qualifier String
- Alias name or
"$LATEST"
.
getFunctionUrl Result
The following output properties are available:
- string
- Type of authentication that the function URL uses.
- Cors
List<Get
Function Url Cor> - The cross-origin resource sharing (CORS) settings for the function URL. See the
aws.lambda.FunctionUrl
resource documentation for more details. - Creation
Time string - When the function URL was created, in ISO-8601 format.
- Function
Arn string - ARN of the function.
- Function
Name string - Function
Url string - HTTP URL endpoint for the function in the format
https://<url_id>.lambda-url.<region>.on.aws/
. - Id string
- The provider-assigned unique ID for this managed resource.
- Invoke
Mode string - Whether the Lambda function responds in
BUFFERED
orRESPONSE_STREAM
mode. - Last
Modified stringTime - When the function URL configuration was last updated, in ISO-8601 format.
- Url
Id string - Generated ID for the endpoint.
- Qualifier string
- string
- Type of authentication that the function URL uses.
- Cors
[]Get
Function Url Cor - The cross-origin resource sharing (CORS) settings for the function URL. See the
aws.lambda.FunctionUrl
resource documentation for more details. - Creation
Time string - When the function URL was created, in ISO-8601 format.
- Function
Arn string - ARN of the function.
- Function
Name string - Function
Url string - HTTP URL endpoint for the function in the format
https://<url_id>.lambda-url.<region>.on.aws/
. - Id string
- The provider-assigned unique ID for this managed resource.
- Invoke
Mode string - Whether the Lambda function responds in
BUFFERED
orRESPONSE_STREAM
mode. - Last
Modified stringTime - When the function URL configuration was last updated, in ISO-8601 format.
- Url
Id string - Generated ID for the endpoint.
- Qualifier string
- String
- Type of authentication that the function URL uses.
- cors
List<Get
Function Url Cor> - The cross-origin resource sharing (CORS) settings for the function URL. See the
aws.lambda.FunctionUrl
resource documentation for more details. - creation
Time String - When the function URL was created, in ISO-8601 format.
- function
Arn String - ARN of the function.
- function
Name String - function
Url String - HTTP URL endpoint for the function in the format
https://<url_id>.lambda-url.<region>.on.aws/
. - id String
- The provider-assigned unique ID for this managed resource.
- invoke
Mode String - Whether the Lambda function responds in
BUFFERED
orRESPONSE_STREAM
mode. - last
Modified StringTime - When the function URL configuration was last updated, in ISO-8601 format.
- url
Id String - Generated ID for the endpoint.
- qualifier String
- string
- Type of authentication that the function URL uses.
- cors
Get
Function Url Cor[] - The cross-origin resource sharing (CORS) settings for the function URL. See the
aws.lambda.FunctionUrl
resource documentation for more details. - creation
Time string - When the function URL was created, in ISO-8601 format.
- function
Arn string - ARN of the function.
- function
Name string - function
Url string - HTTP URL endpoint for the function in the format
https://<url_id>.lambda-url.<region>.on.aws/
. - id string
- The provider-assigned unique ID for this managed resource.
- invoke
Mode string - Whether the Lambda function responds in
BUFFERED
orRESPONSE_STREAM
mode. - last
Modified stringTime - When the function URL configuration was last updated, in ISO-8601 format.
- url
Id string - Generated ID for the endpoint.
- qualifier string
- str
- Type of authentication that the function URL uses.
- cors
Sequence[lambda_.
Get Function Url Cor] - The cross-origin resource sharing (CORS) settings for the function URL. See the
aws.lambda.FunctionUrl
resource documentation for more details. - creation_
time str - When the function URL was created, in ISO-8601 format.
- function_
arn str - ARN of the function.
- function_
name str - function_
url str - HTTP URL endpoint for the function in the format
https://<url_id>.lambda-url.<region>.on.aws/
. - id str
- The provider-assigned unique ID for this managed resource.
- invoke_
mode str - Whether the Lambda function responds in
BUFFERED
orRESPONSE_STREAM
mode. - last_
modified_ strtime - When the function URL configuration was last updated, in ISO-8601 format.
- url_
id str - Generated ID for the endpoint.
- qualifier str
- String
- Type of authentication that the function URL uses.
- cors List<Property Map>
- The cross-origin resource sharing (CORS) settings for the function URL. See the
aws.lambda.FunctionUrl
resource documentation for more details. - creation
Time String - When the function URL was created, in ISO-8601 format.
- function
Arn String - ARN of the function.
- function
Name String - function
Url String - HTTP URL endpoint for the function in the format
https://<url_id>.lambda-url.<region>.on.aws/
. - id String
- The provider-assigned unique ID for this managed resource.
- invoke
Mode String - Whether the Lambda function responds in
BUFFERED
orRESPONSE_STREAM
mode. - last
Modified StringTime - When the function URL configuration was last updated, in ISO-8601 format.
- url
Id String - Generated ID for the endpoint.
- qualifier String
Supporting Types
GetFunctionUrlCor
- Allow
Credentials bool - Allow
Headers List<string> - Allow
Methods List<string> - Allow
Origins List<string> - Expose
Headers List<string> - Max
Age int
- Allow
Credentials bool - Allow
Headers []string - Allow
Methods []string - Allow
Origins []string - Expose
Headers []string - Max
Age int
- allow
Credentials Boolean - allow
Headers List<String> - allow
Methods List<String> - allow
Origins List<String> - expose
Headers List<String> - max
Age Integer
- allow
Credentials boolean - allow
Headers string[] - allow
Methods string[] - allow
Origins string[] - expose
Headers string[] - max
Age number
- allow_
credentials bool - allow_
headers Sequence[str] - allow_
methods Sequence[str] - allow_
origins Sequence[str] - expose_
headers Sequence[str] - max_
age int
- allow
Credentials Boolean - allow
Headers List<String> - allow
Methods List<String> - allow
Origins List<String> - expose
Headers List<String> - max
Age Number
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.