vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getNsxvDnat
Explore with Pulumi AI
Provides a VMware Cloud Director DNAT data source for advanced edge gateways (NSX-V). This can be used to read existing rule by ID and use its attributes in other resources.
Note: This data source requires advanced edge gateway.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const my_rule = vcd.getNsxvDnat({
edgeGateway: "my-edge-gw",
org: "my-org",
ruleId: "197864",
vdc: "my-org-vdc",
});
import pulumi
import pulumi_vcd as vcd
my_rule = vcd.get_nsxv_dnat(edge_gateway="my-edge-gw",
org="my-org",
rule_id="197864",
vdc="my-org-vdc")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vcd.LookupNsxvDnat(ctx, &vcd.LookupNsxvDnatArgs{
EdgeGateway: "my-edge-gw",
Org: pulumi.StringRef("my-org"),
RuleId: "197864",
Vdc: pulumi.StringRef("my-org-vdc"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;
return await Deployment.RunAsync(() =>
{
var my_rule = Vcd.GetNsxvDnat.Invoke(new()
{
EdgeGateway = "my-edge-gw",
Org = "my-org",
RuleId = "197864",
Vdc = "my-org-vdc",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetNsxvDnatArgs;
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 my-rule = VcdFunctions.getNsxvDnat(GetNsxvDnatArgs.builder()
.edgeGateway("my-edge-gw")
.org("my-org")
.ruleId("197864")
.vdc("my-org-vdc")
.build());
}
}
variables:
my-rule:
fn::invoke:
function: vcd:getNsxvDnat
arguments:
edgeGateway: my-edge-gw
org: my-org
ruleId: '197864'
vdc: my-org-vdc
Using getNsxvDnat
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 getNsxvDnat(args: GetNsxvDnatArgs, opts?: InvokeOptions): Promise<GetNsxvDnatResult>
function getNsxvDnatOutput(args: GetNsxvDnatOutputArgs, opts?: InvokeOptions): Output<GetNsxvDnatResult>
def get_nsxv_dnat(edge_gateway: Optional[str] = None,
id: Optional[str] = None,
org: Optional[str] = None,
rule_id: Optional[str] = None,
vdc: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNsxvDnatResult
def get_nsxv_dnat_output(edge_gateway: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
org: Optional[pulumi.Input[str]] = None,
rule_id: Optional[pulumi.Input[str]] = None,
vdc: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNsxvDnatResult]
func LookupNsxvDnat(ctx *Context, args *LookupNsxvDnatArgs, opts ...InvokeOption) (*LookupNsxvDnatResult, error)
func LookupNsxvDnatOutput(ctx *Context, args *LookupNsxvDnatOutputArgs, opts ...InvokeOption) LookupNsxvDnatResultOutput
> Note: This function is named LookupNsxvDnat
in the Go SDK.
public static class GetNsxvDnat
{
public static Task<GetNsxvDnatResult> InvokeAsync(GetNsxvDnatArgs args, InvokeOptions? opts = null)
public static Output<GetNsxvDnatResult> Invoke(GetNsxvDnatInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNsxvDnatResult> getNsxvDnat(GetNsxvDnatArgs args, InvokeOptions options)
public static Output<GetNsxvDnatResult> getNsxvDnat(GetNsxvDnatArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getNsxvDnat:getNsxvDnat
arguments:
# arguments dictionary
The following arguments are supported:
- Edge
Gateway string - The name of the edge gateway on which to apply the DNAT rule.
- Rule
Id string - ID of DNAT rule as shown in the UI.
- Id string
- Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Vdc string
- The name of VDC to use, optional if defined at provider level.
- Edge
Gateway string - The name of the edge gateway on which to apply the DNAT rule.
- Rule
Id string - ID of DNAT rule as shown in the UI.
- Id string
- Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Vdc string
- The name of VDC to use, optional if defined at provider level.
- edge
Gateway String - The name of the edge gateway on which to apply the DNAT rule.
- rule
Id String - ID of DNAT rule as shown in the UI.
- id String
- org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc String
- The name of VDC to use, optional if defined at provider level.
- edge
Gateway string - The name of the edge gateway on which to apply the DNAT rule.
- rule
Id string - ID of DNAT rule as shown in the UI.
- id string
- org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc string
- The name of VDC to use, optional if defined at provider level.
- edge_
gateway str - The name of the edge gateway on which to apply the DNAT rule.
- rule_
id str - ID of DNAT rule as shown in the UI.
- id str
- org str
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc str
- The name of VDC to use, optional if defined at provider level.
- edge
Gateway String - The name of the edge gateway on which to apply the DNAT rule.
- rule
Id String - ID of DNAT rule as shown in the UI.
- id String
- org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc String
- The name of VDC to use, optional if defined at provider level.
getNsxvDnat Result
The following output properties are available:
- Description string
- Edge
Gateway string - Enabled bool
- Icmp
Type string - Id string
- Logging
Enabled bool - Network
Name string - Network
Type string - Original
Address string - Original
Port string - Protocol string
- Rule
Id string - Rule
Tag double - Rule
Type string - Translated
Address string - Translated
Port string - Org string
- Vdc string
- Description string
- Edge
Gateway string - Enabled bool
- Icmp
Type string - Id string
- Logging
Enabled bool - Network
Name string - Network
Type string - Original
Address string - Original
Port string - Protocol string
- Rule
Id string - Rule
Tag float64 - Rule
Type string - Translated
Address string - Translated
Port string - Org string
- Vdc string
- description String
- edge
Gateway String - enabled Boolean
- icmp
Type String - id String
- logging
Enabled Boolean - network
Name String - network
Type String - original
Address String - original
Port String - protocol String
- rule
Id String - rule
Tag Double - rule
Type String - translated
Address String - translated
Port String - org String
- vdc String
- description string
- edge
Gateway string - enabled boolean
- icmp
Type string - id string
- logging
Enabled boolean - network
Name string - network
Type string - original
Address string - original
Port string - protocol string
- rule
Id string - rule
Tag number - rule
Type string - translated
Address string - translated
Port string - org string
- vdc string
- description str
- edge_
gateway str - enabled bool
- icmp_
type str - id str
- logging_
enabled bool - network_
name str - network_
type str - original_
address str - original_
port str - protocol str
- rule_
id str - rule_
tag float - rule_
type str - translated_
address str - translated_
port str - org str
- vdc str
- description String
- edge
Gateway String - enabled Boolean
- icmp
Type String - id String
- logging
Enabled Boolean - network
Name String - network
Type String - original
Address String - original
Port String - protocol String
- rule
Id String - rule
Tag Number - rule
Type String - translated
Address String - translated
Port String - org String
- vdc String
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.