Class 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",
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.RocketMQ
Assembly: Pulumi.AliCloud.dll
Syntax
public class DnatEntry : CustomResource
Constructors
View SourceDnatEntry(String, DnatEntryArgs, CustomResourceOptions)
Create a DnatEntry resource with the given unique name, arguments, and options.
Declaration
public DnatEntry(string name, DnatEntryArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DnatEntryArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceExternalIp
The external public IP address.when "type" is "Internet",automatically identify the external ip.
Declaration
public Output<string> ExternalIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ExternalPort
The public port.Value range: 1 to 65535 or "any".
Declaration
public Output<string> ExternalPort { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InternalIp
The destination private IP address.
Declaration
public Output<string> InternalIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InternalPort
The destination private port.Value range: 1 to 65535 or "any".
Declaration
public Output<string> InternalPort { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IpProtocol
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.
Declaration
public Output<string> IpProtocol { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SagId
The ID of the SAG instance.
Declaration
public Output<string> SagId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Type
The DNAT type. Valid values: Intranet: DNAT of private IP addresses. Internet: DNAT of public IP addresses
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, DnatEntryState, CustomResourceOptions)
Get an existing DnatEntry resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static DnatEntry Get(string name, Input<string> id, DnatEntryState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DnatEntryState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| DnatEntry |