published on Thursday, May 21, 2026 by megaport
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:
- Address
Family string - Address family of the prefix list. One of
IPv4orIPv6. Changing this forces replacement. - Description string
- Description of the prefix list.
- Entries
List<Nat
Gateway Prefix List Entry> - Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
- Nat
Gateway stringProduct Uid - Product UID of the NAT Gateway that owns this prefix list.
- Address
Family string - Address family of the prefix list. One of
IPv4orIPv6. Changing this forces replacement. - Description string
- Description of the prefix list.
- Entries
[]Nat
Gateway Prefix List Entry Args - Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
- Nat
Gateway stringProduct Uid - Product UID of the NAT Gateway that owns this prefix list.
- address_
family string - Address family of the prefix list. One of
IPv4orIPv6. 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_ stringproduct_ uid - Product UID of the NAT Gateway that owns this prefix list.
- address
Family String - Address family of the prefix list. One of
IPv4orIPv6. Changing this forces replacement. - description String
- Description of the prefix list.
- entries
List<Nat
Gateway Prefix List Entry> - Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
- nat
Gateway StringProduct Uid - Product UID of the NAT Gateway that owns this prefix list.
- address
Family string - Address family of the prefix list. One of
IPv4orIPv6. Changing this forces replacement. - description string
- Description of the prefix list.
- entries
Nat
Gateway Prefix List Entry[] - Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
- nat
Gateway stringProduct Uid - Product UID of the NAT Gateway that owns this prefix list.
- address_
family str - Address family of the prefix list. One of
IPv4orIPv6. Changing this forces replacement. - description str
- Description of the prefix list.
- entries
Sequence[Nat
Gateway Prefix List Entry Args] - Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
- nat_
gateway_ strproduct_ uid - Product UID of the NAT Gateway that owns this prefix list.
- address
Family String - Address family of the prefix list. One of
IPv4orIPv6. 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.
- nat
Gateway StringProduct Uid - 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.
- Nat
Gateway doublePrefix List Id - Numeric ID of the prefix list, assigned by the API.
- Id string
- The provider-assigned unique ID for this managed resource.
- Nat
Gateway float64Prefix List Id - Numeric ID of the prefix list, assigned by the API.
- id string
- The provider-assigned unique ID for this managed resource.
- nat_
gateway_ numberprefix_ list_ id - Numeric ID of the prefix list, assigned by the API.
- id String
- The provider-assigned unique ID for this managed resource.
- nat
Gateway DoublePrefix List Id - Numeric ID of the prefix list, assigned by the API.
- id string
- The provider-assigned unique ID for this managed resource.
- nat
Gateway numberPrefix List Id - Numeric ID of the prefix list, assigned by the API.
- id str
- The provider-assigned unique ID for this managed resource.
- nat_
gateway_ floatprefix_ list_ id - Numeric ID of the prefix list, assigned by the API.
- id String
- The provider-assigned unique ID for this managed resource.
- nat
Gateway NumberPrefix List Id - 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) -> NatGatewayPrefixListfunc 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.
- Address
Family string - Address family of the prefix list. One of
IPv4orIPv6. Changing this forces replacement. - Description string
- Description of the prefix list.
- Entries
List<Nat
Gateway Prefix List Entry> - Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
- Nat
Gateway doublePrefix List Id - Numeric ID of the prefix list, assigned by the API.
- Nat
Gateway stringProduct Uid - Product UID of the NAT Gateway that owns this prefix list.
- Address
Family string - Address family of the prefix list. One of
IPv4orIPv6. Changing this forces replacement. - Description string
- Description of the prefix list.
- Entries
[]Nat
Gateway Prefix List Entry Args - Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
- Nat
Gateway float64Prefix List Id - Numeric ID of the prefix list, assigned by the API.
- Nat
Gateway stringProduct Uid - Product UID of the NAT Gateway that owns this prefix list.
- address_
family string - Address family of the prefix list. One of
IPv4orIPv6. 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_ numberprefix_ list_ id - Numeric ID of the prefix list, assigned by the API.
- nat_
gateway_ stringproduct_ uid - Product UID of the NAT Gateway that owns this prefix list.
- address
Family String - Address family of the prefix list. One of
IPv4orIPv6. Changing this forces replacement. - description String
- Description of the prefix list.
- entries
List<Nat
Gateway Prefix List Entry> - Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
- nat
Gateway DoublePrefix List Id - Numeric ID of the prefix list, assigned by the API.
- nat
Gateway StringProduct Uid - Product UID of the NAT Gateway that owns this prefix list.
- address
Family string - Address family of the prefix list. One of
IPv4orIPv6. Changing this forces replacement. - description string
- Description of the prefix list.
- entries
Nat
Gateway Prefix List Entry[] - Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
- nat
Gateway numberPrefix List Id - Numeric ID of the prefix list, assigned by the API.
- nat
Gateway stringProduct Uid - Product UID of the NAT Gateway that owns this prefix list.
- address_
family str - Address family of the prefix list. One of
IPv4orIPv6. Changing this forces replacement. - description str
- Description of the prefix list.
- entries
Sequence[Nat
Gateway Prefix List Entry Args] - Entries in the prefix list. At least one entry is required. Each entry's prefix must match the address_family.
- nat_
gateway_ floatprefix_ list_ id - Numeric ID of the prefix list, assigned by the API.
- nat_
gateway_ strproduct_ uid - Product UID of the NAT Gateway that owns this prefix list.
- address
Family String - Address family of the prefix list. One of
IPv4orIPv6. 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.
- nat
Gateway NumberPrefix List Id - Numeric ID of the prefix list, assigned by the API.
- nat
Gateway StringProduct Uid - Product UID of the NAT Gateway that owns this prefix list.
Supporting Types
NatGatewayPrefixListEntry, NatGatewayPrefixListEntryArgs
- Action string
- Action for the entry. One of
permitordeny. - 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
permitordeny. - 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
permitordeny. - 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
permitordeny. - 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
permitordeny. - 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
permitordeny. - 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
permitordeny. - 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
megaportTerraform Provider.
published on Thursday, May 21, 2026 by megaport