nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware
nsxt.getFirewallSection
Explore with Pulumi AI
This data source provides information about firewall section configured on NSX. It can be useful to enforce placement of newly created firewall sections.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
const blockAll = nsxt.getFirewallSection({
displayName: "block all",
});
import pulumi
import pulumi_nsxt as nsxt
block_all = nsxt.get_firewall_section(display_name="block all")
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.LookupFirewallSection(ctx, &nsxt.LookupFirewallSectionArgs{
DisplayName: pulumi.StringRef("block all"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nsxt = Pulumi.Nsxt;
return await Deployment.RunAsync(() =>
{
var blockAll = Nsxt.GetFirewallSection.Invoke(new()
{
DisplayName = "block all",
});
});
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.GetFirewallSectionArgs;
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 blockAll = NsxtFunctions.getFirewallSection(GetFirewallSectionArgs.builder()
.displayName("block all")
.build());
}
}
variables:
blockAll:
fn::invoke:
function: nsxt:getFirewallSection
arguments:
displayName: block all
Using getFirewallSection
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 getFirewallSection(args: GetFirewallSectionArgs, opts?: InvokeOptions): Promise<GetFirewallSectionResult>
function getFirewallSectionOutput(args: GetFirewallSectionOutputArgs, opts?: InvokeOptions): Output<GetFirewallSectionResult>
def get_firewall_section(description: Optional[str] = None,
display_name: Optional[str] = None,
id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFirewallSectionResult
def get_firewall_section_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[GetFirewallSectionResult]
func LookupFirewallSection(ctx *Context, args *LookupFirewallSectionArgs, opts ...InvokeOption) (*LookupFirewallSectionResult, error)
func LookupFirewallSectionOutput(ctx *Context, args *LookupFirewallSectionOutputArgs, opts ...InvokeOption) LookupFirewallSectionResultOutput
> Note: This function is named LookupFirewallSection
in the Go SDK.
public static class GetFirewallSection
{
public static Task<GetFirewallSectionResult> InvokeAsync(GetFirewallSectionArgs args, InvokeOptions? opts = null)
public static Output<GetFirewallSectionResult> Invoke(GetFirewallSectionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFirewallSectionResult> getFirewallSection(GetFirewallSectionArgs args, InvokeOptions options)
public static Output<GetFirewallSectionResult> getFirewallSection(GetFirewallSectionArgs args, InvokeOptions options)
fn::invoke:
function: nsxt:index/getFirewallSection:getFirewallSection
arguments:
# arguments dictionary
The following arguments are supported:
- Description string
- The description of resource.
- Display
Name string - The Display Name of resource to retrieve.
- Id string
- The ID of resource to retrieve
- Description string
- The description of resource.
- Display
Name string - The Display Name of resource to retrieve.
- Id string
- The ID of resource to retrieve
- description String
- The description of resource.
- display
Name String - The Display Name of resource to retrieve.
- id String
- The ID of resource to retrieve
- description string
- The description of resource.
- display
Name string - The Display Name of resource to retrieve.
- id string
- The ID of resource to retrieve
- description str
- The description of resource.
- display_
name str - The Display Name of resource to retrieve.
- id str
- The ID of resource to retrieve
- description String
- The description of resource.
- display
Name String - The Display Name of resource to retrieve.
- id String
- The ID of resource to retrieve
getFirewallSection Result
The following output properties are available:
- Description string
- The description of resource.
- Display
Name string - Id string
- Description string
- The description of resource.
- Display
Name string - Id string
- description String
- The description of resource.
- display
Name String - id String
- description string
- The description of resource.
- display
Name string - id string
- description str
- The description of resource.
- display_
name str - id str
- description String
- The description of resource.
- display
Name String - id String
Package Details
- Repository
- nsxt vmware/terraform-provider-nsxt
- License
- Notes
- This Pulumi package is based on the
nsxt
Terraform Provider.