1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CfwBlockIgnore
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.CfwBlockIgnore

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a cfw block_ignore

    NOTE: If create domain rule, RuleType not support set 2.

    Example Usage

    If create ip rule

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.CfwBlockIgnore("example", {
        comment: "remark.",
        direction: "0",
        endTime: "2023-10-01 00:00:00",
        ip: "1.1.1.1",
        ruleType: 1,
        startTime: "2023-09-01 00:00:00",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.CfwBlockIgnore("example",
        comment="remark.",
        direction="0",
        end_time="2023-10-01 00:00:00",
        ip="1.1.1.1",
        rule_type=1,
        start_time="2023-09-01 00:00:00")
    
    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.NewCfwBlockIgnore(ctx, "example", &tencentcloud.CfwBlockIgnoreArgs{
    			Comment:   pulumi.String("remark."),
    			Direction: pulumi.String("0"),
    			EndTime:   pulumi.String("2023-10-01 00:00:00"),
    			Ip:        pulumi.String("1.1.1.1"),
    			RuleType:  pulumi.Float64(1),
    			StartTime: pulumi.String("2023-09-01 00:00:00"),
    		})
    		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.CfwBlockIgnore("example", new()
        {
            Comment = "remark.",
            Direction = "0",
            EndTime = "2023-10-01 00:00:00",
            Ip = "1.1.1.1",
            RuleType = 1,
            StartTime = "2023-09-01 00:00:00",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CfwBlockIgnore;
    import com.pulumi.tencentcloud.CfwBlockIgnoreArgs;
    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 CfwBlockIgnore("example", CfwBlockIgnoreArgs.builder()
                .comment("remark.")
                .direction(0)
                .endTime("2023-10-01 00:00:00")
                .ip("1.1.1.1")
                .ruleType(1)
                .startTime("2023-09-01 00:00:00")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:CfwBlockIgnore
        properties:
          comment: remark.
          direction: 0
          endTime: 2023-10-01 00:00:00
          ip: 1.1.1.1
          ruleType: 1
          startTime: 2023-09-01 00:00:00
    

    If create domain rule

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.CfwBlockIgnore("example", {
        comment: "remark.",
        direction: "1",
        domain: "domain.com",
        endTime: "2023-10-01 00:00:00",
        ruleType: 1,
        startTime: "2023-09-01 00:00:00",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.CfwBlockIgnore("example",
        comment="remark.",
        direction="1",
        domain="domain.com",
        end_time="2023-10-01 00:00:00",
        rule_type=1,
        start_time="2023-09-01 00:00:00")
    
    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.NewCfwBlockIgnore(ctx, "example", &tencentcloud.CfwBlockIgnoreArgs{
    			Comment:   pulumi.String("remark."),
    			Direction: pulumi.String("1"),
    			Domain:    pulumi.String("domain.com"),
    			EndTime:   pulumi.String("2023-10-01 00:00:00"),
    			RuleType:  pulumi.Float64(1),
    			StartTime: pulumi.String("2023-09-01 00:00:00"),
    		})
    		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.CfwBlockIgnore("example", new()
        {
            Comment = "remark.",
            Direction = "1",
            Domain = "domain.com",
            EndTime = "2023-10-01 00:00:00",
            RuleType = 1,
            StartTime = "2023-09-01 00:00:00",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CfwBlockIgnore;
    import com.pulumi.tencentcloud.CfwBlockIgnoreArgs;
    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 CfwBlockIgnore("example", CfwBlockIgnoreArgs.builder()
                .comment("remark.")
                .direction(1)
                .domain("domain.com")
                .endTime("2023-10-01 00:00:00")
                .ruleType(1)
                .startTime("2023-09-01 00:00:00")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:CfwBlockIgnore
        properties:
          comment: remark.
          direction: 1
          domain: domain.com
          endTime: 2023-10-01 00:00:00
          ruleType: 1
          startTime: 2023-09-01 00:00:00
    

    Create CfwBlockIgnore Resource

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

    Constructor syntax

    new CfwBlockIgnore(name: string, args: CfwBlockIgnoreArgs, opts?: CustomResourceOptions);
    @overload
    def CfwBlockIgnore(resource_name: str,
                       args: CfwBlockIgnoreArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def CfwBlockIgnore(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       direction: Optional[str] = None,
                       end_time: Optional[str] = None,
                       rule_type: Optional[float] = None,
                       cfw_block_ignore_id: Optional[str] = None,
                       comment: Optional[str] = None,
                       domain: Optional[str] = None,
                       ip: Optional[str] = None,
                       start_time: Optional[str] = None)
    func NewCfwBlockIgnore(ctx *Context, name string, args CfwBlockIgnoreArgs, opts ...ResourceOption) (*CfwBlockIgnore, error)
    public CfwBlockIgnore(string name, CfwBlockIgnoreArgs args, CustomResourceOptions? opts = null)
    public CfwBlockIgnore(String name, CfwBlockIgnoreArgs args)
    public CfwBlockIgnore(String name, CfwBlockIgnoreArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CfwBlockIgnore
    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 CfwBlockIgnoreArgs
    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 CfwBlockIgnoreArgs
    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 CfwBlockIgnoreArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CfwBlockIgnoreArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CfwBlockIgnoreArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Direction string
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    EndTime string
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    RuleType double
    Rule type, 1 block, 2 ignore, domain block is not supported.
    CfwBlockIgnoreId string
    ID of the resource.
    Comment string
    Remarks information, length cannot exceed 50.
    Domain string
    Rule domain name, one of IP and Domain is required.
    Ip string
    Rule IP address, one of IP and Domain is required.
    StartTime string
    Rule start time.
    Direction string
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    EndTime string
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    RuleType float64
    Rule type, 1 block, 2 ignore, domain block is not supported.
    CfwBlockIgnoreId string
    ID of the resource.
    Comment string
    Remarks information, length cannot exceed 50.
    Domain string
    Rule domain name, one of IP and Domain is required.
    Ip string
    Rule IP address, one of IP and Domain is required.
    StartTime string
    Rule start time.
    direction String
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    endTime String
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    ruleType Double
    Rule type, 1 block, 2 ignore, domain block is not supported.
    cfwBlockIgnoreId String
    ID of the resource.
    comment String
    Remarks information, length cannot exceed 50.
    domain String
    Rule domain name, one of IP and Domain is required.
    ip String
    Rule IP address, one of IP and Domain is required.
    startTime String
    Rule start time.
    direction string
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    endTime string
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    ruleType number
    Rule type, 1 block, 2 ignore, domain block is not supported.
    cfwBlockIgnoreId string
    ID of the resource.
    comment string
    Remarks information, length cannot exceed 50.
    domain string
    Rule domain name, one of IP and Domain is required.
    ip string
    Rule IP address, one of IP and Domain is required.
    startTime string
    Rule start time.
    direction str
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    end_time str
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    rule_type float
    Rule type, 1 block, 2 ignore, domain block is not supported.
    cfw_block_ignore_id str
    ID of the resource.
    comment str
    Remarks information, length cannot exceed 50.
    domain str
    Rule domain name, one of IP and Domain is required.
    ip str
    Rule IP address, one of IP and Domain is required.
    start_time str
    Rule start time.
    direction String
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    endTime String
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    ruleType Number
    Rule type, 1 block, 2 ignore, domain block is not supported.
    cfwBlockIgnoreId String
    ID of the resource.
    comment String
    Remarks information, length cannot exceed 50.
    domain String
    Rule domain name, one of IP and Domain is required.
    ip String
    Rule IP address, one of IP and Domain is required.
    startTime String
    Rule start time.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CfwBlockIgnore 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 CfwBlockIgnore Resource

    Get an existing CfwBlockIgnore 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?: CfwBlockIgnoreState, opts?: CustomResourceOptions): CfwBlockIgnore
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cfw_block_ignore_id: Optional[str] = None,
            comment: Optional[str] = None,
            direction: Optional[str] = None,
            domain: Optional[str] = None,
            end_time: Optional[str] = None,
            ip: Optional[str] = None,
            rule_type: Optional[float] = None,
            start_time: Optional[str] = None) -> CfwBlockIgnore
    func GetCfwBlockIgnore(ctx *Context, name string, id IDInput, state *CfwBlockIgnoreState, opts ...ResourceOption) (*CfwBlockIgnore, error)
    public static CfwBlockIgnore Get(string name, Input<string> id, CfwBlockIgnoreState? state, CustomResourceOptions? opts = null)
    public static CfwBlockIgnore get(String name, Output<String> id, CfwBlockIgnoreState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CfwBlockIgnore    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.
    The following state arguments are supported:
    CfwBlockIgnoreId string
    ID of the resource.
    Comment string
    Remarks information, length cannot exceed 50.
    Direction string
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    Domain string
    Rule domain name, one of IP and Domain is required.
    EndTime string
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    Ip string
    Rule IP address, one of IP and Domain is required.
    RuleType double
    Rule type, 1 block, 2 ignore, domain block is not supported.
    StartTime string
    Rule start time.
    CfwBlockIgnoreId string
    ID of the resource.
    Comment string
    Remarks information, length cannot exceed 50.
    Direction string
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    Domain string
    Rule domain name, one of IP and Domain is required.
    EndTime string
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    Ip string
    Rule IP address, one of IP and Domain is required.
    RuleType float64
    Rule type, 1 block, 2 ignore, domain block is not supported.
    StartTime string
    Rule start time.
    cfwBlockIgnoreId String
    ID of the resource.
    comment String
    Remarks information, length cannot exceed 50.
    direction String
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    domain String
    Rule domain name, one of IP and Domain is required.
    endTime String
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    ip String
    Rule IP address, one of IP and Domain is required.
    ruleType Double
    Rule type, 1 block, 2 ignore, domain block is not supported.
    startTime String
    Rule start time.
    cfwBlockIgnoreId string
    ID of the resource.
    comment string
    Remarks information, length cannot exceed 50.
    direction string
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    domain string
    Rule domain name, one of IP and Domain is required.
    endTime string
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    ip string
    Rule IP address, one of IP and Domain is required.
    ruleType number
    Rule type, 1 block, 2 ignore, domain block is not supported.
    startTime string
    Rule start time.
    cfw_block_ignore_id str
    ID of the resource.
    comment str
    Remarks information, length cannot exceed 50.
    direction str
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    domain str
    Rule domain name, one of IP and Domain is required.
    end_time str
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    ip str
    Rule IP address, one of IP and Domain is required.
    rule_type float
    Rule type, 1 block, 2 ignore, domain block is not supported.
    start_time str
    Rule start time.
    cfwBlockIgnoreId String
    ID of the resource.
    comment String
    Remarks information, length cannot exceed 50.
    direction String
    Rule direction, 0 outbound, 1 inbound, 3 intranet.
    domain String
    Rule domain name, one of IP and Domain is required.
    endTime String
    Rule end time, format: 2006-01-02 15:04:05, must be greater than the current time.
    ip String
    Rule IP address, one of IP and Domain is required.
    ruleType Number
    Rule type, 1 block, 2 ignore, domain block is not supported.
    startTime String
    Rule start time.

    Import

    cfw block_ignore_list can be imported using the id, e.g.

    If import ip rule

    $ pulumi import tencentcloud:index/cfwBlockIgnore:CfwBlockIgnore example 1.1.1.1##0#1
    

    If import domain rule

    $ pulumi import tencentcloud:index/cfwBlockIgnore:CfwBlockIgnore example domain.com##0#1
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack