@byteplus/pulumi-bytepluscc 0.0.50 → 0.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cr/getRobotAccount.d.ts +82 -0
- package/cr/getRobotAccount.d.ts.map +1 -0
- package/cr/getRobotAccount.js +51 -0
- package/cr/getRobotAccount.js.map +1 -0
- package/cr/getRobotAccounts.d.ts +23 -0
- package/cr/getRobotAccounts.d.ts.map +1 -0
- package/cr/getRobotAccounts.js +47 -0
- package/cr/getRobotAccounts.js.map +1 -0
- package/cr/index.d.ts +9 -0
- package/cr/index.d.ts.map +1 -1
- package/cr/index.js +12 -1
- package/cr/index.js.map +1 -1
- package/cr/robotAccount.d.ts +201 -0
- package/cr/robotAccount.d.ts.map +1 -0
- package/cr/robotAccount.js +143 -0
- package/cr/robotAccount.js.map +1 -0
- package/ecs/dedicatedHostCluster.d.ts +137 -0
- package/ecs/dedicatedHostCluster.d.ts.map +1 -0
- package/ecs/dedicatedHostCluster.js +114 -0
- package/ecs/dedicatedHostCluster.js.map +1 -0
- package/ecs/getDedicatedHostCluster.d.ts +70 -0
- package/ecs/getDedicatedHostCluster.d.ts.map +1 -0
- package/ecs/getDedicatedHostCluster.js +51 -0
- package/ecs/getDedicatedHostCluster.js.map +1 -0
- package/ecs/getDedicatedHostClusters.d.ts +23 -0
- package/ecs/getDedicatedHostClusters.d.ts.map +1 -0
- package/ecs/getDedicatedHostClusters.js +47 -0
- package/ecs/getDedicatedHostClusters.js.map +1 -0
- package/ecs/index.d.ts +9 -0
- package/ecs/index.d.ts.map +1 -1
- package/ecs/index.js +13 -1
- package/ecs/index.js.map +1 -1
- package/iam/apiKey.d.ts +139 -0
- package/iam/apiKey.d.ts.map +1 -0
- package/iam/apiKey.js +114 -0
- package/iam/apiKey.js.map +1 -0
- package/iam/getApiKey.d.ts +69 -0
- package/iam/getApiKey.d.ts.map +1 -0
- package/iam/getApiKey.js +51 -0
- package/iam/getApiKey.js.map +1 -0
- package/iam/getApiKeys.d.ts +23 -0
- package/iam/getApiKeys.d.ts.map +1 -0
- package/iam/getApiKeys.js +47 -0
- package/iam/getApiKeys.js.map +1 -0
- package/iam/index.d.ts +9 -0
- package/iam/index.d.ts.map +1 -1
- package/iam/index.js +12 -1
- package/iam/index.js.map +1 -1
- package/package.json +1 -1
- package/rdsmysql/getInstance.d.ts +1 -1
- package/rdsmysql/instance.d.ts +3 -3
- package/redis/getKeyScanJob.d.ts +77 -0
- package/redis/getKeyScanJob.d.ts.map +1 -0
- package/redis/getKeyScanJob.js +51 -0
- package/redis/getKeyScanJob.js.map +1 -0
- package/redis/getKeyScanJobs.d.ts +23 -0
- package/redis/getKeyScanJobs.d.ts.map +1 -0
- package/redis/getKeyScanJobs.js +47 -0
- package/redis/getKeyScanJobs.js.map +1 -0
- package/redis/index.d.ts +9 -0
- package/redis/index.d.ts.map +1 -1
- package/redis/index.js +12 -1
- package/redis/index.js.map +1 -1
- package/redis/keyScanJob.d.ts +151 -0
- package/redis/keyScanJob.d.ts.map +1 -0
- package/redis/keyScanJob.js +121 -0
- package/redis/keyScanJob.js.map +1 -0
- package/types/input.d.ts +109 -0
- package/types/input.d.ts.map +1 -1
- package/types/output.d.ts +215 -0
- package/types/output.d.ts.map +1 -1
- package/vpc/getIpv4Gateway.d.ts +77 -0
- package/vpc/getIpv4Gateway.d.ts.map +1 -0
- package/vpc/getIpv4Gateway.js +51 -0
- package/vpc/getIpv4Gateway.js.map +1 -0
- package/vpc/getIpv4Gateways.d.ts +23 -0
- package/vpc/getIpv4Gateways.d.ts.map +1 -0
- package/vpc/getIpv4Gateways.js +47 -0
- package/vpc/getIpv4Gateways.js.map +1 -0
- package/vpc/index.d.ts +9 -0
- package/vpc/index.d.ts.map +1 -1
- package/vpc/index.js +14 -3
- package/vpc/index.js.map +1 -1
- package/vpc/ipv4Gateway.d.ts +155 -0
- package/vpc/ipv4Gateway.d.ts.map +1 -0
- package/vpc/ipv4Gateway.js +112 -0
- package/vpc/ipv4Gateway.js.map +1 -0
- package/waf/customPage.d.ts +272 -0
- package/waf/customPage.d.ts.map +1 -0
- package/waf/customPage.js +156 -0
- package/waf/customPage.js.map +1 -0
- package/waf/getCustomPage.d.ts +110 -0
- package/waf/getCustomPage.d.ts.map +1 -0
- package/waf/getCustomPage.js +51 -0
- package/waf/getCustomPage.js.map +1 -0
- package/waf/getCustomPages.d.ts +23 -0
- package/waf/getCustomPages.d.ts.map +1 -0
- package/waf/getCustomPages.js +47 -0
- package/waf/getCustomPages.js.map +1 -0
- package/waf/getIpGroup.d.ts +62 -0
- package/waf/getIpGroup.d.ts.map +1 -0
- package/waf/getIpGroup.js +51 -0
- package/waf/getIpGroup.js.map +1 -0
- package/waf/getIpGroups.d.ts +23 -0
- package/waf/getIpGroups.d.ts.map +1 -0
- package/waf/getIpGroups.js +47 -0
- package/waf/getIpGroups.js.map +1 -0
- package/waf/getSystemBot.d.ts +38 -0
- package/waf/getSystemBot.d.ts.map +1 -0
- package/waf/getSystemBot.js +51 -0
- package/waf/getSystemBot.js.map +1 -0
- package/waf/getSystemBots.d.ts +23 -0
- package/waf/getSystemBots.d.ts.map +1 -0
- package/waf/getSystemBots.js +47 -0
- package/waf/getSystemBots.js.map +1 -0
- package/waf/index.d.ts +27 -0
- package/waf/index.d.ts.map +1 -1
- package/waf/index.js +34 -1
- package/waf/index.js.map +1 -1
- package/waf/ipGroup.d.ts +121 -0
- package/waf/ipGroup.d.ts.map +1 -0
- package/waf/ipGroup.js +112 -0
- package/waf/ipGroup.js.map +1 -0
- package/waf/systemBot.d.ts +172 -0
- package/waf/systemBot.d.ts.map +1 -0
- package/waf/systemBot.js +121 -0
- package/waf/systemBot.js.map +1 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Ipv4Gateway = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* Volcengine VPC IPv4 gateway resource. The IPv4 gateway serves as the unified exit for private VPCs to access the public network. After creation, it can be associated with a specified VPC to enable public network access. This resource only manages the lifecycle of the gateway itself (create, query, modify, delete, list). Association between the gateway and VPC (Attach/Detach), and enabling/disabling (Enable/Disable) are managed by separate association operations.
|
|
33
|
+
*
|
|
34
|
+
* ## Example Usage
|
|
35
|
+
*
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
38
|
+
* import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
|
|
39
|
+
*
|
|
40
|
+
* const example = new bytepluscc.vpc.Ipv4Gateway("example", {
|
|
41
|
+
* ipv4GatewayName: "ccapi-ipv4-gw-full",
|
|
42
|
+
* description: "ccapi ipv4 gateway full case",
|
|
43
|
+
* vpcId: "vpc-xxxxx",
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* ## Import
|
|
48
|
+
*
|
|
49
|
+
* ```sh
|
|
50
|
+
* $ pulumi import bytepluscc:vpc/ipv4Gateway:Ipv4Gateway example "ipv4_gateway_id"
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
class Ipv4Gateway extends pulumi.CustomResource {
|
|
54
|
+
/**
|
|
55
|
+
* Get an existing Ipv4Gateway resource's state with the given name, ID, and optional extra
|
|
56
|
+
* properties used to qualify the lookup.
|
|
57
|
+
*
|
|
58
|
+
* @param name The _unique_ name of the resulting resource.
|
|
59
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
60
|
+
* @param state Any extra arguments used during the lookup.
|
|
61
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
62
|
+
*/
|
|
63
|
+
static get(name, id, state, opts) {
|
|
64
|
+
return new Ipv4Gateway(name, state, { ...opts, id: id });
|
|
65
|
+
}
|
|
66
|
+
/** @internal */
|
|
67
|
+
static __pulumiType = 'bytepluscc:vpc/ipv4Gateway:Ipv4Gateway';
|
|
68
|
+
/**
|
|
69
|
+
* Returns true if the given object is an instance of Ipv4Gateway. This is designed to work even
|
|
70
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
71
|
+
*/
|
|
72
|
+
static isInstance(obj) {
|
|
73
|
+
if (obj === undefined || obj === null) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return obj['__pulumiType'] === Ipv4Gateway.__pulumiType;
|
|
77
|
+
}
|
|
78
|
+
constructor(name, argsOrState, opts) {
|
|
79
|
+
let resourceInputs = {};
|
|
80
|
+
opts = opts || {};
|
|
81
|
+
if (opts.id) {
|
|
82
|
+
const state = argsOrState;
|
|
83
|
+
resourceInputs["accountId"] = state?.accountId;
|
|
84
|
+
resourceInputs["creationTime"] = state?.creationTime;
|
|
85
|
+
resourceInputs["description"] = state?.description;
|
|
86
|
+
resourceInputs["enabled"] = state?.enabled;
|
|
87
|
+
resourceInputs["ipv4GatewayId"] = state?.ipv4GatewayId;
|
|
88
|
+
resourceInputs["ipv4GatewayName"] = state?.ipv4GatewayName;
|
|
89
|
+
resourceInputs["routeTableId"] = state?.routeTableId;
|
|
90
|
+
resourceInputs["status"] = state?.status;
|
|
91
|
+
resourceInputs["updatedAt"] = state?.updatedAt;
|
|
92
|
+
resourceInputs["vpcId"] = state?.vpcId;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
const args = argsOrState;
|
|
96
|
+
resourceInputs["description"] = args?.description;
|
|
97
|
+
resourceInputs["enabled"] = args?.enabled;
|
|
98
|
+
resourceInputs["ipv4GatewayName"] = args?.ipv4GatewayName;
|
|
99
|
+
resourceInputs["vpcId"] = args?.vpcId;
|
|
100
|
+
resourceInputs["accountId"] = undefined /*out*/;
|
|
101
|
+
resourceInputs["creationTime"] = undefined /*out*/;
|
|
102
|
+
resourceInputs["ipv4GatewayId"] = undefined /*out*/;
|
|
103
|
+
resourceInputs["routeTableId"] = undefined /*out*/;
|
|
104
|
+
resourceInputs["status"] = undefined /*out*/;
|
|
105
|
+
resourceInputs["updatedAt"] = undefined /*out*/;
|
|
106
|
+
}
|
|
107
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
108
|
+
super(Ipv4Gateway.__pulumiType, name, resourceInputs, opts);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.Ipv4Gateway = Ipv4Gateway;
|
|
112
|
+
//# sourceMappingURL=ipv4Gateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "../types/input";
|
|
3
|
+
import * as outputs from "../types/output";
|
|
4
|
+
/**
|
|
5
|
+
* WAF custom block response rule. When block conditions are met, WAF returns a custom response code, page, or redirects to the specified URL according to this rule.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
|
|
12
|
+
*
|
|
13
|
+
* const example = new bytepluscc.waf.CustomPage("example", {
|
|
14
|
+
* clientIp: "ALL",
|
|
15
|
+
* description: "ccapi custom page required",
|
|
16
|
+
* host: "www.testwaf.com",
|
|
17
|
+
* name: "ccapi-custompage-required",
|
|
18
|
+
* pageMode: 0,
|
|
19
|
+
* policy: 8,
|
|
20
|
+
* url: "/ccapi-required",
|
|
21
|
+
* body: "blocked by ccapi required page",
|
|
22
|
+
* code: "403",
|
|
23
|
+
* contentType: "text/html",
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* ## Import
|
|
28
|
+
*
|
|
29
|
+
* ```sh
|
|
30
|
+
* $ pulumi import bytepluscc:waf/customPage:CustomPage example "host|rule_id"
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare class CustomPage extends pulumi.CustomResource {
|
|
34
|
+
/**
|
|
35
|
+
* Get an existing CustomPage resource's state with the given name, ID, and optional extra
|
|
36
|
+
* properties used to qualify the lookup.
|
|
37
|
+
*
|
|
38
|
+
* @param name The _unique_ name of the resulting resource.
|
|
39
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
40
|
+
* @param state Any extra arguments used during the lookup.
|
|
41
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
42
|
+
*/
|
|
43
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CustomPageState, opts?: pulumi.CustomResourceOptions): CustomPage;
|
|
44
|
+
/**
|
|
45
|
+
* Returns true if the given object is an instance of CustomPage. This is designed to work even
|
|
46
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
47
|
+
*/
|
|
48
|
+
static isInstance(obj: any): obj is CustomPage;
|
|
49
|
+
/**
|
|
50
|
+
* Advanced condition configuration. Only takes effect when Advanced=1.
|
|
51
|
+
*/
|
|
52
|
+
readonly accurate: pulumi.Output<outputs.waf.CustomPageAccurate>;
|
|
53
|
+
/**
|
|
54
|
+
* Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
|
|
55
|
+
*/
|
|
56
|
+
readonly advanced: pulumi.Output<number>;
|
|
57
|
+
/**
|
|
58
|
+
* Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
|
|
59
|
+
*/
|
|
60
|
+
readonly body: pulumi.Output<string>;
|
|
61
|
+
/**
|
|
62
|
+
* Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
|
|
63
|
+
*/
|
|
64
|
+
readonly clientIp: pulumi.Output<string>;
|
|
65
|
+
/**
|
|
66
|
+
* Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
|
|
67
|
+
*/
|
|
68
|
+
readonly code: pulumi.Output<string>;
|
|
69
|
+
/**
|
|
70
|
+
* Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
|
|
71
|
+
*/
|
|
72
|
+
readonly contentType: pulumi.Output<string>;
|
|
73
|
+
/**
|
|
74
|
+
* Rule description.
|
|
75
|
+
*/
|
|
76
|
+
readonly description: pulumi.Output<string>;
|
|
77
|
+
/**
|
|
78
|
+
* Rule switch. 0: Off; 1: On.
|
|
79
|
+
*/
|
|
80
|
+
readonly enable: pulumi.Output<number>;
|
|
81
|
+
/**
|
|
82
|
+
* Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
|
|
83
|
+
*/
|
|
84
|
+
readonly host: pulumi.Output<string>;
|
|
85
|
+
/**
|
|
86
|
+
* Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
|
|
87
|
+
*/
|
|
88
|
+
readonly name: pulumi.Output<string>;
|
|
89
|
+
/**
|
|
90
|
+
* Response page mode. 0: Custom response body; 2: Redirect URL.
|
|
91
|
+
*/
|
|
92
|
+
readonly pageMode: pulumi.Output<number>;
|
|
93
|
+
/**
|
|
94
|
+
* Associated protection policy. 1: Observe; 8: Block.
|
|
95
|
+
*/
|
|
96
|
+
readonly policy: pulumi.Output<number>;
|
|
97
|
+
/**
|
|
98
|
+
* Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
|
|
99
|
+
*/
|
|
100
|
+
readonly projectName: pulumi.Output<string>;
|
|
101
|
+
/**
|
|
102
|
+
* Redirect target URL. Only effective when PageMode=2.
|
|
103
|
+
*/
|
|
104
|
+
readonly redirectUrl: pulumi.Output<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Custom block response rule ID.
|
|
107
|
+
*/
|
|
108
|
+
readonly ruleId: pulumi.Output<string>;
|
|
109
|
+
/**
|
|
110
|
+
* Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
|
|
111
|
+
*/
|
|
112
|
+
readonly ruleTag: pulumi.Output<string>;
|
|
113
|
+
/**
|
|
114
|
+
* Last updated time of the rule.
|
|
115
|
+
*/
|
|
116
|
+
readonly updateTime: pulumi.Output<string>;
|
|
117
|
+
/**
|
|
118
|
+
* URL path where the rule takes effect.
|
|
119
|
+
*/
|
|
120
|
+
readonly url: pulumi.Output<string>;
|
|
121
|
+
/**
|
|
122
|
+
* Create a CustomPage resource with the given unique name, arguments, and options.
|
|
123
|
+
*
|
|
124
|
+
* @param name The _unique_ name of the resource.
|
|
125
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
126
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
127
|
+
*/
|
|
128
|
+
constructor(name: string, args: CustomPageArgs, opts?: pulumi.CustomResourceOptions);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Input properties used for looking up and filtering CustomPage resources.
|
|
132
|
+
*/
|
|
133
|
+
export interface CustomPageState {
|
|
134
|
+
/**
|
|
135
|
+
* Advanced condition configuration. Only takes effect when Advanced=1.
|
|
136
|
+
*/
|
|
137
|
+
accurate?: pulumi.Input<inputs.waf.CustomPageAccurate | undefined>;
|
|
138
|
+
/**
|
|
139
|
+
* Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
|
|
140
|
+
*/
|
|
141
|
+
advanced?: pulumi.Input<number | undefined>;
|
|
142
|
+
/**
|
|
143
|
+
* Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
|
|
144
|
+
*/
|
|
145
|
+
body?: pulumi.Input<string | undefined>;
|
|
146
|
+
/**
|
|
147
|
+
* Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
|
|
148
|
+
*/
|
|
149
|
+
clientIp?: pulumi.Input<string | undefined>;
|
|
150
|
+
/**
|
|
151
|
+
* Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
|
|
152
|
+
*/
|
|
153
|
+
code?: pulumi.Input<string | undefined>;
|
|
154
|
+
/**
|
|
155
|
+
* Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
|
|
156
|
+
*/
|
|
157
|
+
contentType?: pulumi.Input<string | undefined>;
|
|
158
|
+
/**
|
|
159
|
+
* Rule description.
|
|
160
|
+
*/
|
|
161
|
+
description?: pulumi.Input<string | undefined>;
|
|
162
|
+
/**
|
|
163
|
+
* Rule switch. 0: Off; 1: On.
|
|
164
|
+
*/
|
|
165
|
+
enable?: pulumi.Input<number | undefined>;
|
|
166
|
+
/**
|
|
167
|
+
* Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
|
|
168
|
+
*/
|
|
169
|
+
host?: pulumi.Input<string | undefined>;
|
|
170
|
+
/**
|
|
171
|
+
* Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
|
|
172
|
+
*/
|
|
173
|
+
name?: pulumi.Input<string | undefined>;
|
|
174
|
+
/**
|
|
175
|
+
* Response page mode. 0: Custom response body; 2: Redirect URL.
|
|
176
|
+
*/
|
|
177
|
+
pageMode?: pulumi.Input<number | undefined>;
|
|
178
|
+
/**
|
|
179
|
+
* Associated protection policy. 1: Observe; 8: Block.
|
|
180
|
+
*/
|
|
181
|
+
policy?: pulumi.Input<number | undefined>;
|
|
182
|
+
/**
|
|
183
|
+
* Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
|
|
184
|
+
*/
|
|
185
|
+
projectName?: pulumi.Input<string | undefined>;
|
|
186
|
+
/**
|
|
187
|
+
* Redirect target URL. Only effective when PageMode=2.
|
|
188
|
+
*/
|
|
189
|
+
redirectUrl?: pulumi.Input<string | undefined>;
|
|
190
|
+
/**
|
|
191
|
+
* Custom block response rule ID.
|
|
192
|
+
*/
|
|
193
|
+
ruleId?: pulumi.Input<string | undefined>;
|
|
194
|
+
/**
|
|
195
|
+
* Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
|
|
196
|
+
*/
|
|
197
|
+
ruleTag?: pulumi.Input<string | undefined>;
|
|
198
|
+
/**
|
|
199
|
+
* Last updated time of the rule.
|
|
200
|
+
*/
|
|
201
|
+
updateTime?: pulumi.Input<string | undefined>;
|
|
202
|
+
/**
|
|
203
|
+
* URL path where the rule takes effect.
|
|
204
|
+
*/
|
|
205
|
+
url?: pulumi.Input<string | undefined>;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* The set of arguments for constructing a CustomPage resource.
|
|
209
|
+
*/
|
|
210
|
+
export interface CustomPageArgs {
|
|
211
|
+
/**
|
|
212
|
+
* Advanced condition configuration. Only takes effect when Advanced=1.
|
|
213
|
+
*/
|
|
214
|
+
accurate?: pulumi.Input<inputs.waf.CustomPageAccurate | undefined>;
|
|
215
|
+
/**
|
|
216
|
+
* Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
|
|
217
|
+
*/
|
|
218
|
+
advanced?: pulumi.Input<number | undefined>;
|
|
219
|
+
/**
|
|
220
|
+
* Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
|
|
221
|
+
*/
|
|
222
|
+
body?: pulumi.Input<string | undefined>;
|
|
223
|
+
/**
|
|
224
|
+
* Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
|
|
225
|
+
*/
|
|
226
|
+
clientIp: pulumi.Input<string>;
|
|
227
|
+
/**
|
|
228
|
+
* Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
|
|
229
|
+
*/
|
|
230
|
+
code?: pulumi.Input<string | undefined>;
|
|
231
|
+
/**
|
|
232
|
+
* Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
|
|
233
|
+
*/
|
|
234
|
+
contentType?: pulumi.Input<string | undefined>;
|
|
235
|
+
/**
|
|
236
|
+
* Rule description.
|
|
237
|
+
*/
|
|
238
|
+
description: pulumi.Input<string>;
|
|
239
|
+
/**
|
|
240
|
+
* Rule switch. 0: Off; 1: On.
|
|
241
|
+
*/
|
|
242
|
+
enable?: pulumi.Input<number | undefined>;
|
|
243
|
+
/**
|
|
244
|
+
* Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
|
|
245
|
+
*/
|
|
246
|
+
host: pulumi.Input<string>;
|
|
247
|
+
/**
|
|
248
|
+
* Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
|
|
249
|
+
*/
|
|
250
|
+
name: pulumi.Input<string>;
|
|
251
|
+
/**
|
|
252
|
+
* Response page mode. 0: Custom response body; 2: Redirect URL.
|
|
253
|
+
*/
|
|
254
|
+
pageMode: pulumi.Input<number>;
|
|
255
|
+
/**
|
|
256
|
+
* Associated protection policy. 1: Observe; 8: Block.
|
|
257
|
+
*/
|
|
258
|
+
policy: pulumi.Input<number>;
|
|
259
|
+
/**
|
|
260
|
+
* Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
|
|
261
|
+
*/
|
|
262
|
+
projectName?: pulumi.Input<string | undefined>;
|
|
263
|
+
/**
|
|
264
|
+
* Redirect target URL. Only effective when PageMode=2.
|
|
265
|
+
*/
|
|
266
|
+
redirectUrl?: pulumi.Input<string | undefined>;
|
|
267
|
+
/**
|
|
268
|
+
* URL path where the rule takes effect.
|
|
269
|
+
*/
|
|
270
|
+
url: pulumi.Input<string>;
|
|
271
|
+
}
|
|
272
|
+
//# sourceMappingURL=customPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customPage.d.ts","sourceRoot":"","sources":["../../waf/customPage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,UAAW,SAAQ,MAAM,CAAC,cAAc;IACjD;;;;;;;;OAQG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,UAAU;IAOtI;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,UAAU;IAOrD;;OAEG;IACH,SAAwB,QA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G;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC1C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAC7B"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.CustomPage = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* WAF custom block response rule. When block conditions are met, WAF returns a custom response code, page, or redirects to the specified URL according to this rule.
|
|
33
|
+
*
|
|
34
|
+
* ## Example Usage
|
|
35
|
+
*
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
38
|
+
* import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
|
|
39
|
+
*
|
|
40
|
+
* const example = new bytepluscc.waf.CustomPage("example", {
|
|
41
|
+
* clientIp: "ALL",
|
|
42
|
+
* description: "ccapi custom page required",
|
|
43
|
+
* host: "www.testwaf.com",
|
|
44
|
+
* name: "ccapi-custompage-required",
|
|
45
|
+
* pageMode: 0,
|
|
46
|
+
* policy: 8,
|
|
47
|
+
* url: "/ccapi-required",
|
|
48
|
+
* body: "blocked by ccapi required page",
|
|
49
|
+
* code: "403",
|
|
50
|
+
* contentType: "text/html",
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* ## Import
|
|
55
|
+
*
|
|
56
|
+
* ```sh
|
|
57
|
+
* $ pulumi import bytepluscc:waf/customPage:CustomPage example "host|rule_id"
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
class CustomPage extends pulumi.CustomResource {
|
|
61
|
+
/**
|
|
62
|
+
* Get an existing CustomPage resource's state with the given name, ID, and optional extra
|
|
63
|
+
* properties used to qualify the lookup.
|
|
64
|
+
*
|
|
65
|
+
* @param name The _unique_ name of the resulting resource.
|
|
66
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
67
|
+
* @param state Any extra arguments used during the lookup.
|
|
68
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
69
|
+
*/
|
|
70
|
+
static get(name, id, state, opts) {
|
|
71
|
+
return new CustomPage(name, state, { ...opts, id: id });
|
|
72
|
+
}
|
|
73
|
+
/** @internal */
|
|
74
|
+
static __pulumiType = 'bytepluscc:waf/customPage:CustomPage';
|
|
75
|
+
/**
|
|
76
|
+
* Returns true if the given object is an instance of CustomPage. This is designed to work even
|
|
77
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
78
|
+
*/
|
|
79
|
+
static isInstance(obj) {
|
|
80
|
+
if (obj === undefined || obj === null) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
return obj['__pulumiType'] === CustomPage.__pulumiType;
|
|
84
|
+
}
|
|
85
|
+
constructor(name, argsOrState, opts) {
|
|
86
|
+
let resourceInputs = {};
|
|
87
|
+
opts = opts || {};
|
|
88
|
+
if (opts.id) {
|
|
89
|
+
const state = argsOrState;
|
|
90
|
+
resourceInputs["accurate"] = state?.accurate;
|
|
91
|
+
resourceInputs["advanced"] = state?.advanced;
|
|
92
|
+
resourceInputs["body"] = state?.body;
|
|
93
|
+
resourceInputs["clientIp"] = state?.clientIp;
|
|
94
|
+
resourceInputs["code"] = state?.code;
|
|
95
|
+
resourceInputs["contentType"] = state?.contentType;
|
|
96
|
+
resourceInputs["description"] = state?.description;
|
|
97
|
+
resourceInputs["enable"] = state?.enable;
|
|
98
|
+
resourceInputs["host"] = state?.host;
|
|
99
|
+
resourceInputs["name"] = state?.name;
|
|
100
|
+
resourceInputs["pageMode"] = state?.pageMode;
|
|
101
|
+
resourceInputs["policy"] = state?.policy;
|
|
102
|
+
resourceInputs["projectName"] = state?.projectName;
|
|
103
|
+
resourceInputs["redirectUrl"] = state?.redirectUrl;
|
|
104
|
+
resourceInputs["ruleId"] = state?.ruleId;
|
|
105
|
+
resourceInputs["ruleTag"] = state?.ruleTag;
|
|
106
|
+
resourceInputs["updateTime"] = state?.updateTime;
|
|
107
|
+
resourceInputs["url"] = state?.url;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
const args = argsOrState;
|
|
111
|
+
if (args?.clientIp === undefined && !opts.urn) {
|
|
112
|
+
throw new Error("Missing required property 'clientIp'");
|
|
113
|
+
}
|
|
114
|
+
if (args?.description === undefined && !opts.urn) {
|
|
115
|
+
throw new Error("Missing required property 'description'");
|
|
116
|
+
}
|
|
117
|
+
if (args?.host === undefined && !opts.urn) {
|
|
118
|
+
throw new Error("Missing required property 'host'");
|
|
119
|
+
}
|
|
120
|
+
if (args?.name === undefined && !opts.urn) {
|
|
121
|
+
throw new Error("Missing required property 'name'");
|
|
122
|
+
}
|
|
123
|
+
if (args?.pageMode === undefined && !opts.urn) {
|
|
124
|
+
throw new Error("Missing required property 'pageMode'");
|
|
125
|
+
}
|
|
126
|
+
if (args?.policy === undefined && !opts.urn) {
|
|
127
|
+
throw new Error("Missing required property 'policy'");
|
|
128
|
+
}
|
|
129
|
+
if (args?.url === undefined && !opts.urn) {
|
|
130
|
+
throw new Error("Missing required property 'url'");
|
|
131
|
+
}
|
|
132
|
+
resourceInputs["accurate"] = args?.accurate;
|
|
133
|
+
resourceInputs["advanced"] = args?.advanced;
|
|
134
|
+
resourceInputs["body"] = args?.body;
|
|
135
|
+
resourceInputs["clientIp"] = args?.clientIp;
|
|
136
|
+
resourceInputs["code"] = args?.code;
|
|
137
|
+
resourceInputs["contentType"] = args?.contentType;
|
|
138
|
+
resourceInputs["description"] = args?.description;
|
|
139
|
+
resourceInputs["enable"] = args?.enable;
|
|
140
|
+
resourceInputs["host"] = args?.host;
|
|
141
|
+
resourceInputs["name"] = args?.name;
|
|
142
|
+
resourceInputs["pageMode"] = args?.pageMode;
|
|
143
|
+
resourceInputs["policy"] = args?.policy;
|
|
144
|
+
resourceInputs["projectName"] = args?.projectName;
|
|
145
|
+
resourceInputs["redirectUrl"] = args?.redirectUrl;
|
|
146
|
+
resourceInputs["url"] = args?.url;
|
|
147
|
+
resourceInputs["ruleId"] = undefined /*out*/;
|
|
148
|
+
resourceInputs["ruleTag"] = undefined /*out*/;
|
|
149
|
+
resourceInputs["updateTime"] = undefined /*out*/;
|
|
150
|
+
}
|
|
151
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
152
|
+
super(CustomPage.__pulumiType, name, resourceInputs, opts);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
exports.CustomPage = CustomPage;
|
|
156
|
+
//# sourceMappingURL=customPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customPage.js","sourceRoot":"","sources":["../../waf/customPage.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,wDAA0C;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,cAAc;IACjD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAuB,EAAE,IAAmC;QAC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S,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC9C,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACpD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,UAAU,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC/D,CAAC;;AAhLL,gCAiLC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as outputs from "../types/output";
|
|
3
|
+
/**
|
|
4
|
+
* Data Source schema for Byteplus::WAF::CustomPage
|
|
5
|
+
*/
|
|
6
|
+
export declare function getCustomPage(args: GetCustomPageArgs, opts?: pulumi.InvokeOptions): Promise<GetCustomPageResult>;
|
|
7
|
+
/**
|
|
8
|
+
* A collection of arguments for invoking getCustomPage.
|
|
9
|
+
*/
|
|
10
|
+
export interface GetCustomPageArgs {
|
|
11
|
+
/**
|
|
12
|
+
* Uniquely identifies the resource.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A collection of values returned by getCustomPage.
|
|
18
|
+
*/
|
|
19
|
+
export interface GetCustomPageResult {
|
|
20
|
+
/**
|
|
21
|
+
* Advanced condition configuration. Only takes effect when Advanced=1.
|
|
22
|
+
*/
|
|
23
|
+
readonly accurate: outputs.waf.GetCustomPageAccurate;
|
|
24
|
+
/**
|
|
25
|
+
* Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
|
|
26
|
+
*/
|
|
27
|
+
readonly advanced: number;
|
|
28
|
+
/**
|
|
29
|
+
* Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
|
|
30
|
+
*/
|
|
31
|
+
readonly body: string;
|
|
32
|
+
/**
|
|
33
|
+
* Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
|
|
34
|
+
*/
|
|
35
|
+
readonly clientIp: string;
|
|
36
|
+
/**
|
|
37
|
+
* Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
|
|
38
|
+
*/
|
|
39
|
+
readonly code: string;
|
|
40
|
+
/**
|
|
41
|
+
* Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
|
|
42
|
+
*/
|
|
43
|
+
readonly contentType: string;
|
|
44
|
+
/**
|
|
45
|
+
* Rule description.
|
|
46
|
+
*/
|
|
47
|
+
readonly description: string;
|
|
48
|
+
/**
|
|
49
|
+
* Rule switch. 0: Off; 1: On.
|
|
50
|
+
*/
|
|
51
|
+
readonly enable: number;
|
|
52
|
+
/**
|
|
53
|
+
* Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
|
|
54
|
+
*/
|
|
55
|
+
readonly host: string;
|
|
56
|
+
/**
|
|
57
|
+
* Uniquely identifies the resource.
|
|
58
|
+
*/
|
|
59
|
+
readonly id: string;
|
|
60
|
+
/**
|
|
61
|
+
* Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
|
|
62
|
+
*/
|
|
63
|
+
readonly name: string;
|
|
64
|
+
/**
|
|
65
|
+
* Response page mode. 0: Custom response body; 2: Redirect URL.
|
|
66
|
+
*/
|
|
67
|
+
readonly pageMode: number;
|
|
68
|
+
/**
|
|
69
|
+
* Associated protection policy. 1: Observe; 8: Block.
|
|
70
|
+
*/
|
|
71
|
+
readonly policy: number;
|
|
72
|
+
/**
|
|
73
|
+
* Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
|
|
74
|
+
*/
|
|
75
|
+
readonly projectName: string;
|
|
76
|
+
/**
|
|
77
|
+
* Redirect target URL. Only effective when PageMode=2.
|
|
78
|
+
*/
|
|
79
|
+
readonly redirectUrl: string;
|
|
80
|
+
/**
|
|
81
|
+
* Custom block response rule ID.
|
|
82
|
+
*/
|
|
83
|
+
readonly ruleId: string;
|
|
84
|
+
/**
|
|
85
|
+
* Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
|
|
86
|
+
*/
|
|
87
|
+
readonly ruleTag: string;
|
|
88
|
+
/**
|
|
89
|
+
* Last updated time of the rule.
|
|
90
|
+
*/
|
|
91
|
+
readonly updateTime: string;
|
|
92
|
+
/**
|
|
93
|
+
* URL path where the rule takes effect.
|
|
94
|
+
*/
|
|
95
|
+
readonly url: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Data Source schema for Byteplus::WAF::CustomPage
|
|
99
|
+
*/
|
|
100
|
+
export declare function getCustomPageOutput(args: GetCustomPageOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCustomPageResult>;
|
|
101
|
+
/**
|
|
102
|
+
* A collection of arguments for invoking getCustomPage.
|
|
103
|
+
*/
|
|
104
|
+
export interface GetCustomPageOutputArgs {
|
|
105
|
+
/**
|
|
106
|
+
* Uniquely identifies the resource.
|
|
107
|
+
*/
|
|
108
|
+
id: pulumi.Input<string>;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=getCustomPage.d.ts.map
|