1. Packages
  2. Nsxt Provider
  3. API Docs
  4. getSwitchingProfile
nsxt 3.8.0 published on Monday, Apr 14, 2025 by vmware

nsxt.getSwitchingProfile

Explore with Pulumi AI

The switching profile data source provides information about switching profiles configured in NSX. A switching profile is a template that defines the settings of one or more logical switches. There can be both factory default and user defined switching profiles. One example of a switching profile is a quality of service (QoS) profile which defines the QoS settings of all switches that use the defined switch profile.

Example Usage

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

const qosProfile = nsxt.getSwitchingProfile({
    displayName: "qos-profile",
});
Copy
import pulumi
import pulumi_nsxt as nsxt

qos_profile = nsxt.get_switching_profile(display_name="qos-profile")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := nsxt.GetSwitchingProfile(ctx, &nsxt.GetSwitchingProfileArgs{
			DisplayName: pulumi.StringRef("qos-profile"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nsxt = Pulumi.Nsxt;

return await Deployment.RunAsync(() => 
{
    var qosProfile = Nsxt.GetSwitchingProfile.Invoke(new()
    {
        DisplayName = "qos-profile",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nsxt.NsxtFunctions;
import com.pulumi.nsxt.inputs.GetSwitchingProfileArgs;
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 qosProfile = NsxtFunctions.getSwitchingProfile(GetSwitchingProfileArgs.builder()
            .displayName("qos-profile")
            .build());

    }
}
Copy
variables:
  qosProfile:
    fn::invoke:
      function: nsxt:getSwitchingProfile
      arguments:
        displayName: qos-profile
Copy

Using getSwitchingProfile

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 getSwitchingProfile(args: GetSwitchingProfileArgs, opts?: InvokeOptions): Promise<GetSwitchingProfileResult>
function getSwitchingProfileOutput(args: GetSwitchingProfileOutputArgs, opts?: InvokeOptions): Output<GetSwitchingProfileResult>
Copy
def get_switching_profile(description: Optional[str] = None,
                          display_name: Optional[str] = None,
                          id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetSwitchingProfileResult
def get_switching_profile_output(description: Optional[pulumi.Input[str]] = None,
                          display_name: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetSwitchingProfileResult]
Copy
func GetSwitchingProfile(ctx *Context, args *GetSwitchingProfileArgs, opts ...InvokeOption) (*GetSwitchingProfileResult, error)
func GetSwitchingProfileOutput(ctx *Context, args *GetSwitchingProfileOutputArgs, opts ...InvokeOption) GetSwitchingProfileResultOutput
Copy

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

public static class GetSwitchingProfile 
{
    public static Task<GetSwitchingProfileResult> InvokeAsync(GetSwitchingProfileArgs args, InvokeOptions? opts = null)
    public static Output<GetSwitchingProfileResult> Invoke(GetSwitchingProfileInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSwitchingProfileResult> getSwitchingProfile(GetSwitchingProfileArgs args, InvokeOptions options)
public static Output<GetSwitchingProfileResult> getSwitchingProfile(GetSwitchingProfileArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: nsxt:index/getSwitchingProfile:getSwitchingProfile
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Description string
The description of the switching profile.
DisplayName string
The Display Name of the Switching Profile to retrieve.
Id string
The ID of Switching Profile to retrieve.
Description string
The description of the switching profile.
DisplayName string
The Display Name of the Switching Profile to retrieve.
Id string
The ID of Switching Profile to retrieve.
description String
The description of the switching profile.
displayName String
The Display Name of the Switching Profile to retrieve.
id String
The ID of Switching Profile to retrieve.
description string
The description of the switching profile.
displayName string
The Display Name of the Switching Profile to retrieve.
id string
The ID of Switching Profile to retrieve.
description str
The description of the switching profile.
display_name str
The Display Name of the Switching Profile to retrieve.
id str
The ID of Switching Profile to retrieve.
description String
The description of the switching profile.
displayName String
The Display Name of the Switching Profile to retrieve.
id String
The ID of Switching Profile to retrieve.

getSwitchingProfile Result

The following output properties are available:

Description string
The description of the switching profile.
DisplayName string
Id string
ResourceType string
The resource type representing the specific type of this switching profile.
Description string
The description of the switching profile.
DisplayName string
Id string
ResourceType string
The resource type representing the specific type of this switching profile.
description String
The description of the switching profile.
displayName String
id String
resourceType String
The resource type representing the specific type of this switching profile.
description string
The description of the switching profile.
displayName string
id string
resourceType string
The resource type representing the specific type of this switching profile.
description str
The description of the switching profile.
display_name str
id str
resource_type str
The resource type representing the specific type of this switching profile.
description String
The description of the switching profile.
displayName String
id String
resourceType String
The resource type representing the specific type of this switching profile.

Package Details

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