pulumi-gcp 7.20.0a1713986537__py3-none-any.whl → 7.21.0__py3-none-any.whl
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.
- pulumi_gcp/__init__.py +40 -0
- pulumi_gcp/alloydb/_inputs.py +74 -0
- pulumi_gcp/alloydb/backup.py +0 -12
- pulumi_gcp/alloydb/cluster.py +0 -12
- pulumi_gcp/alloydb/instance.py +90 -81
- pulumi_gcp/alloydb/outputs.py +98 -0
- pulumi_gcp/apigee/environment.py +47 -0
- pulumi_gcp/apigee/sharedflow.py +0 -20
- pulumi_gcp/appengine/flexible_app_version.py +0 -20
- pulumi_gcp/applicationintegration/__init__.py +1 -0
- pulumi_gcp/applicationintegration/_inputs.py +843 -0
- pulumi_gcp/applicationintegration/auth_config.py +998 -0
- pulumi_gcp/applicationintegration/outputs.py +891 -0
- pulumi_gcp/bigquerydatapolicy/_inputs.py +21 -4
- pulumi_gcp/bigquerydatapolicy/data_policy.py +78 -0
- pulumi_gcp/bigquerydatapolicy/outputs.py +16 -3
- pulumi_gcp/certificateauthority/_inputs.py +92 -12
- pulumi_gcp/certificateauthority/authority.py +117 -27
- pulumi_gcp/certificateauthority/certificate.py +176 -0
- pulumi_gcp/certificateauthority/outputs.py +144 -12
- pulumi_gcp/cloudbuild/worker_pool.py +0 -12
- pulumi_gcp/cloudbuildv2/connection.py +0 -12
- pulumi_gcp/cloudbuildv2/repository.py +0 -12
- pulumi_gcp/clouddeploy/automation.py +0 -12
- pulumi_gcp/clouddeploy/custom_target_type.py +0 -12
- pulumi_gcp/clouddeploy/delivery_pipeline.py +0 -12
- pulumi_gcp/clouddeploy/target.py +0 -12
- pulumi_gcp/cloudrunv2/job.py +0 -12
- pulumi_gcp/cloudrunv2/service.py +0 -12
- pulumi_gcp/composer/__init__.py +1 -0
- pulumi_gcp/composer/environment.py +35 -47
- pulumi_gcp/composer/user_workloads_secret.py +441 -0
- pulumi_gcp/compute/__init__.py +1 -0
- pulumi_gcp/compute/_inputs.py +121 -58
- pulumi_gcp/compute/forwarding_rule.py +0 -13
- pulumi_gcp/compute/global_address.py +0 -12
- pulumi_gcp/compute/global_forwarding_rule.py +0 -282
- pulumi_gcp/compute/instance_from_machine_image.py +14 -46
- pulumi_gcp/compute/instance_from_template.py +14 -46
- pulumi_gcp/compute/outputs.py +120 -65
- pulumi_gcp/compute/region_instance_template.py +0 -13
- pulumi_gcp/compute/region_target_https_proxy.py +257 -0
- pulumi_gcp/compute/region_url_map.py +0 -470
- pulumi_gcp/compute/security_policy_rule.py +850 -0
- pulumi_gcp/container/attached_cluster.py +0 -12
- pulumi_gcp/container/aws_cluster.py +0 -12
- pulumi_gcp/container/aws_node_pool.py +0 -12
- pulumi_gcp/container/azure_cluster.py +0 -12
- pulumi_gcp/container/azure_node_pool.py +0 -12
- pulumi_gcp/container/cluster.py +0 -20
- pulumi_gcp/dataflow/flex_template_job.py +0 -39
- pulumi_gcp/dataloss/__init__.py +1 -0
- pulumi_gcp/dataloss/_inputs.py +1040 -0
- pulumi_gcp/dataloss/outputs.py +1123 -0
- pulumi_gcp/dataloss/prevention_discovery_config.py +737 -0
- pulumi_gcp/dataproc/cluster.py +0 -20
- pulumi_gcp/dataproc/workflow_template.py +21 -26
- pulumi_gcp/deploymentmanager/deployment.py +0 -34
- pulumi_gcp/dns/_inputs.py +2 -2
- pulumi_gcp/dns/outputs.py +2 -2
- pulumi_gcp/dns/record_set.py +2 -36
- pulumi_gcp/filestore/get_instance.py +11 -1
- pulumi_gcp/filestore/instance.py +101 -0
- pulumi_gcp/firebase/_inputs.py +16 -0
- pulumi_gcp/firebase/android_app.py +0 -27
- pulumi_gcp/firebase/app_check_play_integrity_config.py +20 -0
- pulumi_gcp/firebase/app_check_recaptcha_enterprise_config.py +10 -0
- pulumi_gcp/firebase/app_check_service_config.py +0 -125
- pulumi_gcp/firebase/apple_app.py +0 -27
- pulumi_gcp/firebase/hosting_custom_domain.py +0 -27
- pulumi_gcp/firebase/hosting_version.py +44 -0
- pulumi_gcp/firebase/outputs.py +12 -0
- pulumi_gcp/firebase/web_app.py +0 -20
- pulumi_gcp/firestore/database.py +0 -68
- pulumi_gcp/gkeonprem/bare_metal_admin_cluster.py +0 -12
- pulumi_gcp/gkeonprem/bare_metal_cluster.py +0 -12
- pulumi_gcp/gkeonprem/bare_metal_node_pool.py +0 -12
- pulumi_gcp/gkeonprem/v_mware_cluster.py +0 -12
- pulumi_gcp/gkeonprem/v_mware_node_pool.py +0 -12
- pulumi_gcp/logging/folder_sink.py +54 -0
- pulumi_gcp/logging/organization_sink.py +54 -0
- pulumi_gcp/monitoring/_inputs.py +46 -2
- pulumi_gcp/monitoring/outputs.py +40 -2
- pulumi_gcp/monitoring/uptime_check_config.py +6 -0
- pulumi_gcp/netapp/active_directory.py +0 -20
- pulumi_gcp/netapp/volume_replication.py +0 -68
- pulumi_gcp/networkconnectivity/__init__.py +1 -0
- pulumi_gcp/networkconnectivity/internal_range.py +1024 -0
- pulumi_gcp/provider.py +3 -1
- pulumi_gcp/secretmanager/get_secret.py +13 -3
- pulumi_gcp/secretmanager/outputs.py +20 -1
- pulumi_gcp/secretmanager/secret.py +90 -15
- pulumi_gcp/servicenetworking/connection.py +0 -20
- pulumi_gcp/spanner/database.py +0 -41
- pulumi_gcp/spanner/instance.py +0 -40
- pulumi_gcp/storage/__init__.py +1 -0
- pulumi_gcp/storage/bucket.py +0 -12
- pulumi_gcp/storage/get_bucket_objects.py +153 -0
- pulumi_gcp/storage/outputs.py +63 -0
- pulumi_gcp/workstations/workstation.py +0 -12
- pulumi_gcp/workstations/workstation_cluster.py +0 -12
- pulumi_gcp/workstations/workstation_config.py +0 -12
- {pulumi_gcp-7.20.0a1713986537.dist-info → pulumi_gcp-7.21.0.dist-info}/METADATA +1 -1
- {pulumi_gcp-7.20.0a1713986537.dist-info → pulumi_gcp-7.21.0.dist-info}/RECORD +106 -100
- {pulumi_gcp-7.20.0a1713986537.dist-info → pulumi_gcp-7.21.0.dist-info}/WHEEL +0 -0
- {pulumi_gcp-7.20.0a1713986537.dist-info → pulumi_gcp-7.21.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,850 @@
|
|
1
|
+
# coding=utf-8
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
4
|
+
|
5
|
+
import copy
|
6
|
+
import warnings
|
7
|
+
import pulumi
|
8
|
+
import pulumi.runtime
|
9
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
10
|
+
from .. import _utilities
|
11
|
+
from . import outputs
|
12
|
+
from ._inputs import *
|
13
|
+
|
14
|
+
__all__ = ['SecurityPolicyRuleInitArgs', 'SecurityPolicyRule']
|
15
|
+
|
16
|
+
@pulumi.input_type
|
17
|
+
class SecurityPolicyRuleInitArgs:
|
18
|
+
def __init__(__self__, *,
|
19
|
+
action: pulumi.Input[str],
|
20
|
+
priority: pulumi.Input[int],
|
21
|
+
security_policy: pulumi.Input[str],
|
22
|
+
description: Optional[pulumi.Input[str]] = None,
|
23
|
+
match: Optional[pulumi.Input['SecurityPolicyRuleMatchArgs']] = None,
|
24
|
+
preconfigured_waf_config: Optional[pulumi.Input['SecurityPolicyRulePreconfiguredWafConfigArgs']] = None,
|
25
|
+
preview: Optional[pulumi.Input[bool]] = None,
|
26
|
+
project: Optional[pulumi.Input[str]] = None):
|
27
|
+
"""
|
28
|
+
The set of arguments for constructing a SecurityPolicyRule resource.
|
29
|
+
:param pulumi.Input[str] action: The Action to perform when the rule is matched. The following are the valid actions:
|
30
|
+
* allow: allow access to target.
|
31
|
+
* deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
|
32
|
+
* rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
|
33
|
+
* redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
|
34
|
+
* throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
|
35
|
+
:param pulumi.Input[int] priority: An integer indicating the priority of a rule in the list.
|
36
|
+
The priority must be a positive value between 0 and 2147483647.
|
37
|
+
Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
|
38
|
+
:param pulumi.Input[str] security_policy: The name of the security policy this rule belongs to.
|
39
|
+
|
40
|
+
|
41
|
+
- - -
|
42
|
+
:param pulumi.Input[str] description: An optional description of this resource. Provide this property when you create the resource.
|
43
|
+
:param pulumi.Input['SecurityPolicyRuleMatchArgs'] match: A match condition that incoming traffic is evaluated against.
|
44
|
+
If it evaluates to true, the corresponding 'action' is enforced.
|
45
|
+
Structure is documented below.
|
46
|
+
:param pulumi.Input['SecurityPolicyRulePreconfiguredWafConfigArgs'] preconfigured_waf_config: Preconfigured WAF configuration to be applied for the rule.
|
47
|
+
If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
|
48
|
+
Structure is documented below.
|
49
|
+
:param pulumi.Input[bool] preview: If set to true, the specified action is not enforced.
|
50
|
+
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
|
51
|
+
If it is not provided, the provider project is used.
|
52
|
+
"""
|
53
|
+
pulumi.set(__self__, "action", action)
|
54
|
+
pulumi.set(__self__, "priority", priority)
|
55
|
+
pulumi.set(__self__, "security_policy", security_policy)
|
56
|
+
if description is not None:
|
57
|
+
pulumi.set(__self__, "description", description)
|
58
|
+
if match is not None:
|
59
|
+
pulumi.set(__self__, "match", match)
|
60
|
+
if preconfigured_waf_config is not None:
|
61
|
+
pulumi.set(__self__, "preconfigured_waf_config", preconfigured_waf_config)
|
62
|
+
if preview is not None:
|
63
|
+
pulumi.set(__self__, "preview", preview)
|
64
|
+
if project is not None:
|
65
|
+
pulumi.set(__self__, "project", project)
|
66
|
+
|
67
|
+
@property
|
68
|
+
@pulumi.getter
|
69
|
+
def action(self) -> pulumi.Input[str]:
|
70
|
+
"""
|
71
|
+
The Action to perform when the rule is matched. The following are the valid actions:
|
72
|
+
* allow: allow access to target.
|
73
|
+
* deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
|
74
|
+
* rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
|
75
|
+
* redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
|
76
|
+
* throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
|
77
|
+
"""
|
78
|
+
return pulumi.get(self, "action")
|
79
|
+
|
80
|
+
@action.setter
|
81
|
+
def action(self, value: pulumi.Input[str]):
|
82
|
+
pulumi.set(self, "action", value)
|
83
|
+
|
84
|
+
@property
|
85
|
+
@pulumi.getter
|
86
|
+
def priority(self) -> pulumi.Input[int]:
|
87
|
+
"""
|
88
|
+
An integer indicating the priority of a rule in the list.
|
89
|
+
The priority must be a positive value between 0 and 2147483647.
|
90
|
+
Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
|
91
|
+
"""
|
92
|
+
return pulumi.get(self, "priority")
|
93
|
+
|
94
|
+
@priority.setter
|
95
|
+
def priority(self, value: pulumi.Input[int]):
|
96
|
+
pulumi.set(self, "priority", value)
|
97
|
+
|
98
|
+
@property
|
99
|
+
@pulumi.getter(name="securityPolicy")
|
100
|
+
def security_policy(self) -> pulumi.Input[str]:
|
101
|
+
"""
|
102
|
+
The name of the security policy this rule belongs to.
|
103
|
+
|
104
|
+
|
105
|
+
- - -
|
106
|
+
"""
|
107
|
+
return pulumi.get(self, "security_policy")
|
108
|
+
|
109
|
+
@security_policy.setter
|
110
|
+
def security_policy(self, value: pulumi.Input[str]):
|
111
|
+
pulumi.set(self, "security_policy", value)
|
112
|
+
|
113
|
+
@property
|
114
|
+
@pulumi.getter
|
115
|
+
def description(self) -> Optional[pulumi.Input[str]]:
|
116
|
+
"""
|
117
|
+
An optional description of this resource. Provide this property when you create the resource.
|
118
|
+
"""
|
119
|
+
return pulumi.get(self, "description")
|
120
|
+
|
121
|
+
@description.setter
|
122
|
+
def description(self, value: Optional[pulumi.Input[str]]):
|
123
|
+
pulumi.set(self, "description", value)
|
124
|
+
|
125
|
+
@property
|
126
|
+
@pulumi.getter
|
127
|
+
def match(self) -> Optional[pulumi.Input['SecurityPolicyRuleMatchArgs']]:
|
128
|
+
"""
|
129
|
+
A match condition that incoming traffic is evaluated against.
|
130
|
+
If it evaluates to true, the corresponding 'action' is enforced.
|
131
|
+
Structure is documented below.
|
132
|
+
"""
|
133
|
+
return pulumi.get(self, "match")
|
134
|
+
|
135
|
+
@match.setter
|
136
|
+
def match(self, value: Optional[pulumi.Input['SecurityPolicyRuleMatchArgs']]):
|
137
|
+
pulumi.set(self, "match", value)
|
138
|
+
|
139
|
+
@property
|
140
|
+
@pulumi.getter(name="preconfiguredWafConfig")
|
141
|
+
def preconfigured_waf_config(self) -> Optional[pulumi.Input['SecurityPolicyRulePreconfiguredWafConfigArgs']]:
|
142
|
+
"""
|
143
|
+
Preconfigured WAF configuration to be applied for the rule.
|
144
|
+
If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
|
145
|
+
Structure is documented below.
|
146
|
+
"""
|
147
|
+
return pulumi.get(self, "preconfigured_waf_config")
|
148
|
+
|
149
|
+
@preconfigured_waf_config.setter
|
150
|
+
def preconfigured_waf_config(self, value: Optional[pulumi.Input['SecurityPolicyRulePreconfiguredWafConfigArgs']]):
|
151
|
+
pulumi.set(self, "preconfigured_waf_config", value)
|
152
|
+
|
153
|
+
@property
|
154
|
+
@pulumi.getter
|
155
|
+
def preview(self) -> Optional[pulumi.Input[bool]]:
|
156
|
+
"""
|
157
|
+
If set to true, the specified action is not enforced.
|
158
|
+
"""
|
159
|
+
return pulumi.get(self, "preview")
|
160
|
+
|
161
|
+
@preview.setter
|
162
|
+
def preview(self, value: Optional[pulumi.Input[bool]]):
|
163
|
+
pulumi.set(self, "preview", value)
|
164
|
+
|
165
|
+
@property
|
166
|
+
@pulumi.getter
|
167
|
+
def project(self) -> Optional[pulumi.Input[str]]:
|
168
|
+
"""
|
169
|
+
The ID of the project in which the resource belongs.
|
170
|
+
If it is not provided, the provider project is used.
|
171
|
+
"""
|
172
|
+
return pulumi.get(self, "project")
|
173
|
+
|
174
|
+
@project.setter
|
175
|
+
def project(self, value: Optional[pulumi.Input[str]]):
|
176
|
+
pulumi.set(self, "project", value)
|
177
|
+
|
178
|
+
|
179
|
+
@pulumi.input_type
|
180
|
+
class _SecurityPolicyRuleState:
|
181
|
+
def __init__(__self__, *,
|
182
|
+
action: Optional[pulumi.Input[str]] = None,
|
183
|
+
description: Optional[pulumi.Input[str]] = None,
|
184
|
+
match: Optional[pulumi.Input['SecurityPolicyRuleMatchArgs']] = None,
|
185
|
+
preconfigured_waf_config: Optional[pulumi.Input['SecurityPolicyRulePreconfiguredWafConfigArgs']] = None,
|
186
|
+
preview: Optional[pulumi.Input[bool]] = None,
|
187
|
+
priority: Optional[pulumi.Input[int]] = None,
|
188
|
+
project: Optional[pulumi.Input[str]] = None,
|
189
|
+
security_policy: Optional[pulumi.Input[str]] = None):
|
190
|
+
"""
|
191
|
+
Input properties used for looking up and filtering SecurityPolicyRule resources.
|
192
|
+
:param pulumi.Input[str] action: The Action to perform when the rule is matched. The following are the valid actions:
|
193
|
+
* allow: allow access to target.
|
194
|
+
* deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
|
195
|
+
* rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
|
196
|
+
* redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
|
197
|
+
* throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
|
198
|
+
:param pulumi.Input[str] description: An optional description of this resource. Provide this property when you create the resource.
|
199
|
+
:param pulumi.Input['SecurityPolicyRuleMatchArgs'] match: A match condition that incoming traffic is evaluated against.
|
200
|
+
If it evaluates to true, the corresponding 'action' is enforced.
|
201
|
+
Structure is documented below.
|
202
|
+
:param pulumi.Input['SecurityPolicyRulePreconfiguredWafConfigArgs'] preconfigured_waf_config: Preconfigured WAF configuration to be applied for the rule.
|
203
|
+
If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
|
204
|
+
Structure is documented below.
|
205
|
+
:param pulumi.Input[bool] preview: If set to true, the specified action is not enforced.
|
206
|
+
:param pulumi.Input[int] priority: An integer indicating the priority of a rule in the list.
|
207
|
+
The priority must be a positive value between 0 and 2147483647.
|
208
|
+
Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
|
209
|
+
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
|
210
|
+
If it is not provided, the provider project is used.
|
211
|
+
:param pulumi.Input[str] security_policy: The name of the security policy this rule belongs to.
|
212
|
+
|
213
|
+
|
214
|
+
- - -
|
215
|
+
"""
|
216
|
+
if action is not None:
|
217
|
+
pulumi.set(__self__, "action", action)
|
218
|
+
if description is not None:
|
219
|
+
pulumi.set(__self__, "description", description)
|
220
|
+
if match is not None:
|
221
|
+
pulumi.set(__self__, "match", match)
|
222
|
+
if preconfigured_waf_config is not None:
|
223
|
+
pulumi.set(__self__, "preconfigured_waf_config", preconfigured_waf_config)
|
224
|
+
if preview is not None:
|
225
|
+
pulumi.set(__self__, "preview", preview)
|
226
|
+
if priority is not None:
|
227
|
+
pulumi.set(__self__, "priority", priority)
|
228
|
+
if project is not None:
|
229
|
+
pulumi.set(__self__, "project", project)
|
230
|
+
if security_policy is not None:
|
231
|
+
pulumi.set(__self__, "security_policy", security_policy)
|
232
|
+
|
233
|
+
@property
|
234
|
+
@pulumi.getter
|
235
|
+
def action(self) -> Optional[pulumi.Input[str]]:
|
236
|
+
"""
|
237
|
+
The Action to perform when the rule is matched. The following are the valid actions:
|
238
|
+
* allow: allow access to target.
|
239
|
+
* deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
|
240
|
+
* rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
|
241
|
+
* redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
|
242
|
+
* throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
|
243
|
+
"""
|
244
|
+
return pulumi.get(self, "action")
|
245
|
+
|
246
|
+
@action.setter
|
247
|
+
def action(self, value: Optional[pulumi.Input[str]]):
|
248
|
+
pulumi.set(self, "action", value)
|
249
|
+
|
250
|
+
@property
|
251
|
+
@pulumi.getter
|
252
|
+
def description(self) -> Optional[pulumi.Input[str]]:
|
253
|
+
"""
|
254
|
+
An optional description of this resource. Provide this property when you create the resource.
|
255
|
+
"""
|
256
|
+
return pulumi.get(self, "description")
|
257
|
+
|
258
|
+
@description.setter
|
259
|
+
def description(self, value: Optional[pulumi.Input[str]]):
|
260
|
+
pulumi.set(self, "description", value)
|
261
|
+
|
262
|
+
@property
|
263
|
+
@pulumi.getter
|
264
|
+
def match(self) -> Optional[pulumi.Input['SecurityPolicyRuleMatchArgs']]:
|
265
|
+
"""
|
266
|
+
A match condition that incoming traffic is evaluated against.
|
267
|
+
If it evaluates to true, the corresponding 'action' is enforced.
|
268
|
+
Structure is documented below.
|
269
|
+
"""
|
270
|
+
return pulumi.get(self, "match")
|
271
|
+
|
272
|
+
@match.setter
|
273
|
+
def match(self, value: Optional[pulumi.Input['SecurityPolicyRuleMatchArgs']]):
|
274
|
+
pulumi.set(self, "match", value)
|
275
|
+
|
276
|
+
@property
|
277
|
+
@pulumi.getter(name="preconfiguredWafConfig")
|
278
|
+
def preconfigured_waf_config(self) -> Optional[pulumi.Input['SecurityPolicyRulePreconfiguredWafConfigArgs']]:
|
279
|
+
"""
|
280
|
+
Preconfigured WAF configuration to be applied for the rule.
|
281
|
+
If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
|
282
|
+
Structure is documented below.
|
283
|
+
"""
|
284
|
+
return pulumi.get(self, "preconfigured_waf_config")
|
285
|
+
|
286
|
+
@preconfigured_waf_config.setter
|
287
|
+
def preconfigured_waf_config(self, value: Optional[pulumi.Input['SecurityPolicyRulePreconfiguredWafConfigArgs']]):
|
288
|
+
pulumi.set(self, "preconfigured_waf_config", value)
|
289
|
+
|
290
|
+
@property
|
291
|
+
@pulumi.getter
|
292
|
+
def preview(self) -> Optional[pulumi.Input[bool]]:
|
293
|
+
"""
|
294
|
+
If set to true, the specified action is not enforced.
|
295
|
+
"""
|
296
|
+
return pulumi.get(self, "preview")
|
297
|
+
|
298
|
+
@preview.setter
|
299
|
+
def preview(self, value: Optional[pulumi.Input[bool]]):
|
300
|
+
pulumi.set(self, "preview", value)
|
301
|
+
|
302
|
+
@property
|
303
|
+
@pulumi.getter
|
304
|
+
def priority(self) -> Optional[pulumi.Input[int]]:
|
305
|
+
"""
|
306
|
+
An integer indicating the priority of a rule in the list.
|
307
|
+
The priority must be a positive value between 0 and 2147483647.
|
308
|
+
Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
|
309
|
+
"""
|
310
|
+
return pulumi.get(self, "priority")
|
311
|
+
|
312
|
+
@priority.setter
|
313
|
+
def priority(self, value: Optional[pulumi.Input[int]]):
|
314
|
+
pulumi.set(self, "priority", value)
|
315
|
+
|
316
|
+
@property
|
317
|
+
@pulumi.getter
|
318
|
+
def project(self) -> Optional[pulumi.Input[str]]:
|
319
|
+
"""
|
320
|
+
The ID of the project in which the resource belongs.
|
321
|
+
If it is not provided, the provider project is used.
|
322
|
+
"""
|
323
|
+
return pulumi.get(self, "project")
|
324
|
+
|
325
|
+
@project.setter
|
326
|
+
def project(self, value: Optional[pulumi.Input[str]]):
|
327
|
+
pulumi.set(self, "project", value)
|
328
|
+
|
329
|
+
@property
|
330
|
+
@pulumi.getter(name="securityPolicy")
|
331
|
+
def security_policy(self) -> Optional[pulumi.Input[str]]:
|
332
|
+
"""
|
333
|
+
The name of the security policy this rule belongs to.
|
334
|
+
|
335
|
+
|
336
|
+
- - -
|
337
|
+
"""
|
338
|
+
return pulumi.get(self, "security_policy")
|
339
|
+
|
340
|
+
@security_policy.setter
|
341
|
+
def security_policy(self, value: Optional[pulumi.Input[str]]):
|
342
|
+
pulumi.set(self, "security_policy", value)
|
343
|
+
|
344
|
+
|
345
|
+
class SecurityPolicyRule(pulumi.CustomResource):
|
346
|
+
@overload
|
347
|
+
def __init__(__self__,
|
348
|
+
resource_name: str,
|
349
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
350
|
+
action: Optional[pulumi.Input[str]] = None,
|
351
|
+
description: Optional[pulumi.Input[str]] = None,
|
352
|
+
match: Optional[pulumi.Input[pulumi.InputType['SecurityPolicyRuleMatchArgs']]] = None,
|
353
|
+
preconfigured_waf_config: Optional[pulumi.Input[pulumi.InputType['SecurityPolicyRulePreconfiguredWafConfigArgs']]] = None,
|
354
|
+
preview: Optional[pulumi.Input[bool]] = None,
|
355
|
+
priority: Optional[pulumi.Input[int]] = None,
|
356
|
+
project: Optional[pulumi.Input[str]] = None,
|
357
|
+
security_policy: Optional[pulumi.Input[str]] = None,
|
358
|
+
__props__=None):
|
359
|
+
"""
|
360
|
+
A rule for the SecurityPolicy.
|
361
|
+
|
362
|
+
To get more information about SecurityPolicyRule, see:
|
363
|
+
|
364
|
+
* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/securityPolicies/addRule)
|
365
|
+
* How-to Guides
|
366
|
+
* [Creating global security policy rules](https://cloud.google.com/armor/docs/configure-security-policies)
|
367
|
+
|
368
|
+
## Example Usage
|
369
|
+
|
370
|
+
### Security Policy Rule Basic
|
371
|
+
|
372
|
+
```python
|
373
|
+
import pulumi
|
374
|
+
import pulumi_gcp as gcp
|
375
|
+
|
376
|
+
default = gcp.compute.SecurityPolicy("default",
|
377
|
+
name="policyruletest",
|
378
|
+
description="basic global security policy",
|
379
|
+
type="CLOUD_ARMOR")
|
380
|
+
policy_rule = gcp.compute.SecurityPolicyRule("policy_rule",
|
381
|
+
security_policy=default.name,
|
382
|
+
description="new rule",
|
383
|
+
priority=100,
|
384
|
+
match=gcp.compute.SecurityPolicyRuleMatchArgs(
|
385
|
+
versioned_expr="SRC_IPS_V1",
|
386
|
+
config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
|
387
|
+
src_ip_ranges=["10.10.0.0/16"],
|
388
|
+
),
|
389
|
+
),
|
390
|
+
action="allow",
|
391
|
+
preview=True)
|
392
|
+
```
|
393
|
+
### Security Policy Rule Default Rule
|
394
|
+
|
395
|
+
```python
|
396
|
+
import pulumi
|
397
|
+
import pulumi_gcp as gcp
|
398
|
+
|
399
|
+
default = gcp.compute.SecurityPolicy("default",
|
400
|
+
name="policyruletest",
|
401
|
+
description="basic global security policy",
|
402
|
+
type="CLOUD_ARMOR")
|
403
|
+
# A default rule is generated when creating the security_policy resource, import is needed to patch it
|
404
|
+
# import {
|
405
|
+
# id = "projects//global/securityPolicies/policyruletest/priority/2147483647"
|
406
|
+
# to = google_compute_security_policy_rule.default_rule
|
407
|
+
# }
|
408
|
+
default_rule = gcp.compute.SecurityPolicyRule("default_rule",
|
409
|
+
security_policy=default.name,
|
410
|
+
description="default rule",
|
411
|
+
action="allow",
|
412
|
+
priority=2147483647,
|
413
|
+
match=gcp.compute.SecurityPolicyRuleMatchArgs(
|
414
|
+
versioned_expr="SRC_IPS_V1",
|
415
|
+
config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
|
416
|
+
src_ip_ranges=["*"],
|
417
|
+
),
|
418
|
+
))
|
419
|
+
policy_rule = gcp.compute.SecurityPolicyRule("policy_rule",
|
420
|
+
security_policy=default.name,
|
421
|
+
description="new rule",
|
422
|
+
priority=100,
|
423
|
+
match=gcp.compute.SecurityPolicyRuleMatchArgs(
|
424
|
+
versioned_expr="SRC_IPS_V1",
|
425
|
+
config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
|
426
|
+
src_ip_ranges=["10.10.0.0/16"],
|
427
|
+
),
|
428
|
+
),
|
429
|
+
action="allow",
|
430
|
+
preview=True)
|
431
|
+
```
|
432
|
+
### Security Policy Rule Multiple Rules
|
433
|
+
|
434
|
+
```python
|
435
|
+
import pulumi
|
436
|
+
import pulumi_gcp as gcp
|
437
|
+
|
438
|
+
default = gcp.compute.SecurityPolicy("default",
|
439
|
+
name="policywithmultiplerules",
|
440
|
+
description="basic global security policy",
|
441
|
+
type="CLOUD_ARMOR")
|
442
|
+
policy_rule_one = gcp.compute.SecurityPolicyRule("policy_rule_one",
|
443
|
+
security_policy=default.name,
|
444
|
+
description="new rule one",
|
445
|
+
priority=100,
|
446
|
+
match=gcp.compute.SecurityPolicyRuleMatchArgs(
|
447
|
+
versioned_expr="SRC_IPS_V1",
|
448
|
+
config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
|
449
|
+
src_ip_ranges=["10.10.0.0/16"],
|
450
|
+
),
|
451
|
+
),
|
452
|
+
action="allow",
|
453
|
+
preview=True)
|
454
|
+
policy_rule_two = gcp.compute.SecurityPolicyRule("policy_rule_two",
|
455
|
+
security_policy=default.name,
|
456
|
+
description="new rule two",
|
457
|
+
priority=101,
|
458
|
+
match=gcp.compute.SecurityPolicyRuleMatchArgs(
|
459
|
+
versioned_expr="SRC_IPS_V1",
|
460
|
+
config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
|
461
|
+
src_ip_ranges=[
|
462
|
+
"192.168.0.0/16",
|
463
|
+
"10.0.0.0/8",
|
464
|
+
],
|
465
|
+
),
|
466
|
+
),
|
467
|
+
action="allow",
|
468
|
+
preview=True)
|
469
|
+
```
|
470
|
+
|
471
|
+
## Import
|
472
|
+
|
473
|
+
SecurityPolicyRule can be imported using any of these accepted formats:
|
474
|
+
|
475
|
+
* `projects/{{project}}/global/securityPolicies/{{security_policy}}/priority/{{priority}}`
|
476
|
+
|
477
|
+
* `{{project}}/{{security_policy}}/{{priority}}`
|
478
|
+
|
479
|
+
* `{{security_policy}}/{{priority}}`
|
480
|
+
|
481
|
+
When using the `pulumi import` command, SecurityPolicyRule can be imported using one of the formats above. For example:
|
482
|
+
|
483
|
+
```sh
|
484
|
+
$ pulumi import gcp:compute/securityPolicyRule:SecurityPolicyRule default projects/{{project}}/global/securityPolicies/{{security_policy}}/priority/{{priority}}
|
485
|
+
```
|
486
|
+
|
487
|
+
```sh
|
488
|
+
$ pulumi import gcp:compute/securityPolicyRule:SecurityPolicyRule default {{project}}/{{security_policy}}/{{priority}}
|
489
|
+
```
|
490
|
+
|
491
|
+
```sh
|
492
|
+
$ pulumi import gcp:compute/securityPolicyRule:SecurityPolicyRule default {{security_policy}}/{{priority}}
|
493
|
+
```
|
494
|
+
|
495
|
+
:param str resource_name: The name of the resource.
|
496
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
497
|
+
:param pulumi.Input[str] action: The Action to perform when the rule is matched. The following are the valid actions:
|
498
|
+
* allow: allow access to target.
|
499
|
+
* deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
|
500
|
+
* rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
|
501
|
+
* redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
|
502
|
+
* throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
|
503
|
+
:param pulumi.Input[str] description: An optional description of this resource. Provide this property when you create the resource.
|
504
|
+
:param pulumi.Input[pulumi.InputType['SecurityPolicyRuleMatchArgs']] match: A match condition that incoming traffic is evaluated against.
|
505
|
+
If it evaluates to true, the corresponding 'action' is enforced.
|
506
|
+
Structure is documented below.
|
507
|
+
:param pulumi.Input[pulumi.InputType['SecurityPolicyRulePreconfiguredWafConfigArgs']] preconfigured_waf_config: Preconfigured WAF configuration to be applied for the rule.
|
508
|
+
If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
|
509
|
+
Structure is documented below.
|
510
|
+
:param pulumi.Input[bool] preview: If set to true, the specified action is not enforced.
|
511
|
+
:param pulumi.Input[int] priority: An integer indicating the priority of a rule in the list.
|
512
|
+
The priority must be a positive value between 0 and 2147483647.
|
513
|
+
Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
|
514
|
+
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
|
515
|
+
If it is not provided, the provider project is used.
|
516
|
+
:param pulumi.Input[str] security_policy: The name of the security policy this rule belongs to.
|
517
|
+
|
518
|
+
|
519
|
+
- - -
|
520
|
+
"""
|
521
|
+
...
|
522
|
+
@overload
|
523
|
+
def __init__(__self__,
|
524
|
+
resource_name: str,
|
525
|
+
args: SecurityPolicyRuleInitArgs,
|
526
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
527
|
+
"""
|
528
|
+
A rule for the SecurityPolicy.
|
529
|
+
|
530
|
+
To get more information about SecurityPolicyRule, see:
|
531
|
+
|
532
|
+
* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/securityPolicies/addRule)
|
533
|
+
* How-to Guides
|
534
|
+
* [Creating global security policy rules](https://cloud.google.com/armor/docs/configure-security-policies)
|
535
|
+
|
536
|
+
## Example Usage
|
537
|
+
|
538
|
+
### Security Policy Rule Basic
|
539
|
+
|
540
|
+
```python
|
541
|
+
import pulumi
|
542
|
+
import pulumi_gcp as gcp
|
543
|
+
|
544
|
+
default = gcp.compute.SecurityPolicy("default",
|
545
|
+
name="policyruletest",
|
546
|
+
description="basic global security policy",
|
547
|
+
type="CLOUD_ARMOR")
|
548
|
+
policy_rule = gcp.compute.SecurityPolicyRule("policy_rule",
|
549
|
+
security_policy=default.name,
|
550
|
+
description="new rule",
|
551
|
+
priority=100,
|
552
|
+
match=gcp.compute.SecurityPolicyRuleMatchArgs(
|
553
|
+
versioned_expr="SRC_IPS_V1",
|
554
|
+
config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
|
555
|
+
src_ip_ranges=["10.10.0.0/16"],
|
556
|
+
),
|
557
|
+
),
|
558
|
+
action="allow",
|
559
|
+
preview=True)
|
560
|
+
```
|
561
|
+
### Security Policy Rule Default Rule
|
562
|
+
|
563
|
+
```python
|
564
|
+
import pulumi
|
565
|
+
import pulumi_gcp as gcp
|
566
|
+
|
567
|
+
default = gcp.compute.SecurityPolicy("default",
|
568
|
+
name="policyruletest",
|
569
|
+
description="basic global security policy",
|
570
|
+
type="CLOUD_ARMOR")
|
571
|
+
# A default rule is generated when creating the security_policy resource, import is needed to patch it
|
572
|
+
# import {
|
573
|
+
# id = "projects//global/securityPolicies/policyruletest/priority/2147483647"
|
574
|
+
# to = google_compute_security_policy_rule.default_rule
|
575
|
+
# }
|
576
|
+
default_rule = gcp.compute.SecurityPolicyRule("default_rule",
|
577
|
+
security_policy=default.name,
|
578
|
+
description="default rule",
|
579
|
+
action="allow",
|
580
|
+
priority=2147483647,
|
581
|
+
match=gcp.compute.SecurityPolicyRuleMatchArgs(
|
582
|
+
versioned_expr="SRC_IPS_V1",
|
583
|
+
config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
|
584
|
+
src_ip_ranges=["*"],
|
585
|
+
),
|
586
|
+
))
|
587
|
+
policy_rule = gcp.compute.SecurityPolicyRule("policy_rule",
|
588
|
+
security_policy=default.name,
|
589
|
+
description="new rule",
|
590
|
+
priority=100,
|
591
|
+
match=gcp.compute.SecurityPolicyRuleMatchArgs(
|
592
|
+
versioned_expr="SRC_IPS_V1",
|
593
|
+
config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
|
594
|
+
src_ip_ranges=["10.10.0.0/16"],
|
595
|
+
),
|
596
|
+
),
|
597
|
+
action="allow",
|
598
|
+
preview=True)
|
599
|
+
```
|
600
|
+
### Security Policy Rule Multiple Rules
|
601
|
+
|
602
|
+
```python
|
603
|
+
import pulumi
|
604
|
+
import pulumi_gcp as gcp
|
605
|
+
|
606
|
+
default = gcp.compute.SecurityPolicy("default",
|
607
|
+
name="policywithmultiplerules",
|
608
|
+
description="basic global security policy",
|
609
|
+
type="CLOUD_ARMOR")
|
610
|
+
policy_rule_one = gcp.compute.SecurityPolicyRule("policy_rule_one",
|
611
|
+
security_policy=default.name,
|
612
|
+
description="new rule one",
|
613
|
+
priority=100,
|
614
|
+
match=gcp.compute.SecurityPolicyRuleMatchArgs(
|
615
|
+
versioned_expr="SRC_IPS_V1",
|
616
|
+
config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
|
617
|
+
src_ip_ranges=["10.10.0.0/16"],
|
618
|
+
),
|
619
|
+
),
|
620
|
+
action="allow",
|
621
|
+
preview=True)
|
622
|
+
policy_rule_two = gcp.compute.SecurityPolicyRule("policy_rule_two",
|
623
|
+
security_policy=default.name,
|
624
|
+
description="new rule two",
|
625
|
+
priority=101,
|
626
|
+
match=gcp.compute.SecurityPolicyRuleMatchArgs(
|
627
|
+
versioned_expr="SRC_IPS_V1",
|
628
|
+
config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
|
629
|
+
src_ip_ranges=[
|
630
|
+
"192.168.0.0/16",
|
631
|
+
"10.0.0.0/8",
|
632
|
+
],
|
633
|
+
),
|
634
|
+
),
|
635
|
+
action="allow",
|
636
|
+
preview=True)
|
637
|
+
```
|
638
|
+
|
639
|
+
## Import
|
640
|
+
|
641
|
+
SecurityPolicyRule can be imported using any of these accepted formats:
|
642
|
+
|
643
|
+
* `projects/{{project}}/global/securityPolicies/{{security_policy}}/priority/{{priority}}`
|
644
|
+
|
645
|
+
* `{{project}}/{{security_policy}}/{{priority}}`
|
646
|
+
|
647
|
+
* `{{security_policy}}/{{priority}}`
|
648
|
+
|
649
|
+
When using the `pulumi import` command, SecurityPolicyRule can be imported using one of the formats above. For example:
|
650
|
+
|
651
|
+
```sh
|
652
|
+
$ pulumi import gcp:compute/securityPolicyRule:SecurityPolicyRule default projects/{{project}}/global/securityPolicies/{{security_policy}}/priority/{{priority}}
|
653
|
+
```
|
654
|
+
|
655
|
+
```sh
|
656
|
+
$ pulumi import gcp:compute/securityPolicyRule:SecurityPolicyRule default {{project}}/{{security_policy}}/{{priority}}
|
657
|
+
```
|
658
|
+
|
659
|
+
```sh
|
660
|
+
$ pulumi import gcp:compute/securityPolicyRule:SecurityPolicyRule default {{security_policy}}/{{priority}}
|
661
|
+
```
|
662
|
+
|
663
|
+
:param str resource_name: The name of the resource.
|
664
|
+
:param SecurityPolicyRuleInitArgs args: The arguments to use to populate this resource's properties.
|
665
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
666
|
+
"""
|
667
|
+
...
|
668
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
669
|
+
resource_args, opts = _utilities.get_resource_args_opts(SecurityPolicyRuleInitArgs, pulumi.ResourceOptions, *args, **kwargs)
|
670
|
+
if resource_args is not None:
|
671
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
672
|
+
else:
|
673
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
674
|
+
|
675
|
+
def _internal_init(__self__,
|
676
|
+
resource_name: str,
|
677
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
678
|
+
action: Optional[pulumi.Input[str]] = None,
|
679
|
+
description: Optional[pulumi.Input[str]] = None,
|
680
|
+
match: Optional[pulumi.Input[pulumi.InputType['SecurityPolicyRuleMatchArgs']]] = None,
|
681
|
+
preconfigured_waf_config: Optional[pulumi.Input[pulumi.InputType['SecurityPolicyRulePreconfiguredWafConfigArgs']]] = None,
|
682
|
+
preview: Optional[pulumi.Input[bool]] = None,
|
683
|
+
priority: Optional[pulumi.Input[int]] = None,
|
684
|
+
project: Optional[pulumi.Input[str]] = None,
|
685
|
+
security_policy: Optional[pulumi.Input[str]] = None,
|
686
|
+
__props__=None):
|
687
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
688
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
689
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
690
|
+
if opts.id is None:
|
691
|
+
if __props__ is not None:
|
692
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
693
|
+
__props__ = SecurityPolicyRuleInitArgs.__new__(SecurityPolicyRuleInitArgs)
|
694
|
+
|
695
|
+
if action is None and not opts.urn:
|
696
|
+
raise TypeError("Missing required property 'action'")
|
697
|
+
__props__.__dict__["action"] = action
|
698
|
+
__props__.__dict__["description"] = description
|
699
|
+
__props__.__dict__["match"] = match
|
700
|
+
__props__.__dict__["preconfigured_waf_config"] = preconfigured_waf_config
|
701
|
+
__props__.__dict__["preview"] = preview
|
702
|
+
if priority is None and not opts.urn:
|
703
|
+
raise TypeError("Missing required property 'priority'")
|
704
|
+
__props__.__dict__["priority"] = priority
|
705
|
+
__props__.__dict__["project"] = project
|
706
|
+
if security_policy is None and not opts.urn:
|
707
|
+
raise TypeError("Missing required property 'security_policy'")
|
708
|
+
__props__.__dict__["security_policy"] = security_policy
|
709
|
+
super(SecurityPolicyRule, __self__).__init__(
|
710
|
+
'gcp:compute/securityPolicyRule:SecurityPolicyRule',
|
711
|
+
resource_name,
|
712
|
+
__props__,
|
713
|
+
opts)
|
714
|
+
|
715
|
+
@staticmethod
|
716
|
+
def get(resource_name: str,
|
717
|
+
id: pulumi.Input[str],
|
718
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
719
|
+
action: Optional[pulumi.Input[str]] = None,
|
720
|
+
description: Optional[pulumi.Input[str]] = None,
|
721
|
+
match: Optional[pulumi.Input[pulumi.InputType['SecurityPolicyRuleMatchArgs']]] = None,
|
722
|
+
preconfigured_waf_config: Optional[pulumi.Input[pulumi.InputType['SecurityPolicyRulePreconfiguredWafConfigArgs']]] = None,
|
723
|
+
preview: Optional[pulumi.Input[bool]] = None,
|
724
|
+
priority: Optional[pulumi.Input[int]] = None,
|
725
|
+
project: Optional[pulumi.Input[str]] = None,
|
726
|
+
security_policy: Optional[pulumi.Input[str]] = None) -> 'SecurityPolicyRule':
|
727
|
+
"""
|
728
|
+
Get an existing SecurityPolicyRule resource's state with the given name, id, and optional extra
|
729
|
+
properties used to qualify the lookup.
|
730
|
+
|
731
|
+
:param str resource_name: The unique name of the resulting resource.
|
732
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
733
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
734
|
+
:param pulumi.Input[str] action: The Action to perform when the rule is matched. The following are the valid actions:
|
735
|
+
* allow: allow access to target.
|
736
|
+
* deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
|
737
|
+
* rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
|
738
|
+
* redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
|
739
|
+
* throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
|
740
|
+
:param pulumi.Input[str] description: An optional description of this resource. Provide this property when you create the resource.
|
741
|
+
:param pulumi.Input[pulumi.InputType['SecurityPolicyRuleMatchArgs']] match: A match condition that incoming traffic is evaluated against.
|
742
|
+
If it evaluates to true, the corresponding 'action' is enforced.
|
743
|
+
Structure is documented below.
|
744
|
+
:param pulumi.Input[pulumi.InputType['SecurityPolicyRulePreconfiguredWafConfigArgs']] preconfigured_waf_config: Preconfigured WAF configuration to be applied for the rule.
|
745
|
+
If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
|
746
|
+
Structure is documented below.
|
747
|
+
:param pulumi.Input[bool] preview: If set to true, the specified action is not enforced.
|
748
|
+
:param pulumi.Input[int] priority: An integer indicating the priority of a rule in the list.
|
749
|
+
The priority must be a positive value between 0 and 2147483647.
|
750
|
+
Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
|
751
|
+
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
|
752
|
+
If it is not provided, the provider project is used.
|
753
|
+
:param pulumi.Input[str] security_policy: The name of the security policy this rule belongs to.
|
754
|
+
|
755
|
+
|
756
|
+
- - -
|
757
|
+
"""
|
758
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
759
|
+
|
760
|
+
__props__ = _SecurityPolicyRuleState.__new__(_SecurityPolicyRuleState)
|
761
|
+
|
762
|
+
__props__.__dict__["action"] = action
|
763
|
+
__props__.__dict__["description"] = description
|
764
|
+
__props__.__dict__["match"] = match
|
765
|
+
__props__.__dict__["preconfigured_waf_config"] = preconfigured_waf_config
|
766
|
+
__props__.__dict__["preview"] = preview
|
767
|
+
__props__.__dict__["priority"] = priority
|
768
|
+
__props__.__dict__["project"] = project
|
769
|
+
__props__.__dict__["security_policy"] = security_policy
|
770
|
+
return SecurityPolicyRule(resource_name, opts=opts, __props__=__props__)
|
771
|
+
|
772
|
+
@property
|
773
|
+
@pulumi.getter
|
774
|
+
def action(self) -> pulumi.Output[str]:
|
775
|
+
"""
|
776
|
+
The Action to perform when the rule is matched. The following are the valid actions:
|
777
|
+
* allow: allow access to target.
|
778
|
+
* deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
|
779
|
+
* rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
|
780
|
+
* redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
|
781
|
+
* throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
|
782
|
+
"""
|
783
|
+
return pulumi.get(self, "action")
|
784
|
+
|
785
|
+
@property
|
786
|
+
@pulumi.getter
|
787
|
+
def description(self) -> pulumi.Output[Optional[str]]:
|
788
|
+
"""
|
789
|
+
An optional description of this resource. Provide this property when you create the resource.
|
790
|
+
"""
|
791
|
+
return pulumi.get(self, "description")
|
792
|
+
|
793
|
+
@property
|
794
|
+
@pulumi.getter
|
795
|
+
def match(self) -> pulumi.Output[Optional['outputs.SecurityPolicyRuleMatch']]:
|
796
|
+
"""
|
797
|
+
A match condition that incoming traffic is evaluated against.
|
798
|
+
If it evaluates to true, the corresponding 'action' is enforced.
|
799
|
+
Structure is documented below.
|
800
|
+
"""
|
801
|
+
return pulumi.get(self, "match")
|
802
|
+
|
803
|
+
@property
|
804
|
+
@pulumi.getter(name="preconfiguredWafConfig")
|
805
|
+
def preconfigured_waf_config(self) -> pulumi.Output[Optional['outputs.SecurityPolicyRulePreconfiguredWafConfig']]:
|
806
|
+
"""
|
807
|
+
Preconfigured WAF configuration to be applied for the rule.
|
808
|
+
If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
|
809
|
+
Structure is documented below.
|
810
|
+
"""
|
811
|
+
return pulumi.get(self, "preconfigured_waf_config")
|
812
|
+
|
813
|
+
@property
|
814
|
+
@pulumi.getter
|
815
|
+
def preview(self) -> pulumi.Output[Optional[bool]]:
|
816
|
+
"""
|
817
|
+
If set to true, the specified action is not enforced.
|
818
|
+
"""
|
819
|
+
return pulumi.get(self, "preview")
|
820
|
+
|
821
|
+
@property
|
822
|
+
@pulumi.getter
|
823
|
+
def priority(self) -> pulumi.Output[int]:
|
824
|
+
"""
|
825
|
+
An integer indicating the priority of a rule in the list.
|
826
|
+
The priority must be a positive value between 0 and 2147483647.
|
827
|
+
Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
|
828
|
+
"""
|
829
|
+
return pulumi.get(self, "priority")
|
830
|
+
|
831
|
+
@property
|
832
|
+
@pulumi.getter
|
833
|
+
def project(self) -> pulumi.Output[str]:
|
834
|
+
"""
|
835
|
+
The ID of the project in which the resource belongs.
|
836
|
+
If it is not provided, the provider project is used.
|
837
|
+
"""
|
838
|
+
return pulumi.get(self, "project")
|
839
|
+
|
840
|
+
@property
|
841
|
+
@pulumi.getter(name="securityPolicy")
|
842
|
+
def security_policy(self) -> pulumi.Output[str]:
|
843
|
+
"""
|
844
|
+
The name of the security policy this rule belongs to.
|
845
|
+
|
846
|
+
|
847
|
+
- - -
|
848
|
+
"""
|
849
|
+
return pulumi.get(self, "security_policy")
|
850
|
+
|