1. Packages
  2. Packages
  3. Vercel Provider
  4. API Docs
  5. getFeatureFlagSegment
Viewing docs for Vercel v5.4.1
published on Wednesday, Jul 22, 2026 by Pulumiverse
vercel logo
Viewing docs for Vercel v5.4.1
published on Wednesday, Jul 22, 2026 by Pulumiverse

    Provides information about an existing Feature Flag Segment.

    This data source reads the simplified exact-match segment shape exposed by this provider and looks up the segment by its stable slug within a project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumiverse/vercel";
    
    const example = vercel.getFeatureFlagSegment({
        projectId: "prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        slug: "internal-users",
    });
    
    import pulumi
    import pulumi_vercel as vercel
    
    example = vercel.get_feature_flag_segment(project_id="prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        slug="internal-users")
    
    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 {
    		_, err := vercel.LookupFeatureFlagSegment(ctx, &vercel.LookupFeatureFlagSegmentArgs{
    			ProjectId: "prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    			Slug:      "internal-users",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumiverse.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Vercel.GetFeatureFlagSegment.Invoke(new()
        {
            ProjectId = "prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            Slug = "internal-users",
        });
    
    });
    
    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.GetFeatureFlagSegmentArgs;
    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 example = VercelFunctions.getFeatureFlagSegment(GetFeatureFlagSegmentArgs.builder()
                .projectId("prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx")
                .slug("internal-users")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: vercel:getFeatureFlagSegment
          arguments:
            projectId: prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
            slug: internal-users
    
    Example coming soon!
    

    Using getFeatureFlagSegment

    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 getFeatureFlagSegment(args: GetFeatureFlagSegmentArgs, opts?: InvokeOptions): Promise<GetFeatureFlagSegmentResult>
    function getFeatureFlagSegmentOutput(args: GetFeatureFlagSegmentOutputArgs, opts?: InvokeOptions): Output<GetFeatureFlagSegmentResult>
    def get_feature_flag_segment(project_id: Optional[str] = None,
                                 slug: Optional[str] = None,
                                 team_id: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetFeatureFlagSegmentResult
    def get_feature_flag_segment_output(project_id: pulumi.Input[Optional[str]] = None,
                                 slug: pulumi.Input[Optional[str]] = None,
                                 team_id: pulumi.Input[Optional[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetFeatureFlagSegmentResult]
    func LookupFeatureFlagSegment(ctx *Context, args *LookupFeatureFlagSegmentArgs, opts ...InvokeOption) (*LookupFeatureFlagSegmentResult, error)
    func LookupFeatureFlagSegmentOutput(ctx *Context, args *LookupFeatureFlagSegmentOutputArgs, opts ...InvokeOption) LookupFeatureFlagSegmentResultOutput

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

    public static class GetFeatureFlagSegment 
    {
        public static Task<GetFeatureFlagSegmentResult> InvokeAsync(GetFeatureFlagSegmentArgs args, InvokeOptions? opts = null)
        public static Output<GetFeatureFlagSegmentResult> Invoke(GetFeatureFlagSegmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFeatureFlagSegmentResult> getFeatureFlagSegment(GetFeatureFlagSegmentArgs args, InvokeOptions options)
    public static Output<GetFeatureFlagSegmentResult> getFeatureFlagSegment(GetFeatureFlagSegmentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vercel:index/getFeatureFlagSegment:getFeatureFlagSegment
      arguments:
        # arguments dictionary
    data "vercel_get_feature_flag_segment" "name" {
        # arguments
    }

    The following arguments are supported:

    ProjectId string
    The ID of the Vercel project that owns the segment.
    Slug string
    The stable segment slug used by the Vercel Flags API.
    TeamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    ProjectId string
    The ID of the Vercel project that owns the segment.
    Slug string
    The stable segment slug used by the Vercel Flags API.
    TeamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    project_id string
    The ID of the Vercel project that owns the segment.
    slug string
    The stable segment slug used by the Vercel Flags API.
    team_id string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    projectId String
    The ID of the Vercel project that owns the segment.
    slug String
    The stable segment slug used by the Vercel Flags API.
    teamId String
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    projectId string
    The ID of the Vercel project that owns the segment.
    slug string
    The stable segment slug used by the Vercel Flags API.
    teamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    project_id str
    The ID of the Vercel project that owns the segment.
    slug str
    The stable segment slug used by the Vercel Flags API.
    team_id str
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    projectId String
    The ID of the Vercel project that owns the segment.
    slug String
    The stable segment slug used by the Vercel Flags API.
    teamId String
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.

    getFeatureFlagSegment Result

    The following output properties are available:

    Description string
    A human-readable description of the segment.
    Excludes List<Pulumiverse.Vercel.Outputs.GetFeatureFlagSegmentExclude>
    Exact entity attribute values that are always excluded from this segment.
    Hint string
    An optional dashboard hint for the segment.
    Id string
    The ID of the segment.
    Includes List<Pulumiverse.Vercel.Outputs.GetFeatureFlagSegmentInclude>
    Exact entity attribute values that are always part of this segment.
    Name string
    The human-readable segment name shown in the Vercel dashboard.
    ProjectId string
    The ID of the Vercel project that owns the segment.
    Slug string
    The stable segment slug used by the Vercel Flags API.
    TeamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    Description string
    A human-readable description of the segment.
    Excludes []GetFeatureFlagSegmentExclude
    Exact entity attribute values that are always excluded from this segment.
    Hint string
    An optional dashboard hint for the segment.
    Id string
    The ID of the segment.
    Includes []GetFeatureFlagSegmentInclude
    Exact entity attribute values that are always part of this segment.
    Name string
    The human-readable segment name shown in the Vercel dashboard.
    ProjectId string
    The ID of the Vercel project that owns the segment.
    Slug string
    The stable segment slug used by the Vercel Flags API.
    TeamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    description string
    A human-readable description of the segment.
    excludes list(object)
    Exact entity attribute values that are always excluded from this segment.
    hint string
    An optional dashboard hint for the segment.
    id string
    The ID of the segment.
    includes list(object)
    Exact entity attribute values that are always part of this segment.
    name string
    The human-readable segment name shown in the Vercel dashboard.
    project_id string
    The ID of the Vercel project that owns the segment.
    slug string
    The stable segment slug used by the Vercel Flags API.
    team_id string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    description String
    A human-readable description of the segment.
    excludes List<GetFeatureFlagSegmentExclude>
    Exact entity attribute values that are always excluded from this segment.
    hint String
    An optional dashboard hint for the segment.
    id String
    The ID of the segment.
    includes List<GetFeatureFlagSegmentInclude>
    Exact entity attribute values that are always part of this segment.
    name String
    The human-readable segment name shown in the Vercel dashboard.
    projectId String
    The ID of the Vercel project that owns the segment.
    slug String
    The stable segment slug used by the Vercel Flags API.
    teamId String
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    description string
    A human-readable description of the segment.
    excludes GetFeatureFlagSegmentExclude[]
    Exact entity attribute values that are always excluded from this segment.
    hint string
    An optional dashboard hint for the segment.
    id string
    The ID of the segment.
    includes GetFeatureFlagSegmentInclude[]
    Exact entity attribute values that are always part of this segment.
    name string
    The human-readable segment name shown in the Vercel dashboard.
    projectId string
    The ID of the Vercel project that owns the segment.
    slug string
    The stable segment slug used by the Vercel Flags API.
    teamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    description str
    A human-readable description of the segment.
    excludes Sequence[GetFeatureFlagSegmentExclude]
    Exact entity attribute values that are always excluded from this segment.
    hint str
    An optional dashboard hint for the segment.
    id str
    The ID of the segment.
    includes Sequence[GetFeatureFlagSegmentInclude]
    Exact entity attribute values that are always part of this segment.
    name str
    The human-readable segment name shown in the Vercel dashboard.
    project_id str
    The ID of the Vercel project that owns the segment.
    slug str
    The stable segment slug used by the Vercel Flags API.
    team_id str
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    description String
    A human-readable description of the segment.
    excludes List<Property Map>
    Exact entity attribute values that are always excluded from this segment.
    hint String
    An optional dashboard hint for the segment.
    id String
    The ID of the segment.
    includes List<Property Map>
    Exact entity attribute values that are always part of this segment.
    name String
    The human-readable segment name shown in the Vercel dashboard.
    projectId String
    The ID of the Vercel project that owns the segment.
    slug String
    The stable segment slug used by the Vercel Flags API.
    teamId String
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.

    Supporting Types

    GetFeatureFlagSegmentExclude

    Attribute string
    The entity attribute to match.
    Entity string
    The entity type to match.
    Values List<string>
    The exact values to include or exclude for this entity attribute.
    Attribute string
    The entity attribute to match.
    Entity string
    The entity type to match.
    Values []string
    The exact values to include or exclude for this entity attribute.
    attribute string
    The entity attribute to match.
    entity string
    The entity type to match.
    values list(string)
    The exact values to include or exclude for this entity attribute.
    attribute String
    The entity attribute to match.
    entity String
    The entity type to match.
    values List<String>
    The exact values to include or exclude for this entity attribute.
    attribute string
    The entity attribute to match.
    entity string
    The entity type to match.
    values string[]
    The exact values to include or exclude for this entity attribute.
    attribute str
    The entity attribute to match.
    entity str
    The entity type to match.
    values Sequence[str]
    The exact values to include or exclude for this entity attribute.
    attribute String
    The entity attribute to match.
    entity String
    The entity type to match.
    values List<String>
    The exact values to include or exclude for this entity attribute.

    GetFeatureFlagSegmentInclude

    Attribute string
    The entity attribute to match.
    Entity string
    The entity type to match.
    Values List<string>
    The exact values to include or exclude for this entity attribute.
    Attribute string
    The entity attribute to match.
    Entity string
    The entity type to match.
    Values []string
    The exact values to include or exclude for this entity attribute.
    attribute string
    The entity attribute to match.
    entity string
    The entity type to match.
    values list(string)
    The exact values to include or exclude for this entity attribute.
    attribute String
    The entity attribute to match.
    entity String
    The entity type to match.
    values List<String>
    The exact values to include or exclude for this entity attribute.
    attribute string
    The entity attribute to match.
    entity string
    The entity type to match.
    values string[]
    The exact values to include or exclude for this entity attribute.
    attribute str
    The entity attribute to match.
    entity str
    The entity type to match.
    values Sequence[str]
    The exact values to include or exclude for this entity attribute.
    attribute String
    The entity attribute to match.
    entity String
    The entity type to match.
    values List<String>
    The exact values to include or exclude for this entity attribute.

    Package Details

    Repository
    vercel pulumiverse/pulumi-vercel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vercel Terraform Provider.
    vercel logo
    Viewing docs for Vercel v5.4.1
    published on Wednesday, Jul 22, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial