DnatEntry
Provides a Sag DnatEntry resource. This topic describes how to add a DNAT entry to a Smart Access Gateway (SAG) instance to enable the DNAT function. By using the DNAT function, you can forward requests received by public IP addresses to Alibaba Cloud instances according to custom mapping rules.
For information about Sag DnatEntry and how to use it, see What is Sag DnatEntry.
NOTE: Available in 1.63.0+
NOTE: Only the following regions suppor. [
cn-shanghai,cn-shanghai-finance-1,cn-hongkong,ap-southeast-1,ap-southeast-2,ap-southeast-3,ap-southeast-5,ap-northeast-1,eu-central-1]
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var @default = new AliCloud.RocketMQ.DnatEntry("default", new AliCloud.RocketMQ.DnatEntryArgs
{
ExternalIp = "1.0.0.2",
ExternalPort = "1",
InternalIp = "10.0.0.2",
InternalPort = "20",
IpProtocol = "tcp",
SagId = "sag-3rb1t3iagy3w0zgwy9",
Type = "Intranet",
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.rocketmq.DnatEntry("default",
external_ip="1.0.0.2",
external_port="1",
internal_ip="10.0.0.2",
internal_port="20",
ip_protocol="tcp",
sag_id="sag-3rb1t3iagy3w0zgwy9",
type="Intranet")import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultDnatEntry = new alicloud.rocketmq.DnatEntry("default", {
externalIp: "1.0.0.2",
externalPort: "1",
internalIp: "10.0.0.2",
internalPort: "20",
ipProtocol: "tcp",
sagId: "sag-3rb1t3iagy3w0zgwy9",
type: "Intranet",
});Create a DnatEntry Resource
new DnatEntry(name: string, args: DnatEntryArgs, opts?: CustomResourceOptions);def DnatEntry(resource_name, opts=None, external_ip=None, external_port=None, internal_ip=None, internal_port=None, ip_protocol=None, sag_id=None, type=None, __props__=None);func NewDnatEntry(ctx *Context, name string, args DnatEntryArgs, opts ...ResourceOption) (*DnatEntry, error)public DnatEntry(string name, DnatEntryArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args DnatEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DnatEntryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DnatEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
DnatEntry Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The DnatEntry resource accepts the following input properties:
- External
Port string The public port.Value range: 1 to 65535 or “any”.
- Internal
Ip string The destination private IP address.
- Internal
Port string The destination private port.Value range: 1 to 65535 or “any”.
- Ip
Protocol string The protocol type. Valid values: TCP: Forwards packets of the TCP protocol. UDP: Forwards packets of the UDP protocol. Any: Forwards packets of all protocols.
- Sag
Id string The ID of the SAG instance.
- Type string
The DNAT type. Valid values: Intranet: DNAT of private IP addresses. Internet: DNAT of public IP addresses
- External
Ip string The external public IP address.when “type” is “Internet”,automatically identify the external ip.
- External
Port string The public port.Value range: 1 to 65535 or “any”.
- Internal
Ip string The destination private IP address.
- Internal
Port string The destination private port.Value range: 1 to 65535 or “any”.
- Ip
Protocol string The protocol type. Valid values: TCP: Forwards packets of the TCP protocol. UDP: Forwards packets of the UDP protocol. Any: Forwards packets of all protocols.
- Sag
Id string The ID of the SAG instance.
- Type string
The DNAT type. Valid values: Intranet: DNAT of private IP addresses. Internet: DNAT of public IP addresses
- External
Ip string The external public IP address.when “type” is “Internet”,automatically identify the external ip.
- external
Port string The public port.Value range: 1 to 65535 or “any”.
- internal
Ip string The destination private IP address.
- internal
Port string The destination private port.Value range: 1 to 65535 or “any”.
- ip
Protocol string The protocol type. Valid values: TCP: Forwards packets of the TCP protocol. UDP: Forwards packets of the UDP protocol. Any: Forwards packets of all protocols.
- sag
Id string The ID of the SAG instance.
- type string
The DNAT type. Valid values: Intranet: DNAT of private IP addresses. Internet: DNAT of public IP addresses
- external
Ip string The external public IP address.when “type” is “Internet”,automatically identify the external ip.
- external_
port str The public port.Value range: 1 to 65535 or “any”.
- internal_
ip str The destination private IP address.
- internal_
port str The destination private port.Value range: 1 to 65535 or “any”.
- ip_
protocol str The protocol type. Valid values: TCP: Forwards packets of the TCP protocol. UDP: Forwards packets of the UDP protocol. Any: Forwards packets of all protocols.
- sag_
id str The ID of the SAG instance.
- type str
The DNAT type. Valid values: Intranet: DNAT of private IP addresses. Internet: DNAT of public IP addresses
- external_
ip str The external public IP address.when “type” is “Internet”,automatically identify the external ip.
Outputs
All input properties are implicitly available as output properties. Additionally, the DnatEntry resource produces the following output properties:
Look up an Existing DnatEntry Resource
Get an existing DnatEntry 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?: DnatEntryState, opts?: CustomResourceOptions): DnatEntrystatic get(resource_name, id, opts=None, external_ip=None, external_port=None, internal_ip=None, internal_port=None, ip_protocol=None, sag_id=None, type=None, __props__=None);func GetDnatEntry(ctx *Context, name string, id IDInput, state *DnatEntryState, opts ...ResourceOption) (*DnatEntry, error)public static DnatEntry Get(string name, Input<string> id, DnatEntryState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- External
Ip string The external public IP address.when “type” is “Internet”,automatically identify the external ip.
- External
Port string The public port.Value range: 1 to 65535 or “any”.
- Internal
Ip string The destination private IP address.
- Internal
Port string The destination private port.Value range: 1 to 65535 or “any”.
- Ip
Protocol string The protocol type. Valid values: TCP: Forwards packets of the TCP protocol. UDP: Forwards packets of the UDP protocol. Any: Forwards packets of all protocols.
- Sag
Id string The ID of the SAG instance.
- Type string
The DNAT type. Valid values: Intranet: DNAT of private IP addresses. Internet: DNAT of public IP addresses
- External
Ip string The external public IP address.when “type” is “Internet”,automatically identify the external ip.
- External
Port string The public port.Value range: 1 to 65535 or “any”.
- Internal
Ip string The destination private IP address.
- Internal
Port string The destination private port.Value range: 1 to 65535 or “any”.
- Ip
Protocol string The protocol type. Valid values: TCP: Forwards packets of the TCP protocol. UDP: Forwards packets of the UDP protocol. Any: Forwards packets of all protocols.
- Sag
Id string The ID of the SAG instance.
- Type string
The DNAT type. Valid values: Intranet: DNAT of private IP addresses. Internet: DNAT of public IP addresses
- external
Ip string The external public IP address.when “type” is “Internet”,automatically identify the external ip.
- external
Port string The public port.Value range: 1 to 65535 or “any”.
- internal
Ip string The destination private IP address.
- internal
Port string The destination private port.Value range: 1 to 65535 or “any”.
- ip
Protocol string The protocol type. Valid values: TCP: Forwards packets of the TCP protocol. UDP: Forwards packets of the UDP protocol. Any: Forwards packets of all protocols.
- sag
Id string The ID of the SAG instance.
- type string
The DNAT type. Valid values: Intranet: DNAT of private IP addresses. Internet: DNAT of public IP addresses
- external_
ip str The external public IP address.when “type” is “Internet”,automatically identify the external ip.
- external_
port str The public port.Value range: 1 to 65535 or “any”.
- internal_
ip str The destination private IP address.
- internal_
port str The destination private port.Value range: 1 to 65535 or “any”.
- ip_
protocol str The protocol type. Valid values: TCP: Forwards packets of the TCP protocol. UDP: Forwards packets of the UDP protocol. Any: Forwards packets of all protocols.
- sag_
id str The ID of the SAG instance.
- type str
The DNAT type. Valid values: Intranet: DNAT of private IP addresses. Internet: DNAT of public IP addresses
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.