1. Packages
  2. Vantage Provider
  3. API Docs
  4. Segment
vantage 0.1.48 published on Tuesday, Mar 18, 2025 by vantage-sh

vantage.Segment

Explore with Pulumi AI

Manages a Segment.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vantage from "@pulumi/vantage";

const demoSegment = new vantage.Segment("demoSegment", {
    description: "This is still a demo segment",
    filter: "(costs.provider = 'aws' AND tags.name = NULL)",
    priority: 50,
    title: "Demo Segment",
    trackUnallocated: false,
    workspaceToken: "wrkspc_47c3254c790e9351",
});
Copy
import pulumi
import pulumi_vantage as vantage

demo_segment = vantage.Segment("demoSegment",
    description="This is still a demo segment",
    filter="(costs.provider = 'aws' AND tags.name = NULL)",
    priority=50,
    title="Demo Segment",
    track_unallocated=False,
    workspace_token="wrkspc_47c3254c790e9351")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vantage/vantage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vantage.NewSegment(ctx, "demoSegment", &vantage.SegmentArgs{
			Description:      pulumi.String("This is still a demo segment"),
			Filter:           pulumi.String("(costs.provider = 'aws' AND tags.name = NULL)"),
			Priority:         pulumi.Float64(50),
			Title:            pulumi.String("Demo Segment"),
			TrackUnallocated: pulumi.Bool(false),
			WorkspaceToken:   pulumi.String("wrkspc_47c3254c790e9351"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vantage = Pulumi.Vantage;

return await Deployment.RunAsync(() => 
{
    var demoSegment = new Vantage.Segment("demoSegment", new()
    {
        Description = "This is still a demo segment",
        Filter = "(costs.provider = 'aws' AND tags.name = NULL)",
        Priority = 50,
        Title = "Demo Segment",
        TrackUnallocated = false,
        WorkspaceToken = "wrkspc_47c3254c790e9351",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vantage.Segment;
import com.pulumi.vantage.SegmentArgs;
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 demoSegment = new Segment("demoSegment", SegmentArgs.builder()
            .description("This is still a demo segment")
            .filter("(costs.provider = 'aws' AND tags.name = NULL)")
            .priority(50)
            .title("Demo Segment")
            .trackUnallocated(false)
            .workspaceToken("wrkspc_47c3254c790e9351")
            .build());

    }
}
Copy
resources:
  demoSegment:
    type: vantage:Segment
    properties:
      description: This is still a demo segment
      filter: (costs.provider = 'aws' AND tags.name = NULL)
      priority: 50
      title: Demo Segment
      trackUnallocated: false
      # either provide workspace_token or parent_segment_token
      workspaceToken: wrkspc_47c3254c790e9351
Copy

Create Segment Resource

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

Constructor syntax

new Segment(name: string, args: SegmentArgs, opts?: CustomResourceOptions);
@overload
def Segment(resource_name: str,
            args: SegmentArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Segment(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            title: Optional[str] = None,
            description: Optional[str] = None,
            filter: Optional[str] = None,
            parent_segment_token: Optional[str] = None,
            priority: Optional[float] = None,
            track_unallocated: Optional[bool] = None,
            workspace_token: Optional[str] = None)
func NewSegment(ctx *Context, name string, args SegmentArgs, opts ...ResourceOption) (*Segment, error)
public Segment(string name, SegmentArgs args, CustomResourceOptions? opts = null)
public Segment(String name, SegmentArgs args)
public Segment(String name, SegmentArgs args, CustomResourceOptions options)
type: vantage:Segment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SegmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SegmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SegmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SegmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SegmentArgs
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 segmentResource = new Vantage.Segment("segmentResource", new()
{
    Title = "string",
    Description = "string",
    Filter = "string",
    ParentSegmentToken = "string",
    Priority = 0,
    TrackUnallocated = false,
    WorkspaceToken = "string",
});
Copy
example, err := vantage.NewSegment(ctx, "segmentResource", &vantage.SegmentArgs{
Title: pulumi.String("string"),
Description: pulumi.String("string"),
Filter: pulumi.String("string"),
ParentSegmentToken: pulumi.String("string"),
Priority: pulumi.Float64(0),
TrackUnallocated: pulumi.Bool(false),
WorkspaceToken: pulumi.String("string"),
})
Copy
var segmentResource = new Segment("segmentResource", SegmentArgs.builder()
    .title("string")
    .description("string")
    .filter("string")
    .parentSegmentToken("string")
    .priority(0)
    .trackUnallocated(false)
    .workspaceToken("string")
    .build());
Copy
segment_resource = vantage.Segment("segmentResource",
    title="string",
    description="string",
    filter="string",
    parent_segment_token="string",
    priority=0,
    track_unallocated=False,
    workspace_token="string")
Copy
const segmentResource = new vantage.Segment("segmentResource", {
    title: "string",
    description: "string",
    filter: "string",
    parentSegmentToken: "string",
    priority: 0,
    trackUnallocated: false,
    workspaceToken: "string",
});
Copy
type: vantage:Segment
properties:
    description: string
    filter: string
    parentSegmentToken: string
    priority: 0
    title: string
    trackUnallocated: false
    workspaceToken: string
Copy

Segment 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 Segment resource accepts the following input properties:

Title This property is required. string
The title of the Segment.
Description string
The description of the Segment.
Filter string
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
ParentSegmentToken string
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
Priority double
The priority of the Segment.
TrackUnallocated bool
Whether or not to track unallocated resources in this Segment.
WorkspaceToken string
Workspace token to add the segment to.
Title This property is required. string
The title of the Segment.
Description string
The description of the Segment.
Filter string
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
ParentSegmentToken string
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
Priority float64
The priority of the Segment.
TrackUnallocated bool
Whether or not to track unallocated resources in this Segment.
WorkspaceToken string
Workspace token to add the segment to.
title This property is required. String
The title of the Segment.
description String
The description of the Segment.
filter String
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
parentSegmentToken String
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
priority Double
The priority of the Segment.
trackUnallocated Boolean
Whether or not to track unallocated resources in this Segment.
workspaceToken String
Workspace token to add the segment to.
title This property is required. string
The title of the Segment.
description string
The description of the Segment.
filter string
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
parentSegmentToken string
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
priority number
The priority of the Segment.
trackUnallocated boolean
Whether or not to track unallocated resources in this Segment.
workspaceToken string
Workspace token to add the segment to.
title This property is required. str
The title of the Segment.
description str
The description of the Segment.
filter str
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
parent_segment_token str
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
priority float
The priority of the Segment.
track_unallocated bool
Whether or not to track unallocated resources in this Segment.
workspace_token str
Workspace token to add the segment to.
title This property is required. String
The title of the Segment.
description String
The description of the Segment.
filter String
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
parentSegmentToken String
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
priority Number
The priority of the Segment.
trackUnallocated Boolean
Whether or not to track unallocated resources in this Segment.
workspaceToken String
Workspace token to add the segment to.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
ReportToken string
Token of the report for this segment.
Token string
Unique segment identifier
Id string
The provider-assigned unique ID for this managed resource.
ReportToken string
Token of the report for this segment.
Token string
Unique segment identifier
id String
The provider-assigned unique ID for this managed resource.
reportToken String
Token of the report for this segment.
token String
Unique segment identifier
id string
The provider-assigned unique ID for this managed resource.
reportToken string
Token of the report for this segment.
token string
Unique segment identifier
id str
The provider-assigned unique ID for this managed resource.
report_token str
Token of the report for this segment.
token str
Unique segment identifier
id String
The provider-assigned unique ID for this managed resource.
reportToken String
Token of the report for this segment.
token String
Unique segment identifier

Look up Existing Segment Resource

Get an existing Segment 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?: SegmentState, opts?: CustomResourceOptions): Segment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        filter: Optional[str] = None,
        parent_segment_token: Optional[str] = None,
        priority: Optional[float] = None,
        report_token: Optional[str] = None,
        title: Optional[str] = None,
        token: Optional[str] = None,
        track_unallocated: Optional[bool] = None,
        workspace_token: Optional[str] = None) -> Segment
func GetSegment(ctx *Context, name string, id IDInput, state *SegmentState, opts ...ResourceOption) (*Segment, error)
public static Segment Get(string name, Input<string> id, SegmentState? state, CustomResourceOptions? opts = null)
public static Segment get(String name, Output<String> id, SegmentState state, CustomResourceOptions options)
resources:  _:    type: vantage:Segment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Description string
The description of the Segment.
Filter string
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
ParentSegmentToken string
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
Priority double
The priority of the Segment.
ReportToken string
Token of the report for this segment.
Title string
The title of the Segment.
Token string
Unique segment identifier
TrackUnallocated bool
Whether or not to track unallocated resources in this Segment.
WorkspaceToken string
Workspace token to add the segment to.
Description string
The description of the Segment.
Filter string
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
ParentSegmentToken string
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
Priority float64
The priority of the Segment.
ReportToken string
Token of the report for this segment.
Title string
The title of the Segment.
Token string
Unique segment identifier
TrackUnallocated bool
Whether or not to track unallocated resources in this Segment.
WorkspaceToken string
Workspace token to add the segment to.
description String
The description of the Segment.
filter String
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
parentSegmentToken String
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
priority Double
The priority of the Segment.
reportToken String
Token of the report for this segment.
title String
The title of the Segment.
token String
Unique segment identifier
trackUnallocated Boolean
Whether or not to track unallocated resources in this Segment.
workspaceToken String
Workspace token to add the segment to.
description string
The description of the Segment.
filter string
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
parentSegmentToken string
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
priority number
The priority of the Segment.
reportToken string
Token of the report for this segment.
title string
The title of the Segment.
token string
Unique segment identifier
trackUnallocated boolean
Whether or not to track unallocated resources in this Segment.
workspaceToken string
Workspace token to add the segment to.
description str
The description of the Segment.
filter str
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
parent_segment_token str
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
priority float
The priority of the Segment.
report_token str
Token of the report for this segment.
title str
The title of the Segment.
token str
Unique segment identifier
track_unallocated bool
Whether or not to track unallocated resources in this Segment.
workspace_token str
Workspace token to add the segment to.
description String
The description of the Segment.
filter String
The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
parentSegmentToken String
The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
priority Number
The priority of the Segment.
reportToken String
Token of the report for this segment.
title String
The title of the Segment.
token String
Unique segment identifier
trackUnallocated Boolean
Whether or not to track unallocated resources in this Segment.
workspaceToken String
Workspace token to add the segment to.

Package Details

Repository
vantage vantage-sh/terraform-provider-vantage
License
Notes
This Pulumi package is based on the vantage Terraform Provider.