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

tencentcloud.WafIpAccessControlV2

Explore with Pulumi AI

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

    Provides a resource to create a waf ip access control v2

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.WafIpAccessControlV2("example", {
        actionType: 40,
        domain: "example.com",
        instanceId: "waf_2kxtlbky11bbcr4b",
        ipLists: [
            "10.0.0.10",
            "172.0.0.16",
            "192.168.0.30",
        ],
        jobDateTime: {
            timeTZone: "UTC+8",
            timeds: [{
                endDateTime: 0,
                startDateTime: 0,
            }],
        },
        jobType: "TimedJob",
        note: "note.",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.WafIpAccessControlV2("example",
        action_type=40,
        domain="example.com",
        instance_id="waf_2kxtlbky11bbcr4b",
        ip_lists=[
            "10.0.0.10",
            "172.0.0.16",
            "192.168.0.30",
        ],
        job_date_time={
            "time_t_zone": "UTC+8",
            "timeds": [{
                "end_date_time": 0,
                "start_date_time": 0,
            }],
        },
        job_type="TimedJob",
        note="note.")
    
    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.NewWafIpAccessControlV2(ctx, "example", &tencentcloud.WafIpAccessControlV2Args{
    			ActionType: pulumi.Float64(40),
    			Domain:     pulumi.String("example.com"),
    			InstanceId: pulumi.String("waf_2kxtlbky11bbcr4b"),
    			IpLists: pulumi.StringArray{
    				pulumi.String("10.0.0.10"),
    				pulumi.String("172.0.0.16"),
    				pulumi.String("192.168.0.30"),
    			},
    			JobDateTime: &tencentcloud.WafIpAccessControlV2JobDateTimeArgs{
    				TimeTZone: pulumi.String("UTC+8"),
    				Timeds: tencentcloud.WafIpAccessControlV2JobDateTimeTimedArray{
    					&tencentcloud.WafIpAccessControlV2JobDateTimeTimedArgs{
    						EndDateTime:   pulumi.Float64(0),
    						StartDateTime: pulumi.Float64(0),
    					},
    				},
    			},
    			JobType: pulumi.String("TimedJob"),
    			Note:    pulumi.String("note."),
    		})
    		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.WafIpAccessControlV2("example", new()
        {
            ActionType = 40,
            Domain = "example.com",
            InstanceId = "waf_2kxtlbky11bbcr4b",
            IpLists = new[]
            {
                "10.0.0.10",
                "172.0.0.16",
                "192.168.0.30",
            },
            JobDateTime = new Tencentcloud.Inputs.WafIpAccessControlV2JobDateTimeArgs
            {
                TimeTZone = "UTC+8",
                Timeds = new[]
                {
                    new Tencentcloud.Inputs.WafIpAccessControlV2JobDateTimeTimedArgs
                    {
                        EndDateTime = 0,
                        StartDateTime = 0,
                    },
                },
            },
            JobType = "TimedJob",
            Note = "note.",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.WafIpAccessControlV2;
    import com.pulumi.tencentcloud.WafIpAccessControlV2Args;
    import com.pulumi.tencentcloud.inputs.WafIpAccessControlV2JobDateTimeArgs;
    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 WafIpAccessControlV2("example", WafIpAccessControlV2Args.builder()
                .actionType(40)
                .domain("example.com")
                .instanceId("waf_2kxtlbky11bbcr4b")
                .ipLists(            
                    "10.0.0.10",
                    "172.0.0.16",
                    "192.168.0.30")
                .jobDateTime(WafIpAccessControlV2JobDateTimeArgs.builder()
                    .timeTZone("UTC+8")
                    .timeds(WafIpAccessControlV2JobDateTimeTimedArgs.builder()
                        .endDateTime(0)
                        .startDateTime(0)
                        .build())
                    .build())
                .jobType("TimedJob")
                .note("note.")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:WafIpAccessControlV2
        properties:
          actionType: 40
          domain: example.com
          instanceId: waf_2kxtlbky11bbcr4b
          ipLists:
            - 10.0.0.10
            - 172.0.0.16
            - 192.168.0.30
          jobDateTime:
            timeTZone: UTC+8
            timeds:
              - endDateTime: 0
                startDateTime: 0
          jobType: TimedJob
          note: note.
    

    Create WafIpAccessControlV2 Resource

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

    Constructor syntax

    new WafIpAccessControlV2(name: string, args: WafIpAccessControlV2Args, opts?: CustomResourceOptions);
    @overload
    def WafIpAccessControlV2(resource_name: str,
                             args: WafIpAccessControlV2Args,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def WafIpAccessControlV2(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             action_type: Optional[float] = None,
                             domain: Optional[str] = None,
                             instance_id: Optional[str] = None,
                             ip_lists: Optional[Sequence[str]] = None,
                             job_date_time: Optional[WafIpAccessControlV2JobDateTimeArgs] = None,
                             job_type: Optional[str] = None,
                             note: Optional[str] = None,
                             waf_ip_access_control_v2_id: Optional[str] = None)
    func NewWafIpAccessControlV2(ctx *Context, name string, args WafIpAccessControlV2Args, opts ...ResourceOption) (*WafIpAccessControlV2, error)
    public WafIpAccessControlV2(string name, WafIpAccessControlV2Args args, CustomResourceOptions? opts = null)
    public WafIpAccessControlV2(String name, WafIpAccessControlV2Args args)
    public WafIpAccessControlV2(String name, WafIpAccessControlV2Args args, CustomResourceOptions options)
    
    type: tencentcloud:WafIpAccessControlV2
    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 WafIpAccessControlV2Args
    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 WafIpAccessControlV2Args
    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 WafIpAccessControlV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WafIpAccessControlV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WafIpAccessControlV2Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ActionType double
    42: blocklist; 40: allowlist.
    Domain string
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    InstanceId string
    Instance ID.
    IpLists List<string>
    IP parameter list.
    JobDateTime WafIpAccessControlV2JobDateTime
    Details of scheduled configuration.
    JobType string
    Scheduled configuration type.
    Note string
    Remarks.
    WafIpAccessControlV2Id string
    ID of the resource.
    ActionType float64
    42: blocklist; 40: allowlist.
    Domain string
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    InstanceId string
    Instance ID.
    IpLists []string
    IP parameter list.
    JobDateTime WafIpAccessControlV2JobDateTimeArgs
    Details of scheduled configuration.
    JobType string
    Scheduled configuration type.
    Note string
    Remarks.
    WafIpAccessControlV2Id string
    ID of the resource.
    actionType Double
    42: blocklist; 40: allowlist.
    domain String
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    instanceId String
    Instance ID.
    ipLists List<String>
    IP parameter list.
    jobDateTime WafIpAccessControlV2JobDateTime
    Details of scheduled configuration.
    jobType String
    Scheduled configuration type.
    note String
    Remarks.
    wafIpAccessControlV2Id String
    ID of the resource.
    actionType number
    42: blocklist; 40: allowlist.
    domain string
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    instanceId string
    Instance ID.
    ipLists string[]
    IP parameter list.
    jobDateTime WafIpAccessControlV2JobDateTime
    Details of scheduled configuration.
    jobType string
    Scheduled configuration type.
    note string
    Remarks.
    wafIpAccessControlV2Id string
    ID of the resource.
    action_type float
    42: blocklist; 40: allowlist.
    domain str
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    instance_id str
    Instance ID.
    ip_lists Sequence[str]
    IP parameter list.
    job_date_time WafIpAccessControlV2JobDateTimeArgs
    Details of scheduled configuration.
    job_type str
    Scheduled configuration type.
    note str
    Remarks.
    waf_ip_access_control_v2_id str
    ID of the resource.
    actionType Number
    42: blocklist; 40: allowlist.
    domain String
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    instanceId String
    Instance ID.
    ipLists List<String>
    IP parameter list.
    jobDateTime Property Map
    Details of scheduled configuration.
    jobType String
    Scheduled configuration type.
    note String
    Remarks.
    wafIpAccessControlV2Id String
    ID of the resource.

    Outputs

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

    Get an existing WafIpAccessControlV2 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?: WafIpAccessControlV2State, opts?: CustomResourceOptions): WafIpAccessControlV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action_type: Optional[float] = None,
            domain: Optional[str] = None,
            instance_id: Optional[str] = None,
            ip_lists: Optional[Sequence[str]] = None,
            job_date_time: Optional[WafIpAccessControlV2JobDateTimeArgs] = None,
            job_type: Optional[str] = None,
            note: Optional[str] = None,
            waf_ip_access_control_v2_id: Optional[str] = None) -> WafIpAccessControlV2
    func GetWafIpAccessControlV2(ctx *Context, name string, id IDInput, state *WafIpAccessControlV2State, opts ...ResourceOption) (*WafIpAccessControlV2, error)
    public static WafIpAccessControlV2 Get(string name, Input<string> id, WafIpAccessControlV2State? state, CustomResourceOptions? opts = null)
    public static WafIpAccessControlV2 get(String name, Output<String> id, WafIpAccessControlV2State state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:WafIpAccessControlV2    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:
    ActionType double
    42: blocklist; 40: allowlist.
    Domain string
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    InstanceId string
    Instance ID.
    IpLists List<string>
    IP parameter list.
    JobDateTime WafIpAccessControlV2JobDateTime
    Details of scheduled configuration.
    JobType string
    Scheduled configuration type.
    Note string
    Remarks.
    WafIpAccessControlV2Id string
    ID of the resource.
    ActionType float64
    42: blocklist; 40: allowlist.
    Domain string
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    InstanceId string
    Instance ID.
    IpLists []string
    IP parameter list.
    JobDateTime WafIpAccessControlV2JobDateTimeArgs
    Details of scheduled configuration.
    JobType string
    Scheduled configuration type.
    Note string
    Remarks.
    WafIpAccessControlV2Id string
    ID of the resource.
    actionType Double
    42: blocklist; 40: allowlist.
    domain String
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    instanceId String
    Instance ID.
    ipLists List<String>
    IP parameter list.
    jobDateTime WafIpAccessControlV2JobDateTime
    Details of scheduled configuration.
    jobType String
    Scheduled configuration type.
    note String
    Remarks.
    wafIpAccessControlV2Id String
    ID of the resource.
    actionType number
    42: blocklist; 40: allowlist.
    domain string
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    instanceId string
    Instance ID.
    ipLists string[]
    IP parameter list.
    jobDateTime WafIpAccessControlV2JobDateTime
    Details of scheduled configuration.
    jobType string
    Scheduled configuration type.
    note string
    Remarks.
    wafIpAccessControlV2Id string
    ID of the resource.
    action_type float
    42: blocklist; 40: allowlist.
    domain str
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    instance_id str
    Instance ID.
    ip_lists Sequence[str]
    IP parameter list.
    job_date_time WafIpAccessControlV2JobDateTimeArgs
    Details of scheduled configuration.
    job_type str
    Scheduled configuration type.
    note str
    Remarks.
    waf_ip_access_control_v2_id str
    ID of the resource.
    actionType Number
    42: blocklist; 40: allowlist.
    domain String
    Specific domain name, for example, test.qcloudwaf.com. Global domain name, that is, global.
    instanceId String
    Instance ID.
    ipLists List<String>
    IP parameter list.
    jobDateTime Property Map
    Details of scheduled configuration.
    jobType String
    Scheduled configuration type.
    note String
    Remarks.
    wafIpAccessControlV2Id String
    ID of the resource.

    Supporting Types

    WafIpAccessControlV2JobDateTime, WafIpAccessControlV2JobDateTimeArgs

    Crons List<WafIpAccessControlV2JobDateTimeCron>
    Time parameters for periodic execution Note: This field may return null, indicating that no valid values can be obtained.
    TimeTZone string
    Time zone Note: This field may return null, indicating that no valid values can be obtained.
    Timeds List<WafIpAccessControlV2JobDateTimeTimed>
    Time parameters for scheduled execution Note: This field may return null, indicating that no valid values can be obtained.
    Crons []WafIpAccessControlV2JobDateTimeCron
    Time parameters for periodic execution Note: This field may return null, indicating that no valid values can be obtained.
    TimeTZone string
    Time zone Note: This field may return null, indicating that no valid values can be obtained.
    Timeds []WafIpAccessControlV2JobDateTimeTimed
    Time parameters for scheduled execution Note: This field may return null, indicating that no valid values can be obtained.
    crons List<WafIpAccessControlV2JobDateTimeCron>
    Time parameters for periodic execution Note: This field may return null, indicating that no valid values can be obtained.
    timeTZone String
    Time zone Note: This field may return null, indicating that no valid values can be obtained.
    timeds List<WafIpAccessControlV2JobDateTimeTimed>
    Time parameters for scheduled execution Note: This field may return null, indicating that no valid values can be obtained.
    crons WafIpAccessControlV2JobDateTimeCron[]
    Time parameters for periodic execution Note: This field may return null, indicating that no valid values can be obtained.
    timeTZone string
    Time zone Note: This field may return null, indicating that no valid values can be obtained.
    timeds WafIpAccessControlV2JobDateTimeTimed[]
    Time parameters for scheduled execution Note: This field may return null, indicating that no valid values can be obtained.
    crons Sequence[WafIpAccessControlV2JobDateTimeCron]
    Time parameters for periodic execution Note: This field may return null, indicating that no valid values can be obtained.
    time_t_zone str
    Time zone Note: This field may return null, indicating that no valid values can be obtained.
    timeds Sequence[WafIpAccessControlV2JobDateTimeTimed]
    Time parameters for scheduled execution Note: This field may return null, indicating that no valid values can be obtained.
    crons List<Property Map>
    Time parameters for periodic execution Note: This field may return null, indicating that no valid values can be obtained.
    timeTZone String
    Time zone Note: This field may return null, indicating that no valid values can be obtained.
    timeds List<Property Map>
    Time parameters for scheduled execution Note: This field may return null, indicating that no valid values can be obtained.

    WafIpAccessControlV2JobDateTimeCron, WafIpAccessControlV2JobDateTimeCronArgs

    Days List<double>
    Days in each month for execution Note: This field may return null, indicating that no valid values can be obtained.
    EndTime string

    End time

    Note: This field may return null, indicating that no valid values can be obtained.

    StartTime string

    Start time

    Note: This field may return null, indicating that no valid values can be obtained.

    WDays List<double>
    Days of each week for execution Note: This field may return null, indicating that no valid values can be obtained.
    Days []float64
    Days in each month for execution Note: This field may return null, indicating that no valid values can be obtained.
    EndTime string

    End time

    Note: This field may return null, indicating that no valid values can be obtained.

    StartTime string

    Start time

    Note: This field may return null, indicating that no valid values can be obtained.

    WDays []float64
    Days of each week for execution Note: This field may return null, indicating that no valid values can be obtained.
    days List<Double>
    Days in each month for execution Note: This field may return null, indicating that no valid values can be obtained.
    endTime String

    End time

    Note: This field may return null, indicating that no valid values can be obtained.

    startTime String

    Start time

    Note: This field may return null, indicating that no valid values can be obtained.

    wDays List<Double>
    Days of each week for execution Note: This field may return null, indicating that no valid values can be obtained.
    days number[]
    Days in each month for execution Note: This field may return null, indicating that no valid values can be obtained.
    endTime string

    End time

    Note: This field may return null, indicating that no valid values can be obtained.

    startTime string

    Start time

    Note: This field may return null, indicating that no valid values can be obtained.

    wDays number[]
    Days of each week for execution Note: This field may return null, indicating that no valid values can be obtained.
    days Sequence[float]
    Days in each month for execution Note: This field may return null, indicating that no valid values can be obtained.
    end_time str

    End time

    Note: This field may return null, indicating that no valid values can be obtained.

    start_time str

    Start time

    Note: This field may return null, indicating that no valid values can be obtained.

    w_days Sequence[float]
    Days of each week for execution Note: This field may return null, indicating that no valid values can be obtained.
    days List<Number>
    Days in each month for execution Note: This field may return null, indicating that no valid values can be obtained.
    endTime String

    End time

    Note: This field may return null, indicating that no valid values can be obtained.

    startTime String

    Start time

    Note: This field may return null, indicating that no valid values can be obtained.

    wDays List<Number>
    Days of each week for execution Note: This field may return null, indicating that no valid values can be obtained.

    WafIpAccessControlV2JobDateTimeTimed, WafIpAccessControlV2JobDateTimeTimedArgs

    EndDateTime double
    End timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.
    StartDateTime double
    Start timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.
    EndDateTime float64
    End timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.
    StartDateTime float64
    Start timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.
    endDateTime Double
    End timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.
    startDateTime Double
    Start timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.
    endDateTime number
    End timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.
    startDateTime number
    Start timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.
    end_date_time float
    End timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.
    start_date_time float
    Start timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.
    endDateTime Number
    End timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.
    startDateTime Number
    Start timestamp, in seconds Note: This field may return null, indicating that no valid values can be obtained.

    Import

    waf ip access control v2 can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/wafIpAccessControlV2:WafIpAccessControlV2 example waf_2kxtlbky11bbcr4b#example.com#5503616778
    

    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