unifi.port.Forward
Explore with Pulumi AI
unifi.port.Forward
manages a port forwarding rule on the gateway.
Create Forward Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Forward(name: string, args?: ForwardArgs, opts?: CustomResourceOptions);
@overload
def Forward(resource_name: str,
args: Optional[ForwardArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Forward(resource_name: str,
opts: Optional[ResourceOptions] = None,
dst_port: Optional[str] = None,
enabled: Optional[bool] = None,
fwd_ip: Optional[str] = None,
fwd_port: Optional[str] = None,
log: Optional[bool] = None,
name: Optional[str] = None,
port_forward_interface: Optional[str] = None,
protocol: Optional[str] = None,
site: Optional[str] = None,
src_ip: Optional[str] = None)
func NewForward(ctx *Context, name string, args *ForwardArgs, opts ...ResourceOption) (*Forward, error)
public Forward(string name, ForwardArgs? args = null, CustomResourceOptions? opts = null)
public Forward(String name, ForwardArgs args)
public Forward(String name, ForwardArgs args, CustomResourceOptions options)
type: unifi:port:Forward
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 ForwardArgs
- 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 ForwardArgs
- 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 ForwardArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ForwardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ForwardArgs
- 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 forwardResource = new Unifi.Port.Forward("forwardResource", new()
{
DstPort = "string",
FwdIp = "string",
FwdPort = "string",
Log = false,
Name = "string",
PortForwardInterface = "string",
Protocol = "string",
Site = "string",
SrcIp = "string",
});
example, err := port.NewForward(ctx, "forwardResource", &port.ForwardArgs{
DstPort: pulumi.String("string"),
FwdIp: pulumi.String("string"),
FwdPort: pulumi.String("string"),
Log: pulumi.Bool(false),
Name: pulumi.String("string"),
PortForwardInterface: pulumi.String("string"),
Protocol: pulumi.String("string"),
Site: pulumi.String("string"),
SrcIp: pulumi.String("string"),
})
var forwardResource = new Forward("forwardResource", ForwardArgs.builder()
.dstPort("string")
.fwdIp("string")
.fwdPort("string")
.log(false)
.name("string")
.portForwardInterface("string")
.protocol("string")
.site("string")
.srcIp("string")
.build());
forward_resource = unifi.port.Forward("forwardResource",
dst_port="string",
fwd_ip="string",
fwd_port="string",
log=False,
name="string",
port_forward_interface="string",
protocol="string",
site="string",
src_ip="string")
const forwardResource = new unifi.port.Forward("forwardResource", {
dstPort: "string",
fwdIp: "string",
fwdPort: "string",
log: false,
name: "string",
portForwardInterface: "string",
protocol: "string",
site: "string",
srcIp: "string",
});
type: unifi:port:Forward
properties:
dstPort: string
fwdIp: string
fwdPort: string
log: false
name: string
portForwardInterface: string
protocol: string
site: string
srcIp: string
Forward 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 Forward resource accepts the following input properties:
- Dst
Port string - The destination port for the forwarding.
- Enabled bool
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - Fwd
Ip string - The IPv4 address to forward traffic to.
- Fwd
Port string - The port to forward traffic to.
- Log bool
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - Name string
- The name of the port forwarding rule.
- Port
Forward stringInterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - Protocol string
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - Site string
- The name of the site to associate the port forwarding rule with.
- Src
Ip string - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
- Dst
Port string - The destination port for the forwarding.
- Enabled bool
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - Fwd
Ip string - The IPv4 address to forward traffic to.
- Fwd
Port string - The port to forward traffic to.
- Log bool
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - Name string
- The name of the port forwarding rule.
- Port
Forward stringInterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - Protocol string
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - Site string
- The name of the site to associate the port forwarding rule with.
- Src
Ip string - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
- dst
Port String - The destination port for the forwarding.
- enabled Boolean
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - fwd
Ip String - The IPv4 address to forward traffic to.
- fwd
Port String - The port to forward traffic to.
- log Boolean
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - name String
- The name of the port forwarding rule.
- port
Forward StringInterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - protocol String
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - site String
- The name of the site to associate the port forwarding rule with.
- src
Ip String - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
- dst
Port string - The destination port for the forwarding.
- enabled boolean
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - fwd
Ip string - The IPv4 address to forward traffic to.
- fwd
Port string - The port to forward traffic to.
- log boolean
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - name string
- The name of the port forwarding rule.
- port
Forward stringInterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - protocol string
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - site string
- The name of the site to associate the port forwarding rule with.
- src
Ip string - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
- dst_
port str - The destination port for the forwarding.
- enabled bool
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - fwd_
ip str - The IPv4 address to forward traffic to.
- fwd_
port str - The port to forward traffic to.
- log bool
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - name str
- The name of the port forwarding rule.
- port_
forward_ strinterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - protocol str
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - site str
- The name of the site to associate the port forwarding rule with.
- src_
ip str - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
- dst
Port String - The destination port for the forwarding.
- enabled Boolean
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - fwd
Ip String - The IPv4 address to forward traffic to.
- fwd
Port String - The port to forward traffic to.
- log Boolean
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - name String
- The name of the port forwarding rule.
- port
Forward StringInterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - protocol String
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - site String
- The name of the site to associate the port forwarding rule with.
- src
Ip String - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Forward 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 Forward Resource
Get an existing Forward 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?: ForwardState, opts?: CustomResourceOptions): Forward
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dst_port: Optional[str] = None,
enabled: Optional[bool] = None,
fwd_ip: Optional[str] = None,
fwd_port: Optional[str] = None,
log: Optional[bool] = None,
name: Optional[str] = None,
port_forward_interface: Optional[str] = None,
protocol: Optional[str] = None,
site: Optional[str] = None,
src_ip: Optional[str] = None) -> Forward
func GetForward(ctx *Context, name string, id IDInput, state *ForwardState, opts ...ResourceOption) (*Forward, error)
public static Forward Get(string name, Input<string> id, ForwardState? state, CustomResourceOptions? opts = null)
public static Forward get(String name, Output<String> id, ForwardState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Dst
Port string - The destination port for the forwarding.
- Enabled bool
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - Fwd
Ip string - The IPv4 address to forward traffic to.
- Fwd
Port string - The port to forward traffic to.
- Log bool
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - Name string
- The name of the port forwarding rule.
- Port
Forward stringInterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - Protocol string
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - Site string
- The name of the site to associate the port forwarding rule with.
- Src
Ip string - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
- Dst
Port string - The destination port for the forwarding.
- Enabled bool
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - Fwd
Ip string - The IPv4 address to forward traffic to.
- Fwd
Port string - The port to forward traffic to.
- Log bool
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - Name string
- The name of the port forwarding rule.
- Port
Forward stringInterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - Protocol string
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - Site string
- The name of the site to associate the port forwarding rule with.
- Src
Ip string - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
- dst
Port String - The destination port for the forwarding.
- enabled Boolean
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - fwd
Ip String - The IPv4 address to forward traffic to.
- fwd
Port String - The port to forward traffic to.
- log Boolean
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - name String
- The name of the port forwarding rule.
- port
Forward StringInterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - protocol String
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - site String
- The name of the site to associate the port forwarding rule with.
- src
Ip String - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
- dst
Port string - The destination port for the forwarding.
- enabled boolean
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - fwd
Ip string - The IPv4 address to forward traffic to.
- fwd
Port string - The port to forward traffic to.
- log boolean
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - name string
- The name of the port forwarding rule.
- port
Forward stringInterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - protocol string
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - site string
- The name of the site to associate the port forwarding rule with.
- src
Ip string - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
- dst_
port str - The destination port for the forwarding.
- enabled bool
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - fwd_
ip str - The IPv4 address to forward traffic to.
- fwd_
port str - The port to forward traffic to.
- log bool
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - name str
- The name of the port forwarding rule.
- port_
forward_ strinterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - protocol str
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - site str
- The name of the site to associate the port forwarding rule with.
- src_
ip str - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
- dst
Port String - The destination port for the forwarding.
- enabled Boolean
- Specifies whether the port forwarding rule is enabled or not. Defaults to
true
. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration. - fwd
Ip String - The IPv4 address to forward traffic to.
- fwd
Port String - The port to forward traffic to.
- log Boolean
- Specifies whether to log forwarded traffic or not. Defaults to
false
. - name String
- The name of the port forwarding rule.
- port
Forward StringInterface - The port forwarding interface. Can be
wan
,wan2
, orboth
. - protocol String
- The protocol for the port forwarding rule. Can be
tcp
,udp
, ortcp_udp
. Defaults totcp_udp
. - site String
- The name of the site to associate the port forwarding rule with.
- src
Ip String - The source IPv4 address (or CIDR) of the port forwarding rule. For all traffic, specify
any
. Defaults toany
.
Package Details
- Repository
- unifi pulumiverse/pulumi-unifi
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
unifi
Terraform Provider.