tencentcloud.VpcPrivateNatGatewayTranslationNatRule
Provides a resource to create a VPC private nat gateway translation nat rule
NOTE: This resource must exclusive in one share unit, do not declare additional translation nat rules resources of this nat gateway elsewhere.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.VpcPrivateNatGatewayTranslationNatRule("example", {
natGatewayId: "intranat-r46f6pxl",
translationNatRules: [
{
translationDirection: "LOCAL",
translationType: "NETWORK_LAYER",
translationIp: "2.2.2.2",
description: "remark.",
originalIp: "1.1.1.1",
},
{
translationDirection: "LOCAL",
translationType: "TRANSPORT_LAYER",
translationIp: "3.3.3.3",
description: "remark.",
},
],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.VpcPrivateNatGatewayTranslationNatRule("example",
nat_gateway_id="intranat-r46f6pxl",
translation_nat_rules=[
{
"translation_direction": "LOCAL",
"translation_type": "NETWORK_LAYER",
"translation_ip": "2.2.2.2",
"description": "remark.",
"original_ip": "1.1.1.1",
},
{
"translation_direction": "LOCAL",
"translation_type": "TRANSPORT_LAYER",
"translation_ip": "3.3.3.3",
"description": "remark.",
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewVpcPrivateNatGatewayTranslationNatRule(ctx, "example", &tencentcloud.VpcPrivateNatGatewayTranslationNatRuleArgs{
NatGatewayId: pulumi.String("intranat-r46f6pxl"),
TranslationNatRules: tencentcloud.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArray{
&tencentcloud.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs{
TranslationDirection: pulumi.String("LOCAL"),
TranslationType: pulumi.String("NETWORK_LAYER"),
TranslationIp: pulumi.String("2.2.2.2"),
Description: pulumi.String("remark."),
OriginalIp: pulumi.String("1.1.1.1"),
},
&tencentcloud.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs{
TranslationDirection: pulumi.String("LOCAL"),
TranslationType: pulumi.String("TRANSPORT_LAYER"),
TranslationIp: pulumi.String("3.3.3.3"),
Description: pulumi.String("remark."),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.VpcPrivateNatGatewayTranslationNatRule("example", new()
{
NatGatewayId = "intranat-r46f6pxl",
TranslationNatRules = new[]
{
new Tencentcloud.Inputs.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs
{
TranslationDirection = "LOCAL",
TranslationType = "NETWORK_LAYER",
TranslationIp = "2.2.2.2",
Description = "remark.",
OriginalIp = "1.1.1.1",
},
new Tencentcloud.Inputs.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs
{
TranslationDirection = "LOCAL",
TranslationType = "TRANSPORT_LAYER",
TranslationIp = "3.3.3.3",
Description = "remark.",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.VpcPrivateNatGatewayTranslationNatRule;
import com.pulumi.tencentcloud.VpcPrivateNatGatewayTranslationNatRuleArgs;
import com.pulumi.tencentcloud.inputs.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs;
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) {
var example = new VpcPrivateNatGatewayTranslationNatRule("example", VpcPrivateNatGatewayTranslationNatRuleArgs.builder()
.natGatewayId("intranat-r46f6pxl")
.translationNatRules(
VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs.builder()
.translationDirection("LOCAL")
.translationType("NETWORK_LAYER")
.translationIp("2.2.2.2")
.description("remark.")
.originalIp("1.1.1.1")
.build(),
VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs.builder()
.translationDirection("LOCAL")
.translationType("TRANSPORT_LAYER")
.translationIp("3.3.3.3")
.description("remark.")
.build())
.build());
}
}
resources:
example:
type: tencentcloud:VpcPrivateNatGatewayTranslationNatRule
properties:
natGatewayId: intranat-r46f6pxl
translationNatRules:
- translationDirection: LOCAL
translationType: NETWORK_LAYER
translationIp: 2.2.2.2
description: remark.
originalIp: 1.1.1.1
- translationDirection: LOCAL
translationType: TRANSPORT_LAYER
translationIp: 3.3.3.3
description: remark.
Create VpcPrivateNatGatewayTranslationNatRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcPrivateNatGatewayTranslationNatRule(name: string, args: VpcPrivateNatGatewayTranslationNatRuleArgs, opts?: CustomResourceOptions);@overload
def VpcPrivateNatGatewayTranslationNatRule(resource_name: str,
args: VpcPrivateNatGatewayTranslationNatRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpcPrivateNatGatewayTranslationNatRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
nat_gateway_id: Optional[str] = None,
translation_nat_rules: Optional[Sequence[VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs]] = None,
vpc_private_nat_gateway_translation_nat_rule_id: Optional[str] = None)func NewVpcPrivateNatGatewayTranslationNatRule(ctx *Context, name string, args VpcPrivateNatGatewayTranslationNatRuleArgs, opts ...ResourceOption) (*VpcPrivateNatGatewayTranslationNatRule, error)public VpcPrivateNatGatewayTranslationNatRule(string name, VpcPrivateNatGatewayTranslationNatRuleArgs args, CustomResourceOptions? opts = null)
public VpcPrivateNatGatewayTranslationNatRule(String name, VpcPrivateNatGatewayTranslationNatRuleArgs args)
public VpcPrivateNatGatewayTranslationNatRule(String name, VpcPrivateNatGatewayTranslationNatRuleArgs args, CustomResourceOptions options)
type: tencentcloud:VpcPrivateNatGatewayTranslationNatRule
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 VpcPrivateNatGatewayTranslationNatRuleArgs
- 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 VpcPrivateNatGatewayTranslationNatRuleArgs
- 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 VpcPrivateNatGatewayTranslationNatRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcPrivateNatGatewayTranslationNatRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcPrivateNatGatewayTranslationNatRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
VpcPrivateNatGatewayTranslationNatRule 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 VpcPrivateNatGatewayTranslationNatRule resource accepts the following input properties:
- Nat
Gateway stringId - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - Translation
Nat List<VpcRules Private Nat Gateway Translation Nat Rule Translation Nat Rule> - Translation rule object array.
- Vpc
Private stringNat Gateway Translation Nat Rule Id - ID of the resource.
- Nat
Gateway stringId - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - Translation
Nat []VpcRules Private Nat Gateway Translation Nat Rule Translation Nat Rule Args - Translation rule object array.
- Vpc
Private stringNat Gateway Translation Nat Rule Id - ID of the resource.
- nat
Gateway StringId - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - translation
Nat List<VpcRules Private Nat Gateway Translation Nat Rule Translation Nat Rule> - Translation rule object array.
- vpc
Private StringNat Gateway Translation Nat Rule Id - ID of the resource.
- nat
Gateway stringId - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - translation
Nat VpcRules Private Nat Gateway Translation Nat Rule Translation Nat Rule[] - Translation rule object array.
- vpc
Private stringNat Gateway Translation Nat Rule Id - ID of the resource.
- nat_
gateway_ strid - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - translation_
nat_ Sequence[Vpcrules Private Nat Gateway Translation Nat Rule Translation Nat Rule Args] - Translation rule object array.
- vpc_
private_ strnat_ gateway_ translation_ nat_ rule_ id - ID of the resource.
- nat
Gateway StringId - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - translation
Nat List<Property Map>Rules - Translation rule object array.
- vpc
Private StringNat Gateway Translation Nat Rule Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcPrivateNatGatewayTranslationNatRule 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 VpcPrivateNatGatewayTranslationNatRule Resource
Get an existing VpcPrivateNatGatewayTranslationNatRule 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?: VpcPrivateNatGatewayTranslationNatRuleState, opts?: CustomResourceOptions): VpcPrivateNatGatewayTranslationNatRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
nat_gateway_id: Optional[str] = None,
translation_nat_rules: Optional[Sequence[VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs]] = None,
vpc_private_nat_gateway_translation_nat_rule_id: Optional[str] = None) -> VpcPrivateNatGatewayTranslationNatRulefunc GetVpcPrivateNatGatewayTranslationNatRule(ctx *Context, name string, id IDInput, state *VpcPrivateNatGatewayTranslationNatRuleState, opts ...ResourceOption) (*VpcPrivateNatGatewayTranslationNatRule, error)public static VpcPrivateNatGatewayTranslationNatRule Get(string name, Input<string> id, VpcPrivateNatGatewayTranslationNatRuleState? state, CustomResourceOptions? opts = null)public static VpcPrivateNatGatewayTranslationNatRule get(String name, Output<String> id, VpcPrivateNatGatewayTranslationNatRuleState state, CustomResourceOptions options)resources: _: type: tencentcloud:VpcPrivateNatGatewayTranslationNatRule get: id: ${id}- 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.
- Nat
Gateway stringId - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - Translation
Nat List<VpcRules Private Nat Gateway Translation Nat Rule Translation Nat Rule> - Translation rule object array.
- Vpc
Private stringNat Gateway Translation Nat Rule Id - ID of the resource.
- Nat
Gateway stringId - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - Translation
Nat []VpcRules Private Nat Gateway Translation Nat Rule Translation Nat Rule Args - Translation rule object array.
- Vpc
Private stringNat Gateway Translation Nat Rule Id - ID of the resource.
- nat
Gateway StringId - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - translation
Nat List<VpcRules Private Nat Gateway Translation Nat Rule Translation Nat Rule> - Translation rule object array.
- vpc
Private StringNat Gateway Translation Nat Rule Id - ID of the resource.
- nat
Gateway stringId - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - translation
Nat VpcRules Private Nat Gateway Translation Nat Rule Translation Nat Rule[] - Translation rule object array.
- vpc
Private stringNat Gateway Translation Nat Rule Id - ID of the resource.
- nat_
gateway_ strid - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - translation_
nat_ Sequence[Vpcrules Private Nat Gateway Translation Nat Rule Translation Nat Rule Args] - Translation rule object array.
- vpc_
private_ strnat_ gateway_ translation_ nat_ rule_ id - ID of the resource.
- nat
Gateway StringId - Private NAT gateway unique ID, such as:
intranat-xxxxxxxx. - translation
Nat List<Property Map>Rules - Translation rule object array.
- vpc
Private StringNat Gateway Translation Nat Rule Id - ID of the resource.
Supporting Types
VpcPrivateNatGatewayTranslationNatRuleTranslationNatRule, VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs
- Description string
- Translation rule description.
- Translation
Direction string - Translation rule target, optional values "LOCAL","PEER".
- Translation
Ip string - Translation IP, when translation rule type is transport layer, it is an IP pool.
- Translation
Type string - Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
- Original
Ip string - Source IP, valid when translation rule type is network layer.
- Description string
- Translation rule description.
- Translation
Direction string - Translation rule target, optional values "LOCAL","PEER".
- Translation
Ip string - Translation IP, when translation rule type is transport layer, it is an IP pool.
- Translation
Type string - Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
- Original
Ip string - Source IP, valid when translation rule type is network layer.
- description String
- Translation rule description.
- translation
Direction String - Translation rule target, optional values "LOCAL","PEER".
- translation
Ip String - Translation IP, when translation rule type is transport layer, it is an IP pool.
- translation
Type String - Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
- original
Ip String - Source IP, valid when translation rule type is network layer.
- description string
- Translation rule description.
- translation
Direction string - Translation rule target, optional values "LOCAL","PEER".
- translation
Ip string - Translation IP, when translation rule type is transport layer, it is an IP pool.
- translation
Type string - Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
- original
Ip string - Source IP, valid when translation rule type is network layer.
- description str
- Translation rule description.
- translation_
direction str - Translation rule target, optional values "LOCAL","PEER".
- translation_
ip str - Translation IP, when translation rule type is transport layer, it is an IP pool.
- translation_
type str - Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
- original_
ip str - Source IP, valid when translation rule type is network layer.
- description String
- Translation rule description.
- translation
Direction String - Translation rule target, optional values "LOCAL","PEER".
- translation
Ip String - Translation IP, when translation rule type is transport layer, it is an IP pool.
- translation
Type String - Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
- original
Ip String - Source IP, valid when translation rule type is network layer.
Import
VPC private nat gateway translation nat rule can be imported using the id, e.g.
$ pulumi import tencentcloud:index/vpcPrivateNatGatewayTranslationNatRule:VpcPrivateNatGatewayTranslationNatRule example intranat-r46f6pxl
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
