1. Registry
  2. Packages
  3. Vercel Provider
  4. API Docs
  5. getShareableLink
Viewing docs for Vercel v5.21.1
published on Thursday, Oct 15, 2026 by Pulumiverse
vercel logo vercel logo
Viewing docs for Vercel v5.21.1
published on Thursday, Oct 15, 2026 by Pulumiverse

    Reads an existing shareable link for a Vercel alias without creating or revoking it. Ordinary deployment URLs without an alias record are not supported. The secret and URL are sensitive but are stored in Terraform state.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumiverse/vercel";
    
    const preview = vercel.getShareableLink({
        alias: "my-project-git-staging.vercel.app",
    });
    export const previewShareUrl = preview.then(preview => preview.url);
    
    import pulumi
    import pulumi_vercel as vercel
    
    preview = vercel.get_shareable_link(alias="my-project-git-staging.vercel.app")
    pulumi.export("previewShareUrl", preview.url)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-vercel/sdk/v5/go/vercel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		preview, err := vercel.LookupShareableLink(ctx, &vercel.LookupShareableLinkArgs{
    			Alias: "my-project-git-staging.vercel.app",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("previewShareUrl", preview.Url)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumiverse.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var preview = Vercel.GetShareableLink.Invoke(new()
        {
            Alias = "my-project-git-staging.vercel.app",
        });
    
        return new Dictionary<string, object?>
        {
            ["previewShareUrl"] = preview.Apply(getShareableLinkResult => getShareableLinkResult.Url),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vercel.VercelFunctions;
    import com.pulumi.vercel.inputs.GetShareableLinkArgs;
    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 preview = VercelFunctions.getShareableLink(GetShareableLinkArgs.builder()
                .alias("my-project-git-staging.vercel.app")
                .build());
    
            ctx.export("previewShareUrl", preview.url());
        }
    }
    
    variables:
      preview:
        fn::invoke:
          function: vercel:getShareableLink
          arguments:
            alias: my-project-git-staging.vercel.app
    outputs:
      previewShareUrl: ${preview.url}
    
    Example coming soon!
    

    Using getShareableLink

    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 getShareableLink(args: GetShareableLinkArgs, opts?: InvokeOptions): Promise<GetShareableLinkResult>
    function getShareableLinkOutput(args: GetShareableLinkOutputArgs, opts?: InvokeOutputOptions): Output<GetShareableLinkResult>
    def get_shareable_link(alias: Optional[str] = None,
                           team_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetShareableLinkResult
    def get_shareable_link_output(alias: pulumi.Input[Optional[str]] = None,
                           team_id: pulumi.Input[Optional[str]] = None,
                           opts: Optional[InvokeOutputOptions] = None) -> Output[GetShareableLinkResult]
    func LookupShareableLink(ctx *Context, args *LookupShareableLinkArgs, opts ...InvokeOption) (*LookupShareableLinkResult, error)
    func LookupShareableLinkOutput(ctx *Context, args *LookupShareableLinkOutputArgs, opts ...InvokeOption) LookupShareableLinkResultOutput

    > Note: This function is named LookupShareableLink in the Go SDK.

    public static class GetShareableLink 
    {
        public static Task<GetShareableLinkResult> InvokeAsync(GetShareableLinkArgs args, InvokeOptions? opts = null)
        public static Output<GetShareableLinkResult> Invoke(GetShareableLinkInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetShareableLinkResult> Invoke(GetShareableLinkInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetShareableLinkResult> getShareableLink(GetShareableLinkArgs args, InvokeOptions options)
    public static Output<GetShareableLinkResult> getShareableLink(GetShareableLinkArgs args, InvokeOptions options)
    public static Output<GetShareableLinkResult> getShareableLink(GetShareableLinkArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: vercel:index/getShareableLink:getShareableLink
      arguments:
        # arguments dictionary
    data "vercel_get_shareable_link" "name" {
        # arguments
    }

    The following arguments are supported:

    Alias string
    The alias hostname, without a scheme or path.
    TeamId string
    The team ID. Defaults to the team configured in the provider.
    Alias string
    The alias hostname, without a scheme or path.
    TeamId string
    The team ID. Defaults to the team configured in the provider.
    alias string
    The alias hostname, without a scheme or path.
    team_id string
    The team ID. Defaults to the team configured in the provider.
    alias String
    The alias hostname, without a scheme or path.
    teamId String
    The team ID. Defaults to the team configured in the provider.
    alias string
    The alias hostname, without a scheme or path.
    teamId string
    The team ID. Defaults to the team configured in the provider.
    alias str
    The alias hostname, without a scheme or path.
    team_id str
    The team ID. Defaults to the team configured in the provider.
    alias String
    The alias hostname, without a scheme or path.
    teamId String
    The team ID. Defaults to the team configured in the provider.

    getShareableLink Result

    The following output properties are available:

    Active bool
    Whether the link has not expired, as of the last read.
    Alias string
    The alias hostname, without a scheme or path.
    CreatedAt int
    Creation time in Unix milliseconds.
    CreatedBy string
    The creator's ID.
    ExpiresAt int
    Expiry time in Unix seconds, or null for no expiry.
    Id string
    The non-secret ID of the alias owning the link.
    ProjectId string
    The project owning the alias.
    Secret string
    The bearer secret. Stored in Terraform state.
    TeamId string
    The team ID. Defaults to the team configured in the provider.
    Url string
    The HTTPS shareable URL, including the secret. Stored in Terraform state.
    Active bool
    Whether the link has not expired, as of the last read.
    Alias string
    The alias hostname, without a scheme or path.
    CreatedAt int
    Creation time in Unix milliseconds.
    CreatedBy string
    The creator's ID.
    ExpiresAt int
    Expiry time in Unix seconds, or null for no expiry.
    Id string
    The non-secret ID of the alias owning the link.
    ProjectId string
    The project owning the alias.
    Secret string
    The bearer secret. Stored in Terraform state.
    TeamId string
    The team ID. Defaults to the team configured in the provider.
    Url string
    The HTTPS shareable URL, including the secret. Stored in Terraform state.
    active bool
    Whether the link has not expired, as of the last read.
    alias string
    The alias hostname, without a scheme or path.
    created_at number
    Creation time in Unix milliseconds.
    created_by string
    The creator's ID.
    expires_at number
    Expiry time in Unix seconds, or null for no expiry.
    id string
    The non-secret ID of the alias owning the link.
    project_id string
    The project owning the alias.
    secret string
    The bearer secret. Stored in Terraform state.
    team_id string
    The team ID. Defaults to the team configured in the provider.
    url string
    The HTTPS shareable URL, including the secret. Stored in Terraform state.
    active Boolean
    Whether the link has not expired, as of the last read.
    alias String
    The alias hostname, without a scheme or path.
    createdAt Integer
    Creation time in Unix milliseconds.
    createdBy String
    The creator's ID.
    expiresAt Integer
    Expiry time in Unix seconds, or null for no expiry.
    id String
    The non-secret ID of the alias owning the link.
    projectId String
    The project owning the alias.
    secret String
    The bearer secret. Stored in Terraform state.
    teamId String
    The team ID. Defaults to the team configured in the provider.
    url String
    The HTTPS shareable URL, including the secret. Stored in Terraform state.
    active boolean
    Whether the link has not expired, as of the last read.
    alias string
    The alias hostname, without a scheme or path.
    createdAt number
    Creation time in Unix milliseconds.
    createdBy string
    The creator's ID.
    expiresAt number
    Expiry time in Unix seconds, or null for no expiry.
    id string
    The non-secret ID of the alias owning the link.
    projectId string
    The project owning the alias.
    secret string
    The bearer secret. Stored in Terraform state.
    teamId string
    The team ID. Defaults to the team configured in the provider.
    url string
    The HTTPS shareable URL, including the secret. Stored in Terraform state.
    active bool
    Whether the link has not expired, as of the last read.
    alias str
    The alias hostname, without a scheme or path.
    created_at int
    Creation time in Unix milliseconds.
    created_by str
    The creator's ID.
    expires_at int
    Expiry time in Unix seconds, or null for no expiry.
    id str
    The non-secret ID of the alias owning the link.
    project_id str
    The project owning the alias.
    secret str
    The bearer secret. Stored in Terraform state.
    team_id str
    The team ID. Defaults to the team configured in the provider.
    url str
    The HTTPS shareable URL, including the secret. Stored in Terraform state.
    active Boolean
    Whether the link has not expired, as of the last read.
    alias String
    The alias hostname, without a scheme or path.
    createdAt Number
    Creation time in Unix milliseconds.
    createdBy String
    The creator's ID.
    expiresAt Number
    Expiry time in Unix seconds, or null for no expiry.
    id String
    The non-secret ID of the alias owning the link.
    projectId String
    The project owning the alias.
    secret String
    The bearer secret. Stored in Terraform state.
    teamId String
    The team ID. Defaults to the team configured in the provider.
    url String
    The HTTPS shareable URL, including the secret. Stored in Terraform state.

    Package Details

    Repository
    vercel pulumiverse/pulumi-vercel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vercel Terraform Provider.
    vercel logo vercel logo
    Viewing docs for Vercel v5.21.1
    published on Thursday, Oct 15, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial