1. Packages
  2. AWS Classic
  3. API Docs
  4. lambda
  5. getFunctionUrl

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi

aws.lambda.getFunctionUrl

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi

    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:

    FunctionName string
    The name (or ARN) of the Lambda function.
    Qualifier string
    Alias name or "$LATEST".
    FunctionName string
    The name (or ARN) of the Lambda function.
    Qualifier string
    Alias name or "$LATEST".
    functionName String
    The name (or ARN) of the Lambda function.
    qualifier String
    Alias name or "$LATEST".
    functionName 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".
    functionName String
    The name (or ARN) of the Lambda function.
    qualifier String
    Alias name or "$LATEST".

    getFunctionUrl Result

    The following output properties are available:

    AuthorizationType string
    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
    ARN of the function.
    FunctionName string
    FunctionUrl 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.
    InvokeMode string
    Whether the Lambda function responds in BUFFERED or RESPONSE_STREAM mode.
    LastModifiedTime string
    When the function URL configuration was last updated, in ISO-8601 format.
    UrlId string
    Generated ID for the endpoint.
    Qualifier string
    AuthorizationType string
    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
    ARN of the function.
    FunctionName string
    FunctionUrl 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.
    InvokeMode string
    Whether the Lambda function responds in BUFFERED or RESPONSE_STREAM mode.
    LastModifiedTime string
    When the function URL configuration was last updated, in ISO-8601 format.
    UrlId string
    Generated ID for the endpoint.
    Qualifier string
    authorizationType String
    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
    ARN of the function.
    functionName String
    functionUrl 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.
    invokeMode String
    Whether the Lambda function responds in BUFFERED or RESPONSE_STREAM mode.
    lastModifiedTime String
    When the function URL configuration was last updated, in ISO-8601 format.
    urlId String
    Generated ID for the endpoint.
    qualifier String
    authorizationType string
    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
    ARN of the function.
    functionName string
    functionUrl 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.
    invokeMode string
    Whether the Lambda function responds in BUFFERED or RESPONSE_STREAM mode.
    lastModifiedTime string
    When the function URL configuration was last updated, in ISO-8601 format.
    urlId string
    Generated ID for the endpoint.
    qualifier string
    authorization_type str
    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
    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 or RESPONSE_STREAM mode.
    last_modified_time str
    When the function URL configuration was last updated, in ISO-8601 format.
    url_id str
    Generated ID for the endpoint.
    qualifier str
    authorizationType 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.
    creationTime String
    When the function URL was created, in ISO-8601 format.
    functionArn String
    ARN of the function.
    functionName String
    functionUrl 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.
    invokeMode String
    Whether the Lambda function responds in BUFFERED or RESPONSE_STREAM mode.
    lastModifiedTime String
    When the function URL configuration was last updated, in ISO-8601 format.
    urlId String
    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
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi