1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CfwNatPolicy
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.CfwNatPolicy

Explore with Pulumi AI

Provides a resource to create a CFW nat policy

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const example = new tencentcloud.CfwNatPolicy("example", {
    description: "policy description.",
    direction: 1,
    enable: "true",
    port: "-1/-1",
    protocol: "TCP",
    ruleAction: "drop",
    scope: "ALL",
    sourceContent: "1.1.1.1/0",
    sourceType: "net",
    targetContent: "0.0.0.0/0",
    targetType: "net",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.CfwNatPolicy("example",
    description="policy description.",
    direction=1,
    enable="true",
    port="-1/-1",
    protocol="TCP",
    rule_action="drop",
    scope="ALL",
    source_content="1.1.1.1/0",
    source_type="net",
    target_content="0.0.0.0/0",
    target_type="net")
Copy
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.NewCfwNatPolicy(ctx, "example", &tencentcloud.CfwNatPolicyArgs{
			Description:   pulumi.String("policy description."),
			Direction:     pulumi.Float64(1),
			Enable:        pulumi.String("true"),
			Port:          pulumi.String("-1/-1"),
			Protocol:      pulumi.String("TCP"),
			RuleAction:    pulumi.String("drop"),
			Scope:         pulumi.String("ALL"),
			SourceContent: pulumi.String("1.1.1.1/0"),
			SourceType:    pulumi.String("net"),
			TargetContent: pulumi.String("0.0.0.0/0"),
			TargetType:    pulumi.String("net"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var example = new Tencentcloud.CfwNatPolicy("example", new()
    {
        Description = "policy description.",
        Direction = 1,
        Enable = "true",
        Port = "-1/-1",
        Protocol = "TCP",
        RuleAction = "drop",
        Scope = "ALL",
        SourceContent = "1.1.1.1/0",
        SourceType = "net",
        TargetContent = "0.0.0.0/0",
        TargetType = "net",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CfwNatPolicy;
import com.pulumi.tencentcloud.CfwNatPolicyArgs;
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 CfwNatPolicy("example", CfwNatPolicyArgs.builder()
            .description("policy description.")
            .direction(1)
            .enable("true")
            .port("-1/-1")
            .protocol("TCP")
            .ruleAction("drop")
            .scope("ALL")
            .sourceContent("1.1.1.1/0")
            .sourceType("net")
            .targetContent("0.0.0.0/0")
            .targetType("net")
            .build());

    }
}
Copy
resources:
  example:
    type: tencentcloud:CfwNatPolicy
    properties:
      description: policy description.
      direction: 1
      enable: 'true'
      port: -1/-1
      protocol: TCP
      ruleAction: drop
      scope: ALL
      sourceContent: 1.1.1.1/0
      sourceType: net
      targetContent: 0.0.0.0/0
      targetType: net
Copy

Create CfwNatPolicy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new CfwNatPolicy(name: string, args: CfwNatPolicyArgs, opts?: CustomResourceOptions);
@overload
def CfwNatPolicy(resource_name: str,
                 args: CfwNatPolicyArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def CfwNatPolicy(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 source_content: Optional[str] = None,
                 direction: Optional[float] = None,
                 port: Optional[str] = None,
                 protocol: Optional[str] = None,
                 rule_action: Optional[str] = None,
                 source_type: Optional[str] = None,
                 target_content: Optional[str] = None,
                 target_type: Optional[str] = None,
                 description: Optional[str] = None,
                 enable: Optional[str] = None,
                 param_template_id: Optional[str] = None,
                 scope: Optional[str] = None,
                 cfw_nat_policy_id: Optional[str] = None)
func NewCfwNatPolicy(ctx *Context, name string, args CfwNatPolicyArgs, opts ...ResourceOption) (*CfwNatPolicy, error)
public CfwNatPolicy(string name, CfwNatPolicyArgs args, CustomResourceOptions? opts = null)
public CfwNatPolicy(String name, CfwNatPolicyArgs args)
public CfwNatPolicy(String name, CfwNatPolicyArgs args, CustomResourceOptions options)
type: tencentcloud:CfwNatPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CfwNatPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CfwNatPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CfwNatPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CfwNatPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CfwNatPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

CfwNatPolicy 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 CfwNatPolicy resource accepts the following input properties:

Direction This property is required. double
Rule direction: 1, inbound; 0, outbound.
Port This property is required. string
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
Protocol This property is required. string
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
RuleAction This property is required. string
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
SourceContent This property is required. string
Access source example: net:IP/CIDR(192.168.0.2).
SourceType This property is required. string
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
TargetContent This property is required. string
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
TargetType This property is required. string
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
CfwNatPolicyId string
ID of the resource.
Description string
Description.
Enable string
Rule status, true means enabled, false means disabled. Default is true.
ParamTemplateId string
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
Scope string
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.
Direction This property is required. float64
Rule direction: 1, inbound; 0, outbound.
Port This property is required. string
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
Protocol This property is required. string
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
RuleAction This property is required. string
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
SourceContent This property is required. string
Access source example: net:IP/CIDR(192.168.0.2).
SourceType This property is required. string
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
TargetContent This property is required. string
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
TargetType This property is required. string
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
CfwNatPolicyId string
ID of the resource.
Description string
Description.
Enable string
Rule status, true means enabled, false means disabled. Default is true.
ParamTemplateId string
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
Scope string
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.
direction This property is required. Double
Rule direction: 1, inbound; 0, outbound.
port This property is required. String
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
protocol This property is required. String
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
ruleAction This property is required. String
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
sourceContent This property is required. String
Access source example: net:IP/CIDR(192.168.0.2).
sourceType This property is required. String
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
targetContent This property is required. String
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
targetType This property is required. String
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
cfwNatPolicyId String
ID of the resource.
description String
Description.
enable String
Rule status, true means enabled, false means disabled. Default is true.
paramTemplateId String
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
scope String
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.
direction This property is required. number
Rule direction: 1, inbound; 0, outbound.
port This property is required. string
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
protocol This property is required. string
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
ruleAction This property is required. string
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
sourceContent This property is required. string
Access source example: net:IP/CIDR(192.168.0.2).
sourceType This property is required. string
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
targetContent This property is required. string
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
targetType This property is required. string
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
cfwNatPolicyId string
ID of the resource.
description string
Description.
enable string
Rule status, true means enabled, false means disabled. Default is true.
paramTemplateId string
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
scope string
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.
direction This property is required. float
Rule direction: 1, inbound; 0, outbound.
port This property is required. str
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
protocol This property is required. str
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
rule_action This property is required. str
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
source_content This property is required. str
Access source example: net:IP/CIDR(192.168.0.2).
source_type This property is required. str
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
target_content This property is required. str
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
target_type This property is required. str
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
cfw_nat_policy_id str
ID of the resource.
description str
Description.
enable str
Rule status, true means enabled, false means disabled. Default is true.
param_template_id str
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
scope str
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.
direction This property is required. Number
Rule direction: 1, inbound; 0, outbound.
port This property is required. String
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
protocol This property is required. String
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
ruleAction This property is required. String
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
sourceContent This property is required. String
Access source example: net:IP/CIDR(192.168.0.2).
sourceType This property is required. String
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
targetContent This property is required. String
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
targetType This property is required. String
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
cfwNatPolicyId String
ID of the resource.
description String
Description.
enable String
Rule status, true means enabled, false means disabled. Default is true.
paramTemplateId String
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
scope String
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.

Outputs

All input properties are implicitly available as output properties. Additionally, the CfwNatPolicy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
InternalUuid double
Internal ID.
Uuid double
The unique id corresponding to the rule, no need to fill in when creating the rule.
Id string
The provider-assigned unique ID for this managed resource.
InternalUuid float64
Internal ID.
Uuid float64
The unique id corresponding to the rule, no need to fill in when creating the rule.
id String
The provider-assigned unique ID for this managed resource.
internalUuid Double
Internal ID.
uuid Double
The unique id corresponding to the rule, no need to fill in when creating the rule.
id string
The provider-assigned unique ID for this managed resource.
internalUuid number
Internal ID.
uuid number
The unique id corresponding to the rule, no need to fill in when creating the rule.
id str
The provider-assigned unique ID for this managed resource.
internal_uuid float
Internal ID.
uuid float
The unique id corresponding to the rule, no need to fill in when creating the rule.
id String
The provider-assigned unique ID for this managed resource.
internalUuid Number
Internal ID.
uuid Number
The unique id corresponding to the rule, no need to fill in when creating the rule.

Look up Existing CfwNatPolicy Resource

Get an existing CfwNatPolicy 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?: CfwNatPolicyState, opts?: CustomResourceOptions): CfwNatPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cfw_nat_policy_id: Optional[str] = None,
        description: Optional[str] = None,
        direction: Optional[float] = None,
        enable: Optional[str] = None,
        internal_uuid: Optional[float] = None,
        param_template_id: Optional[str] = None,
        port: Optional[str] = None,
        protocol: Optional[str] = None,
        rule_action: Optional[str] = None,
        scope: Optional[str] = None,
        source_content: Optional[str] = None,
        source_type: Optional[str] = None,
        target_content: Optional[str] = None,
        target_type: Optional[str] = None,
        uuid: Optional[float] = None) -> CfwNatPolicy
func GetCfwNatPolicy(ctx *Context, name string, id IDInput, state *CfwNatPolicyState, opts ...ResourceOption) (*CfwNatPolicy, error)
public static CfwNatPolicy Get(string name, Input<string> id, CfwNatPolicyState? state, CustomResourceOptions? opts = null)
public static CfwNatPolicy get(String name, Output<String> id, CfwNatPolicyState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:CfwNatPolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CfwNatPolicyId string
ID of the resource.
Description string
Description.
Direction double
Rule direction: 1, inbound; 0, outbound.
Enable string
Rule status, true means enabled, false means disabled. Default is true.
InternalUuid double
Internal ID.
ParamTemplateId string
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
Port string
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
Protocol string
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
RuleAction string
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
Scope string
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.
SourceContent string
Access source example: net:IP/CIDR(192.168.0.2).
SourceType string
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
TargetContent string
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
TargetType string
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
Uuid double
The unique id corresponding to the rule, no need to fill in when creating the rule.
CfwNatPolicyId string
ID of the resource.
Description string
Description.
Direction float64
Rule direction: 1, inbound; 0, outbound.
Enable string
Rule status, true means enabled, false means disabled. Default is true.
InternalUuid float64
Internal ID.
ParamTemplateId string
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
Port string
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
Protocol string
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
RuleAction string
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
Scope string
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.
SourceContent string
Access source example: net:IP/CIDR(192.168.0.2).
SourceType string
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
TargetContent string
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
TargetType string
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
Uuid float64
The unique id corresponding to the rule, no need to fill in when creating the rule.
cfwNatPolicyId String
ID of the resource.
description String
Description.
direction Double
Rule direction: 1, inbound; 0, outbound.
enable String
Rule status, true means enabled, false means disabled. Default is true.
internalUuid Double
Internal ID.
paramTemplateId String
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
port String
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
protocol String
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
ruleAction String
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
scope String
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.
sourceContent String
Access source example: net:IP/CIDR(192.168.0.2).
sourceType String
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
targetContent String
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
targetType String
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
uuid Double
The unique id corresponding to the rule, no need to fill in when creating the rule.
cfwNatPolicyId string
ID of the resource.
description string
Description.
direction number
Rule direction: 1, inbound; 0, outbound.
enable string
Rule status, true means enabled, false means disabled. Default is true.
internalUuid number
Internal ID.
paramTemplateId string
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
port string
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
protocol string
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
ruleAction string
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
scope string
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.
sourceContent string
Access source example: net:IP/CIDR(192.168.0.2).
sourceType string
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
targetContent string
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
targetType string
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
uuid number
The unique id corresponding to the rule, no need to fill in when creating the rule.
cfw_nat_policy_id str
ID of the resource.
description str
Description.
direction float
Rule direction: 1, inbound; 0, outbound.
enable str
Rule status, true means enabled, false means disabled. Default is true.
internal_uuid float
Internal ID.
param_template_id str
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
port str
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
protocol str
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
rule_action str
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
scope str
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.
source_content str
Access source example: net:IP/CIDR(192.168.0.2).
source_type str
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
target_content str
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
target_type str
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
uuid float
The unique id corresponding to the rule, no need to fill in when creating the rule.
cfwNatPolicyId String
ID of the resource.
description String
Description.
direction Number
Rule direction: 1, inbound; 0, outbound.
enable String
Rule status, true means enabled, false means disabled. Default is true.
internalUuid Number
Internal ID.
paramTemplateId String
Parameter template id. Note: This field may return null, indicating that no valid value can be obtained.
port String
The port for the access control policy. Value: -1/-1: All ports 80: Port 80.
protocol String
Protocol. If Direction=1, optional values: TCP, UDP, ANY; If Direction=0, optional values: TCP, UDP, ICMP, ANY, HTTP, HTTPS, HTTP/HTTPS, SMTP, SMTPS, SMTP/SMTPS, FTP, and DNS.
ruleAction String
How the traffic set in the access control policy passes through the cloud firewall. Values: accept: allow; drop: reject; log: observe.
scope String
Scope of effective rules. ALL: Global effectiveness; ap-guangzhou: Effective territory; cfwnat-xxx: Effectiveness based on instance dimension.
sourceContent String
Access source example: net:IP/CIDR(192.168.0.2).
sourceType String
Access source type: for inbound rules, the type can be net, location, vendor, template; for outbound rules, it can be net, instance, tag, template, group.
targetContent String
Example of access purpose: net: IP/CIDR(192.168.0.2) domain: domain name rules, such as *.qq.com.
targetType String
Access purpose type: For inbound rules, the type can be net, instance, tag, template, group; for outbound rules, it can be net, location, vendor, template.
uuid Number
The unique id corresponding to the rule, no need to fill in when creating the rule.

Import

CFW nat policy can be imported using the id, e.g.

$ pulumi import tencentcloud:index/cfwNatPolicy:CfwNatPolicy example 134123
Copy

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 tencentcloud Terraform Provider.