tencentcloud.DayuCcHttpsPolicy
Explore with Pulumi AI
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 typebgpip
.
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
ishttps
. - Resource
Id string - ID of the resource that the CC self-define https policy works for.
- Resource
Type string - Type of the resource that the CC self-define https policy works for, valid value is
bgpip
. - Rule
Id string - Rule id of the domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - Rule
Lists List<DayuCc Https Policy Rule List> - Rule list of the CC self-define https policy.
- Action string
- Action mode. Valid values are
alg
anddrop
. - Dayu
Cc stringHttps Policy Id - 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
ishttps
. - Resource
Id string - ID of the resource that the CC self-define https policy works for.
- Resource
Type string - Type of the resource that the CC self-define https policy works for, valid value is
bgpip
. - Rule
Id string - Rule id of the domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - Rule
Lists []DayuCc Https Policy Rule List Args - Rule list of the CC self-define https policy.
- Action string
- Action mode. Valid values are
alg
anddrop
. - Dayu
Cc stringHttps Policy Id - 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
ishttps
. - resource
Id String - ID of the resource that the CC self-define https policy works for.
- resource
Type String - Type of the resource that the CC self-define https policy works for, valid value is
bgpip
. - rule
Id String - Rule id of the domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - rule
Lists List<DayuCc Https Policy Rule List> - Rule list of the CC self-define https policy.
- action String
- Action mode. Valid values are
alg
anddrop
. - dayu
Cc StringHttps Policy Id - 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
ishttps
. - resource
Id string - ID of the resource that the CC self-define https policy works for.
- resource
Type string - Type of the resource that the CC self-define https policy works for, valid value is
bgpip
. - rule
Id string - Rule id of the domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - rule
Lists DayuCc Https Policy Rule List[] - Rule list of the CC self-define https policy.
- action string
- Action mode. Valid values are
alg
anddrop
. - dayu
Cc stringHttps Policy Id - 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
ishttps
. - 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
ishttps
. - rule_
lists Sequence[DayuCc Https Policy Rule List Args] - Rule list of the CC self-define https policy.
- action str
- Action mode. Valid values are
alg
anddrop
. - dayu_
cc_ strhttps_ policy_ id - 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
ishttps
. - resource
Id String - ID of the resource that the CC self-define https policy works for.
- resource
Type String - Type of the resource that the CC self-define https policy works for, valid value is
bgpip
. - rule
Id String - Rule id of the domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - rule
Lists List<Property Map> - Rule list of the CC self-define https policy.
- action String
- Action mode. Valid values are
alg
anddrop
. - dayu
Cc StringHttps Policy Id - 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:
- Create
Time string - Create time of the CC self-define https policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Lists List<string> - Ip of the CC self-define https policy.
- Policy
Id string - Id of the CC self-define https policy.
- Create
Time string - Create time of the CC self-define https policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Lists []string - Ip of the CC self-define https policy.
- Policy
Id string - Id of the CC self-define https policy.
- create
Time String - Create time of the CC self-define https policy.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Lists List<String> - Ip of the CC self-define https policy.
- policy
Id String - Id of the CC self-define https policy.
- create
Time string - Create time of the CC self-define https policy.
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Lists string[] - Ip of the CC self-define https policy.
- policy
Id 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.
- create
Time String - Create time of the CC self-define https policy.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Lists List<String> - Ip of the CC self-define https policy.
- policy
Id 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.
- Action string
- Action mode. Valid values are
alg
anddrop
. - Create
Time string - Create time of the CC self-define https policy.
- Dayu
Cc stringHttps Policy Id - ID of the resource.
- Domain string
- Domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - Ip
Lists 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.
- Policy
Id string - Id of the CC self-define https policy.
- Resource
Id string - ID of the resource that the CC self-define https policy works for.
- Resource
Type string - Type of the resource that the CC self-define https policy works for, valid value is
bgpip
. - Rule
Id string - Rule id of the domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - Rule
Lists List<DayuCc Https Policy Rule List> - 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
anddrop
. - Create
Time string - Create time of the CC self-define https policy.
- Dayu
Cc stringHttps Policy Id - ID of the resource.
- Domain string
- Domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - Ip
Lists []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.
- Policy
Id string - Id of the CC self-define https policy.
- Resource
Id string - ID of the resource that the CC self-define https policy works for.
- Resource
Type string - Type of the resource that the CC self-define https policy works for, valid value is
bgpip
. - Rule
Id string - Rule id of the domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - Rule
Lists []DayuCc Https Policy Rule List Args - 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
anddrop
. - create
Time String - Create time of the CC self-define https policy.
- dayu
Cc StringHttps Policy Id - ID of the resource.
- domain String
- Domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - ip
Lists 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.
- policy
Id String - Id of the CC self-define https policy.
- resource
Id String - ID of the resource that the CC self-define https policy works for.
- resource
Type String - Type of the resource that the CC self-define https policy works for, valid value is
bgpip
. - rule
Id String - Rule id of the domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - rule
Lists List<DayuCc Https Policy Rule List> - 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
anddrop
. - create
Time string - Create time of the CC self-define https policy.
- dayu
Cc stringHttps Policy Id - ID of the resource.
- domain string
- Domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - ip
Lists 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.
- policy
Id string - Id of the CC self-define https policy.
- resource
Id string - ID of the resource that the CC self-define https policy works for.
- resource
Type string - Type of the resource that the CC self-define https policy works for, valid value is
bgpip
. - rule
Id string - Rule id of the domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - rule
Lists DayuCc Https Policy Rule List[] - 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
anddrop
. - create_
time str - Create time of the CC self-define https policy.
- dayu_
cc_ strhttps_ policy_ id - ID of the resource.
- domain str
- Domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - 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
ishttps
. - rule_
lists Sequence[DayuCc Https Policy Rule List Args] - 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
anddrop
. - create
Time String - Create time of the CC self-define https policy.
- dayu
Cc StringHttps Policy Id - ID of the resource.
- domain String
- Domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - ip
Lists 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.
- policy
Id String - Id of the CC self-define https policy.
- resource
Id String - ID of the resource that the CC self-define https policy works for.
- resource
Type String - Type of the resource that the CC self-define https policy works for, valid value is
bgpip
. - rule
Id String - Rule id of the domain that the CC self-define https policy works for, only valid when
protocol
ishttps
. - rule
Lists 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
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.