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

tencentcloud.DayuCcHttpsPolicy

Explore with Pulumi AI

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

    Use this resource to create a dayu CC self-define https policy

    NOTE: creating CC self-define https policy need a valid resource tencentcloud.DayuL7Rule; The resource only support Anti-DDoS of resource type bgpip.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const testPolicy = new tencentcloud.DayuCcHttpsPolicy("testPolicy", {
        resourceType: tencentcloud_dayu_l7_rule.test_rule.resource_type,
        resourceId: tencentcloud_dayu_l7_rule.test_rule.resource_id,
        ruleId: tencentcloud_dayu_l7_rule.test_rule.rule_id,
        domain: tencentcloud_dayu_l7_rule.test_rule.domain,
        action: "drop",
        "switch": true,
        ruleLists: [{
            skey: "cgi",
            operator: "include",
            value: "123",
        }],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    test_policy = tencentcloud.DayuCcHttpsPolicy("testPolicy",
        resource_type=tencentcloud_dayu_l7_rule["test_rule"]["resource_type"],
        resource_id=tencentcloud_dayu_l7_rule["test_rule"]["resource_id"],
        rule_id=tencentcloud_dayu_l7_rule["test_rule"]["rule_id"],
        domain=tencentcloud_dayu_l7_rule["test_rule"]["domain"],
        action="drop",
        switch=True,
        rule_lists=[{
            "skey": "cgi",
            "operator": "include",
            "value": "123",
        }])
    
    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.NewDayuCcHttpsPolicy(ctx, "testPolicy", &tencentcloud.DayuCcHttpsPolicyArgs{
    			ResourceType: pulumi.Any(tencentcloud_dayu_l7_rule.Test_rule.Resource_type),
    			ResourceId:   pulumi.Any(tencentcloud_dayu_l7_rule.Test_rule.Resource_id),
    			RuleId:       pulumi.Any(tencentcloud_dayu_l7_rule.Test_rule.Rule_id),
    			Domain:       pulumi.Any(tencentcloud_dayu_l7_rule.Test_rule.Domain),
    			Action:       pulumi.String("drop"),
    			Switch:       pulumi.Bool(true),
    			RuleLists: tencentcloud.DayuCcHttpsPolicyRuleListArray{
    				&tencentcloud.DayuCcHttpsPolicyRuleListArgs{
    					Skey:     pulumi.String("cgi"),
    					Operator: pulumi.String("include"),
    					Value:    pulumi.String("123"),
    				},
    			},
    		})
    		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 testPolicy = new Tencentcloud.DayuCcHttpsPolicy("testPolicy", new()
        {
            ResourceType = tencentcloud_dayu_l7_rule.Test_rule.Resource_type,
            ResourceId = tencentcloud_dayu_l7_rule.Test_rule.Resource_id,
            RuleId = tencentcloud_dayu_l7_rule.Test_rule.Rule_id,
            Domain = tencentcloud_dayu_l7_rule.Test_rule.Domain,
            Action = "drop",
            Switch = true,
            RuleLists = new[]
            {
                new Tencentcloud.Inputs.DayuCcHttpsPolicyRuleListArgs
                {
                    Skey = "cgi",
                    Operator = "include",
                    Value = "123",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.DayuCcHttpsPolicy;
    import com.pulumi.tencentcloud.DayuCcHttpsPolicyArgs;
    import com.pulumi.tencentcloud.inputs.DayuCcHttpsPolicyRuleListArgs;
    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 testPolicy = new DayuCcHttpsPolicy("testPolicy", DayuCcHttpsPolicyArgs.builder()
                .resourceType(tencentcloud_dayu_l7_rule.test_rule().resource_type())
                .resourceId(tencentcloud_dayu_l7_rule.test_rule().resource_id())
                .ruleId(tencentcloud_dayu_l7_rule.test_rule().rule_id())
                .domain(tencentcloud_dayu_l7_rule.test_rule().domain())
                .action("drop")
                .switch_(true)
                .ruleLists(DayuCcHttpsPolicyRuleListArgs.builder()
                    .skey("cgi")
                    .operator("include")
                    .value("123")
                    .build())
                .build());
    
        }
    }
    
    resources:
      testPolicy:
        type: tencentcloud:DayuCcHttpsPolicy
        properties:
          resourceType: ${tencentcloud_dayu_l7_rule.test_rule.resource_type}
          resourceId: ${tencentcloud_dayu_l7_rule.test_rule.resource_id}
          ruleId: ${tencentcloud_dayu_l7_rule.test_rule.rule_id}
          domain: ${tencentcloud_dayu_l7_rule.test_rule.domain}
          action: drop
          switch: true
          ruleLists:
            - skey: cgi
              operator: include
              value: '123'
    

    Create DayuCcHttpsPolicy Resource

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

    Constructor syntax

    new DayuCcHttpsPolicy(name: string, args: DayuCcHttpsPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def DayuCcHttpsPolicy(resource_name: str,
                          args: DayuCcHttpsPolicyArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def DayuCcHttpsPolicy(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          domain: Optional[str] = None,
                          resource_id: Optional[str] = None,
                          resource_type: Optional[str] = None,
                          rule_id: Optional[str] = None,
                          rule_lists: Optional[Sequence[DayuCcHttpsPolicyRuleListArgs]] = None,
                          action: Optional[str] = None,
                          dayu_cc_https_policy_id: Optional[str] = None,
                          name: Optional[str] = None,
                          switch: Optional[bool] = None)
    func NewDayuCcHttpsPolicy(ctx *Context, name string, args DayuCcHttpsPolicyArgs, opts ...ResourceOption) (*DayuCcHttpsPolicy, error)
    public DayuCcHttpsPolicy(string name, DayuCcHttpsPolicyArgs args, CustomResourceOptions? opts = null)
    public DayuCcHttpsPolicy(String name, DayuCcHttpsPolicyArgs args)
    public DayuCcHttpsPolicy(String name, DayuCcHttpsPolicyArgs args, CustomResourceOptions options)
    
    type: tencentcloud:DayuCcHttpsPolicy
    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 DayuCcHttpsPolicyArgs
    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 DayuCcHttpsPolicyArgs
    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 DayuCcHttpsPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DayuCcHttpsPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DayuCcHttpsPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Domain string
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    ResourceId string
    ID of the resource that the CC self-define https policy works for.
    ResourceType string
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    RuleId string
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    RuleLists List<DayuCcHttpsPolicyRuleList>
    Rule list of the CC self-define https policy.
    Action string
    Action mode. Valid values are alg and drop.
    DayuCcHttpsPolicyId string
    ID of the resource.
    Name string
    Name of the CC self-define https policy. Length should between 1 and 20.
    Switch bool
    Indicate the CC self-define https policy takes effect or not.
    Domain string
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    ResourceId string
    ID of the resource that the CC self-define https policy works for.
    ResourceType string
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    RuleId string
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    RuleLists []DayuCcHttpsPolicyRuleListArgs
    Rule list of the CC self-define https policy.
    Action string
    Action mode. Valid values are alg and drop.
    DayuCcHttpsPolicyId string
    ID of the resource.
    Name string
    Name of the CC self-define https policy. Length should between 1 and 20.
    Switch bool
    Indicate the CC self-define https policy takes effect or not.
    domain String
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    resourceId String
    ID of the resource that the CC self-define https policy works for.
    resourceType String
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    ruleId String
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    ruleLists List<DayuCcHttpsPolicyRuleList>
    Rule list of the CC self-define https policy.
    action String
    Action mode. Valid values are alg and drop.
    dayuCcHttpsPolicyId String
    ID of the resource.
    name String
    Name of the CC self-define https policy. Length should between 1 and 20.
    switch_ Boolean
    Indicate the CC self-define https policy takes effect or not.
    domain string
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    resourceId string
    ID of the resource that the CC self-define https policy works for.
    resourceType string
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    ruleId string
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    ruleLists DayuCcHttpsPolicyRuleList[]
    Rule list of the CC self-define https policy.
    action string
    Action mode. Valid values are alg and drop.
    dayuCcHttpsPolicyId string
    ID of the resource.
    name string
    Name of the CC self-define https policy. Length should between 1 and 20.
    switch boolean
    Indicate the CC self-define https policy takes effect or not.
    domain str
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    resource_id str
    ID of the resource that the CC self-define https policy works for.
    resource_type str
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    rule_id str
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    rule_lists Sequence[DayuCcHttpsPolicyRuleListArgs]
    Rule list of the CC self-define https policy.
    action str
    Action mode. Valid values are alg and drop.
    dayu_cc_https_policy_id str
    ID of the resource.
    name str
    Name of the CC self-define https policy. Length should between 1 and 20.
    switch bool
    Indicate the CC self-define https policy takes effect or not.
    domain String
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    resourceId String
    ID of the resource that the CC self-define https policy works for.
    resourceType String
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    ruleId String
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    ruleLists List<Property Map>
    Rule list of the CC self-define https policy.
    action String
    Action mode. Valid values are alg and drop.
    dayuCcHttpsPolicyId String
    ID of the resource.
    name String
    Name of the CC self-define https policy. Length should between 1 and 20.
    switch Boolean
    Indicate the CC self-define https policy takes effect or not.

    Outputs

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

    CreateTime string
    Create time of the CC self-define https policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpLists List<string>
    Ip of the CC self-define https policy.
    PolicyId string
    Id of the CC self-define https policy.
    CreateTime string
    Create time of the CC self-define https policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpLists []string
    Ip of the CC self-define https policy.
    PolicyId string
    Id of the CC self-define https policy.
    createTime String
    Create time of the CC self-define https policy.
    id String
    The provider-assigned unique ID for this managed resource.
    ipLists List<String>
    Ip of the CC self-define https policy.
    policyId String
    Id of the CC self-define https policy.
    createTime string
    Create time of the CC self-define https policy.
    id string
    The provider-assigned unique ID for this managed resource.
    ipLists string[]
    Ip of the CC self-define https policy.
    policyId string
    Id of the CC self-define https policy.
    create_time str
    Create time of the CC self-define https policy.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_lists Sequence[str]
    Ip of the CC self-define https policy.
    policy_id str
    Id of the CC self-define https policy.
    createTime String
    Create time of the CC self-define https policy.
    id String
    The provider-assigned unique ID for this managed resource.
    ipLists List<String>
    Ip of the CC self-define https policy.
    policyId String
    Id of the CC self-define https policy.

    Look up Existing DayuCcHttpsPolicy Resource

    Get an existing DayuCcHttpsPolicy 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?: DayuCcHttpsPolicyState, opts?: CustomResourceOptions): DayuCcHttpsPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            create_time: Optional[str] = None,
            dayu_cc_https_policy_id: Optional[str] = None,
            domain: Optional[str] = None,
            ip_lists: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            policy_id: Optional[str] = None,
            resource_id: Optional[str] = None,
            resource_type: Optional[str] = None,
            rule_id: Optional[str] = None,
            rule_lists: Optional[Sequence[DayuCcHttpsPolicyRuleListArgs]] = None,
            switch: Optional[bool] = None) -> DayuCcHttpsPolicy
    func GetDayuCcHttpsPolicy(ctx *Context, name string, id IDInput, state *DayuCcHttpsPolicyState, opts ...ResourceOption) (*DayuCcHttpsPolicy, error)
    public static DayuCcHttpsPolicy Get(string name, Input<string> id, DayuCcHttpsPolicyState? state, CustomResourceOptions? opts = null)
    public static DayuCcHttpsPolicy get(String name, Output<String> id, DayuCcHttpsPolicyState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:DayuCcHttpsPolicy    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:
    Action string
    Action mode. Valid values are alg and drop.
    CreateTime string
    Create time of the CC self-define https policy.
    DayuCcHttpsPolicyId string
    ID of the resource.
    Domain string
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    IpLists List<string>
    Ip of the CC self-define https policy.
    Name string
    Name of the CC self-define https policy. Length should between 1 and 20.
    PolicyId string
    Id of the CC self-define https policy.
    ResourceId string
    ID of the resource that the CC self-define https policy works for.
    ResourceType string
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    RuleId string
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    RuleLists List<DayuCcHttpsPolicyRuleList>
    Rule list of the CC self-define https policy.
    Switch bool
    Indicate the CC self-define https policy takes effect or not.
    Action string
    Action mode. Valid values are alg and drop.
    CreateTime string
    Create time of the CC self-define https policy.
    DayuCcHttpsPolicyId string
    ID of the resource.
    Domain string
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    IpLists []string
    Ip of the CC self-define https policy.
    Name string
    Name of the CC self-define https policy. Length should between 1 and 20.
    PolicyId string
    Id of the CC self-define https policy.
    ResourceId string
    ID of the resource that the CC self-define https policy works for.
    ResourceType string
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    RuleId string
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    RuleLists []DayuCcHttpsPolicyRuleListArgs
    Rule list of the CC self-define https policy.
    Switch bool
    Indicate the CC self-define https policy takes effect or not.
    action String
    Action mode. Valid values are alg and drop.
    createTime String
    Create time of the CC self-define https policy.
    dayuCcHttpsPolicyId String
    ID of the resource.
    domain String
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    ipLists List<String>
    Ip of the CC self-define https policy.
    name String
    Name of the CC self-define https policy. Length should between 1 and 20.
    policyId String
    Id of the CC self-define https policy.
    resourceId String
    ID of the resource that the CC self-define https policy works for.
    resourceType String
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    ruleId String
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    ruleLists List<DayuCcHttpsPolicyRuleList>
    Rule list of the CC self-define https policy.
    switch_ Boolean
    Indicate the CC self-define https policy takes effect or not.
    action string
    Action mode. Valid values are alg and drop.
    createTime string
    Create time of the CC self-define https policy.
    dayuCcHttpsPolicyId string
    ID of the resource.
    domain string
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    ipLists string[]
    Ip of the CC self-define https policy.
    name string
    Name of the CC self-define https policy. Length should between 1 and 20.
    policyId string
    Id of the CC self-define https policy.
    resourceId string
    ID of the resource that the CC self-define https policy works for.
    resourceType string
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    ruleId string
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    ruleLists DayuCcHttpsPolicyRuleList[]
    Rule list of the CC self-define https policy.
    switch boolean
    Indicate the CC self-define https policy takes effect or not.
    action str
    Action mode. Valid values are alg and drop.
    create_time str
    Create time of the CC self-define https policy.
    dayu_cc_https_policy_id str
    ID of the resource.
    domain str
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    ip_lists Sequence[str]
    Ip of the CC self-define https policy.
    name str
    Name of the CC self-define https policy. Length should between 1 and 20.
    policy_id str
    Id of the CC self-define https policy.
    resource_id str
    ID of the resource that the CC self-define https policy works for.
    resource_type str
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    rule_id str
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    rule_lists Sequence[DayuCcHttpsPolicyRuleListArgs]
    Rule list of the CC self-define https policy.
    switch bool
    Indicate the CC self-define https policy takes effect or not.
    action String
    Action mode. Valid values are alg and drop.
    createTime String
    Create time of the CC self-define https policy.
    dayuCcHttpsPolicyId String
    ID of the resource.
    domain String
    Domain that the CC self-define https policy works for, only valid when protocol is https.
    ipLists List<String>
    Ip of the CC self-define https policy.
    name String
    Name of the CC self-define https policy. Length should between 1 and 20.
    policyId String
    Id of the CC self-define https policy.
    resourceId String
    ID of the resource that the CC self-define https policy works for.
    resourceType String
    Type of the resource that the CC self-define https policy works for, valid value is bgpip.
    ruleId String
    Rule id of the domain that the CC self-define https policy works for, only valid when protocol is https.
    ruleLists List<Property Map>
    Rule list of the CC self-define https policy.
    switch Boolean
    Indicate the CC self-define https policy takes effect or not.

    Supporting Types

    DayuCcHttpsPolicyRuleList, DayuCcHttpsPolicyRuleListArgs

    Operator string
    Operator of the rule. Valid values are include and equal.
    Skey string
    Key of the rule. Valid values are cgi, ua and referer.
    Value string
    Rule value, then length should be less than 31 bytes.
    Operator string
    Operator of the rule. Valid values are include and equal.
    Skey string
    Key of the rule. Valid values are cgi, ua and referer.
    Value string
    Rule value, then length should be less than 31 bytes.
    operator String
    Operator of the rule. Valid values are include and equal.
    skey String
    Key of the rule. Valid values are cgi, ua and referer.
    value String
    Rule value, then length should be less than 31 bytes.
    operator string
    Operator of the rule. Valid values are include and equal.
    skey string
    Key of the rule. Valid values are cgi, ua and referer.
    value string
    Rule value, then length should be less than 31 bytes.
    operator str
    Operator of the rule. Valid values are include and equal.
    skey str
    Key of the rule. Valid values are cgi, ua and referer.
    value str
    Rule value, then length should be less than 31 bytes.
    operator String
    Operator of the rule. Valid values are include and equal.
    skey String
    Key of the rule. Valid values are cgi, ua and referer.
    value String
    Rule value, then length should be less than 31 bytes.

    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