tencentcloud.TeoL7AccRulePriorityOperation
Explore with Pulumi AI
Provides a resource to set TEO l7 acc rules priority
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const rule1 = new tencentcloud.TeoL7AccRuleV2("rule1", {
zoneId: "zone-39quuimqg8r6",
descriptions: ["1"],
ruleName: "网站加速1",
status: "enable",
branches: [{
condition: "${http.request.host} in ['aaa.makn.cn']",
actions: [
{
name: "Cache",
cacheParameters: {
customTime: {
cacheTime: 2592000,
ignoreCacheControl: "off",
"switch": "on",
},
},
},
{
name: "CacheKey",
cacheKeyParameters: {
fullUrlCache: "on",
ignoreCase: "off",
queryString: {
"switch": "off",
values: [],
},
},
},
],
subRules: [
{
descriptions: ["1-1"],
branches: [{
condition: "lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']",
actions: [{
name: "Cache",
cacheParameters: {
noCache: {
"switch": "on",
},
},
}],
}],
},
{
descriptions: ["1-2"],
branches: [{
condition: "${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']",
actions: [{
name: "MaxAge",
maxAgeParameters: {
cacheTime: 3600,
followOrigin: "off",
},
}],
}],
},
],
}],
});
const rule2 = new tencentcloud.TeoL7AccRuleV2("rule2", {
zoneId: "zone-39quuimqg8r6",
descriptions: ["2"],
ruleName: "网站加速2",
status: "enable",
branches: [{
condition: "${http.request.host} in ['aaa.makn.cn']",
actions: [
{
name: "Cache",
cacheParameters: {
customTime: {
cacheTime: 2592000,
ignoreCacheControl: "off",
"switch": "on",
},
},
},
{
name: "CacheKey",
cacheKeyParameters: {
fullUrlCache: "on",
ignoreCase: "off",
queryString: {
"switch": "off",
values: [],
},
},
},
],
subRules: [
{
descriptions: ["1-1"],
branches: [{
condition: "lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']",
actions: [{
name: "Cache",
cacheParameters: {
noCache: {
"switch": "on",
},
},
}],
}],
},
{
descriptions: ["1-2"],
branches: [{
condition: "${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']",
actions: [{
name: "MaxAge",
maxAgeParameters: {
cacheTime: 3600,
followOrigin: "off",
},
}],
}],
},
],
}],
});
const teoL7AccRulePriorityOperation = new tencentcloud.TeoL7AccRulePriorityOperation("teoL7AccRulePriorityOperation", {
zoneId: "zone-39quuimqg8r6",
ruleIds: [
resource.tencentcloud_teo_l7_acc_rule_v2.rule2.rule_id,
resource.tencentcloud_teo_l7_acc_rule_v2.rule1.rule_id,
],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
rule1 = tencentcloud.TeoL7AccRuleV2("rule1",
zone_id="zone-39quuimqg8r6",
descriptions=["1"],
rule_name="网站加速1",
status="enable",
branches=[{
"condition": "${http.request.host} in ['aaa.makn.cn']",
"actions": [
{
"name": "Cache",
"cache_parameters": {
"custom_time": {
"cache_time": 2592000,
"ignore_cache_control": "off",
"switch": "on",
},
},
},
{
"name": "CacheKey",
"cache_key_parameters": {
"full_url_cache": "on",
"ignore_case": "off",
"query_string": {
"switch": "off",
"values": [],
},
},
},
],
"sub_rules": [
{
"descriptions": ["1-1"],
"branches": [{
"condition": "lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']",
"actions": [{
"name": "Cache",
"cache_parameters": {
"no_cache": {
"switch": "on",
},
},
}],
}],
},
{
"descriptions": ["1-2"],
"branches": [{
"condition": "${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']",
"actions": [{
"name": "MaxAge",
"max_age_parameters": {
"cache_time": 3600,
"follow_origin": "off",
},
}],
}],
},
],
}])
rule2 = tencentcloud.TeoL7AccRuleV2("rule2",
zone_id="zone-39quuimqg8r6",
descriptions=["2"],
rule_name="网站加速2",
status="enable",
branches=[{
"condition": "${http.request.host} in ['aaa.makn.cn']",
"actions": [
{
"name": "Cache",
"cache_parameters": {
"custom_time": {
"cache_time": 2592000,
"ignore_cache_control": "off",
"switch": "on",
},
},
},
{
"name": "CacheKey",
"cache_key_parameters": {
"full_url_cache": "on",
"ignore_case": "off",
"query_string": {
"switch": "off",
"values": [],
},
},
},
],
"sub_rules": [
{
"descriptions": ["1-1"],
"branches": [{
"condition": "lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']",
"actions": [{
"name": "Cache",
"cache_parameters": {
"no_cache": {
"switch": "on",
},
},
}],
}],
},
{
"descriptions": ["1-2"],
"branches": [{
"condition": "${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']",
"actions": [{
"name": "MaxAge",
"max_age_parameters": {
"cache_time": 3600,
"follow_origin": "off",
},
}],
}],
},
],
}])
teo_l7_acc_rule_priority_operation = tencentcloud.TeoL7AccRulePriorityOperation("teoL7AccRulePriorityOperation",
zone_id="zone-39quuimqg8r6",
rule_ids=[
resource["tencentcloud_teo_l7_acc_rule_v2"]["rule2"]["rule_id"],
resource["tencentcloud_teo_l7_acc_rule_v2"]["rule1"]["rule_id"],
])
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.NewTeoL7AccRuleV2(ctx, "rule1", &tencentcloud.TeoL7AccRuleV2Args{
ZoneId: pulumi.String("zone-39quuimqg8r6"),
Descriptions: pulumi.StringArray{
pulumi.String("1"),
},
RuleName: pulumi.String("网站加速1"),
Status: pulumi.String("enable"),
Branches: tencentcloud.TeoL7AccRuleV2BranchArray{
&tencentcloud.TeoL7AccRuleV2BranchArgs{
Condition: pulumi.String("${http.request.host} in ['aaa.makn.cn']"),
Actions: tencentcloud.TeoL7AccRuleV2BranchActionArray{
&tencentcloud.TeoL7AccRuleV2BranchActionArgs{
Name: pulumi.String("Cache"),
CacheParameters: &tencentcloud.TeoL7AccRuleV2BranchActionCacheParametersArgs{
CustomTime: &tencentcloud.TeoL7AccRuleV2BranchActionCacheParametersCustomTimeArgs{
CacheTime: pulumi.Float64(2592000),
IgnoreCacheControl: pulumi.String("off"),
Switch: pulumi.String("on"),
},
},
},
&tencentcloud.TeoL7AccRuleV2BranchActionArgs{
Name: pulumi.String("CacheKey"),
CacheKeyParameters: &tencentcloud.TeoL7AccRuleV2BranchActionCacheKeyParametersArgs{
FullUrlCache: pulumi.String("on"),
IgnoreCase: pulumi.String("off"),
QueryString: &tencentcloud.TeoL7AccRuleV2BranchActionCacheKeyParametersQueryStringArgs{
Switch: pulumi.String("off"),
Values: pulumi.StringArray{},
},
},
},
},
SubRules: tencentcloud.TeoL7AccRuleV2BranchSubRuleArray{
&tencentcloud.TeoL7AccRuleV2BranchSubRuleArgs{
Descriptions: pulumi.StringArray{
pulumi.String("1-1"),
},
Branches: tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchArray{
&tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchArgs{
Condition: pulumi.String("lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']"),
Actions: tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionArray{
&tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionArgs{
Name: pulumi.String("Cache"),
CacheParameters: &tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersArgs{
NoCache: &tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersNoCacheArgs{
Switch: pulumi.String("on"),
},
},
},
},
},
},
},
&tencentcloud.TeoL7AccRuleV2BranchSubRuleArgs{
Descriptions: pulumi.StringArray{
pulumi.String("1-2"),
},
Branches: tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchArray{
&tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchArgs{
Condition: pulumi.String("${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']"),
Actions: tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionArray{
&tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionArgs{
Name: pulumi.String("MaxAge"),
MaxAgeParameters: &tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionMaxAgeParametersArgs{
CacheTime: pulumi.Float64(3600),
FollowOrigin: pulumi.String("off"),
},
},
},
},
},
},
},
},
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewTeoL7AccRuleV2(ctx, "rule2", &tencentcloud.TeoL7AccRuleV2Args{
ZoneId: pulumi.String("zone-39quuimqg8r6"),
Descriptions: pulumi.StringArray{
pulumi.String("2"),
},
RuleName: pulumi.String("网站加速2"),
Status: pulumi.String("enable"),
Branches: tencentcloud.TeoL7AccRuleV2BranchArray{
&tencentcloud.TeoL7AccRuleV2BranchArgs{
Condition: pulumi.String("${http.request.host} in ['aaa.makn.cn']"),
Actions: tencentcloud.TeoL7AccRuleV2BranchActionArray{
&tencentcloud.TeoL7AccRuleV2BranchActionArgs{
Name: pulumi.String("Cache"),
CacheParameters: &tencentcloud.TeoL7AccRuleV2BranchActionCacheParametersArgs{
CustomTime: &tencentcloud.TeoL7AccRuleV2BranchActionCacheParametersCustomTimeArgs{
CacheTime: pulumi.Float64(2592000),
IgnoreCacheControl: pulumi.String("off"),
Switch: pulumi.String("on"),
},
},
},
&tencentcloud.TeoL7AccRuleV2BranchActionArgs{
Name: pulumi.String("CacheKey"),
CacheKeyParameters: &tencentcloud.TeoL7AccRuleV2BranchActionCacheKeyParametersArgs{
FullUrlCache: pulumi.String("on"),
IgnoreCase: pulumi.String("off"),
QueryString: &tencentcloud.TeoL7AccRuleV2BranchActionCacheKeyParametersQueryStringArgs{
Switch: pulumi.String("off"),
Values: pulumi.StringArray{},
},
},
},
},
SubRules: tencentcloud.TeoL7AccRuleV2BranchSubRuleArray{
&tencentcloud.TeoL7AccRuleV2BranchSubRuleArgs{
Descriptions: pulumi.StringArray{
pulumi.String("1-1"),
},
Branches: tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchArray{
&tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchArgs{
Condition: pulumi.String("lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']"),
Actions: tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionArray{
&tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionArgs{
Name: pulumi.String("Cache"),
CacheParameters: &tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersArgs{
NoCache: &tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersNoCacheArgs{
Switch: pulumi.String("on"),
},
},
},
},
},
},
},
&tencentcloud.TeoL7AccRuleV2BranchSubRuleArgs{
Descriptions: pulumi.StringArray{
pulumi.String("1-2"),
},
Branches: tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchArray{
&tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchArgs{
Condition: pulumi.String("${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']"),
Actions: tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionArray{
&tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionArgs{
Name: pulumi.String("MaxAge"),
MaxAgeParameters: &tencentcloud.TeoL7AccRuleV2BranchSubRuleBranchActionMaxAgeParametersArgs{
CacheTime: pulumi.Float64(3600),
FollowOrigin: pulumi.String("off"),
},
},
},
},
},
},
},
},
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewTeoL7AccRulePriorityOperation(ctx, "teoL7AccRulePriorityOperation", &tencentcloud.TeoL7AccRulePriorityOperationArgs{
ZoneId: pulumi.String("zone-39quuimqg8r6"),
RuleIds: pulumi.StringArray{
resource.Tencentcloud_teo_l7_acc_rule_v2.Rule2.Rule_id,
resource.Tencentcloud_teo_l7_acc_rule_v2.Rule1.Rule_id,
},
})
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 rule1 = new Tencentcloud.TeoL7AccRuleV2("rule1", new()
{
ZoneId = "zone-39quuimqg8r6",
Descriptions = new[]
{
"1",
},
RuleName = "网站加速1",
Status = "enable",
Branches = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchArgs
{
Condition = "${http.request.host} in ['aaa.makn.cn']",
Actions = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionArgs
{
Name = "Cache",
CacheParameters = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionCacheParametersArgs
{
CustomTime = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionCacheParametersCustomTimeArgs
{
CacheTime = 2592000,
IgnoreCacheControl = "off",
Switch = "on",
},
},
},
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionArgs
{
Name = "CacheKey",
CacheKeyParameters = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionCacheKeyParametersArgs
{
FullUrlCache = "on",
IgnoreCase = "off",
QueryString = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionCacheKeyParametersQueryStringArgs
{
Switch = "off",
Values = new() { },
},
},
},
},
SubRules = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleArgs
{
Descriptions = new[]
{
"1-1",
},
Branches = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchArgs
{
Condition = "lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']",
Actions = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchActionArgs
{
Name = "Cache",
CacheParameters = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersArgs
{
NoCache = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersNoCacheArgs
{
Switch = "on",
},
},
},
},
},
},
},
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleArgs
{
Descriptions = new[]
{
"1-2",
},
Branches = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchArgs
{
Condition = "${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']",
Actions = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchActionArgs
{
Name = "MaxAge",
MaxAgeParameters = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchActionMaxAgeParametersArgs
{
CacheTime = 3600,
FollowOrigin = "off",
},
},
},
},
},
},
},
},
},
});
var rule2 = new Tencentcloud.TeoL7AccRuleV2("rule2", new()
{
ZoneId = "zone-39quuimqg8r6",
Descriptions = new[]
{
"2",
},
RuleName = "网站加速2",
Status = "enable",
Branches = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchArgs
{
Condition = "${http.request.host} in ['aaa.makn.cn']",
Actions = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionArgs
{
Name = "Cache",
CacheParameters = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionCacheParametersArgs
{
CustomTime = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionCacheParametersCustomTimeArgs
{
CacheTime = 2592000,
IgnoreCacheControl = "off",
Switch = "on",
},
},
},
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionArgs
{
Name = "CacheKey",
CacheKeyParameters = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionCacheKeyParametersArgs
{
FullUrlCache = "on",
IgnoreCase = "off",
QueryString = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchActionCacheKeyParametersQueryStringArgs
{
Switch = "off",
Values = new() { },
},
},
},
},
SubRules = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleArgs
{
Descriptions = new[]
{
"1-1",
},
Branches = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchArgs
{
Condition = "lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']",
Actions = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchActionArgs
{
Name = "Cache",
CacheParameters = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersArgs
{
NoCache = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersNoCacheArgs
{
Switch = "on",
},
},
},
},
},
},
},
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleArgs
{
Descriptions = new[]
{
"1-2",
},
Branches = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchArgs
{
Condition = "${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']",
Actions = new[]
{
new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchActionArgs
{
Name = "MaxAge",
MaxAgeParameters = new Tencentcloud.Inputs.TeoL7AccRuleV2BranchSubRuleBranchActionMaxAgeParametersArgs
{
CacheTime = 3600,
FollowOrigin = "off",
},
},
},
},
},
},
},
},
},
});
var teoL7AccRulePriorityOperation = new Tencentcloud.TeoL7AccRulePriorityOperation("teoL7AccRulePriorityOperation", new()
{
ZoneId = "zone-39quuimqg8r6",
RuleIds = new[]
{
resource.Tencentcloud_teo_l7_acc_rule_v2.Rule2.Rule_id,
resource.Tencentcloud_teo_l7_acc_rule_v2.Rule1.Rule_id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TeoL7AccRuleV2;
import com.pulumi.tencentcloud.TeoL7AccRuleV2Args;
import com.pulumi.tencentcloud.inputs.TeoL7AccRuleV2BranchArgs;
import com.pulumi.tencentcloud.TeoL7AccRulePriorityOperation;
import com.pulumi.tencentcloud.TeoL7AccRulePriorityOperationArgs;
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 rule1 = new TeoL7AccRuleV2("rule1", TeoL7AccRuleV2Args.builder()
.zoneId("zone-39quuimqg8r6")
.descriptions("1")
.ruleName("网站加速1")
.status("enable")
.branches(TeoL7AccRuleV2BranchArgs.builder()
.condition("${http.request.host} in ['aaa.makn.cn']")
.actions(
TeoL7AccRuleV2BranchActionArgs.builder()
.name("Cache")
.cacheParameters(TeoL7AccRuleV2BranchActionCacheParametersArgs.builder()
.customTime(TeoL7AccRuleV2BranchActionCacheParametersCustomTimeArgs.builder()
.cacheTime(2592000)
.ignoreCacheControl("off")
.switch_("on")
.build())
.build())
.build(),
TeoL7AccRuleV2BranchActionArgs.builder()
.name("CacheKey")
.cacheKeyParameters(TeoL7AccRuleV2BranchActionCacheKeyParametersArgs.builder()
.fullUrlCache("on")
.ignoreCase("off")
.queryString(TeoL7AccRuleV2BranchActionCacheKeyParametersQueryStringArgs.builder()
.switch_("off")
.values()
.build())
.build())
.build())
.subRules(
TeoL7AccRuleV2BranchSubRuleArgs.builder()
.descriptions("1-1")
.branches(TeoL7AccRuleV2BranchSubRuleBranchArgs.builder()
.condition("lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']")
.actions(TeoL7AccRuleV2BranchSubRuleBranchActionArgs.builder()
.name("Cache")
.cacheParameters(TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersArgs.builder()
.noCache(TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersNoCacheArgs.builder()
.switch_("on")
.build())
.build())
.build())
.build())
.build(),
TeoL7AccRuleV2BranchSubRuleArgs.builder()
.descriptions("1-2")
.branches(TeoL7AccRuleV2BranchSubRuleBranchArgs.builder()
.condition("${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']")
.actions(TeoL7AccRuleV2BranchSubRuleBranchActionArgs.builder()
.name("MaxAge")
.maxAgeParameters(TeoL7AccRuleV2BranchSubRuleBranchActionMaxAgeParametersArgs.builder()
.cacheTime(3600)
.followOrigin("off")
.build())
.build())
.build())
.build())
.build())
.build());
var rule2 = new TeoL7AccRuleV2("rule2", TeoL7AccRuleV2Args.builder()
.zoneId("zone-39quuimqg8r6")
.descriptions("2")
.ruleName("网站加速2")
.status("enable")
.branches(TeoL7AccRuleV2BranchArgs.builder()
.condition("${http.request.host} in ['aaa.makn.cn']")
.actions(
TeoL7AccRuleV2BranchActionArgs.builder()
.name("Cache")
.cacheParameters(TeoL7AccRuleV2BranchActionCacheParametersArgs.builder()
.customTime(TeoL7AccRuleV2BranchActionCacheParametersCustomTimeArgs.builder()
.cacheTime(2592000)
.ignoreCacheControl("off")
.switch_("on")
.build())
.build())
.build(),
TeoL7AccRuleV2BranchActionArgs.builder()
.name("CacheKey")
.cacheKeyParameters(TeoL7AccRuleV2BranchActionCacheKeyParametersArgs.builder()
.fullUrlCache("on")
.ignoreCase("off")
.queryString(TeoL7AccRuleV2BranchActionCacheKeyParametersQueryStringArgs.builder()
.switch_("off")
.values()
.build())
.build())
.build())
.subRules(
TeoL7AccRuleV2BranchSubRuleArgs.builder()
.descriptions("1-1")
.branches(TeoL7AccRuleV2BranchSubRuleBranchArgs.builder()
.condition("lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']")
.actions(TeoL7AccRuleV2BranchSubRuleBranchActionArgs.builder()
.name("Cache")
.cacheParameters(TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersArgs.builder()
.noCache(TeoL7AccRuleV2BranchSubRuleBranchActionCacheParametersNoCacheArgs.builder()
.switch_("on")
.build())
.build())
.build())
.build())
.build(),
TeoL7AccRuleV2BranchSubRuleArgs.builder()
.descriptions("1-2")
.branches(TeoL7AccRuleV2BranchSubRuleBranchArgs.builder()
.condition("${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']")
.actions(TeoL7AccRuleV2BranchSubRuleBranchActionArgs.builder()
.name("MaxAge")
.maxAgeParameters(TeoL7AccRuleV2BranchSubRuleBranchActionMaxAgeParametersArgs.builder()
.cacheTime(3600)
.followOrigin("off")
.build())
.build())
.build())
.build())
.build())
.build());
var teoL7AccRulePriorityOperation = new TeoL7AccRulePriorityOperation("teoL7AccRulePriorityOperation", TeoL7AccRulePriorityOperationArgs.builder()
.zoneId("zone-39quuimqg8r6")
.ruleIds(
resource.tencentcloud_teo_l7_acc_rule_v2().rule2().rule_id(),
resource.tencentcloud_teo_l7_acc_rule_v2().rule1().rule_id())
.build());
}
}
resources:
rule1:
type: tencentcloud:TeoL7AccRuleV2
properties:
zoneId: zone-39quuimqg8r6
descriptions:
- '1'
ruleName: 网站加速1
status: enable
branches:
- condition: $${http.request.host} in ['aaa.makn.cn']
actions:
- name: Cache
cacheParameters:
customTime:
cacheTime: 2.592e+06
ignoreCacheControl: off
switch: on
- name: CacheKey
cacheKeyParameters:
fullUrlCache: on
ignoreCase: off
queryString:
switch: off
values: []
subRules:
- descriptions:
- 1-1
branches:
- condition: lower($${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']
actions:
- name: Cache
cacheParameters:
noCache:
switch: on
- descriptions:
- 1-2
branches:
- condition: $${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']
actions:
- name: MaxAge
maxAgeParameters:
cacheTime: 3600
followOrigin: off
rule2:
type: tencentcloud:TeoL7AccRuleV2
properties:
zoneId: zone-39quuimqg8r6
descriptions:
- '2'
ruleName: 网站加速2
status: enable
branches:
- condition: $${http.request.host} in ['aaa.makn.cn']
actions:
- name: Cache
cacheParameters:
customTime:
cacheTime: 2.592e+06
ignoreCacheControl: off
switch: on
- name: CacheKey
cacheKeyParameters:
fullUrlCache: on
ignoreCase: off
queryString:
switch: off
values: []
subRules:
- descriptions:
- 1-1
branches:
- condition: lower($${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']
actions:
- name: Cache
cacheParameters:
noCache:
switch: on
- descriptions:
- 1-2
branches:
- condition: $${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']
actions:
- name: MaxAge
maxAgeParameters:
cacheTime: 3600
followOrigin: off
teoL7AccRulePriorityOperation:
type: tencentcloud:TeoL7AccRulePriorityOperation
properties:
zoneId: zone-39quuimqg8r6
ruleIds:
- ${resource.tencentcloud_teo_l7_acc_rule_v2.rule2.rule_id}
- ${resource.tencentcloud_teo_l7_acc_rule_v2.rule1.rule_id}
Create TeoL7AccRulePriorityOperation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TeoL7AccRulePriorityOperation(name: string, args: TeoL7AccRulePriorityOperationArgs, opts?: CustomResourceOptions);
@overload
def TeoL7AccRulePriorityOperation(resource_name: str,
args: TeoL7AccRulePriorityOperationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TeoL7AccRulePriorityOperation(resource_name: str,
opts: Optional[ResourceOptions] = None,
rule_ids: Optional[Sequence[str]] = None,
zone_id: Optional[str] = None,
teo_l7_acc_rule_priority_operation_id: Optional[str] = None)
func NewTeoL7AccRulePriorityOperation(ctx *Context, name string, args TeoL7AccRulePriorityOperationArgs, opts ...ResourceOption) (*TeoL7AccRulePriorityOperation, error)
public TeoL7AccRulePriorityOperation(string name, TeoL7AccRulePriorityOperationArgs args, CustomResourceOptions? opts = null)
public TeoL7AccRulePriorityOperation(String name, TeoL7AccRulePriorityOperationArgs args)
public TeoL7AccRulePriorityOperation(String name, TeoL7AccRulePriorityOperationArgs args, CustomResourceOptions options)
type: tencentcloud:TeoL7AccRulePriorityOperation
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 TeoL7AccRulePriorityOperationArgs
- 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 TeoL7AccRulePriorityOperationArgs
- 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 TeoL7AccRulePriorityOperationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeoL7AccRulePriorityOperationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TeoL7AccRulePriorityOperationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TeoL7AccRulePriorityOperation 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 TeoL7AccRulePriorityOperation resource accepts the following input properties:
- Rule
Ids List<string> - Complete list of rule IDs under site ID.
- Zone
Id string - Zone id.
- Teo
L7Acc stringRule Priority Operation Id - ID of the resource.
- Rule
Ids []string - Complete list of rule IDs under site ID.
- Zone
Id string - Zone id.
- Teo
L7Acc stringRule Priority Operation Id - ID of the resource.
- rule
Ids List<String> - Complete list of rule IDs under site ID.
- zone
Id String - Zone id.
- teo
L7Acc StringRule Priority Operation Id - ID of the resource.
- rule
Ids string[] - Complete list of rule IDs under site ID.
- zone
Id string - Zone id.
- teo
L7Acc stringRule Priority Operation Id - ID of the resource.
- rule_
ids Sequence[str] - Complete list of rule IDs under site ID.
- zone_
id str - Zone id.
- teo_
l7_ stracc_ rule_ priority_ operation_ id - ID of the resource.
- rule
Ids List<String> - Complete list of rule IDs under site ID.
- zone
Id String - Zone id.
- teo
L7Acc StringRule Priority Operation Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TeoL7AccRulePriorityOperation 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 TeoL7AccRulePriorityOperation Resource
Get an existing TeoL7AccRulePriorityOperation 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?: TeoL7AccRulePriorityOperationState, opts?: CustomResourceOptions): TeoL7AccRulePriorityOperation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
rule_ids: Optional[Sequence[str]] = None,
teo_l7_acc_rule_priority_operation_id: Optional[str] = None,
zone_id: Optional[str] = None) -> TeoL7AccRulePriorityOperation
func GetTeoL7AccRulePriorityOperation(ctx *Context, name string, id IDInput, state *TeoL7AccRulePriorityOperationState, opts ...ResourceOption) (*TeoL7AccRulePriorityOperation, error)
public static TeoL7AccRulePriorityOperation Get(string name, Input<string> id, TeoL7AccRulePriorityOperationState? state, CustomResourceOptions? opts = null)
public static TeoL7AccRulePriorityOperation get(String name, Output<String> id, TeoL7AccRulePriorityOperationState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TeoL7AccRulePriorityOperation 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.
- Rule
Ids List<string> - Complete list of rule IDs under site ID.
- Teo
L7Acc stringRule Priority Operation Id - ID of the resource.
- Zone
Id string - Zone id.
- Rule
Ids []string - Complete list of rule IDs under site ID.
- Teo
L7Acc stringRule Priority Operation Id - ID of the resource.
- Zone
Id string - Zone id.
- rule
Ids List<String> - Complete list of rule IDs under site ID.
- teo
L7Acc StringRule Priority Operation Id - ID of the resource.
- zone
Id String - Zone id.
- rule
Ids string[] - Complete list of rule IDs under site ID.
- teo
L7Acc stringRule Priority Operation Id - ID of the resource.
- zone
Id string - Zone id.
- rule_
ids Sequence[str] - Complete list of rule IDs under site ID.
- teo_
l7_ stracc_ rule_ priority_ operation_ id - ID of the resource.
- zone_
id str - Zone id.
- rule
Ids List<String> - Complete list of rule IDs under site ID.
- teo
L7Acc StringRule Priority Operation Id - ID of the resource.
- zone
Id String - Zone id.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.