1. Packages
  2. Packages
  3. Harness Provider
  4. API Docs
  5. fme
  6. getTrafficType
Viewing docs for Harness v0.13.1
published on Thursday, May 28, 2026 by Pulumi
harness logo
Viewing docs for Harness v0.13.1
published on Thursday, May 28, 2026 by Pulumi

    Look up a Harness FME (Split) traffic type by name. The workspace is resolved from orgId and projectId via Workspaces.ResolveWorkspaceID.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    // Default Split workspaces include a "user" traffic type.
    const user = harness.fme.getTrafficType({
        orgId: "organization_id",
        projectId: "project_id",
        name: "user",
    });
    
    import pulumi
    import pulumi_harness as harness
    
    # Default Split workspaces include a "user" traffic type.
    user = harness.fme.get_traffic_type(org_id="organization_id",
        project_id="project_id",
        name="user")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/fme"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Default Split workspaces include a "user" traffic type.
    		_, err := fme.GetTrafficType(ctx, &fme.GetTrafficTypeArgs{
    			OrgId:     "organization_id",
    			ProjectId: "project_id",
    			Name:      "user",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        // Default Split workspaces include a "user" traffic type.
        var user = Harness.Fme.GetTrafficType.Invoke(new()
        {
            OrgId = "organization_id",
            ProjectId = "project_id",
            Name = "user",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.fme.FmeFunctions;
    import com.pulumi.harness.fme.inputs.GetTrafficTypeArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // Default Split workspaces include a "user" traffic type.
            final var user = FmeFunctions.getTrafficType(GetTrafficTypeArgs.builder()
                .orgId("organization_id")
                .projectId("project_id")
                .name("user")
                .build());
    
        }
    }
    
    variables:
      # Default Split workspaces include a "user" traffic type.
      user:
        fn::invoke:
          function: harness:fme:getTrafficType
          arguments:
            orgId: organization_id
            projectId: project_id
            name: user
    
    pulumi {
      required_providers {
        harness = {
          source = "pulumi/harness"
        }
      }
    }
    
    data "harness_fme_gettraffictype" "user" {
      org_id     = "organization_id"
      project_id = "project_id"
      name       = "user"
    }
    
    # Default Split workspaces include a "user" traffic type.
    

    Using getTrafficType

    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 getTrafficType(args: GetTrafficTypeArgs, opts?: InvokeOptions): Promise<GetTrafficTypeResult>
    function getTrafficTypeOutput(args: GetTrafficTypeOutputArgs, opts?: InvokeOptions): Output<GetTrafficTypeResult>
    def get_traffic_type(name: Optional[str] = None,
                         org_id: Optional[str] = None,
                         project_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetTrafficTypeResult
    def get_traffic_type_output(name: pulumi.Input[Optional[str]] = None,
                         org_id: pulumi.Input[Optional[str]] = None,
                         project_id: pulumi.Input[Optional[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetTrafficTypeResult]
    func GetTrafficType(ctx *Context, args *GetTrafficTypeArgs, opts ...InvokeOption) (*GetTrafficTypeResult, error)
    func GetTrafficTypeOutput(ctx *Context, args *GetTrafficTypeOutputArgs, opts ...InvokeOption) GetTrafficTypeResultOutput

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

    public static class GetTrafficType 
    {
        public static Task<GetTrafficTypeResult> InvokeAsync(GetTrafficTypeArgs args, InvokeOptions? opts = null)
        public static Output<GetTrafficTypeResult> Invoke(GetTrafficTypeInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTrafficTypeResult> getTrafficType(GetTrafficTypeArgs args, InvokeOptions options)
    public static Output<GetTrafficTypeResult> getTrafficType(GetTrafficTypeArgs args, InvokeOptions options)
    
    fn::invoke:
      function: harness:fme/getTrafficType:getTrafficType
      arguments:
        # arguments dictionary
    data "harness_fme_gettraffictype" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    Traffic type name in Split (e.g. user).
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    Name string
    Traffic type name in Split (e.g. user).
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    name string
    Traffic type name in Split (e.g. user).
    org_id string
    Harness organization identifier.
    project_id string
    Harness project identifier.
    name String
    Traffic type name in Split (e.g. user).
    orgId String
    Harness organization identifier.
    projectId String
    Harness project identifier.
    name string
    Traffic type name in Split (e.g. user).
    orgId string
    Harness organization identifier.
    projectId string
    Harness project identifier.
    name str
    Traffic type name in Split (e.g. user).
    org_id str
    Harness organization identifier.
    project_id str
    Harness project identifier.
    name String
    Traffic type name in Split (e.g. user).
    orgId String
    Harness organization identifier.
    projectId String
    Harness project identifier.

    getTrafficType Result

    The following output properties are available:

    DisplayAttributeId string
    Display attribute ID when set.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Traffic type name in Split (e.g. user).
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    TrafficTypeId string
    The Split traffic type ID (same as id).
    DisplayAttributeId string
    Display attribute ID when set.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Traffic type name in Split (e.g. user).
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    TrafficTypeId string
    The Split traffic type ID (same as id).
    display_attribute_id string
    Display attribute ID when set.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Traffic type name in Split (e.g. user).
    org_id string
    Harness organization identifier.
    project_id string
    Harness project identifier.
    traffic_type_id string
    The Split traffic type ID (same as id).
    displayAttributeId String
    Display attribute ID when set.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Traffic type name in Split (e.g. user).
    orgId String
    Harness organization identifier.
    projectId String
    Harness project identifier.
    trafficTypeId String
    The Split traffic type ID (same as id).
    displayAttributeId string
    Display attribute ID when set.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Traffic type name in Split (e.g. user).
    orgId string
    Harness organization identifier.
    projectId string
    Harness project identifier.
    trafficTypeId string
    The Split traffic type ID (same as id).
    display_attribute_id str
    Display attribute ID when set.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Traffic type name in Split (e.g. user).
    org_id str
    Harness organization identifier.
    project_id str
    Harness project identifier.
    traffic_type_id str
    The Split traffic type ID (same as id).
    displayAttributeId String
    Display attribute ID when set.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Traffic type name in Split (e.g. user).
    orgId String
    Harness organization identifier.
    projectId String
    Harness project identifier.
    trafficTypeId String
    The Split traffic type ID (same as id).

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Viewing docs for Harness v0.13.1
    published on Thursday, May 28, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial