AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

getFunctionUrl

Provides information about a Lambda function URL.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var functionName = config.Require("functionName");
        var existing = Output.Create(Aws.Lambda.GetFunctionUrl.InvokeAsync(new Aws.Lambda.GetFunctionUrlArgs
        {
            FunctionName = functionName,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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 = Output.of(LambdaFunctions.getFunctionUrl(GetFunctionUrlArgs.builder()
            .functionName(functionName)
            .build()));

    }
}
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)
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,
});
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:

FunctionName string

he name (or ARN) of the Lambda function.

Qualifier string

The alias name or "$LATEST".

FunctionName string

he name (or ARN) of the Lambda function.

Qualifier string

The alias name or "$LATEST".

functionName String

he name (or ARN) of the Lambda function.

qualifier String

The alias name or "$LATEST".

functionName string

he name (or ARN) of the Lambda function.

qualifier string

The alias name or "$LATEST".

function_name str

he name (or ARN) of the Lambda function.

qualifier str

The alias name or "$LATEST".

functionName String

he name (or ARN) of the Lambda function.

qualifier String

The alias name or "$LATEST".

getFunctionUrl Result

The following output properties are available:

AuthorizationType string

The type of authentication that the function URL uses.

Cors List<GetFunctionUrlCor>

The cross-origin resource sharing (CORS) settings for the function URL. See the aws.lambda.FunctionUrl resource documentation for more details.

CreationTime string

When the function URL was created, in ISO-8601 format.

FunctionArn string

The Amazon Resource Name (ARN) of the function.

FunctionName string
FunctionUrl string

The 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.

LastModifiedTime string

When the function URL configuration was last updated, in ISO-8601 format.

UrlId string

A generated ID for the endpoint.

Qualifier string
AuthorizationType string

The type of authentication that the function URL uses.

Cors []GetFunctionUrlCor

The cross-origin resource sharing (CORS) settings for the function URL. See the aws.lambda.FunctionUrl resource documentation for more details.

CreationTime string

When the function URL was created, in ISO-8601 format.

FunctionArn string

The Amazon Resource Name (ARN) of the function.

FunctionName string
FunctionUrl string

The 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.

LastModifiedTime string

When the function URL configuration was last updated, in ISO-8601 format.

UrlId string

A generated ID for the endpoint.

Qualifier string
authorizationType String

The type of authentication that the function URL uses.

cors List<GetFunctionUrlCor>

The cross-origin resource sharing (CORS) settings for the function URL. See the aws.lambda.FunctionUrl resource documentation for more details.

creationTime String

When the function URL was created, in ISO-8601 format.

functionArn String

The Amazon Resource Name (ARN) of the function.

functionName String
functionUrl String

The 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.

lastModifiedTime String

When the function URL configuration was last updated, in ISO-8601 format.

urlId String

A generated ID for the endpoint.

qualifier String
authorizationType string

The type of authentication that the function URL uses.

cors GetFunctionUrlCor[]

The cross-origin resource sharing (CORS) settings for the function URL. See the aws.lambda.FunctionUrl resource documentation for more details.

creationTime string

When the function URL was created, in ISO-8601 format.

functionArn string

The Amazon Resource Name (ARN) of the function.

functionName string
functionUrl string

The 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.

lastModifiedTime string

When the function URL configuration was last updated, in ISO-8601 format.

urlId string

A generated ID for the endpoint.

qualifier string
authorization_type str

The type of authentication that the function URL uses.

cors GetFunctionUrlCor]

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

The Amazon Resource Name (ARN) of the function.

function_name str
function_url str

The 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.

last_modified_time str

When the function URL configuration was last updated, in ISO-8601 format.

url_id str

A generated ID for the endpoint.

qualifier str
authorizationType String

The 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.

creationTime String

When the function URL was created, in ISO-8601 format.

functionArn String

The Amazon Resource Name (ARN) of the function.

functionName String
functionUrl String

The 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.

lastModifiedTime String

When the function URL configuration was last updated, in ISO-8601 format.

urlId String

A generated ID for the endpoint.

qualifier String

Supporting Types

GetFunctionUrlCor

AllowCredentials bool
AllowHeaders List<string>
AllowMethods List<string>
AllowOrigins List<string>
ExposeHeaders List<string>
MaxAge int
allowCredentials Boolean
allowHeaders List<String>
allowMethods List<String>
allowOrigins List<String>
exposeHeaders List<String>
maxAge Integer
allowCredentials boolean
allowHeaders string[]
allowMethods string[]
allowOrigins string[]
exposeHeaders string[]
maxAge number
allow_credentials bool
allow_headers Sequence[str]
allow_methods Sequence[str]
allow_origins Sequence[str]
expose_headers Sequence[str]
max_age int
allowCredentials Boolean
allowHeaders List<String>
allowMethods List<String>
allowOrigins List<String>
exposeHeaders List<String>
maxAge Number

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.