pulumi-gcp 7.30.0a1720075632__py3-none-any.whl → 7.30.0a1720437548__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 +32 -0
- pulumi_gcp/artifactregistry/get_docker_image.py +2 -2
- pulumi_gcp/bigtable/gc_policy.py +68 -14
- pulumi_gcp/cloudfunctionsv2/_inputs.py +97 -0
- pulumi_gcp/cloudfunctionsv2/function.py +232 -0
- pulumi_gcp/cloudfunctionsv2/outputs.py +129 -1
- pulumi_gcp/compute/_inputs.py +622 -0
- pulumi_gcp/compute/address.py +0 -7
- pulumi_gcp/compute/backend_service.py +0 -14
- pulumi_gcp/compute/forwarding_rule.py +0 -21
- pulumi_gcp/compute/global_forwarding_rule.py +0 -21
- pulumi_gcp/compute/managed_ssl_certificate.py +0 -7
- pulumi_gcp/compute/manged_ssl_certificate.py +0 -7
- pulumi_gcp/compute/network_attachment.py +16 -0
- pulumi_gcp/compute/outputs.py +504 -8
- pulumi_gcp/compute/region_backend_service.py +0 -14
- pulumi_gcp/compute/region_ssl_certificate.py +0 -7
- pulumi_gcp/compute/ssl_certificate.py +0 -7
- pulumi_gcp/compute/target_https_proxy.py +76 -1
- pulumi_gcp/compute/url_map.py +255 -0
- pulumi_gcp/container/aws_cluster.py +2 -2
- pulumi_gcp/container/aws_node_pool.py +2 -2
- pulumi_gcp/container/azure_client.py +2 -2
- pulumi_gcp/container/azure_cluster.py +2 -2
- pulumi_gcp/container/azure_node_pool.py +2 -2
- pulumi_gcp/datafusion/_inputs.py +163 -11
- pulumi_gcp/datafusion/instance.py +64 -0
- pulumi_gcp/datafusion/outputs.py +127 -7
- pulumi_gcp/healthcare/_inputs.py +43 -0
- pulumi_gcp/healthcare/dataset.py +110 -0
- pulumi_gcp/healthcare/outputs.py +43 -0
- pulumi_gcp/identityplatform/config.py +1 -1
- pulumi_gcp/logging/billing_account_bucket_config.py +1 -1
- pulumi_gcp/logging/folder_bucket_config.py +1 -1
- pulumi_gcp/logging/organization_bucket_config.py +1 -1
- pulumi_gcp/monitoring/_inputs.py +77 -0
- pulumi_gcp/monitoring/outputs.py +63 -0
- pulumi_gcp/pulumi-plugin.json +1 -1
- pulumi_gcp/securitycenter/instance_iam_binding.py +64 -0
- pulumi_gcp/securitycenter/instance_iam_member.py +64 -0
- pulumi_gcp/securitycenter/instance_iam_policy.py +64 -0
- pulumi_gcp/storage/__init__.py +5 -0
- pulumi_gcp/storage/_inputs.py +130 -0
- pulumi_gcp/storage/get_managed_folder_iam_policy.py +115 -0
- pulumi_gcp/storage/managed_folder.py +440 -0
- pulumi_gcp/storage/managed_folder_iam_binding.py +947 -0
- pulumi_gcp/storage/managed_folder_iam_member.py +947 -0
- pulumi_gcp/storage/managed_folder_iam_policy.py +766 -0
- pulumi_gcp/storage/outputs.py +76 -0
- pulumi_gcp/vertex/_inputs.py +3 -3
- pulumi_gcp/vertex/ai_feature_online_store.py +9 -9
- pulumi_gcp/vertex/outputs.py +2 -2
- {pulumi_gcp-7.30.0a1720075632.dist-info → pulumi_gcp-7.30.0a1720437548.dist-info}/METADATA +1 -1
- {pulumi_gcp-7.30.0a1720075632.dist-info → pulumi_gcp-7.30.0a1720437548.dist-info}/RECORD +56 -51
- {pulumi_gcp-7.30.0a1720075632.dist-info → pulumi_gcp-7.30.0a1720437548.dist-info}/WHEEL +0 -0
- {pulumi_gcp-7.30.0a1720075632.dist-info → pulumi_gcp-7.30.0a1720437548.dist-info}/top_level.txt +0 -0
pulumi_gcp/compute/url_map.py
CHANGED
@@ -21,6 +21,7 @@ __all__ = ['URLMapArgs', 'URLMap']
|
|
21
21
|
@pulumi.input_type
|
22
22
|
class URLMapArgs:
|
23
23
|
def __init__(__self__, *,
|
24
|
+
default_custom_error_response_policy: Optional[pulumi.Input['URLMapDefaultCustomErrorResponsePolicyArgs']] = None,
|
24
25
|
default_route_action: Optional[pulumi.Input['URLMapDefaultRouteActionArgs']] = None,
|
25
26
|
default_service: Optional[pulumi.Input[str]] = None,
|
26
27
|
default_url_redirect: Optional[pulumi.Input['URLMapDefaultUrlRedirectArgs']] = None,
|
@@ -33,6 +34,15 @@ class URLMapArgs:
|
|
33
34
|
tests: Optional[pulumi.Input[Sequence[pulumi.Input['URLMapTestArgs']]]] = None):
|
34
35
|
"""
|
35
36
|
The set of arguments for constructing a URLMap resource.
|
37
|
+
:param pulumi.Input['URLMapDefaultCustomErrorResponsePolicyArgs'] default_custom_error_response_policy: defaultCustomErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error.
|
38
|
+
This policy takes effect at the PathMatcher level and applies only when no policy has been defined for the error code at lower levels like RouteRule and PathRule within this PathMatcher. If an error code does not have a policy defined in defaultCustomErrorResponsePolicy, then a policy defined for the error code in UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
39
|
+
For example, consider a UrlMap with the following configuration:
|
40
|
+
UrlMap.defaultCustomErrorResponsePolicy is configured with policies for 5xx and 4xx errors
|
41
|
+
A RouteRule for /coming_soon/ is configured for the error code 404.
|
42
|
+
If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
43
|
+
When used in conjunction with pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client.
|
44
|
+
defaultCustomErrorResponsePolicy is supported only for global external Application Load Balancers.
|
45
|
+
Structure is documented below.
|
36
46
|
:param pulumi.Input['URLMapDefaultRouteActionArgs'] default_route_action: defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions
|
37
47
|
like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend.
|
38
48
|
If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService
|
@@ -70,6 +80,8 @@ class URLMapArgs:
|
|
70
80
|
tests per UrlMap.
|
71
81
|
Structure is documented below.
|
72
82
|
"""
|
83
|
+
if default_custom_error_response_policy is not None:
|
84
|
+
pulumi.set(__self__, "default_custom_error_response_policy", default_custom_error_response_policy)
|
73
85
|
if default_route_action is not None:
|
74
86
|
pulumi.set(__self__, "default_route_action", default_route_action)
|
75
87
|
if default_service is not None:
|
@@ -91,6 +103,26 @@ class URLMapArgs:
|
|
91
103
|
if tests is not None:
|
92
104
|
pulumi.set(__self__, "tests", tests)
|
93
105
|
|
106
|
+
@property
|
107
|
+
@pulumi.getter(name="defaultCustomErrorResponsePolicy")
|
108
|
+
def default_custom_error_response_policy(self) -> Optional[pulumi.Input['URLMapDefaultCustomErrorResponsePolicyArgs']]:
|
109
|
+
"""
|
110
|
+
defaultCustomErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error.
|
111
|
+
This policy takes effect at the PathMatcher level and applies only when no policy has been defined for the error code at lower levels like RouteRule and PathRule within this PathMatcher. If an error code does not have a policy defined in defaultCustomErrorResponsePolicy, then a policy defined for the error code in UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
112
|
+
For example, consider a UrlMap with the following configuration:
|
113
|
+
UrlMap.defaultCustomErrorResponsePolicy is configured with policies for 5xx and 4xx errors
|
114
|
+
A RouteRule for /coming_soon/ is configured for the error code 404.
|
115
|
+
If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
116
|
+
When used in conjunction with pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client.
|
117
|
+
defaultCustomErrorResponsePolicy is supported only for global external Application Load Balancers.
|
118
|
+
Structure is documented below.
|
119
|
+
"""
|
120
|
+
return pulumi.get(self, "default_custom_error_response_policy")
|
121
|
+
|
122
|
+
@default_custom_error_response_policy.setter
|
123
|
+
def default_custom_error_response_policy(self, value: Optional[pulumi.Input['URLMapDefaultCustomErrorResponsePolicyArgs']]):
|
124
|
+
pulumi.set(self, "default_custom_error_response_policy", value)
|
125
|
+
|
94
126
|
@property
|
95
127
|
@pulumi.getter(name="defaultRouteAction")
|
96
128
|
def default_route_action(self) -> Optional[pulumi.Input['URLMapDefaultRouteActionArgs']]:
|
@@ -242,6 +274,7 @@ class URLMapArgs:
|
|
242
274
|
class _URLMapState:
|
243
275
|
def __init__(__self__, *,
|
244
276
|
creation_timestamp: Optional[pulumi.Input[str]] = None,
|
277
|
+
default_custom_error_response_policy: Optional[pulumi.Input['URLMapDefaultCustomErrorResponsePolicyArgs']] = None,
|
245
278
|
default_route_action: Optional[pulumi.Input['URLMapDefaultRouteActionArgs']] = None,
|
246
279
|
default_service: Optional[pulumi.Input[str]] = None,
|
247
280
|
default_url_redirect: Optional[pulumi.Input['URLMapDefaultUrlRedirectArgs']] = None,
|
@@ -258,6 +291,15 @@ class _URLMapState:
|
|
258
291
|
"""
|
259
292
|
Input properties used for looking up and filtering URLMap resources.
|
260
293
|
:param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
|
294
|
+
:param pulumi.Input['URLMapDefaultCustomErrorResponsePolicyArgs'] default_custom_error_response_policy: defaultCustomErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error.
|
295
|
+
This policy takes effect at the PathMatcher level and applies only when no policy has been defined for the error code at lower levels like RouteRule and PathRule within this PathMatcher. If an error code does not have a policy defined in defaultCustomErrorResponsePolicy, then a policy defined for the error code in UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
296
|
+
For example, consider a UrlMap with the following configuration:
|
297
|
+
UrlMap.defaultCustomErrorResponsePolicy is configured with policies for 5xx and 4xx errors
|
298
|
+
A RouteRule for /coming_soon/ is configured for the error code 404.
|
299
|
+
If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
300
|
+
When used in conjunction with pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client.
|
301
|
+
defaultCustomErrorResponsePolicy is supported only for global external Application Load Balancers.
|
302
|
+
Structure is documented below.
|
261
303
|
:param pulumi.Input['URLMapDefaultRouteActionArgs'] default_route_action: defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions
|
262
304
|
like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend.
|
263
305
|
If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService
|
@@ -301,6 +343,8 @@ class _URLMapState:
|
|
301
343
|
"""
|
302
344
|
if creation_timestamp is not None:
|
303
345
|
pulumi.set(__self__, "creation_timestamp", creation_timestamp)
|
346
|
+
if default_custom_error_response_policy is not None:
|
347
|
+
pulumi.set(__self__, "default_custom_error_response_policy", default_custom_error_response_policy)
|
304
348
|
if default_route_action is not None:
|
305
349
|
pulumi.set(__self__, "default_route_action", default_route_action)
|
306
350
|
if default_service is not None:
|
@@ -340,6 +384,26 @@ class _URLMapState:
|
|
340
384
|
def creation_timestamp(self, value: Optional[pulumi.Input[str]]):
|
341
385
|
pulumi.set(self, "creation_timestamp", value)
|
342
386
|
|
387
|
+
@property
|
388
|
+
@pulumi.getter(name="defaultCustomErrorResponsePolicy")
|
389
|
+
def default_custom_error_response_policy(self) -> Optional[pulumi.Input['URLMapDefaultCustomErrorResponsePolicyArgs']]:
|
390
|
+
"""
|
391
|
+
defaultCustomErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error.
|
392
|
+
This policy takes effect at the PathMatcher level and applies only when no policy has been defined for the error code at lower levels like RouteRule and PathRule within this PathMatcher. If an error code does not have a policy defined in defaultCustomErrorResponsePolicy, then a policy defined for the error code in UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
393
|
+
For example, consider a UrlMap with the following configuration:
|
394
|
+
UrlMap.defaultCustomErrorResponsePolicy is configured with policies for 5xx and 4xx errors
|
395
|
+
A RouteRule for /coming_soon/ is configured for the error code 404.
|
396
|
+
If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
397
|
+
When used in conjunction with pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client.
|
398
|
+
defaultCustomErrorResponsePolicy is supported only for global external Application Load Balancers.
|
399
|
+
Structure is documented below.
|
400
|
+
"""
|
401
|
+
return pulumi.get(self, "default_custom_error_response_policy")
|
402
|
+
|
403
|
+
@default_custom_error_response_policy.setter
|
404
|
+
def default_custom_error_response_policy(self, value: Optional[pulumi.Input['URLMapDefaultCustomErrorResponsePolicyArgs']]):
|
405
|
+
pulumi.set(self, "default_custom_error_response_policy", value)
|
406
|
+
|
343
407
|
@property
|
344
408
|
@pulumi.getter(name="defaultRouteAction")
|
345
409
|
def default_route_action(self) -> Optional[pulumi.Input['URLMapDefaultRouteActionArgs']]:
|
@@ -529,6 +593,7 @@ class URLMap(pulumi.CustomResource):
|
|
529
593
|
def __init__(__self__,
|
530
594
|
resource_name: str,
|
531
595
|
opts: Optional[pulumi.ResourceOptions] = None,
|
596
|
+
default_custom_error_response_policy: Optional[pulumi.Input[Union['URLMapDefaultCustomErrorResponsePolicyArgs', 'URLMapDefaultCustomErrorResponsePolicyArgsDict']]] = None,
|
532
597
|
default_route_action: Optional[pulumi.Input[Union['URLMapDefaultRouteActionArgs', 'URLMapDefaultRouteActionArgsDict']]] = None,
|
533
598
|
default_service: Optional[pulumi.Input[str]] = None,
|
534
599
|
default_url_redirect: Optional[pulumi.Input[Union['URLMapDefaultUrlRedirectArgs', 'URLMapDefaultUrlRedirectArgsDict']]] = None,
|
@@ -1123,6 +1188,82 @@ class URLMap(pulumi.CustomResource):
|
|
1123
1188
|
],
|
1124
1189
|
}])
|
1125
1190
|
```
|
1191
|
+
### Url Map Custom Error Response Policy
|
1192
|
+
|
1193
|
+
```python
|
1194
|
+
import pulumi
|
1195
|
+
import pulumi_gcp as gcp
|
1196
|
+
|
1197
|
+
default = gcp.compute.HttpHealthCheck("default",
|
1198
|
+
name="health-check",
|
1199
|
+
request_path="/",
|
1200
|
+
check_interval_sec=1,
|
1201
|
+
timeout_sec=1)
|
1202
|
+
example = gcp.compute.BackendService("example",
|
1203
|
+
name="login",
|
1204
|
+
port_name="http",
|
1205
|
+
protocol="HTTP",
|
1206
|
+
timeout_sec=10,
|
1207
|
+
load_balancing_scheme="EXTERNAL_MANAGED",
|
1208
|
+
health_checks=default.id)
|
1209
|
+
error_bucket = gcp.storage.Bucket("error",
|
1210
|
+
name="static-asset-bucket",
|
1211
|
+
location="US")
|
1212
|
+
error = gcp.compute.BackendBucket("error",
|
1213
|
+
name="error-backend-bucket",
|
1214
|
+
bucket_name=error_bucket.name,
|
1215
|
+
enable_cdn=True)
|
1216
|
+
urlmap = gcp.compute.URLMap("urlmap",
|
1217
|
+
name="urlmap",
|
1218
|
+
description="a description",
|
1219
|
+
default_service=example.id,
|
1220
|
+
default_custom_error_response_policy={
|
1221
|
+
"errorResponseRules": [{
|
1222
|
+
"matchResponseCodes": ["5xx"],
|
1223
|
+
"path": "/*",
|
1224
|
+
"overrideResponseCode": 502,
|
1225
|
+
}],
|
1226
|
+
"errorService": error.id,
|
1227
|
+
},
|
1228
|
+
host_rules=[{
|
1229
|
+
"hosts": ["mysite.com"],
|
1230
|
+
"pathMatcher": "mysite",
|
1231
|
+
}],
|
1232
|
+
path_matchers=[{
|
1233
|
+
"name": "mysite",
|
1234
|
+
"defaultService": example.id,
|
1235
|
+
"defaultCustomErrorResponsePolicy": {
|
1236
|
+
"errorResponseRules": [
|
1237
|
+
{
|
1238
|
+
"matchResponseCodes": [
|
1239
|
+
"4xx",
|
1240
|
+
"5xx",
|
1241
|
+
],
|
1242
|
+
"path": "/login",
|
1243
|
+
"overrideResponseCode": 404,
|
1244
|
+
},
|
1245
|
+
{
|
1246
|
+
"matchResponseCodes": ["503"],
|
1247
|
+
"path": "/example",
|
1248
|
+
"overrideResponseCode": 502,
|
1249
|
+
},
|
1250
|
+
],
|
1251
|
+
"errorService": error.id,
|
1252
|
+
},
|
1253
|
+
"pathRules": [{
|
1254
|
+
"paths": ["/*"],
|
1255
|
+
"service": example.id,
|
1256
|
+
"customErrorResponsePolicy": {
|
1257
|
+
"errorResponseRules": [{
|
1258
|
+
"matchResponseCodes": ["4xx"],
|
1259
|
+
"path": "/register",
|
1260
|
+
"overrideResponseCode": 401,
|
1261
|
+
}],
|
1262
|
+
"errorService": error.id,
|
1263
|
+
},
|
1264
|
+
}],
|
1265
|
+
}])
|
1266
|
+
```
|
1126
1267
|
|
1127
1268
|
## Import
|
1128
1269
|
|
@@ -1150,6 +1291,15 @@ class URLMap(pulumi.CustomResource):
|
|
1150
1291
|
|
1151
1292
|
:param str resource_name: The name of the resource.
|
1152
1293
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
1294
|
+
:param pulumi.Input[Union['URLMapDefaultCustomErrorResponsePolicyArgs', 'URLMapDefaultCustomErrorResponsePolicyArgsDict']] default_custom_error_response_policy: defaultCustomErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error.
|
1295
|
+
This policy takes effect at the PathMatcher level and applies only when no policy has been defined for the error code at lower levels like RouteRule and PathRule within this PathMatcher. If an error code does not have a policy defined in defaultCustomErrorResponsePolicy, then a policy defined for the error code in UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
1296
|
+
For example, consider a UrlMap with the following configuration:
|
1297
|
+
UrlMap.defaultCustomErrorResponsePolicy is configured with policies for 5xx and 4xx errors
|
1298
|
+
A RouteRule for /coming_soon/ is configured for the error code 404.
|
1299
|
+
If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
1300
|
+
When used in conjunction with pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client.
|
1301
|
+
defaultCustomErrorResponsePolicy is supported only for global external Application Load Balancers.
|
1302
|
+
Structure is documented below.
|
1153
1303
|
:param pulumi.Input[Union['URLMapDefaultRouteActionArgs', 'URLMapDefaultRouteActionArgsDict']] default_route_action: defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions
|
1154
1304
|
like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend.
|
1155
1305
|
If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService
|
@@ -1776,6 +1926,82 @@ class URLMap(pulumi.CustomResource):
|
|
1776
1926
|
],
|
1777
1927
|
}])
|
1778
1928
|
```
|
1929
|
+
### Url Map Custom Error Response Policy
|
1930
|
+
|
1931
|
+
```python
|
1932
|
+
import pulumi
|
1933
|
+
import pulumi_gcp as gcp
|
1934
|
+
|
1935
|
+
default = gcp.compute.HttpHealthCheck("default",
|
1936
|
+
name="health-check",
|
1937
|
+
request_path="/",
|
1938
|
+
check_interval_sec=1,
|
1939
|
+
timeout_sec=1)
|
1940
|
+
example = gcp.compute.BackendService("example",
|
1941
|
+
name="login",
|
1942
|
+
port_name="http",
|
1943
|
+
protocol="HTTP",
|
1944
|
+
timeout_sec=10,
|
1945
|
+
load_balancing_scheme="EXTERNAL_MANAGED",
|
1946
|
+
health_checks=default.id)
|
1947
|
+
error_bucket = gcp.storage.Bucket("error",
|
1948
|
+
name="static-asset-bucket",
|
1949
|
+
location="US")
|
1950
|
+
error = gcp.compute.BackendBucket("error",
|
1951
|
+
name="error-backend-bucket",
|
1952
|
+
bucket_name=error_bucket.name,
|
1953
|
+
enable_cdn=True)
|
1954
|
+
urlmap = gcp.compute.URLMap("urlmap",
|
1955
|
+
name="urlmap",
|
1956
|
+
description="a description",
|
1957
|
+
default_service=example.id,
|
1958
|
+
default_custom_error_response_policy={
|
1959
|
+
"errorResponseRules": [{
|
1960
|
+
"matchResponseCodes": ["5xx"],
|
1961
|
+
"path": "/*",
|
1962
|
+
"overrideResponseCode": 502,
|
1963
|
+
}],
|
1964
|
+
"errorService": error.id,
|
1965
|
+
},
|
1966
|
+
host_rules=[{
|
1967
|
+
"hosts": ["mysite.com"],
|
1968
|
+
"pathMatcher": "mysite",
|
1969
|
+
}],
|
1970
|
+
path_matchers=[{
|
1971
|
+
"name": "mysite",
|
1972
|
+
"defaultService": example.id,
|
1973
|
+
"defaultCustomErrorResponsePolicy": {
|
1974
|
+
"errorResponseRules": [
|
1975
|
+
{
|
1976
|
+
"matchResponseCodes": [
|
1977
|
+
"4xx",
|
1978
|
+
"5xx",
|
1979
|
+
],
|
1980
|
+
"path": "/login",
|
1981
|
+
"overrideResponseCode": 404,
|
1982
|
+
},
|
1983
|
+
{
|
1984
|
+
"matchResponseCodes": ["503"],
|
1985
|
+
"path": "/example",
|
1986
|
+
"overrideResponseCode": 502,
|
1987
|
+
},
|
1988
|
+
],
|
1989
|
+
"errorService": error.id,
|
1990
|
+
},
|
1991
|
+
"pathRules": [{
|
1992
|
+
"paths": ["/*"],
|
1993
|
+
"service": example.id,
|
1994
|
+
"customErrorResponsePolicy": {
|
1995
|
+
"errorResponseRules": [{
|
1996
|
+
"matchResponseCodes": ["4xx"],
|
1997
|
+
"path": "/register",
|
1998
|
+
"overrideResponseCode": 401,
|
1999
|
+
}],
|
2000
|
+
"errorService": error.id,
|
2001
|
+
},
|
2002
|
+
}],
|
2003
|
+
}])
|
2004
|
+
```
|
1779
2005
|
|
1780
2006
|
## Import
|
1781
2007
|
|
@@ -1816,6 +2042,7 @@ class URLMap(pulumi.CustomResource):
|
|
1816
2042
|
def _internal_init(__self__,
|
1817
2043
|
resource_name: str,
|
1818
2044
|
opts: Optional[pulumi.ResourceOptions] = None,
|
2045
|
+
default_custom_error_response_policy: Optional[pulumi.Input[Union['URLMapDefaultCustomErrorResponsePolicyArgs', 'URLMapDefaultCustomErrorResponsePolicyArgsDict']]] = None,
|
1819
2046
|
default_route_action: Optional[pulumi.Input[Union['URLMapDefaultRouteActionArgs', 'URLMapDefaultRouteActionArgsDict']]] = None,
|
1820
2047
|
default_service: Optional[pulumi.Input[str]] = None,
|
1821
2048
|
default_url_redirect: Optional[pulumi.Input[Union['URLMapDefaultUrlRedirectArgs', 'URLMapDefaultUrlRedirectArgsDict']]] = None,
|
@@ -1835,6 +2062,7 @@ class URLMap(pulumi.CustomResource):
|
|
1835
2062
|
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
1836
2063
|
__props__ = URLMapArgs.__new__(URLMapArgs)
|
1837
2064
|
|
2065
|
+
__props__.__dict__["default_custom_error_response_policy"] = default_custom_error_response_policy
|
1838
2066
|
__props__.__dict__["default_route_action"] = default_route_action
|
1839
2067
|
__props__.__dict__["default_service"] = default_service
|
1840
2068
|
__props__.__dict__["default_url_redirect"] = default_url_redirect
|
@@ -1860,6 +2088,7 @@ class URLMap(pulumi.CustomResource):
|
|
1860
2088
|
id: pulumi.Input[str],
|
1861
2089
|
opts: Optional[pulumi.ResourceOptions] = None,
|
1862
2090
|
creation_timestamp: Optional[pulumi.Input[str]] = None,
|
2091
|
+
default_custom_error_response_policy: Optional[pulumi.Input[Union['URLMapDefaultCustomErrorResponsePolicyArgs', 'URLMapDefaultCustomErrorResponsePolicyArgsDict']]] = None,
|
1863
2092
|
default_route_action: Optional[pulumi.Input[Union['URLMapDefaultRouteActionArgs', 'URLMapDefaultRouteActionArgsDict']]] = None,
|
1864
2093
|
default_service: Optional[pulumi.Input[str]] = None,
|
1865
2094
|
default_url_redirect: Optional[pulumi.Input[Union['URLMapDefaultUrlRedirectArgs', 'URLMapDefaultUrlRedirectArgsDict']]] = None,
|
@@ -1881,6 +2110,15 @@ class URLMap(pulumi.CustomResource):
|
|
1881
2110
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
1882
2111
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
1883
2112
|
:param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
|
2113
|
+
:param pulumi.Input[Union['URLMapDefaultCustomErrorResponsePolicyArgs', 'URLMapDefaultCustomErrorResponsePolicyArgsDict']] default_custom_error_response_policy: defaultCustomErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error.
|
2114
|
+
This policy takes effect at the PathMatcher level and applies only when no policy has been defined for the error code at lower levels like RouteRule and PathRule within this PathMatcher. If an error code does not have a policy defined in defaultCustomErrorResponsePolicy, then a policy defined for the error code in UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
2115
|
+
For example, consider a UrlMap with the following configuration:
|
2116
|
+
UrlMap.defaultCustomErrorResponsePolicy is configured with policies for 5xx and 4xx errors
|
2117
|
+
A RouteRule for /coming_soon/ is configured for the error code 404.
|
2118
|
+
If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
2119
|
+
When used in conjunction with pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client.
|
2120
|
+
defaultCustomErrorResponsePolicy is supported only for global external Application Load Balancers.
|
2121
|
+
Structure is documented below.
|
1884
2122
|
:param pulumi.Input[Union['URLMapDefaultRouteActionArgs', 'URLMapDefaultRouteActionArgsDict']] default_route_action: defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions
|
1885
2123
|
like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend.
|
1886
2124
|
If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService
|
@@ -1927,6 +2165,7 @@ class URLMap(pulumi.CustomResource):
|
|
1927
2165
|
__props__ = _URLMapState.__new__(_URLMapState)
|
1928
2166
|
|
1929
2167
|
__props__.__dict__["creation_timestamp"] = creation_timestamp
|
2168
|
+
__props__.__dict__["default_custom_error_response_policy"] = default_custom_error_response_policy
|
1930
2169
|
__props__.__dict__["default_route_action"] = default_route_action
|
1931
2170
|
__props__.__dict__["default_service"] = default_service
|
1932
2171
|
__props__.__dict__["default_url_redirect"] = default_url_redirect
|
@@ -1950,6 +2189,22 @@ class URLMap(pulumi.CustomResource):
|
|
1950
2189
|
"""
|
1951
2190
|
return pulumi.get(self, "creation_timestamp")
|
1952
2191
|
|
2192
|
+
@property
|
2193
|
+
@pulumi.getter(name="defaultCustomErrorResponsePolicy")
|
2194
|
+
def default_custom_error_response_policy(self) -> pulumi.Output[Optional['outputs.URLMapDefaultCustomErrorResponsePolicy']]:
|
2195
|
+
"""
|
2196
|
+
defaultCustomErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error.
|
2197
|
+
This policy takes effect at the PathMatcher level and applies only when no policy has been defined for the error code at lower levels like RouteRule and PathRule within this PathMatcher. If an error code does not have a policy defined in defaultCustomErrorResponsePolicy, then a policy defined for the error code in UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
2198
|
+
For example, consider a UrlMap with the following configuration:
|
2199
|
+
UrlMap.defaultCustomErrorResponsePolicy is configured with policies for 5xx and 4xx errors
|
2200
|
+
A RouteRule for /coming_soon/ is configured for the error code 404.
|
2201
|
+
If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect.
|
2202
|
+
When used in conjunction with pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client.
|
2203
|
+
defaultCustomErrorResponsePolicy is supported only for global external Application Load Balancers.
|
2204
|
+
Structure is documented below.
|
2205
|
+
"""
|
2206
|
+
return pulumi.get(self, "default_custom_error_response_policy")
|
2207
|
+
|
1953
2208
|
@property
|
1954
2209
|
@pulumi.getter(name="defaultRouteAction")
|
1955
2210
|
def default_route_action(self) -> pulumi.Output[Optional['outputs.URLMapDefaultRouteAction']]:
|
@@ -594,7 +594,7 @@ class AwsCluster(pulumi.CustomResource):
|
|
594
594
|
An Anthos cluster running on AWS.
|
595
595
|
|
596
596
|
For more information, see:
|
597
|
-
* [Multicloud overview](https://cloud.google.com/
|
597
|
+
* [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs)
|
598
598
|
## Example Usage
|
599
599
|
|
600
600
|
### Basic_aws_cluster
|
@@ -876,7 +876,7 @@ class AwsCluster(pulumi.CustomResource):
|
|
876
876
|
An Anthos cluster running on AWS.
|
877
877
|
|
878
878
|
For more information, see:
|
879
|
-
* [Multicloud overview](https://cloud.google.com/
|
879
|
+
* [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs)
|
880
880
|
## Example Usage
|
881
881
|
|
882
882
|
### Basic_aws_cluster
|
@@ -561,7 +561,7 @@ class AwsNodePool(pulumi.CustomResource):
|
|
561
561
|
An Anthos node pool running on AWS.
|
562
562
|
|
563
563
|
For more information, see:
|
564
|
-
* [Multicloud overview](https://cloud.google.com/
|
564
|
+
* [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs)
|
565
565
|
## Example Usage
|
566
566
|
|
567
567
|
### Basic_aws_cluster
|
@@ -983,7 +983,7 @@ class AwsNodePool(pulumi.CustomResource):
|
|
983
983
|
An Anthos node pool running on AWS.
|
984
984
|
|
985
985
|
For more information, see:
|
986
|
-
* [Multicloud overview](https://cloud.google.com/
|
986
|
+
* [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs)
|
987
987
|
## Example Usage
|
988
988
|
|
989
989
|
### Basic_aws_cluster
|
@@ -268,7 +268,7 @@ class AzureClient(pulumi.CustomResource):
|
|
268
268
|
AzureClient resources hold client authentication information needed by the Anthos Multi-Cloud API to manage Azure resources on your Azure subscription.When an AzureCluster is created, an AzureClient resource needs to be provided and all operations on Azure resources associated to that cluster will authenticate to Azure services using the given client.AzureClient resources are immutable and cannot be modified upon creation.Each AzureClient resource is bound to a single Azure Active Directory Application and tenant.
|
269
269
|
|
270
270
|
For more information, see:
|
271
|
-
* [Multicloud overview](https://cloud.google.com/
|
271
|
+
* [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs)
|
272
272
|
## Example Usage
|
273
273
|
|
274
274
|
### Basic_azure_client
|
@@ -331,7 +331,7 @@ class AzureClient(pulumi.CustomResource):
|
|
331
331
|
AzureClient resources hold client authentication information needed by the Anthos Multi-Cloud API to manage Azure resources on your Azure subscription.When an AzureCluster is created, an AzureClient resource needs to be provided and all operations on Azure resources associated to that cluster will authenticate to Azure services using the given client.AzureClient resources are immutable and cannot be modified upon creation.Each AzureClient resource is bound to a single Azure Active Directory Application and tenant.
|
332
332
|
|
333
333
|
For more information, see:
|
334
|
-
* [Multicloud overview](https://cloud.google.com/
|
334
|
+
* [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs)
|
335
335
|
## Example Usage
|
336
336
|
|
337
337
|
### Basic_azure_client
|
@@ -671,7 +671,7 @@ class AzureCluster(pulumi.CustomResource):
|
|
671
671
|
An Anthos cluster running on Azure.
|
672
672
|
|
673
673
|
For more information, see:
|
674
|
-
* [Multicloud overview](https://cloud.google.com/
|
674
|
+
* [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs)
|
675
675
|
## Example Usage
|
676
676
|
|
677
677
|
### Basic_azure_cluster
|
@@ -829,7 +829,7 @@ class AzureCluster(pulumi.CustomResource):
|
|
829
829
|
An Anthos cluster running on Azure.
|
830
830
|
|
831
831
|
For more information, see:
|
832
|
-
* [Multicloud overview](https://cloud.google.com/
|
832
|
+
* [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs)
|
833
833
|
## Example Usage
|
834
834
|
|
835
835
|
### Basic_azure_cluster
|
@@ -561,7 +561,7 @@ class AzureNodePool(pulumi.CustomResource):
|
|
561
561
|
An Anthos node pool running on Azure.
|
562
562
|
|
563
563
|
For more information, see:
|
564
|
-
* [Multicloud overview](https://cloud.google.com/
|
564
|
+
* [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs)
|
565
565
|
## Example Usage
|
566
566
|
|
567
567
|
### Basic_azure_node_pool
|
@@ -700,7 +700,7 @@ class AzureNodePool(pulumi.CustomResource):
|
|
700
700
|
An Anthos node pool running on Azure.
|
701
701
|
|
702
702
|
For more information, see:
|
703
|
-
* [Multicloud overview](https://cloud.google.com/
|
703
|
+
* [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs)
|
704
704
|
## Example Usage
|
705
705
|
|
706
706
|
### Basic_azure_node_pool
|