1. Packages
  2. Vantage
  3. API Docs
  4. Segment
Vantage v0.0.3 published on Wednesday, Jan 31, 2024 by lbrlabs

vantage.Segment

Explore with Pulumi AI

vantage logo
Vantage v0.0.3 published on Wednesday, Jan 31, 2024 by lbrlabs

    Manages a Segment.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vantage = Lbrlabs.PulumiPackage.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,
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-vantage/sdk/go/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.Int(50),
    			Title:            pulumi.String("Demo Segment"),
    			TrackUnallocated: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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)
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_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)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vantage from "@lbrlabs/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,
    });
    
    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
    

    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[int] = 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 string
    The unique name of the resource.
    args SegmentArgs
    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 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 string
    The unique name of the resource.
    args SegmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SegmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    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.Int(0),
    	TrackUnallocated:   pulumi.Bool(false),
    	WorkspaceToken:     pulumi.String("string"),
    })
    
    var segmentResource = new Segment("segmentResource", SegmentArgs.builder()
        .title("string")
        .description("string")
        .filter("string")
        .parentSegmentToken("string")
        .priority(0)
        .trackUnallocated(false)
        .workspaceToken("string")
        .build());
    
    segment_resource = vantage.Segment("segmentResource",
        title="string",
        description="string",
        filter="string",
        parent_segment_token="string",
        priority=0,
        track_unallocated=False,
        workspace_token="string")
    
    const segmentResource = new vantage.Segment("segmentResource", {
        title: "string",
        description: "string",
        filter: "string",
        parentSegmentToken: "string",
        priority: 0,
        trackUnallocated: false,
        workspaceToken: "string",
    });
    
    type: vantage:Segment
    properties:
        description: string
        filter: string
        parentSegmentToken: string
        priority: 0
        title: string
        trackUnallocated: false
        workspaceToken: string
    

    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 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 int
    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 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 int
    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 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 Integer
    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 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 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 int
    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 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.
    Token string
    Unique segment identifier
    Id string
    The provider-assigned unique ID for this managed resource.
    Token string
    Unique segment identifier
    id String
    The provider-assigned unique ID for this managed resource.
    token String
    Unique segment identifier
    id string
    The provider-assigned unique ID for this managed resource.
    token string
    Unique segment identifier
    id str
    The provider-assigned unique ID for this managed resource.
    token str
    Unique segment identifier
    id String
    The provider-assigned unique ID for this managed resource.
    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[int] = 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)
    Resource lookup is not supported in YAML
    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:
    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 int
    The priority of the 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 int
    The priority of the 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 Integer
    The priority of the 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.
    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 int
    The priority of the 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.
    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 lbrlabs/pulumi-vantage
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vantage Terraform Provider.
    vantage logo
    Vantage v0.0.3 published on Wednesday, Jan 31, 2024 by lbrlabs