1. Packages
  2. Packages
  3. Megaport Provider
  4. API Docs
  5. NatGatewayPrefixList
Viewing docs for megaport 1.9.0
published on Thursday, May 21, 2026 by megaport
Viewing docs for megaport 1.9.0
published on Thursday, May 21, 2026 by megaport

    Create NatGatewayPrefixList Resource

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

    Constructor syntax

    new NatGatewayPrefixList(name: string, args: NatGatewayPrefixListArgs, opts?: CustomResourceOptions);
    @overload
    def NatGatewayPrefixList(resource_name: str,
                             args: NatGatewayPrefixListArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def NatGatewayPrefixList(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             address_family: Optional[str] = None,
                             description: Optional[str] = None,
                             entries: Optional[Sequence[NatGatewayPrefixListEntryArgs]] = None,
                             nat_gateway_product_uid: Optional[str] = None)
    func NewNatGatewayPrefixList(ctx *Context, name string, args NatGatewayPrefixListArgs, opts ...ResourceOption) (*NatGatewayPrefixList, error)
    public NatGatewayPrefixList(string name, NatGatewayPrefixListArgs args, CustomResourceOptions? opts = null)
    public NatGatewayPrefixList(String name, NatGatewayPrefixListArgs args)
    public NatGatewayPrefixList(String name, NatGatewayPrefixListArgs args, CustomResourceOptions options)
    
    type: megaport:NatGatewayPrefixList
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "megaport_natgatewayprefixlist" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args NatGatewayPrefixListArgs
    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 NatGatewayPrefixListArgs
    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 NatGatewayPrefixListArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NatGatewayPrefixListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NatGatewayPrefixListArgs
    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 natGatewayPrefixListResource = new Megaport.NatGatewayPrefixList("natGatewayPrefixListResource", new()
    {
        AddressFamily = "string",
        Description = "string",
        Entries = new[]
        {
            new Megaport.Inputs.NatGatewayPrefixListEntryArgs
            {
                Action = "string",
                Prefix = "string",
                Ge = 0,
                Le = 0,
            },
        },
        NatGatewayProductUid = "string",
    });
    
    example, err := megaport.NewNatGatewayPrefixList(ctx, "natGatewayPrefixListResource", &megaport.NatGatewayPrefixListArgs{
    	AddressFamily: pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	Entries: megaport.NatGatewayPrefixListEntryArray{
    		&megaport.NatGatewayPrefixListEntryArgs{
    			Action: pulumi.String("string"),
    			Prefix: pulumi.String("string"),
    			Ge:     pulumi.Float64(0),
    			Le:     pulumi.Float64(0),
    		},
    	},
    	NatGatewayProductUid: pulumi.String("string"),
    })
    
    resource "megaport_natgatewayprefixlist" "natGatewayPrefixListResource" {
      address_family = "string"
      description    = "string"
      entries {
        action = "string"
        prefix = "string"
        ge     = 0
        le     = 0
      }
      nat_gateway_product_uid = "string"
    }
    
    var natGatewayPrefixListResource = new NatGatewayPrefixList("natGatewayPrefixListResource", NatGatewayPrefixListArgs.builder()
        .addressFamily("string")
        .description("string")
        .entries(NatGatewayPrefixListEntryArgs.builder()
            .action("string")
            .prefix("string")
            .ge(0.0)
            .le(0.0)
            .build())
        .natGatewayProductUid("string")
        .build());
    
    nat_gateway_prefix_list_resource = megaport.NatGatewayPrefixList("natGatewayPrefixListResource",
        address_family="string",
        description="string",
        entries=[{
            "action": "string",
            "prefix": "string",
            "ge": float(0),
            "le": float(0),
        }],
        nat_gateway_product_uid="string")
    
    const natGatewayPrefixListResource = new megaport.NatGatewayPrefixList("natGatewayPrefixListResource", {
        addressFamily: "string",
        description: "string",
        entries: [{
            action: "string",
            prefix: "string",
            ge: 0,
            le: 0,
        }],
        natGatewayProductUid: "string",
    });
    
    type: megaport:NatGatewayPrefixList
    properties:
        addressFamily: string
        description: string
        entries:
            - action: string
              ge: 0
              le: 0
              prefix: string
        natGatewayProductUid: string
    

    NatGatewayPrefixList 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 NatGatewayPrefixList resource accepts the following input properties:

    AddressFamily string
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    Description string
    Description of the prefix list.
    Entries List<NatGatewayPrefixListEntry>
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    NatGatewayProductUid string
    Product UID of the NAT Gateway that owns this prefix list.
    AddressFamily string
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    Description string
    Description of the prefix list.
    Entries []NatGatewayPrefixListEntryArgs
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    NatGatewayProductUid string
    Product UID of the NAT Gateway that owns this prefix list.
    address_family string
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    description string
    Description of the prefix list.
    entries list(object)
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    nat_gateway_product_uid string
    Product UID of the NAT Gateway that owns this prefix list.
    addressFamily String
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    description String
    Description of the prefix list.
    entries List<NatGatewayPrefixListEntry>
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    natGatewayProductUid String
    Product UID of the NAT Gateway that owns this prefix list.
    addressFamily string
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    description string
    Description of the prefix list.
    entries NatGatewayPrefixListEntry[]
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    natGatewayProductUid string
    Product UID of the NAT Gateway that owns this prefix list.
    address_family str
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    description str
    Description of the prefix list.
    entries Sequence[NatGatewayPrefixListEntryArgs]
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    nat_gateway_product_uid str
    Product UID of the NAT Gateway that owns this prefix list.
    addressFamily String
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    description String
    Description of the prefix list.
    entries List<Property Map>
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    natGatewayProductUid String
    Product UID of the NAT Gateway that owns this prefix list.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    NatGatewayPrefixListId double
    Numeric ID of the prefix list, assigned by the API.
    Id string
    The provider-assigned unique ID for this managed resource.
    NatGatewayPrefixListId float64
    Numeric ID of the prefix list, assigned by the API.
    id string
    The provider-assigned unique ID for this managed resource.
    nat_gateway_prefix_list_id number
    Numeric ID of the prefix list, assigned by the API.
    id String
    The provider-assigned unique ID for this managed resource.
    natGatewayPrefixListId Double
    Numeric ID of the prefix list, assigned by the API.
    id string
    The provider-assigned unique ID for this managed resource.
    natGatewayPrefixListId number
    Numeric ID of the prefix list, assigned by the API.
    id str
    The provider-assigned unique ID for this managed resource.
    nat_gateway_prefix_list_id float
    Numeric ID of the prefix list, assigned by the API.
    id String
    The provider-assigned unique ID for this managed resource.
    natGatewayPrefixListId Number
    Numeric ID of the prefix list, assigned by the API.

    Look up Existing NatGatewayPrefixList Resource

    Get an existing NatGatewayPrefixList 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?: NatGatewayPrefixListState, opts?: CustomResourceOptions): NatGatewayPrefixList
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address_family: Optional[str] = None,
            description: Optional[str] = None,
            entries: Optional[Sequence[NatGatewayPrefixListEntryArgs]] = None,
            nat_gateway_prefix_list_id: Optional[float] = None,
            nat_gateway_product_uid: Optional[str] = None) -> NatGatewayPrefixList
    func GetNatGatewayPrefixList(ctx *Context, name string, id IDInput, state *NatGatewayPrefixListState, opts ...ResourceOption) (*NatGatewayPrefixList, error)
    public static NatGatewayPrefixList Get(string name, Input<string> id, NatGatewayPrefixListState? state, CustomResourceOptions? opts = null)
    public static NatGatewayPrefixList get(String name, Output<String> id, NatGatewayPrefixListState state, CustomResourceOptions options)
    resources:  _:    type: megaport:NatGatewayPrefixList    get:      id: ${id}
    import {
      to = megaport_natgatewayprefixlist.example
      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:
    AddressFamily string
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    Description string
    Description of the prefix list.
    Entries List<NatGatewayPrefixListEntry>
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    NatGatewayPrefixListId double
    Numeric ID of the prefix list, assigned by the API.
    NatGatewayProductUid string
    Product UID of the NAT Gateway that owns this prefix list.
    AddressFamily string
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    Description string
    Description of the prefix list.
    Entries []NatGatewayPrefixListEntryArgs
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    NatGatewayPrefixListId float64
    Numeric ID of the prefix list, assigned by the API.
    NatGatewayProductUid string
    Product UID of the NAT Gateway that owns this prefix list.
    address_family string
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    description string
    Description of the prefix list.
    entries list(object)
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    nat_gateway_prefix_list_id number
    Numeric ID of the prefix list, assigned by the API.
    nat_gateway_product_uid string
    Product UID of the NAT Gateway that owns this prefix list.
    addressFamily String
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    description String
    Description of the prefix list.
    entries List<NatGatewayPrefixListEntry>
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    natGatewayPrefixListId Double
    Numeric ID of the prefix list, assigned by the API.
    natGatewayProductUid String
    Product UID of the NAT Gateway that owns this prefix list.
    addressFamily string
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    description string
    Description of the prefix list.
    entries NatGatewayPrefixListEntry[]
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    natGatewayPrefixListId number
    Numeric ID of the prefix list, assigned by the API.
    natGatewayProductUid string
    Product UID of the NAT Gateway that owns this prefix list.
    address_family str
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    description str
    Description of the prefix list.
    entries Sequence[NatGatewayPrefixListEntryArgs]
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    nat_gateway_prefix_list_id float
    Numeric ID of the prefix list, assigned by the API.
    nat_gateway_product_uid str
    Product UID of the NAT Gateway that owns this prefix list.
    addressFamily String
    Address family of the prefix list. One of IPv4 or IPv6. Changing this forces replacement.
    description String
    Description of the prefix list.
    entries List<Property Map>
    Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
    natGatewayPrefixListId Number
    Numeric ID of the prefix list, assigned by the API.
    natGatewayProductUid String
    Product UID of the NAT Gateway that owns this prefix list.

    Supporting Types

    NatGatewayPrefixListEntry, NatGatewayPrefixListEntryArgs

    Action string
    Action for the entry. One of permit or deny.
    Prefix string
    CIDR network address of the entry. Must be a valid network address with no host bits set.
    Ge double
    Minimum prefix length to be matched. 0–32 for IPv4, 0–128 for IPv6. Omit or set to 0 to match the prefix's own length.
    Le double
    Maximum prefix length to be matched. Must be greater than or equal to ge. Omit or set to 0 to match the prefix's own length.
    Action string
    Action for the entry. One of permit or deny.
    Prefix string
    CIDR network address of the entry. Must be a valid network address with no host bits set.
    Ge float64
    Minimum prefix length to be matched. 0–32 for IPv4, 0–128 for IPv6. Omit or set to 0 to match the prefix's own length.
    Le float64
    Maximum prefix length to be matched. Must be greater than or equal to ge. Omit or set to 0 to match the prefix's own length.
    action string
    Action for the entry. One of permit or deny.
    prefix string
    CIDR network address of the entry. Must be a valid network address with no host bits set.
    ge number
    Minimum prefix length to be matched. 0–32 for IPv4, 0–128 for IPv6. Omit or set to 0 to match the prefix's own length.
    le number
    Maximum prefix length to be matched. Must be greater than or equal to ge. Omit or set to 0 to match the prefix's own length.
    action String
    Action for the entry. One of permit or deny.
    prefix String
    CIDR network address of the entry. Must be a valid network address with no host bits set.
    ge Double
    Minimum prefix length to be matched. 0–32 for IPv4, 0–128 for IPv6. Omit or set to 0 to match the prefix's own length.
    le Double
    Maximum prefix length to be matched. Must be greater than or equal to ge. Omit or set to 0 to match the prefix's own length.
    action string
    Action for the entry. One of permit or deny.
    prefix string
    CIDR network address of the entry. Must be a valid network address with no host bits set.
    ge number
    Minimum prefix length to be matched. 0–32 for IPv4, 0–128 for IPv6. Omit or set to 0 to match the prefix's own length.
    le number
    Maximum prefix length to be matched. Must be greater than or equal to ge. Omit or set to 0 to match the prefix's own length.
    action str
    Action for the entry. One of permit or deny.
    prefix str
    CIDR network address of the entry. Must be a valid network address with no host bits set.
    ge float
    Minimum prefix length to be matched. 0–32 for IPv4, 0–128 for IPv6. Omit or set to 0 to match the prefix's own length.
    le float
    Maximum prefix length to be matched. Must be greater than or equal to ge. Omit or set to 0 to match the prefix's own length.
    action String
    Action for the entry. One of permit or deny.
    prefix String
    CIDR network address of the entry. Must be a valid network address with no host bits set.
    ge Number
    Minimum prefix length to be matched. 0–32 for IPv4, 0–128 for IPv6. Omit or set to 0 to match the prefix's own length.
    le Number
    Maximum prefix length to be matched. Must be greater than or equal to ge. Omit or set to 0 to match the prefix's own length.

    Package Details

    Repository
    megaport megaport/terraform-provider-megaport
    License
    Notes
    This Pulumi package is based on the megaport Terraform Provider.
    Viewing docs for megaport 1.9.0
    published on Thursday, May 21, 2026 by megaport

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial