Skip to main content

region_url_maps

Creates, updates, deletes, gets or lists a region_url_maps resource.

Overview

Nameregion_url_maps
TypeResource
Idgoogle.compute.region_url_maps

Fields

NameDatatypeDescription
idstring[Output Only] The unique identifier for the resource. This identifier is defined by the server.
namestringName of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
descriptionstringAn optional description of this resource. Provide this property when you create the resource.
creationTimestampstring[Output Only] Creation timestamp in RFC3339 text format.
defaultCustomErrorResponsePolicyobjectSpecifies the custom error response policy that must be applied when the backend service or backend bucket responds with an error.
defaultRouteActionobject
defaultServicestringThe full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any defaultRouteAction.weightedBackendServices. Conversely, if defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
defaultUrlRedirectobjectSpecifies settings for an HTTP redirect.
fingerprintstringFingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field is ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a UrlMap.
headerActionobjectThe request and response header transformations that take effect before the request is passed along to the selected backendService.
hostRulesarrayThe list of host rules to use against the URL.
kindstring[Output Only] Type of the resource. Always compute#urlMaps for url maps.
pathMatchersarrayThe list of named PathMatchers to use against the URL.
regionstring[Output Only] URL of the region where the regional URL map resides. This field is not applicable to global URL maps. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
selfLinkstring[Output Only] Server-defined URL for the resource.
testsarrayThe list of expected URL mapping tests. Request to update the UrlMap succeeds only if all test cases pass. You can specify a maximum of 100 tests per UrlMap. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.

Methods

NameAccessible byRequired ParamsDescription
getSELECTproject, region, urlMapReturns the specified UrlMap resource.
listSELECTproject, regionRetrieves the list of UrlMap resources available to the specified project in the specified region.
insertINSERTproject, regionCreates a UrlMap resource in the specified project using the data included in the request.
deleteDELETEproject, region, urlMapDeletes the specified UrlMap resource.
patchUPDATEproject, region, urlMapPatches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
updateREPLACEproject, region, urlMapUpdates the specified UrlMap resource with the data included in the request.
validateEXECproject, region, urlMapRuns static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.

SELECT examples

Retrieves the list of UrlMap resources available to the specified project in the specified region.

SELECT
id,
name,
description,
creationTimestamp,
defaultCustomErrorResponsePolicy,
defaultRouteAction,
defaultService,
defaultUrlRedirect,
fingerprint,
headerAction,
hostRules,
kind,
pathMatchers,
region,
selfLink,
tests
FROM google.compute.region_url_maps
WHERE project = '{{ project }}'
AND region = '{{ region }}';

INSERT example

Use the following StackQL query and manifest file to create a new region_url_maps resource.

/*+ create */
INSERT INTO google.compute.region_url_maps (
project,
region,
name,
description,
hostRules,
pathMatchers,
tests,
defaultService,
defaultRouteAction,
defaultUrlRedirect,
headerAction,
defaultCustomErrorResponsePolicy,
fingerprint,
region
)
SELECT
'{{ project }}',
'{{ region }}',
'{{ name }}',
'{{ description }}',
'{{ hostRules }}',
'{{ pathMatchers }}',
'{{ tests }}',
'{{ defaultService }}',
'{{ defaultRouteAction }}',
'{{ defaultUrlRedirect }}',
'{{ headerAction }}',
'{{ defaultCustomErrorResponsePolicy }}',
'{{ fingerprint }}',
'{{ region }}'
;

UPDATE example

Updates a region_url_maps resource.

/*+ update */
UPDATE google.compute.region_url_maps
SET
name = '{{ name }}',
description = '{{ description }}',
hostRules = '{{ hostRules }}',
pathMatchers = '{{ pathMatchers }}',
tests = '{{ tests }}',
defaultService = '{{ defaultService }}',
defaultRouteAction = '{{ defaultRouteAction }}',
defaultUrlRedirect = '{{ defaultUrlRedirect }}',
headerAction = '{{ headerAction }}',
defaultCustomErrorResponsePolicy = '{{ defaultCustomErrorResponsePolicy }}',
fingerprint = '{{ fingerprint }}',
region = '{{ region }}'
WHERE
project = '{{ project }}'
AND region = '{{ region }}'
AND urlMap = '{{ urlMap }}';

REPLACE example

Replaces all fields in the specified region_url_maps resource.

/*+ update */
REPLACE google.compute.region_url_maps
SET
name = '{{ name }}',
description = '{{ description }}',
hostRules = '{{ hostRules }}',
pathMatchers = '{{ pathMatchers }}',
tests = '{{ tests }}',
defaultService = '{{ defaultService }}',
defaultRouteAction = '{{ defaultRouteAction }}',
defaultUrlRedirect = '{{ defaultUrlRedirect }}',
headerAction = '{{ headerAction }}',
defaultCustomErrorResponsePolicy = '{{ defaultCustomErrorResponsePolicy }}',
fingerprint = '{{ fingerprint }}',
region = '{{ region }}'
WHERE
project = '{{ project }}'
AND region = '{{ region }}'
AND urlMap = '{{ urlMap }}';

DELETE example

Deletes the specified region_url_maps resource.

/*+ delete */
DELETE FROM google.compute.region_url_maps
WHERE project = '{{ project }}'
AND region = '{{ region }}'
AND urlMap = '{{ urlMap }}';