1. Registry
  2. Packages
  3. Vercel Provider
  4. API Docs
  5. ShareableLink
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

    Manages a shareable link for an existing Vercel alias. Anyone with the link can bypass Deployment Protection for that alias. Ordinary deployment URLs without an alias record are not supported.

    Hobby plans: Only one shareable link can exist per account. Creating a link automatically revokes other shareable links across the account, including links managed outside Terraform. Managing multiple links on a Hobby account will cause recurring drift.

    The secret and URL are sensitive but are stored in Terraform state. Protect access to your state. Only one shareable link can exist per alias; import an existing link before managing it. Custom shareable-link parameters are not supported.

    Changing ttl_seconds or rotation_id rotates the secret and immediately invalidates the old link. Expired links remain managed and are not automatically renewed. Create-before-destroy is not supported for the same alias.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumiverse/vercel";
    
    const preview = new vercel.ShareableLink("preview", {
        alias: "my-project-git-staging.vercel.app",
        ttlSeconds: 604800,
        rotationId: "1",
    });
    export const previewShareUrl = preview.url;
    
    import pulumi
    import pulumiverse_vercel as vercel
    
    preview = vercel.ShareableLink("preview",
        alias="my-project-git-staging.vercel.app",
        ttl_seconds=604800,
        rotation_id="1")
    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.NewShareableLink(ctx, "preview", &vercel.ShareableLinkArgs{
    			Alias:      pulumi.String("my-project-git-staging.vercel.app"),
    			TtlSeconds: pulumi.Int(604800),
    			RotationId: pulumi.String("1"),
    		})
    		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 = new Vercel.ShareableLink("preview", new()
        {
            Alias = "my-project-git-staging.vercel.app",
            TtlSeconds = 604800,
            RotationId = "1",
        });
    
        return new Dictionary<string, object?>
        {
            ["previewShareUrl"] = preview.Url,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumiverse.vercel.ShareableLink;
    import com.pulumiverse.vercel.ShareableLinkArgs;
    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 preview = new ShareableLink("preview", ShareableLinkArgs.builder()
                .alias("my-project-git-staging.vercel.app")
                .ttlSeconds(604800)
                .rotationId("1")
                .build());
    
            ctx.export("previewShareUrl", preview.url());
        }
    }
    
    resources:
      preview:
        type: vercel:ShareableLink
        properties:
          alias: my-project-git-staging.vercel.app
          ttlSeconds: 604800
          rotationId: '1'
    outputs:
      previewShareUrl: ${preview.url}
    
    Example coming soon!
    

    Create ShareableLink Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ShareableLink(name: string, args: ShareableLinkArgs, opts?: CustomResourceOptions);
    @overload
    def ShareableLink(resource_name: str,
                      args: ShareableLinkArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ShareableLink(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      alias: Optional[str] = None,
                      rotation_id: Optional[str] = None,
                      team_id: Optional[str] = None,
                      ttl_seconds: Optional[int] = None)
    func NewShareableLink(ctx *Context, name string, args ShareableLinkArgs, opts ...ResourceOption) (*ShareableLink, error)
    public ShareableLink(string name, ShareableLinkArgs args, CustomResourceOptions? opts = null)
    public ShareableLink(String name, ShareableLinkArgs args)
    public ShareableLink(String name, ShareableLinkArgs args, CustomResourceOptions options)
    
    type: vercel:ShareableLink
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "vercel_shareable_link" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ShareableLinkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ShareableLinkArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ShareableLinkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ShareableLinkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ShareableLinkArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var shareableLinkResource = new Vercel.ShareableLink("shareableLinkResource", new()
    {
        Alias = "string",
        RotationId = "string",
        TeamId = "string",
        TtlSeconds = 0,
    });
    
    example, err := vercel.NewShareableLink(ctx, "shareableLinkResource", &vercel.ShareableLinkArgs{
    	Alias:      pulumi.String("string"),
    	RotationId: pulumi.String("string"),
    	TeamId:     pulumi.String("string"),
    	TtlSeconds: pulumi.Int(0),
    })
    
    resource "vercel_shareable_link" "shareableLinkResource" {
      lifecycle {
        create_before_destroy = true
      }
      alias       = "string"
      rotation_id = "string"
      team_id     = "string"
      ttl_seconds = 0
    }
    
    var shareableLinkResource = new ShareableLink("shareableLinkResource", ShareableLinkArgs.builder()
        .alias("string")
        .rotationId("string")
        .teamId("string")
        .ttlSeconds(0)
        .build());
    
    shareable_link_resource = vercel.ShareableLink("shareableLinkResource",
        alias="string",
        rotation_id="string",
        team_id="string",
        ttl_seconds=0)
    
    const shareableLinkResource = new vercel.ShareableLink("shareableLinkResource", {
        alias: "string",
        rotationId: "string",
        teamId: "string",
        ttlSeconds: 0,
    });
    
    type: vercel:ShareableLink
    properties:
        alias: string
        rotationId: string
        teamId: string
        ttlSeconds: 0
    

    ShareableLink Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ShareableLink resource accepts the following input properties:

    Alias string
    The existing alias hostname, without a scheme or path.
    RotationId string
    Change this value to explicitly rotate the link, including renewing an expired link.
    TeamId string
    The team ID. Defaults to the team configured in the provider.
    TtlSeconds int
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    Alias string
    The existing alias hostname, without a scheme or path.
    RotationId string
    Change this value to explicitly rotate the link, including renewing an expired link.
    TeamId string
    The team ID. Defaults to the team configured in the provider.
    TtlSeconds int
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    alias string
    The existing alias hostname, without a scheme or path.
    rotation_id string
    Change this value to explicitly rotate the link, including renewing an expired link.
    team_id string
    The team ID. Defaults to the team configured in the provider.
    ttl_seconds number
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    alias String
    The existing alias hostname, without a scheme or path.
    rotationId String
    Change this value to explicitly rotate the link, including renewing an expired link.
    teamId String
    The team ID. Defaults to the team configured in the provider.
    ttlSeconds Integer
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    alias string
    The existing alias hostname, without a scheme or path.
    rotationId string
    Change this value to explicitly rotate the link, including renewing an expired link.
    teamId string
    The team ID. Defaults to the team configured in the provider.
    ttlSeconds number
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    alias str
    The existing alias hostname, without a scheme or path.
    rotation_id str
    Change this value to explicitly rotate the link, including renewing an expired link.
    team_id str
    The team ID. Defaults to the team configured in the provider.
    ttl_seconds int
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    alias String
    The existing alias hostname, without a scheme or path.
    rotationId String
    Change this value to explicitly rotate the link, including renewing an expired link.
    teamId String
    The team ID. Defaults to the team configured in the provider.
    ttlSeconds Number
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ShareableLink resource produces the following output properties:

    Active bool
    Whether the link has not expired, as of the last refresh.
    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 provider-assigned unique ID for this managed resource.
    ProjectId string
    The project owning the alias.
    Secret string
    The generated bearer secret. Stored in Terraform state.
    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 refresh.
    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 provider-assigned unique ID for this managed resource.
    ProjectId string
    The project owning the alias.
    Secret string
    The generated bearer secret. Stored in Terraform state.
    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 refresh.
    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 provider-assigned unique ID for this managed resource.
    project_id string
    The project owning the alias.
    secret string
    The generated bearer secret. Stored in Terraform state.
    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 refresh.
    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 provider-assigned unique ID for this managed resource.
    projectId String
    The project owning the alias.
    secret String
    The generated bearer secret. Stored in Terraform state.
    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 refresh.
    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 provider-assigned unique ID for this managed resource.
    projectId string
    The project owning the alias.
    secret string
    The generated bearer secret. Stored in Terraform state.
    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 refresh.
    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 provider-assigned unique ID for this managed resource.
    project_id str
    The project owning the alias.
    secret str
    The generated bearer secret. Stored in Terraform state.
    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 refresh.
    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 provider-assigned unique ID for this managed resource.
    projectId String
    The project owning the alias.
    secret String
    The generated bearer secret. Stored in Terraform state.
    url String
    The HTTPS shareable URL, including the secret. Stored in Terraform state.

    Look up Existing ShareableLink Resource

    Get an existing ShareableLink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ShareableLinkState, opts?: CustomResourceOptions): ShareableLink
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            active: Optional[bool] = None,
            alias: Optional[str] = None,
            created_at: Optional[int] = None,
            created_by: Optional[str] = None,
            expires_at: Optional[int] = None,
            project_id: Optional[str] = None,
            rotation_id: Optional[str] = None,
            secret: Optional[str] = None,
            team_id: Optional[str] = None,
            ttl_seconds: Optional[int] = None,
            url: Optional[str] = None) -> ShareableLink
    func GetShareableLink(ctx *Context, name string, id IDInput, state *ShareableLinkState, opts ...ResourceOption) (*ShareableLink, error)
    public static ShareableLink Get(string name, Input<string> id, ShareableLinkState? state, CustomResourceOptions? opts = null)
    public static ShareableLink get(String name, Output<String> id, ShareableLinkState state, CustomResourceOptions options)
    resources:  _:    type: vercel:ShareableLink    get:      id: ${id}
    import {
      to = vercel_shareable_link.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Active bool
    Whether the link has not expired, as of the last refresh.
    Alias string
    The existing 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.
    ProjectId string
    The project owning the alias.
    RotationId string
    Change this value to explicitly rotate the link, including renewing an expired link.
    Secret string
    The generated bearer secret. Stored in Terraform state.
    TeamId string
    The team ID. Defaults to the team configured in the provider.
    TtlSeconds int
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    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 refresh.
    Alias string
    The existing 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.
    ProjectId string
    The project owning the alias.
    RotationId string
    Change this value to explicitly rotate the link, including renewing an expired link.
    Secret string
    The generated bearer secret. Stored in Terraform state.
    TeamId string
    The team ID. Defaults to the team configured in the provider.
    TtlSeconds int
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    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 refresh.
    alias string
    The existing 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.
    project_id string
    The project owning the alias.
    rotation_id string
    Change this value to explicitly rotate the link, including renewing an expired link.
    secret string
    The generated bearer secret. Stored in Terraform state.
    team_id string
    The team ID. Defaults to the team configured in the provider.
    ttl_seconds number
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    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 refresh.
    alias String
    The existing 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.
    projectId String
    The project owning the alias.
    rotationId String
    Change this value to explicitly rotate the link, including renewing an expired link.
    secret String
    The generated bearer secret. Stored in Terraform state.
    teamId String
    The team ID. Defaults to the team configured in the provider.
    ttlSeconds Integer
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    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 refresh.
    alias string
    The existing 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.
    projectId string
    The project owning the alias.
    rotationId string
    Change this value to explicitly rotate the link, including renewing an expired link.
    secret string
    The generated bearer secret. Stored in Terraform state.
    teamId string
    The team ID. Defaults to the team configured in the provider.
    ttlSeconds number
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    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 refresh.
    alias str
    The existing 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.
    project_id str
    The project owning the alias.
    rotation_id str
    Change this value to explicitly rotate the link, including renewing an expired link.
    secret str
    The generated bearer secret. Stored in Terraform state.
    team_id str
    The team ID. Defaults to the team configured in the provider.
    ttl_seconds int
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    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 refresh.
    alias String
    The existing 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.
    projectId String
    The project owning the alias.
    rotationId String
    Change this value to explicitly rotate the link, including renewing an expired link.
    secret String
    The generated bearer secret. Stored in Terraform state.
    teamId String
    The team ID. Defaults to the team configured in the provider.
    ttlSeconds Number
    How long a newly created or rotated link is valid, in seconds (1 to 63072000). Omit for no expiry. Changing this rotates the link.
    url String
    The HTTPS shareable URL, including the secret. Stored in Terraform state.

    Import

    The pulumi import command can be used, for example:

    Import using an alias hostname, optionally prefixed with the team ID.

    $ pulumi import vercel:index/shareableLink:ShareableLink preview my-project-git-staging.vercel.app
    $ pulumi import vercel:index/shareableLink:ShareableLink preview team_xxxxxxxxxxxxxxxxxxxxxxxx/my-project-git-staging.vercel.app
    

    To learn more about importing existing cloud resources, see Importing resources.

    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