1. Packages
  2. Panos Provider
  3. API Docs
  4. NatPolicy
panos 2.0.0 published on Tuesday, Apr 15, 2025 by paloaltonetworks

panos.NatPolicy

Explore with Pulumi AI

panos logo
panos 2.0.0 published on Tuesday, Apr 15, 2025 by paloaltonetworks

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.panos.Template;
    import com.pulumi.panos.TemplateArgs;
    import com.pulumi.panos.inputs.TemplateLocationArgs;
    import com.pulumi.panos.inputs.TemplateLocationPanoramaArgs;
    import com.pulumi.panos.EthernetInterface;
    import com.pulumi.panos.EthernetInterfaceArgs;
    import com.pulumi.panos.inputs.EthernetInterfaceLocationArgs;
    import com.pulumi.panos.inputs.EthernetInterfaceLocationTemplateArgs;
    import com.pulumi.panos.inputs.EthernetInterfaceLayer3Args;
    import com.pulumi.panos.Zone;
    import com.pulumi.panos.ZoneArgs;
    import com.pulumi.panos.inputs.ZoneLocationArgs;
    import com.pulumi.panos.inputs.ZoneLocationTemplateArgs;
    import com.pulumi.panos.DeviceGroup;
    import com.pulumi.panos.DeviceGroupArgs;
    import com.pulumi.panos.inputs.DeviceGroupLocationArgs;
    import com.pulumi.panos.inputs.DeviceGroupLocationPanoramaArgs;
    import com.pulumi.panos.NatPolicy;
    import com.pulumi.panos.NatPolicyArgs;
    import com.pulumi.panos.inputs.NatPolicyLocationArgs;
    import com.pulumi.panos.inputs.NatPolicyRuleArgs;
    import com.pulumi.panos.inputs.NatPolicyRuleSourceTranslationArgs;
    import com.pulumi.panos.inputs.NatPolicyRuleSourceTranslationStaticIpArgs;
    import com.pulumi.panos.inputs.NatPolicyRuleSourceTranslationDynamicIpAndPortArgs;
    import com.pulumi.panos.inputs.NatPolicyRuleSourceTranslationDynamicIpAndPortInterfaceAddressArgs;
    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) {
            var exampleTemplate = new Template("exampleTemplate", TemplateArgs.builder()
                .location(TemplateLocationArgs.builder()
                    .panorama()
                    .build())
                .build());
    
            var exampleEthernetInterface = new EthernetInterface("exampleEthernetInterface", EthernetInterfaceArgs.builder()
                .location(EthernetInterfaceLocationArgs.builder()
                    .template(EthernetInterfaceLocationTemplateArgs.builder()
                        .vsys("vsys1")
                        .name(exampleTemplate.name())
                        .build())
                    .build())
                .layer3()
                .build());
    
            var trust = new Zone("trust", ZoneArgs.builder()
                .location(ZoneLocationArgs.builder()
                    .template(ZoneLocationTemplateArgs.builder()
                        .name(exampleTemplate.name())
                        .build())
                    .build())
                .build());
    
            var untrust = new Zone("untrust", ZoneArgs.builder()
                .location(ZoneLocationArgs.builder()
                    .template(ZoneLocationTemplateArgs.builder()
                        .name(exampleTemplate.name())
                        .build())
                    .build())
                .build());
    
            var exampleDeviceGroup = new DeviceGroup("exampleDeviceGroup", DeviceGroupArgs.builder()
                .location(DeviceGroupLocationArgs.builder()
                    .panorama()
                    .build())
                .build());
    
            // Manages the entire NAT policy
            var exampleNatPolicy = new NatPolicy("exampleNatPolicy", NatPolicyArgs.builder()
                .location(NatPolicyLocationArgs.builder()
                    .device_group(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                    .build())
                .rules(            
                    NatPolicyRuleArgs.builder()
                        .name("rule-1")
                        .sourceZones(trust.name())
                        .sourceAddresses("10.0.0.0/24")
                        .destinationZones(untrust.name())
                        .destinationAddresses("172.16.0.0/16")
                        .services("any")
                        .sourceTranslation(NatPolicyRuleSourceTranslationArgs.builder()
                            .staticIp(NatPolicyRuleSourceTranslationStaticIpArgs.builder()
                                .translatedAddress("192.168.0.1")
                                .build())
                            .build())
                        .build(),
                    NatPolicyRuleArgs.builder()
                        .name("rule-2")
                        .sourceZones(trust.name())
                        .sourceAddresses("10.0.0.0/24")
                        .destinationZones(untrust.name())
                        .destinationAddresses("172.16.0.0/16")
                        .services("any")
                        .sourceTranslation(NatPolicyRuleSourceTranslationArgs.builder()
                            .dynamicIpAndPort(NatPolicyRuleSourceTranslationDynamicIpAndPortArgs.builder()
                                .interfaceAddress(NatPolicyRuleSourceTranslationDynamicIpAndPortInterfaceAddressArgs.builder()
                                    .interface_(exampleEthernetInterface.name())
                                    .ip("10.1.0.0/24")
                                    .build())
                                .build())
                            .build())
                        .build())
                .build());
    
        }
    }
    
    resources:
      # Manages the entire NAT policy
      exampleNatPolicy:
        type: panos:NatPolicy
        properties:
          location:
            device_group:
              name: ${exampleDeviceGroup.name}
              rulebase: post-rulebase
          rules:
            - name: rule-1
              sourceZones:
                - ${trust.name}
              sourceAddresses:
                - 10.0.0.0/24
              destinationZones:
                - ${untrust.name}
              destinationAddresses:
                - 172.16.0.0/16
              services:
                - any
              sourceTranslation:
                staticIp:
                  translatedAddress: 192.168.0.1
            - name: rule-2
              sourceZones:
                - ${trust.name}
              sourceAddresses:
                - 10.0.0.0/24
              destinationZones:
                - ${untrust.name}
              destinationAddresses:
                - 172.16.0.0/16
              services:
                - any
              sourceTranslation:
                dynamicIpAndPort:
                  interfaceAddress:
                    interface: ${exampleEthernetInterface.name}
                    ip: 10.1.0.0/24
      exampleEthernetInterface:
        type: panos:EthernetInterface
        properties:
          location:
            template:
              vsys: vsys1
              name: ${exampleTemplate.name}
          layer3: {}
      trust:
        type: panos:Zone
        properties:
          location:
            template:
              name: ${exampleTemplate.name}
      untrust:
        type: panos:Zone
        properties:
          location:
            template:
              name: ${exampleTemplate.name}
      exampleDeviceGroup:
        type: panos:DeviceGroup
        properties:
          location:
            panorama: {}
      exampleTemplate:
        type: panos:Template
        properties:
          location:
            panorama: {}
    

    Create NatPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NatPolicy(name: string, args: NatPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def NatPolicy(resource_name: str,
                  args: NatPolicyArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def NatPolicy(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  location: Optional[NatPolicyLocationArgs] = None,
                  rules: Optional[Sequence[NatPolicyRuleArgs]] = None)
    func NewNatPolicy(ctx *Context, name string, args NatPolicyArgs, opts ...ResourceOption) (*NatPolicy, error)
    public NatPolicy(string name, NatPolicyArgs args, CustomResourceOptions? opts = null)
    public NatPolicy(String name, NatPolicyArgs args)
    public NatPolicy(String name, NatPolicyArgs args, CustomResourceOptions options)
    
    type: panos:NatPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NatPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NatPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NatPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NatPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NatPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var natPolicyResource = new Panos.NatPolicy("natPolicyResource", new()
    {
        Location = new Panos.Inputs.NatPolicyLocationArgs
        {
            DeviceGroup = new Panos.Inputs.NatPolicyLocationDeviceGroupArgs
            {
                Name = "string",
                PanoramaDevice = "string",
                Rulebase = "string",
            },
            Shared = new Panos.Inputs.NatPolicyLocationSharedArgs
            {
                Rulebase = "string",
            },
            Vsys = new Panos.Inputs.NatPolicyLocationVsysArgs
            {
                Name = "string",
                NgfwDevice = "string",
            },
        },
        Rules = new[]
        {
            new Panos.Inputs.NatPolicyRuleArgs
            {
                Name = "string",
                DestinationZones = new[]
                {
                    "string",
                },
                Service = "string",
                DestinationTranslation = new Panos.Inputs.NatPolicyRuleDestinationTranslationArgs
                {
                    DnsRewrite = new Panos.Inputs.NatPolicyRuleDestinationTranslationDnsRewriteArgs
                    {
                        Direction = "string",
                    },
                    TranslatedAddress = "string",
                    TranslatedPort = 0,
                },
                ActiveActiveDeviceBinding = "string",
                Disabled = false,
                DynamicDestinationTranslation = new Panos.Inputs.NatPolicyRuleDynamicDestinationTranslationArgs
                {
                    Distribution = "string",
                    TranslatedAddress = "string",
                    TranslatedPort = 0,
                },
                DestinationAddresses = new[]
                {
                    "string",
                },
                GroupTag = "string",
                NatType = "string",
                Description = "string",
                SourceAddresses = new[]
                {
                    "string",
                },
                SourceTranslation = new Panos.Inputs.NatPolicyRuleSourceTranslationArgs
                {
                    DynamicIp = new Panos.Inputs.NatPolicyRuleSourceTranslationDynamicIpArgs
                    {
                        Fallback = new Panos.Inputs.NatPolicyRuleSourceTranslationDynamicIpFallbackArgs
                        {
                            InterfaceAddress = new Panos.Inputs.NatPolicyRuleSourceTranslationDynamicIpFallbackInterfaceAddressArgs
                            {
                                FloatingIp = "string",
                                Interface = "string",
                                Ip = "string",
                            },
                            TranslatedAddresses = new[]
                            {
                                "string",
                            },
                        },
                        TranslatedAddresses = new[]
                        {
                            "string",
                        },
                    },
                    DynamicIpAndPort = new Panos.Inputs.NatPolicyRuleSourceTranslationDynamicIpAndPortArgs
                    {
                        InterfaceAddress = new Panos.Inputs.NatPolicyRuleSourceTranslationDynamicIpAndPortInterfaceAddressArgs
                        {
                            FloatingIp = "string",
                            Interface = "string",
                            Ip = "string",
                        },
                        TranslatedAddresses = new[]
                        {
                            "string",
                        },
                    },
                    StaticIp = new Panos.Inputs.NatPolicyRuleSourceTranslationStaticIpArgs
                    {
                        BiDirectional = "string",
                        TranslatedAddress = "string",
                    },
                },
                SourceZones = new[]
                {
                    "string",
                },
                Tags = new[]
                {
                    "string",
                },
                Target = new Panos.Inputs.NatPolicyRuleTargetArgs
                {
                    Devices = new[]
                    {
                        new Panos.Inputs.NatPolicyRuleTargetDeviceArgs
                        {
                            Name = "string",
                            Vsys = new[]
                            {
                                new Panos.Inputs.NatPolicyRuleTargetDeviceVsyArgs
                                {
                                    Name = "string",
                                },
                            },
                        },
                    },
                    Negate = false,
                    Tags = new[]
                    {
                        "string",
                    },
                },
                ToInterface = "string",
            },
        },
    });
    
    example, err := panos.NewNatPolicy(ctx, "natPolicyResource", &panos.NatPolicyArgs{
    	Location: &panos.NatPolicyLocationArgs{
    		DeviceGroup: &panos.NatPolicyLocationDeviceGroupArgs{
    			Name:           pulumi.String("string"),
    			PanoramaDevice: pulumi.String("string"),
    			Rulebase:       pulumi.String("string"),
    		},
    		Shared: &panos.NatPolicyLocationSharedArgs{
    			Rulebase: pulumi.String("string"),
    		},
    		Vsys: &panos.NatPolicyLocationVsysArgs{
    			Name:       pulumi.String("string"),
    			NgfwDevice: pulumi.String("string"),
    		},
    	},
    	Rules: panos.NatPolicyRuleArray{
    		&panos.NatPolicyRuleArgs{
    			Name: pulumi.String("string"),
    			DestinationZones: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Service: pulumi.String("string"),
    			DestinationTranslation: &panos.NatPolicyRuleDestinationTranslationArgs{
    				DnsRewrite: &panos.NatPolicyRuleDestinationTranslationDnsRewriteArgs{
    					Direction: pulumi.String("string"),
    				},
    				TranslatedAddress: pulumi.String("string"),
    				TranslatedPort:    pulumi.Float64(0),
    			},
    			ActiveActiveDeviceBinding: pulumi.String("string"),
    			Disabled:                  pulumi.Bool(false),
    			DynamicDestinationTranslation: &panos.NatPolicyRuleDynamicDestinationTranslationArgs{
    				Distribution:      pulumi.String("string"),
    				TranslatedAddress: pulumi.String("string"),
    				TranslatedPort:    pulumi.Float64(0),
    			},
    			DestinationAddresses: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			GroupTag:    pulumi.String("string"),
    			NatType:     pulumi.String("string"),
    			Description: pulumi.String("string"),
    			SourceAddresses: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			SourceTranslation: &panos.NatPolicyRuleSourceTranslationArgs{
    				DynamicIp: &panos.NatPolicyRuleSourceTranslationDynamicIpArgs{
    					Fallback: &panos.NatPolicyRuleSourceTranslationDynamicIpFallbackArgs{
    						InterfaceAddress: &panos.NatPolicyRuleSourceTranslationDynamicIpFallbackInterfaceAddressArgs{
    							FloatingIp: pulumi.String("string"),
    							Interface:  pulumi.String("string"),
    							Ip:         pulumi.String("string"),
    						},
    						TranslatedAddresses: pulumi.StringArray{
    							pulumi.String("string"),
    						},
    					},
    					TranslatedAddresses: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    				DynamicIpAndPort: &panos.NatPolicyRuleSourceTranslationDynamicIpAndPortArgs{
    					InterfaceAddress: &panos.NatPolicyRuleSourceTranslationDynamicIpAndPortInterfaceAddressArgs{
    						FloatingIp: pulumi.String("string"),
    						Interface:  pulumi.String("string"),
    						Ip:         pulumi.String("string"),
    					},
    					TranslatedAddresses: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    				StaticIp: &panos.NatPolicyRuleSourceTranslationStaticIpArgs{
    					BiDirectional:     pulumi.String("string"),
    					TranslatedAddress: pulumi.String("string"),
    				},
    			},
    			SourceZones: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Tags: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Target: &panos.NatPolicyRuleTargetArgs{
    				Devices: panos.NatPolicyRuleTargetDeviceArray{
    					&panos.NatPolicyRuleTargetDeviceArgs{
    						Name: pulumi.String("string"),
    						Vsys: panos.NatPolicyRuleTargetDeviceVsyArray{
    							&panos.NatPolicyRuleTargetDeviceVsyArgs{
    								Name: pulumi.String("string"),
    							},
    						},
    					},
    				},
    				Negate: pulumi.Bool(false),
    				Tags: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    			ToInterface: pulumi.String("string"),
    		},
    	},
    })
    
    var natPolicyResource = new NatPolicy("natPolicyResource", NatPolicyArgs.builder()
        .location(NatPolicyLocationArgs.builder()
            .deviceGroup(NatPolicyLocationDeviceGroupArgs.builder()
                .name("string")
                .panoramaDevice("string")
                .rulebase("string")
                .build())
            .shared(NatPolicyLocationSharedArgs.builder()
                .rulebase("string")
                .build())
            .vsys(NatPolicyLocationVsysArgs.builder()
                .name("string")
                .ngfwDevice("string")
                .build())
            .build())
        .rules(NatPolicyRuleArgs.builder()
            .name("string")
            .destinationZones("string")
            .service("string")
            .destinationTranslation(NatPolicyRuleDestinationTranslationArgs.builder()
                .dnsRewrite(NatPolicyRuleDestinationTranslationDnsRewriteArgs.builder()
                    .direction("string")
                    .build())
                .translatedAddress("string")
                .translatedPort(0)
                .build())
            .activeActiveDeviceBinding("string")
            .disabled(false)
            .dynamicDestinationTranslation(NatPolicyRuleDynamicDestinationTranslationArgs.builder()
                .distribution("string")
                .translatedAddress("string")
                .translatedPort(0)
                .build())
            .destinationAddresses("string")
            .groupTag("string")
            .natType("string")
            .description("string")
            .sourceAddresses("string")
            .sourceTranslation(NatPolicyRuleSourceTranslationArgs.builder()
                .dynamicIp(NatPolicyRuleSourceTranslationDynamicIpArgs.builder()
                    .fallback(NatPolicyRuleSourceTranslationDynamicIpFallbackArgs.builder()
                        .interfaceAddress(NatPolicyRuleSourceTranslationDynamicIpFallbackInterfaceAddressArgs.builder()
                            .floatingIp("string")
                            .interface_("string")
                            .ip("string")
                            .build())
                        .translatedAddresses("string")
                        .build())
                    .translatedAddresses("string")
                    .build())
                .dynamicIpAndPort(NatPolicyRuleSourceTranslationDynamicIpAndPortArgs.builder()
                    .interfaceAddress(NatPolicyRuleSourceTranslationDynamicIpAndPortInterfaceAddressArgs.builder()
                        .floatingIp("string")
                        .interface_("string")
                        .ip("string")
                        .build())
                    .translatedAddresses("string")
                    .build())
                .staticIp(NatPolicyRuleSourceTranslationStaticIpArgs.builder()
                    .biDirectional("string")
                    .translatedAddress("string")
                    .build())
                .build())
            .sourceZones("string")
            .tags("string")
            .target(NatPolicyRuleTargetArgs.builder()
                .devices(NatPolicyRuleTargetDeviceArgs.builder()
                    .name("string")
                    .vsys(NatPolicyRuleTargetDeviceVsyArgs.builder()
                        .name("string")
                        .build())
                    .build())
                .negate(false)
                .tags("string")
                .build())
            .toInterface("string")
            .build())
        .build());
    
    nat_policy_resource = panos.NatPolicy("natPolicyResource",
        location={
            "device_group": {
                "name": "string",
                "panorama_device": "string",
                "rulebase": "string",
            },
            "shared": {
                "rulebase": "string",
            },
            "vsys": {
                "name": "string",
                "ngfw_device": "string",
            },
        },
        rules=[{
            "name": "string",
            "destination_zones": ["string"],
            "service": "string",
            "destination_translation": {
                "dns_rewrite": {
                    "direction": "string",
                },
                "translated_address": "string",
                "translated_port": 0,
            },
            "active_active_device_binding": "string",
            "disabled": False,
            "dynamic_destination_translation": {
                "distribution": "string",
                "translated_address": "string",
                "translated_port": 0,
            },
            "destination_addresses": ["string"],
            "group_tag": "string",
            "nat_type": "string",
            "description": "string",
            "source_addresses": ["string"],
            "source_translation": {
                "dynamic_ip": {
                    "fallback": {
                        "interface_address": {
                            "floating_ip": "string",
                            "interface": "string",
                            "ip": "string",
                        },
                        "translated_addresses": ["string"],
                    },
                    "translated_addresses": ["string"],
                },
                "dynamic_ip_and_port": {
                    "interface_address": {
                        "floating_ip": "string",
                        "interface": "string",
                        "ip": "string",
                    },
                    "translated_addresses": ["string"],
                },
                "static_ip": {
                    "bi_directional": "string",
                    "translated_address": "string",
                },
            },
            "source_zones": ["string"],
            "tags": ["string"],
            "target": {
                "devices": [{
                    "name": "string",
                    "vsys": [{
                        "name": "string",
                    }],
                }],
                "negate": False,
                "tags": ["string"],
            },
            "to_interface": "string",
        }])
    
    const natPolicyResource = new panos.NatPolicy("natPolicyResource", {
        location: {
            deviceGroup: {
                name: "string",
                panoramaDevice: "string",
                rulebase: "string",
            },
            shared: {
                rulebase: "string",
            },
            vsys: {
                name: "string",
                ngfwDevice: "string",
            },
        },
        rules: [{
            name: "string",
            destinationZones: ["string"],
            service: "string",
            destinationTranslation: {
                dnsRewrite: {
                    direction: "string",
                },
                translatedAddress: "string",
                translatedPort: 0,
            },
            activeActiveDeviceBinding: "string",
            disabled: false,
            dynamicDestinationTranslation: {
                distribution: "string",
                translatedAddress: "string",
                translatedPort: 0,
            },
            destinationAddresses: ["string"],
            groupTag: "string",
            natType: "string",
            description: "string",
            sourceAddresses: ["string"],
            sourceTranslation: {
                dynamicIp: {
                    fallback: {
                        interfaceAddress: {
                            floatingIp: "string",
                            "interface": "string",
                            ip: "string",
                        },
                        translatedAddresses: ["string"],
                    },
                    translatedAddresses: ["string"],
                },
                dynamicIpAndPort: {
                    interfaceAddress: {
                        floatingIp: "string",
                        "interface": "string",
                        ip: "string",
                    },
                    translatedAddresses: ["string"],
                },
                staticIp: {
                    biDirectional: "string",
                    translatedAddress: "string",
                },
            },
            sourceZones: ["string"],
            tags: ["string"],
            target: {
                devices: [{
                    name: "string",
                    vsys: [{
                        name: "string",
                    }],
                }],
                negate: false,
                tags: ["string"],
            },
            toInterface: "string",
        }],
    });
    
    type: panos:NatPolicy
    properties:
        location:
            deviceGroup:
                name: string
                panoramaDevice: string
                rulebase: string
            shared:
                rulebase: string
            vsys:
                name: string
                ngfwDevice: string
        rules:
            - activeActiveDeviceBinding: string
              description: string
              destinationAddresses:
                - string
              destinationTranslation:
                dnsRewrite:
                    direction: string
                translatedAddress: string
                translatedPort: 0
              destinationZones:
                - string
              disabled: false
              dynamicDestinationTranslation:
                distribution: string
                translatedAddress: string
                translatedPort: 0
              groupTag: string
              name: string
              natType: string
              service: string
              sourceAddresses:
                - string
              sourceTranslation:
                dynamicIp:
                    fallback:
                        interfaceAddress:
                            floatingIp: string
                            interface: string
                            ip: string
                        translatedAddresses:
                            - string
                    translatedAddresses:
                        - string
                dynamicIpAndPort:
                    interfaceAddress:
                        floatingIp: string
                        interface: string
                        ip: string
                    translatedAddresses:
                        - string
                staticIp:
                    biDirectional: string
                    translatedAddress: string
              sourceZones:
                - string
              tags:
                - string
              target:
                devices:
                    - name: string
                      vsys:
                        - name: string
                negate: false
                tags:
                    - string
              toInterface: string
    

    NatPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The NatPolicy resource accepts the following input properties:

    location NatPolicyLocation
    The location of this object.
    rules NatPolicyRule[]
    location Property Map
    The location of this object.
    rules List<Property Map>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NatPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NatPolicy Resource

    Get an existing NatPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: NatPolicyState, opts?: CustomResourceOptions): NatPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            location: Optional[NatPolicyLocationArgs] = None,
            rules: Optional[Sequence[NatPolicyRuleArgs]] = None) -> NatPolicy
    func GetNatPolicy(ctx *Context, name string, id IDInput, state *NatPolicyState, opts ...ResourceOption) (*NatPolicy, error)
    public static NatPolicy Get(string name, Input<string> id, NatPolicyState? state, CustomResourceOptions? opts = null)
    public static NatPolicy get(String name, Output<String> id, NatPolicyState state, CustomResourceOptions options)
    resources:  _:    type: panos:NatPolicy    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    location NatPolicyLocation
    The location of this object.
    rules NatPolicyRule[]
    location Property Map
    The location of this object.
    rules List<Property Map>

    Supporting Types

    NatPolicyLocation, NatPolicyLocationArgs

    DeviceGroup NatPolicyLocationDeviceGroup
    Located in a specific device group.
    Shared NatPolicyLocationShared
    Located in a shared rulebase
    Vsys NatPolicyLocationVsys
    Located in a specific vsys.
    DeviceGroup NatPolicyLocationDeviceGroup
    Located in a specific device group.
    Shared NatPolicyLocationShared
    Located in a shared rulebase
    Vsys NatPolicyLocationVsys
    Located in a specific vsys.
    deviceGroup NatPolicyLocationDeviceGroup
    Located in a specific device group.
    shared NatPolicyLocationShared
    Located in a shared rulebase
    vsys NatPolicyLocationVsys
    Located in a specific vsys.
    deviceGroup NatPolicyLocationDeviceGroup
    Located in a specific device group.
    shared NatPolicyLocationShared
    Located in a shared rulebase
    vsys NatPolicyLocationVsys
    Located in a specific vsys.
    device_group NatPolicyLocationDeviceGroup
    Located in a specific device group.
    shared NatPolicyLocationShared
    Located in a shared rulebase
    vsys NatPolicyLocationVsys
    Located in a specific vsys.
    deviceGroup Property Map
    Located in a specific device group.
    shared Property Map
    Located in a shared rulebase
    vsys Property Map
    Located in a specific vsys.

    NatPolicyLocationDeviceGroup, NatPolicyLocationDeviceGroupArgs

    Name string
    The device group.
    PanoramaDevice string
    The panorama device.
    Rulebase string
    The rulebase.
    Name string
    The device group.
    PanoramaDevice string
    The panorama device.
    Rulebase string
    The rulebase.
    name String
    The device group.
    panoramaDevice String
    The panorama device.
    rulebase String
    The rulebase.
    name string
    The device group.
    panoramaDevice string
    The panorama device.
    rulebase string
    The rulebase.
    name str
    The device group.
    panorama_device str
    The panorama device.
    rulebase str
    The rulebase.
    name String
    The device group.
    panoramaDevice String
    The panorama device.
    rulebase String
    The rulebase.

    NatPolicyLocationShared, NatPolicyLocationSharedArgs

    Rulebase string
    Rulebase name
    Rulebase string
    Rulebase name
    rulebase String
    Rulebase name
    rulebase string
    Rulebase name
    rulebase str
    Rulebase name
    rulebase String
    Rulebase name

    NatPolicyLocationVsys, NatPolicyLocationVsysArgs

    Name string
    The vsys name
    NgfwDevice string
    The NGFW device
    Name string
    The vsys name
    NgfwDevice string
    The NGFW device
    name String
    The vsys name
    ngfwDevice String
    The NGFW device
    name string
    The vsys name
    ngfwDevice string
    The NGFW device
    name str
    The vsys name
    ngfw_device str
    The NGFW device
    name String
    The vsys name
    ngfwDevice String
    The NGFW device

    NatPolicyRule, NatPolicyRuleArgs

    Name string
    ActiveActiveDeviceBinding string
    Device binding configuration in HA Active-Active mode
    Description string
    DestinationAddresses List<string>
    DestinationTranslation NatPolicyRuleDestinationTranslation
    DestinationZones List<string>
    Disabled bool
    Disable the rule
    DynamicDestinationTranslation NatPolicyRuleDynamicDestinationTranslation
    GroupTag string
    NatType string
    type of nat
    Service string
    SourceAddresses List<string>
    SourceTranslation NatPolicyRuleSourceTranslation
    SourceZones List<string>
    Tags List<string>
    Target NatPolicyRuleTarget
    ToInterface string
    Egress interface from route lookup
    name String
    activeActiveDeviceBinding String
    Device binding configuration in HA Active-Active mode
    description String
    destinationAddresses List<String>
    destinationTranslation NatPolicyRuleDestinationTranslation
    destinationZones List<String>
    disabled Boolean
    Disable the rule
    dynamicDestinationTranslation NatPolicyRuleDynamicDestinationTranslation
    groupTag String
    natType String
    type of nat
    service String
    sourceAddresses List<String>
    sourceTranslation NatPolicyRuleSourceTranslation
    sourceZones List<String>
    tags List<String>
    target NatPolicyRuleTarget
    toInterface String
    Egress interface from route lookup
    name String
    activeActiveDeviceBinding String
    Device binding configuration in HA Active-Active mode
    description String
    destinationAddresses List<String>
    destinationTranslation Property Map
    destinationZones List<String>
    disabled Boolean
    Disable the rule
    dynamicDestinationTranslation Property Map
    groupTag String
    natType String
    type of nat
    service String
    sourceAddresses List<String>
    sourceTranslation Property Map
    sourceZones List<String>
    tags List<String>
    target Property Map
    toInterface String
    Egress interface from route lookup

    NatPolicyRuleDestinationTranslation, NatPolicyRuleDestinationTranslationArgs

    NatPolicyRuleDestinationTranslationDnsRewrite, NatPolicyRuleDestinationTranslationDnsRewriteArgs

    Direction string
    Select direction to apply DNS rewrite
    Direction string
    Select direction to apply DNS rewrite
    direction String
    Select direction to apply DNS rewrite
    direction string
    Select direction to apply DNS rewrite
    direction str
    Select direction to apply DNS rewrite
    direction String
    Select direction to apply DNS rewrite

    NatPolicyRuleDynamicDestinationTranslation, NatPolicyRuleDynamicDestinationTranslationArgs

    Distribution string
    Distribution algorithm for destination address pool
    TranslatedAddress string
    TranslatedPort double
    Distribution string
    Distribution algorithm for destination address pool
    TranslatedAddress string
    TranslatedPort float64
    distribution String
    Distribution algorithm for destination address pool
    translatedAddress String
    translatedPort Double
    distribution string
    Distribution algorithm for destination address pool
    translatedAddress string
    translatedPort number
    distribution str
    Distribution algorithm for destination address pool
    translated_address str
    translated_port float
    distribution String
    Distribution algorithm for destination address pool
    translatedAddress String
    translatedPort Number

    NatPolicyRuleSourceTranslation, NatPolicyRuleSourceTranslationArgs

    NatPolicyRuleSourceTranslationDynamicIp, NatPolicyRuleSourceTranslationDynamicIpArgs

    NatPolicyRuleSourceTranslationDynamicIpAndPort, NatPolicyRuleSourceTranslationDynamicIpAndPortArgs

    NatPolicyRuleSourceTranslationDynamicIpAndPortInterfaceAddress, NatPolicyRuleSourceTranslationDynamicIpAndPortInterfaceAddressArgs

    FloatingIp string
    Floating IP address in HA Active-Active configuration
    Interface string
    Interface name
    Ip string
    specify exact IP address if interface has multiple addresses
    FloatingIp string
    Floating IP address in HA Active-Active configuration
    Interface string
    Interface name
    Ip string
    specify exact IP address if interface has multiple addresses
    floatingIp String
    Floating IP address in HA Active-Active configuration
    interface_ String
    Interface name
    ip String
    specify exact IP address if interface has multiple addresses
    floatingIp string
    Floating IP address in HA Active-Active configuration
    interface string
    Interface name
    ip string
    specify exact IP address if interface has multiple addresses
    floating_ip str
    Floating IP address in HA Active-Active configuration
    interface str
    Interface name
    ip str
    specify exact IP address if interface has multiple addresses
    floatingIp String
    Floating IP address in HA Active-Active configuration
    interface String
    Interface name
    ip String
    specify exact IP address if interface has multiple addresses

    NatPolicyRuleSourceTranslationDynamicIpFallback, NatPolicyRuleSourceTranslationDynamicIpFallbackArgs

    NatPolicyRuleSourceTranslationDynamicIpFallbackInterfaceAddress, NatPolicyRuleSourceTranslationDynamicIpFallbackInterfaceAddressArgs

    FloatingIp string
    Floating IP address in HA Active-Active configuration
    Interface string
    Interface name
    Ip string
    specify exact IP address if interface has multiple addresses
    FloatingIp string
    Floating IP address in HA Active-Active configuration
    Interface string
    Interface name
    Ip string
    specify exact IP address if interface has multiple addresses
    floatingIp String
    Floating IP address in HA Active-Active configuration
    interface_ String
    Interface name
    ip String
    specify exact IP address if interface has multiple addresses
    floatingIp string
    Floating IP address in HA Active-Active configuration
    interface string
    Interface name
    ip string
    specify exact IP address if interface has multiple addresses
    floating_ip str
    Floating IP address in HA Active-Active configuration
    interface str
    Interface name
    ip str
    specify exact IP address if interface has multiple addresses
    floatingIp String
    Floating IP address in HA Active-Active configuration
    interface String
    Interface name
    ip String
    specify exact IP address if interface has multiple addresses

    NatPolicyRuleSourceTranslationStaticIp, NatPolicyRuleSourceTranslationStaticIpArgs

    BiDirectional string
    allow reverse translation from translated address to original address
    TranslatedAddress string
    BiDirectional string
    allow reverse translation from translated address to original address
    TranslatedAddress string
    biDirectional String
    allow reverse translation from translated address to original address
    translatedAddress String
    biDirectional string
    allow reverse translation from translated address to original address
    translatedAddress string
    bi_directional str
    allow reverse translation from translated address to original address
    translated_address str
    biDirectional String
    allow reverse translation from translated address to original address
    translatedAddress String

    NatPolicyRuleTarget, NatPolicyRuleTargetArgs

    Devices List<NatPolicyRuleTargetDevice>
    Negate bool
    Target to all but these specified devices and tags
    Tags List<string>
    Devices []NatPolicyRuleTargetDevice
    Negate bool
    Target to all but these specified devices and tags
    Tags []string
    devices List<NatPolicyRuleTargetDevice>
    negate Boolean
    Target to all but these specified devices and tags
    tags List<String>
    devices NatPolicyRuleTargetDevice[]
    negate boolean
    Target to all but these specified devices and tags
    tags string[]
    devices Sequence[NatPolicyRuleTargetDevice]
    negate bool
    Target to all but these specified devices and tags
    tags Sequence[str]
    devices List<Property Map>
    negate Boolean
    Target to all but these specified devices and tags
    tags List<String>

    NatPolicyRuleTargetDevice, NatPolicyRuleTargetDeviceArgs

    NatPolicyRuleTargetDeviceVsy, NatPolicyRuleTargetDeviceVsyArgs

    Name string
    Name string
    name String
    name string
    name str
    name String

    Package Details

    Repository
    panos paloaltonetworks/terraform-provider-panos
    License
    Notes
    This Pulumi package is based on the panos Terraform Provider.
    panos logo
    panos 2.0.0 published on Tuesday, Apr 15, 2025 by paloaltonetworks