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

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:

ExternalPort string

The public port.Value range: 1 to 65535 or “any”.

InternalIp string

The destination private IP address.

InternalPort string

The destination private port.Value range: 1 to 65535 or “any”.

IpProtocol 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.

SagId 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

ExternalIp string

The external public IP address.when “type” is “Internet”,automatically identify the external ip.

ExternalPort string

The public port.Value range: 1 to 65535 or “any”.

InternalIp string

The destination private IP address.

InternalPort string

The destination private port.Value range: 1 to 65535 or “any”.

IpProtocol 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.

SagId 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

ExternalIp string

The external public IP address.when “type” is “Internet”,automatically identify the external ip.

externalPort string

The public port.Value range: 1 to 65535 or “any”.

internalIp string

The destination private IP address.

internalPort string

The destination private port.Value range: 1 to 65535 or “any”.

ipProtocol 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.

sagId 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

externalIp 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:

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.

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): DnatEntry
static 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:

ExternalIp string

The external public IP address.when “type” is “Internet”,automatically identify the external ip.

ExternalPort string

The public port.Value range: 1 to 65535 or “any”.

InternalIp string

The destination private IP address.

InternalPort string

The destination private port.Value range: 1 to 65535 or “any”.

IpProtocol 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.

SagId 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

ExternalIp string

The external public IP address.when “type” is “Internet”,automatically identify the external ip.

ExternalPort string

The public port.Value range: 1 to 65535 or “any”.

InternalIp string

The destination private IP address.

InternalPort string

The destination private port.Value range: 1 to 65535 or “any”.

IpProtocol 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.

SagId 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

externalIp string

The external public IP address.when “type” is “Internet”,automatically identify the external ip.

externalPort string

The public port.Value range: 1 to 65535 or “any”.

internalIp string

The destination private IP address.

internalPort string

The destination private port.Value range: 1 to 65535 or “any”.

ipProtocol 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.

sagId 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 alicloud Terraform Provider.