Package com.pulumi.alicloud.rocketmq
Class SnatEntry
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.alicloud.rocketmq.SnatEntry
-
public class SnatEntry extends com.pulumi.resources.CustomResource
Provides a Sag SnatEntry resource. This topic describes how to add a SNAT entry to enable the SNAT function. The SNAT function can hide internal IP addresses and resolve private IP address conflicts. With this function, on-premises sites can access internal IP addresses, but cannot be accessed by internal IP addresses. If you do not add a SNAT entry, on-premises sites can access each other only when all related IP addresses do not conflict. For information about Sag SnatEntry and how to use it, see [What is Sag SnatEntry](https://www.alibabacloud.com/help/en/smart-access-gateway/latest/addsnatentry). > **NOTE:** Available since v1.61.0. > **NOTE:** Only the following regions support. [`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 Basic Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.alicloud.rocketmq.SnatEntry; import com.pulumi.alicloud.rocketmq.SnatEntryArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var config = ctx.config(); final var sagId = config.get("sagId").orElse("sag-9bifk***"); var default_ = new SnatEntry("default", SnatEntryArgs.builder() .sagId(sagId) .cidrBlock("192.168.7.0/24") .snatIp("192.0.0.2") .build()); } } ``` ## Import The Sag SnatEntry can be imported using the id, e.g. ```sh $ pulumi import alicloud:rocketmq/snatEntry:SnatEntry example sag-abc123456:snat-abc123456 ```
-
-
Constructor Summary
Constructors Constructor Description SnatEntry(java.lang.String name)
SnatEntry(java.lang.String name, SnatEntryArgs args)
SnatEntry(java.lang.String name, SnatEntryArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
cidrBlock()
static SnatEntry
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SnatEntryState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
sagId()
com.pulumi.core.Output<java.lang.String>
snatIp()
-
-
-
Constructor Detail
-
SnatEntry
public SnatEntry(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
SnatEntry
public SnatEntry(java.lang.String name, SnatEntryArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
SnatEntry
public SnatEntry(java.lang.String name, SnatEntryArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
cidrBlock
public com.pulumi.core.Output<java.lang.String> cidrBlock()
- Returns:
- The destination CIDR block.
-
sagId
public com.pulumi.core.Output<java.lang.String> sagId()
- Returns:
- The ID of the SAG instance.
-
snatIp
public com.pulumi.core.Output<java.lang.String> snatIp()
- Returns:
- The public IP address.
-
get
public static SnatEntry get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable SnatEntryState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-