turbot/gcp

steampipe plugin install gcpsteampipe plugin install gcp
On This Page
Get Involved

Table: gcp_compute_url_map

When you configure an HTTP(S) load balancer or Traffic Director, you create a URL map. This URL map directs traffic to one or more of the following destinations based on rules that you define: Default backend service. Non-default backend servic

Get the default backend service of each url-map

select
name,
id,
default_service_name
from
gcp_compute_url_map;

Path matcher info of each url-map

select
name,
id,
p ->> 'name' as name,
r ->> 'paths' as paths,
split_part(r ->> 'service', '/', 10) as service
from
gcp_compute_url_map,
jsonb_array_elements(path_matchers) as p,
jsonb_array_elements(p -> 'pathRules') as r;

Host rule info of each url-map

select
name,
id,
p ->> 'hosts' as hosts,
p ->> 'pathMatcher' as path_matcher
from
gcp_compute_url_map,
jsonb_array_elements(host_rules) as p;

List of all global type url-maps

select
name,
id,
location_type
from
gcp_compute_url_map
where
location_type = 'GLOBAL';

.inspect gcp_compute_url_map

GCP Compute URL Map

NameTypeDescription
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
creation_timestamptimestamp without time zoneThe creation timestamp of the resource.
default_route_actionjsonbDefaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set.
default_servicetextThe full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match.
default_service_nametextThe defaultService name of resource to which traffic is directed if none of the hostRules match.
default_url_host_redirecttextThe host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.
default_url_https_redirectbooleanSpecifies whether the URL scheme in the redirected request is set to https, or not.
default_url_path_redirecttextThe path that will be used in the redirect response instead of the one that was supplied in the request.
default_url_prefix_redirecttextThe prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
default_url_redirect_response_codetextSpecifies the HTTP Status code to use for this RedirectAction.
default_url_strip_querybooleanSpecifies whether any accompanying query portion of the original URL is removed prior to redirecting the request, or not.
descriptiontextA user-specified, human-readable description of the URL map.
fingerprinttextAn unique system generated string, to reduce conflicts when multiple users change any property of the resource.
host_rulesjsonbThe list of HostRules to use against the URL.
idbigintThe unique identifier for the resource.
kindtextThe type of the resource.
locationtextThe GCP multi-region, region, or zone in which the resource is located.
location_typetextLocation type where the url map resides.
nametextA friendly name that identifies the resource.
path_matchersjsonbThe list of named PathMatchers to use against the URL.
projecttextThe GCP Project in which the resource is located.
regiontextThe URL of the region where the regional backend service resides. This field is not applicable to global backend services.
request_headers_to_addjsonbA list of headers to add to a matching request prior to forwarding the request to the backendService.
request_headers_to_removejsonbA list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
response_headers_to_addjsonbA list of headers to add the response prior to sending the response back to the client.
response_headers_to_removejsonbA list of header names for headers that need to be removed from the response prior to sending the response back to the client.
self_linktextThe server-defined URL for the resource.
testsjsonbThe list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass.
titletextTitle of the resource.