vcd.VappNatRules
Explore with Pulumi AI
Create VappNatRules Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VappNatRules(name: string, args: VappNatRulesArgs, opts?: CustomResourceOptions);
@overload
def VappNatRules(resource_name: str,
args: VappNatRulesArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VappNatRules(resource_name: str,
opts: Optional[ResourceOptions] = None,
nat_type: Optional[str] = None,
network_id: Optional[str] = None,
vapp_id: Optional[str] = None,
enable_ip_masquerade: Optional[bool] = None,
enabled: Optional[bool] = None,
org: Optional[str] = None,
rules: Optional[Sequence[VappNatRulesRuleArgs]] = None,
vapp_nat_rules_id: Optional[str] = None,
vdc: Optional[str] = None)
func NewVappNatRules(ctx *Context, name string, args VappNatRulesArgs, opts ...ResourceOption) (*VappNatRules, error)
public VappNatRules(string name, VappNatRulesArgs args, CustomResourceOptions? opts = null)
public VappNatRules(String name, VappNatRulesArgs args)
public VappNatRules(String name, VappNatRulesArgs args, CustomResourceOptions options)
type: vcd:VappNatRules
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 VappNatRulesArgs
- 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 VappNatRulesArgs
- 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 VappNatRulesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VappNatRulesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VappNatRulesArgs
- 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 vappNatRulesResource = new Vcd.VappNatRules("vappNatRulesResource", new()
{
NatType = "string",
NetworkId = "string",
VappId = "string",
EnableIpMasquerade = false,
Enabled = false,
Org = "string",
Rules = new[]
{
new Vcd.Inputs.VappNatRulesRuleArgs
{
VmId = "string",
VmNicId = 0,
ExternalIp = "string",
ExternalPort = 0,
ForwardToPort = 0,
Id = "string",
MappingMode = "string",
Protocol = "string",
},
},
VappNatRulesId = "string",
Vdc = "string",
});
example, err := vcd.NewVappNatRules(ctx, "vappNatRulesResource", &vcd.VappNatRulesArgs{
NatType: pulumi.String("string"),
NetworkId: pulumi.String("string"),
VappId: pulumi.String("string"),
EnableIpMasquerade: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
Org: pulumi.String("string"),
Rules: vcd.VappNatRulesRuleArray{
&vcd.VappNatRulesRuleArgs{
VmId: pulumi.String("string"),
VmNicId: pulumi.Float64(0),
ExternalIp: pulumi.String("string"),
ExternalPort: pulumi.Float64(0),
ForwardToPort: pulumi.Float64(0),
Id: pulumi.String("string"),
MappingMode: pulumi.String("string"),
Protocol: pulumi.String("string"),
},
},
VappNatRulesId: pulumi.String("string"),
Vdc: pulumi.String("string"),
})
var vappNatRulesResource = new VappNatRules("vappNatRulesResource", VappNatRulesArgs.builder()
.natType("string")
.networkId("string")
.vappId("string")
.enableIpMasquerade(false)
.enabled(false)
.org("string")
.rules(VappNatRulesRuleArgs.builder()
.vmId("string")
.vmNicId(0)
.externalIp("string")
.externalPort(0)
.forwardToPort(0)
.id("string")
.mappingMode("string")
.protocol("string")
.build())
.vappNatRulesId("string")
.vdc("string")
.build());
vapp_nat_rules_resource = vcd.VappNatRules("vappNatRulesResource",
nat_type="string",
network_id="string",
vapp_id="string",
enable_ip_masquerade=False,
enabled=False,
org="string",
rules=[{
"vm_id": "string",
"vm_nic_id": 0,
"external_ip": "string",
"external_port": 0,
"forward_to_port": 0,
"id": "string",
"mapping_mode": "string",
"protocol": "string",
}],
vapp_nat_rules_id="string",
vdc="string")
const vappNatRulesResource = new vcd.VappNatRules("vappNatRulesResource", {
natType: "string",
networkId: "string",
vappId: "string",
enableIpMasquerade: false,
enabled: false,
org: "string",
rules: [{
vmId: "string",
vmNicId: 0,
externalIp: "string",
externalPort: 0,
forwardToPort: 0,
id: "string",
mappingMode: "string",
protocol: "string",
}],
vappNatRulesId: "string",
vdc: "string",
});
type: vcd:VappNatRules
properties:
enableIpMasquerade: false
enabled: false
natType: string
networkId: string
org: string
rules:
- externalIp: string
externalPort: 0
forwardToPort: 0
id: string
mappingMode: string
protocol: string
vmId: string
vmNicId: 0
vappId: string
vappNatRulesId: string
vdc: string
VappNatRules 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 VappNatRules resource accepts the following input properties:
- Nat
Type string - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - Network
Id string - The identifier of vApp network.
- Vapp
Id string - The identifier of vApp.
- Enable
Ip boolMasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - Enabled bool
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Rules
List<Vapp
Nat Rules Rule> Configures a NAT rule; see Rules below for details.
- Vapp
Nat stringRules Id - Vdc string
- The name of VDC to use, optional if defined at provider level.
- Nat
Type string - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - Network
Id string - The identifier of vApp network.
- Vapp
Id string - The identifier of vApp.
- Enable
Ip boolMasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - Enabled bool
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Rules
[]Vapp
Nat Rules Rule Args Configures a NAT rule; see Rules below for details.
- Vapp
Nat stringRules Id - Vdc string
- The name of VDC to use, optional if defined at provider level.
- nat
Type String - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - network
Id String - The identifier of vApp network.
- vapp
Id String - The identifier of vApp.
- enable
Ip BooleanMasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - enabled Boolean
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- rules
List<Vapp
Nat Rules Rule> Configures a NAT rule; see Rules below for details.
- vapp
Nat StringRules Id - vdc String
- The name of VDC to use, optional if defined at provider level.
- nat
Type string - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - network
Id string - The identifier of vApp network.
- vapp
Id string - The identifier of vApp.
- enable
Ip booleanMasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - enabled boolean
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- rules
Vapp
Nat Rules Rule[] Configures a NAT rule; see Rules below for details.
- vapp
Nat stringRules Id - vdc string
- The name of VDC to use, optional if defined at provider level.
- nat_
type str - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - network_
id str - The identifier of vApp network.
- vapp_
id str - The identifier of vApp.
- enable_
ip_ boolmasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - enabled bool
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - org str
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- rules
Sequence[Vapp
Nat Rules Rule Args] Configures a NAT rule; see Rules below for details.
- vapp_
nat_ strrules_ id - vdc str
- The name of VDC to use, optional if defined at provider level.
- nat
Type String - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - network
Id String - The identifier of vApp network.
- vapp
Id String - The identifier of vApp.
- enable
Ip BooleanMasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - enabled Boolean
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- rules List<Property Map>
Configures a NAT rule; see Rules below for details.
- vapp
Nat StringRules Id - vdc String
- The name of VDC to use, optional if defined at provider level.
Outputs
All input properties are implicitly available as output properties. Additionally, the VappNatRules 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 VappNatRules Resource
Get an existing VappNatRules 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?: VappNatRulesState, opts?: CustomResourceOptions): VappNatRules
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enable_ip_masquerade: Optional[bool] = None,
enabled: Optional[bool] = None,
nat_type: Optional[str] = None,
network_id: Optional[str] = None,
org: Optional[str] = None,
rules: Optional[Sequence[VappNatRulesRuleArgs]] = None,
vapp_id: Optional[str] = None,
vapp_nat_rules_id: Optional[str] = None,
vdc: Optional[str] = None) -> VappNatRules
func GetVappNatRules(ctx *Context, name string, id IDInput, state *VappNatRulesState, opts ...ResourceOption) (*VappNatRules, error)
public static VappNatRules Get(string name, Input<string> id, VappNatRulesState? state, CustomResourceOptions? opts = null)
public static VappNatRules get(String name, Output<String> id, VappNatRulesState state, CustomResourceOptions options)
resources: _: type: vcd:VappNatRules 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.
- Enable
Ip boolMasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - Enabled bool
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - Nat
Type string - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - Network
Id string - The identifier of vApp network.
- Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Rules
List<Vapp
Nat Rules Rule> Configures a NAT rule; see Rules below for details.
- Vapp
Id string - The identifier of vApp.
- Vapp
Nat stringRules Id - Vdc string
- The name of VDC to use, optional if defined at provider level.
- Enable
Ip boolMasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - Enabled bool
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - Nat
Type string - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - Network
Id string - The identifier of vApp network.
- Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Rules
[]Vapp
Nat Rules Rule Args Configures a NAT rule; see Rules below for details.
- Vapp
Id string - The identifier of vApp.
- Vapp
Nat stringRules Id - Vdc string
- The name of VDC to use, optional if defined at provider level.
- enable
Ip BooleanMasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - enabled Boolean
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - nat
Type String - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - network
Id String - The identifier of vApp network.
- org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- rules
List<Vapp
Nat Rules Rule> Configures a NAT rule; see Rules below for details.
- vapp
Id String - The identifier of vApp.
- vapp
Nat StringRules Id - vdc String
- The name of VDC to use, optional if defined at provider level.
- enable
Ip booleanMasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - enabled boolean
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - nat
Type string - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - network
Id string - The identifier of vApp network.
- org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- rules
Vapp
Nat Rules Rule[] Configures a NAT rule; see Rules below for details.
- vapp
Id string - The identifier of vApp.
- vapp
Nat stringRules Id - vdc string
- The name of VDC to use, optional if defined at provider level.
- enable_
ip_ boolmasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - enabled bool
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - nat_
type str - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - network_
id str - The identifier of vApp network.
- org str
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- rules
Sequence[Vapp
Nat Rules Rule Args] Configures a NAT rule; see Rules below for details.
- vapp_
id str - The identifier of vApp.
- vapp_
nat_ strrules_ id - vdc str
- The name of VDC to use, optional if defined at provider level.
- enable
Ip BooleanMasquerade - When enabled translates a virtual machine's private, internal IP address to a public IP address for outbound traffic. Default value is
false
. - enabled Boolean
- Enable or disable NAT. Default is
true
. To enable the NAT service, vcd.VappFirewallRules needs to be enabled as well. - nat
Type String - "One of:
ipTranslation
(use IP translation),portForwarding
(use port forwarding). ForipTranslation
fieldsvm_id
,vm_nic_id
,mapping_mode
are required andexternal_ip
is optional. ForportForwarding
fieldsvm_id
,vm_nic_id
,protocol
,external_port
andforward_to_port
are required. - network
Id String - The identifier of vApp network.
- org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- rules List<Property Map>
Configures a NAT rule; see Rules below for details.
- vapp
Id String - The identifier of vApp.
- vapp
Nat StringRules Id - vdc String
- The name of VDC to use, optional if defined at provider level.
Supporting Types
VappNatRulesRule, VappNatRulesRuleArgs
- Vm
Id string - VM to which this rule applies.
- Vm
Nic doubleId - VM NIC ID to which this rule applies.
- External
Ip string - External IP address to forward to or External IP address to map to VM
- External
Port double - External port to forward.
- Forward
To doublePort - Internal port to forward.
- Id string
- ID of the rule. Can be used to track syslog messages.
- Mapping
Mode string - Mapping mode. One of:
automatic
,manual
- Protocol string
- Protocol to forward. One of:
TCP
(forward TCP packets),UDP
(forward UDP packets),TCP_UDP
(forward TCP and UDP packets).
- Vm
Id string - VM to which this rule applies.
- Vm
Nic float64Id - VM NIC ID to which this rule applies.
- External
Ip string - External IP address to forward to or External IP address to map to VM
- External
Port float64 - External port to forward.
- Forward
To float64Port - Internal port to forward.
- Id string
- ID of the rule. Can be used to track syslog messages.
- Mapping
Mode string - Mapping mode. One of:
automatic
,manual
- Protocol string
- Protocol to forward. One of:
TCP
(forward TCP packets),UDP
(forward UDP packets),TCP_UDP
(forward TCP and UDP packets).
- vm
Id String - VM to which this rule applies.
- vm
Nic DoubleId - VM NIC ID to which this rule applies.
- external
Ip String - External IP address to forward to or External IP address to map to VM
- external
Port Double - External port to forward.
- forward
To DoublePort - Internal port to forward.
- id String
- ID of the rule. Can be used to track syslog messages.
- mapping
Mode String - Mapping mode. One of:
automatic
,manual
- protocol String
- Protocol to forward. One of:
TCP
(forward TCP packets),UDP
(forward UDP packets),TCP_UDP
(forward TCP and UDP packets).
- vm
Id string - VM to which this rule applies.
- vm
Nic numberId - VM NIC ID to which this rule applies.
- external
Ip string - External IP address to forward to or External IP address to map to VM
- external
Port number - External port to forward.
- forward
To numberPort - Internal port to forward.
- id string
- ID of the rule. Can be used to track syslog messages.
- mapping
Mode string - Mapping mode. One of:
automatic
,manual
- protocol string
- Protocol to forward. One of:
TCP
(forward TCP packets),UDP
(forward UDP packets),TCP_UDP
(forward TCP and UDP packets).
- vm_
id str - VM to which this rule applies.
- vm_
nic_ floatid - VM NIC ID to which this rule applies.
- external_
ip str - External IP address to forward to or External IP address to map to VM
- external_
port float - External port to forward.
- forward_
to_ floatport - Internal port to forward.
- id str
- ID of the rule. Can be used to track syslog messages.
- mapping_
mode str - Mapping mode. One of:
automatic
,manual
- protocol str
- Protocol to forward. One of:
TCP
(forward TCP packets),UDP
(forward UDP packets),TCP_UDP
(forward TCP and UDP packets).
- vm
Id String - VM to which this rule applies.
- vm
Nic NumberId - VM NIC ID to which this rule applies.
- external
Ip String - External IP address to forward to or External IP address to map to VM
- external
Port Number - External port to forward.
- forward
To NumberPort - Internal port to forward.
- id String
- ID of the rule. Can be used to track syslog messages.
- mapping
Mode String - Mapping mode. One of:
automatic
,manual
- protocol String
- Protocol to forward. One of:
TCP
(forward TCP packets),UDP
(forward UDP packets),TCP_UDP
(forward TCP and UDP packets).
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.