avi 31.1.1 published on Monday, Apr 14, 2025 by vmware
avi.getNatpolicy
Explore with Pulumi AI
<!–
Copyright 2021 VMware, Inc.
SPDX-License-Identifier: Mozilla Public License 2.0
–>
layout: “avi”
page_title: “AVI: avi.Natpolicy” sidebar_current: “docs-avi-datasource-natpolicy” description: |- Get information of Avi NatPolicy.
avi.Natpolicy
This data source is used to to get avi.Natpolicy objects.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as avi from "@pulumi/avi";
const fooNatpolicy = avi.getNatpolicy({
name: "foo",
uuid: "natpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
});
import pulumi
import pulumi_avi as avi
foo_natpolicy = avi.get_natpolicy(name="foo",
uuid="natpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/avi/v31/avi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := avi.LookupNatpolicy(ctx, &avi.LookupNatpolicyArgs{
Name: pulumi.StringRef("foo"),
Uuid: pulumi.StringRef("natpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Avi = Pulumi.Avi;
return await Deployment.RunAsync(() =>
{
var fooNatpolicy = Avi.GetNatpolicy.Invoke(new()
{
Name = "foo",
Uuid = "natpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.avi.AviFunctions;
import com.pulumi.avi.inputs.GetNatpolicyArgs;
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 fooNatpolicy = AviFunctions.getNatpolicy(GetNatpolicyArgs.builder()
.name("foo")
.uuid("natpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
.build());
}
}
variables:
fooNatpolicy:
fn::invoke:
function: avi:getNatpolicy
arguments:
name: foo
uuid: natpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b
Using getNatpolicy
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 getNatpolicy(args: GetNatpolicyArgs, opts?: InvokeOptions): Promise<GetNatpolicyResult>
function getNatpolicyOutput(args: GetNatpolicyOutputArgs, opts?: InvokeOptions): Output<GetNatpolicyResult>
def get_natpolicy(id: Optional[str] = None,
name: Optional[str] = None,
tenant_ref: Optional[str] = None,
uuid: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNatpolicyResult
def get_natpolicy_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
tenant_ref: Optional[pulumi.Input[str]] = None,
uuid: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNatpolicyResult]
func LookupNatpolicy(ctx *Context, args *LookupNatpolicyArgs, opts ...InvokeOption) (*LookupNatpolicyResult, error)
func LookupNatpolicyOutput(ctx *Context, args *LookupNatpolicyOutputArgs, opts ...InvokeOption) LookupNatpolicyResultOutput
> Note: This function is named LookupNatpolicy
in the Go SDK.
public static class GetNatpolicy
{
public static Task<GetNatpolicyResult> InvokeAsync(GetNatpolicyArgs args, InvokeOptions? opts = null)
public static Output<GetNatpolicyResult> Invoke(GetNatpolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNatpolicyResult> getNatpolicy(GetNatpolicyArgs args, InvokeOptions options)
public static Output<GetNatpolicyResult> getNatpolicy(GetNatpolicyArgs args, InvokeOptions options)
fn::invoke:
function: avi:index/getNatpolicy:getNatpolicy
arguments:
# arguments dictionary
The following arguments are supported:
- id str
- name str
- Search NatPolicy by name.
- tenant_
ref str - It is a reference to an object of type tenant. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- uuid str
- Search NatPolicy by uuid.
getNatpolicy Result
The following output properties are available:
- Configpb
Attributes List<GetNatpolicy Configpb Attribute> - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Created
By string - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Description string
- Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Id string
- Markers
List<Get
Natpolicy Marker> - List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Name string
- Name of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Rules
List<Get
Natpolicy Rule> - Nat policy rules. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Tenant
Ref string - It is a reference to an object of type tenant. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Uuid string
- Uuid of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Configpb
Attributes []GetNatpolicy Configpb Attribute - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Created
By string - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Description string
- Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Id string
- Markers
[]Get
Natpolicy Marker - List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Name string
- Name of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Rules
[]Get
Natpolicy Rule - Nat policy rules. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Tenant
Ref string - It is a reference to an object of type tenant. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Uuid string
- Uuid of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- configpb
Attributes List<GetNatpolicy Configpb Attribute> - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- created
By String - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- description String
- Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- id String
- markers
List<Get
Natpolicy Marker> - List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- name String
- Name of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- rules
List<Get
Natpolicy Rule> - Nat policy rules. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- tenant
Ref String - It is a reference to an object of type tenant. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- uuid String
- Uuid of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- configpb
Attributes GetNatpolicy Configpb Attribute[] - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- created
By string - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- description string
- Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- id string
- markers
Get
Natpolicy Marker[] - List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- name string
- Name of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- rules
Get
Natpolicy Rule[] - Nat policy rules. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- tenant
Ref string - It is a reference to an object of type tenant. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- uuid string
- Uuid of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- configpb_
attributes Sequence[GetNatpolicy Configpb Attribute] - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- created_
by str - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- description str
- Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- id str
- markers
Sequence[Get
Natpolicy Marker] - List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- name str
- Name of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- rules
Sequence[Get
Natpolicy Rule] - Nat policy rules. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- tenant_
ref str - It is a reference to an object of type tenant. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- uuid str
- Uuid of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- configpb
Attributes List<Property Map> - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- created
By String - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- description String
- Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- id String
- markers List<Property Map>
- List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- name String
- Name of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- rules List<Property Map>
- Nat policy rules. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- tenant
Ref String - It is a reference to an object of type tenant. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- uuid String
- Uuid of the nat policy. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Supporting Types
GetNatpolicyConfigpbAttribute
- Version string
- Version string
- version String
- version string
- version str
- version String
GetNatpolicyMarker
GetNatpolicyRule
- Actions
List<Get
Natpolicy Rule Action> - Created
By string - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Enable string
- Index string
- Matches
List<Get
Natpolicy Rule Match> - Name string
- Search NatPolicy by name.
- Actions
[]Get
Natpolicy Rule Action - Created
By string - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Enable string
- Index string
- Matches
[]Get
Natpolicy Rule Match - Name string
- Search NatPolicy by name.
- actions
List<Get
Natpolicy Rule Action> - created
By String - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- enable String
- index String
- matches
List<Get
Natpolicy Rule Match> - name String
- Search NatPolicy by name.
- actions
Get
Natpolicy Rule Action[] - created
By string - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- enable string
- index string
- matches
Get
Natpolicy Rule Match[] - name string
- Search NatPolicy by name.
- actions
Sequence[Get
Natpolicy Rule Action] - created_
by str - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- enable str
- index str
- matches
Sequence[Get
Natpolicy Rule Match] - name str
- Search NatPolicy by name.
- actions List<Property Map>
- created
By String - Creator name. Field introduced in 18.2.3. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- enable String
- index String
- matches List<Property Map>
- name String
- Search NatPolicy by name.
GetNatpolicyRuleAction
- nat
Infos List<Property Map> - type String
GetNatpolicyRuleActionNatInfo
GetNatpolicyRuleActionNatInfoNatIp
GetNatpolicyRuleActionNatInfoNatIpRange
GetNatpolicyRuleActionNatInfoNatIpRangeBegin
GetNatpolicyRuleActionNatInfoNatIpRangeEnd
GetNatpolicyRuleMatch
GetNatpolicyRuleMatchDestinationIp
GetNatpolicyRuleMatchDestinationIpAddr
GetNatpolicyRuleMatchDestinationIpPrefix
- ip
Addrs List<Property Map> - mask String
GetNatpolicyRuleMatchDestinationIpPrefixIpAddr
GetNatpolicyRuleMatchDestinationIpRange
GetNatpolicyRuleMatchDestinationIpRangeBegin
GetNatpolicyRuleMatchDestinationIpRangeEnd
GetNatpolicyRuleMatchService
GetNatpolicyRuleMatchServiceDestinationPort
- Match
Criteria string - Ports List<double>
- Match
Criteria string - Ports []float64
- match
Criteria String - ports List<Double>
- match
Criteria string - ports number[]
- match_
criteria str - ports Sequence[float]
- match
Criteria String - ports List<Number>
GetNatpolicyRuleMatchServiceProtocol
- Match
Criteria string - Protocol string
- Match
Criteria string - Protocol string
- match
Criteria String - protocol String
- match
Criteria string - protocol string
- match_
criteria str - protocol str
- match
Criteria String - protocol String
GetNatpolicyRuleMatchServiceSourcePort
- Match
Criteria string - Ports List<double>
- Match
Criteria string - Ports []float64
- match
Criteria String - ports List<Double>
- match
Criteria string - ports number[]
- match_
criteria str - ports Sequence[float]
- match
Criteria String - ports List<Number>
GetNatpolicyRuleMatchSourceIp
GetNatpolicyRuleMatchSourceIpAddr
GetNatpolicyRuleMatchSourceIpPrefix
- ip
Addrs List<Property Map> - mask String
GetNatpolicyRuleMatchSourceIpPrefixIpAddr
GetNatpolicyRuleMatchSourceIpRange
GetNatpolicyRuleMatchSourceIpRangeBegin
GetNatpolicyRuleMatchSourceIpRangeEnd
Package Details
- Repository
- avi vmware/terraform-provider-avi
- License
- Notes
- This Pulumi package is based on the
avi
Terraform Provider.