Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.urlMaps.html">urlMaps</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 78 | <code><a href="#delete">delete(project, urlMap, requestId=None)</a></code></p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 79 | <p class="firstline">Deletes the specified UrlMap resource.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#get">get(project, urlMap)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 82 | <p class="firstline">Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 83 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 84 | <code><a href="#insert">insert(project, body, requestId=None)</a></code></p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 85 | <p class="firstline">Creates a UrlMap resource in the specified project using the data included in the request.</p> |
| 86 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 87 | <code><a href="#invalidateCache">invalidateCache(project, urlMap, body, requestId=None)</a></code></p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 88 | <p class="firstline">Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.</p> |
| 89 | <p class="toc_element"> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 90 | <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 91 | <p class="firstline">Retrieves the list of UrlMap resources available to the specified project.</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 94 | <p class="firstline">Retrieves the next page of results.</p> |
| 95 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 96 | <code><a href="#patch">patch(project, urlMap, body, requestId=None)</a></code></p> |
| 97 | <p class="firstline">Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 98 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 99 | <code><a href="#update">update(project, urlMap, body, requestId=None)</a></code></p> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 100 | <p class="firstline">Updates the specified UrlMap resource with the data included in the request.</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 101 | <p class="toc_element"> |
| 102 | <code><a href="#validate">validate(project, urlMap, body)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 103 | <p class="firstline">Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 104 | <h3>Method Details</h3> |
| 105 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 106 | <code class="details" id="delete">delete(project, urlMap, requestId=None)</code> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 107 | <pre>Deletes the specified UrlMap resource. |
| 108 | |
| 109 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 110 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 111 | urlMap: string, Name of the UrlMap resource to delete. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 112 | requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. |
| 113 | |
| 114 | For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| 115 | |
| 116 | The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 117 | |
| 118 | Returns: |
| 119 | An object of the form: |
| 120 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 121 | { # Represents an Operation resource. |
| 122 | # |
| 123 | # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. |
| 124 | # |
| 125 | # Operations can be global, regional or zonal. |
| 126 | # - For global operations, use the globalOperations resource. |
| 127 | # - For regional operations, use the regionOperations resource. |
| 128 | # - For zonal operations, use the zonalOperations resource. |
| 129 | # |
| 130 | # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 131 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 132 | "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 133 | "creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 134 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 135 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 136 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 137 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 138 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 139 | "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| 140 | "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 141 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 142 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 143 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 144 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 145 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 146 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 147 | "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. |
| 148 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 149 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 150 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 151 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 152 | "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 153 | }, |
| 154 | ], |
| 155 | }, |
| 156 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 157 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 158 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 159 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 160 | "name": "A String", # [Output Only] Name of the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 161 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 162 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 163 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 164 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 165 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 166 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 167 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 168 | }, |
| 169 | ], |
| 170 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 171 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 172 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 173 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 174 | }</pre> |
| 175 | </div> |
| 176 | |
| 177 | <div class="method"> |
| 178 | <code class="details" id="get">get(project, urlMap)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 179 | <pre>Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 180 | |
| 181 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 182 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 183 | urlMap: string, Name of the UrlMap resource to return. (required) |
| 184 | |
| 185 | Returns: |
| 186 | An object of the form: |
| 187 | |
| 188 | { # A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the "longest-match" of the URL's host and path. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 189 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 190 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 191 | "defaultService": "A String", # The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 192 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 193 | "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 194 | { # Message for the expected URL mappings. |
| 195 | "path": "A String", # Path portion of the URL. |
| 196 | "host": "A String", # Host portion of the URL. |
| 197 | "description": "A String", # Description of this test case. |
| 198 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 199 | }, |
| 200 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 201 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 202 | "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be 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. |
| 203 | # |
| 204 | # To see the latest fingerprint, make a get() request to retrieve a UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 205 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 206 | { # A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 207 | "defaultService": "A String", # The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 208 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 209 | # - compute/v1/projects/project/global/backendServices/backendService |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 210 | # - global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. |
| 211 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 212 | # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: |
| 213 | # - compute.backendBuckets.use |
| 214 | # - compute.backendServices.use |
| 215 | "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. |
| 216 | # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. |
| 217 | # Only one of pathRules or routeRules must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 218 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 219 | "paths": [ # The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| 220 | "A String", |
| 221 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 222 | "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 223 | # Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 224 | }, |
| 225 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 226 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 227 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 228 | }, |
| 229 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 230 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 231 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 232 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 233 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 234 | "hosts": [ # The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 235 | "A String", |
| 236 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 237 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 238 | "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 239 | }, |
| 240 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 241 | "name": "A String", # Name 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 242 | }</pre> |
| 243 | </div> |
| 244 | |
| 245 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 246 | <code class="details" id="insert">insert(project, body, requestId=None)</code> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 247 | <pre>Creates a UrlMap resource in the specified project using the data included in the request. |
| 248 | |
| 249 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 250 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 251 | body: object, The request body. (required) |
| 252 | The object takes the form of: |
| 253 | |
| 254 | { # A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the "longest-match" of the URL's host and path. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 255 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 256 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 257 | "defaultService": "A String", # The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 258 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 259 | "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 260 | { # Message for the expected URL mappings. |
| 261 | "path": "A String", # Path portion of the URL. |
| 262 | "host": "A String", # Host portion of the URL. |
| 263 | "description": "A String", # Description of this test case. |
| 264 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 265 | }, |
| 266 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 267 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 268 | "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be 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. |
| 269 | # |
| 270 | # To see the latest fingerprint, make a get() request to retrieve a UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 271 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 272 | { # A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 273 | "defaultService": "A String", # The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 274 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 275 | # - compute/v1/projects/project/global/backendServices/backendService |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 276 | # - global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. |
| 277 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 278 | # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: |
| 279 | # - compute.backendBuckets.use |
| 280 | # - compute.backendServices.use |
| 281 | "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. |
| 282 | # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. |
| 283 | # Only one of pathRules or routeRules must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 284 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 285 | "paths": [ # The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| 286 | "A String", |
| 287 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 288 | "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 289 | # Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 290 | }, |
| 291 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 292 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 293 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 294 | }, |
| 295 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 296 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 297 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 298 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 299 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 300 | "hosts": [ # The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 301 | "A String", |
| 302 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 303 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 304 | "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 305 | }, |
| 306 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 307 | "name": "A String", # Name 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 308 | } |
| 309 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 310 | requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. |
| 311 | |
| 312 | For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| 313 | |
| 314 | The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 315 | |
| 316 | Returns: |
| 317 | An object of the form: |
| 318 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 319 | { # Represents an Operation resource. |
| 320 | # |
| 321 | # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. |
| 322 | # |
| 323 | # Operations can be global, regional or zonal. |
| 324 | # - For global operations, use the globalOperations resource. |
| 325 | # - For regional operations, use the regionOperations resource. |
| 326 | # - For zonal operations, use the zonalOperations resource. |
| 327 | # |
| 328 | # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 329 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 330 | "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 331 | "creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 332 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 333 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 334 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 335 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 336 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 337 | "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| 338 | "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 339 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 340 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 341 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 342 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 343 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 344 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 345 | "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. |
| 346 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 347 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 348 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 349 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 350 | "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 351 | }, |
| 352 | ], |
| 353 | }, |
| 354 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 355 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 356 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 357 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 358 | "name": "A String", # [Output Only] Name of the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 359 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 360 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 361 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 362 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 363 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 364 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 365 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 366 | }, |
| 367 | ], |
| 368 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 369 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 370 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 371 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 372 | }</pre> |
| 373 | </div> |
| 374 | |
| 375 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 376 | <code class="details" id="invalidateCache">invalidateCache(project, urlMap, body, requestId=None)</code> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 377 | <pre>Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. |
| 378 | |
| 379 | Args: |
| 380 | project: string, Project ID for this request. (required) |
| 381 | urlMap: string, Name of the UrlMap scoping this request. (required) |
| 382 | body: object, The request body. (required) |
| 383 | The object takes the form of: |
| 384 | |
| 385 | { |
| 386 | "path": "A String", |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 387 | "host": "A String", # If set, this invalidation rule will only apply to requests with a Host header matching host. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 388 | } |
| 389 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 390 | requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. |
| 391 | |
| 392 | For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| 393 | |
| 394 | The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 395 | |
| 396 | Returns: |
| 397 | An object of the form: |
| 398 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 399 | { # Represents an Operation resource. |
| 400 | # |
| 401 | # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. |
| 402 | # |
| 403 | # Operations can be global, regional or zonal. |
| 404 | # - For global operations, use the globalOperations resource. |
| 405 | # - For regional operations, use the regionOperations resource. |
| 406 | # - For zonal operations, use the zonalOperations resource. |
| 407 | # |
| 408 | # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 409 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 410 | "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 411 | "creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 412 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 413 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 414 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 415 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
| 416 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| 417 | "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| 418 | "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found. |
| 419 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
| 420 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 421 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
| 422 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| 423 | { |
| 424 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 425 | "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. |
| 426 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 427 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
| 428 | { |
| 429 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 430 | "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 431 | }, |
| 432 | ], |
| 433 | }, |
| 434 | ], |
| 435 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
| 436 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 437 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
| 438 | "name": "A String", # [Output Only] Name of the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 439 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 440 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
| 441 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
| 442 | { |
| 443 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 444 | "code": "A String", # [Output Only] The error type identifier for this error. |
| 445 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
| 446 | }, |
| 447 | ], |
| 448 | }, |
| 449 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
| 450 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 451 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 452 | }</pre> |
| 453 | </div> |
| 454 | |
| 455 | <div class="method"> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 456 | <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 457 | <pre>Retrieves the list of UrlMap resources available to the specified project. |
| 458 | |
| 459 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 460 | project: string, Project ID for this request. (required) |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 461 | orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. |
| 462 | |
| 463 | You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. |
| 464 | |
| 465 | Currently, only sorting by name or creationTimestamp desc is supported. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 466 | maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 467 | pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 468 | filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 469 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 470 | For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 471 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 472 | You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 473 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 474 | To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 475 | |
| 476 | Returns: |
| 477 | An object of the form: |
| 478 | |
| 479 | { # Contains a list of UrlMap resources. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 480 | "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 481 | "kind": "compute#urlMapList", # Type of resource. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 482 | "items": [ # A list of UrlMap resources. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 483 | { # A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the "longest-match" of the URL's host and path. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 484 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 485 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 486 | "defaultService": "A String", # The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 487 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 488 | "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 489 | { # Message for the expected URL mappings. |
| 490 | "path": "A String", # Path portion of the URL. |
| 491 | "host": "A String", # Host portion of the URL. |
| 492 | "description": "A String", # Description of this test case. |
| 493 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 494 | }, |
| 495 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 496 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 497 | "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be 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. |
| 498 | # |
| 499 | # To see the latest fingerprint, make a get() request to retrieve a UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 500 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 501 | { # A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 502 | "defaultService": "A String", # The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 503 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 504 | # - compute/v1/projects/project/global/backendServices/backendService |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 505 | # - global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. |
| 506 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 507 | # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: |
| 508 | # - compute.backendBuckets.use |
| 509 | # - compute.backendServices.use |
| 510 | "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. |
| 511 | # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. |
| 512 | # Only one of pathRules or routeRules must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 513 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 514 | "paths": [ # The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| 515 | "A String", |
| 516 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 517 | "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 518 | # Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 519 | }, |
| 520 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 521 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 522 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 523 | }, |
| 524 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 525 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 526 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 527 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 528 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 529 | "hosts": [ # The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 530 | "A String", |
| 531 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 532 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 533 | "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 534 | }, |
| 535 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 536 | "name": "A String", # Name 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 537 | }, |
| 538 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 539 | "warning": { # [Output Only] Informational warning message. |
| 540 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 541 | "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. |
| 542 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 543 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
| 544 | { |
| 545 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 546 | "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 547 | }, |
| 548 | ], |
| 549 | }, |
| 550 | "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 551 | "selfLink": "A String", # [Output Only] Server-defined URL for this resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 552 | }</pre> |
| 553 | </div> |
| 554 | |
| 555 | <div class="method"> |
| 556 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 557 | <pre>Retrieves the next page of results. |
| 558 | |
| 559 | Args: |
| 560 | previous_request: The request for the previous page. (required) |
| 561 | previous_response: The response from the request for the previous page. (required) |
| 562 | |
| 563 | Returns: |
| 564 | A request object that you can call 'execute()' on to request the next |
| 565 | page. Returns None if there are no more items in the collection. |
| 566 | </pre> |
| 567 | </div> |
| 568 | |
| 569 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 570 | <code class="details" id="patch">patch(project, urlMap, body, requestId=None)</code> |
| 571 | <pre>Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 572 | |
| 573 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 574 | project: string, Project ID for this request. (required) |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 575 | urlMap: string, Name of the UrlMap resource to patch. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 576 | body: object, The request body. (required) |
| 577 | The object takes the form of: |
| 578 | |
| 579 | { # A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the "longest-match" of the URL's host and path. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 580 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 581 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 582 | "defaultService": "A String", # The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 583 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 584 | "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 585 | { # Message for the expected URL mappings. |
| 586 | "path": "A String", # Path portion of the URL. |
| 587 | "host": "A String", # Host portion of the URL. |
| 588 | "description": "A String", # Description of this test case. |
| 589 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 590 | }, |
| 591 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 592 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 593 | "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be 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. |
| 594 | # |
| 595 | # To see the latest fingerprint, make a get() request to retrieve a UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 596 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 597 | { # A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 598 | "defaultService": "A String", # The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 599 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 600 | # - compute/v1/projects/project/global/backendServices/backendService |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 601 | # - global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. |
| 602 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 603 | # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: |
| 604 | # - compute.backendBuckets.use |
| 605 | # - compute.backendServices.use |
| 606 | "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. |
| 607 | # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. |
| 608 | # Only one of pathRules or routeRules must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 609 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 610 | "paths": [ # The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| 611 | "A String", |
| 612 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 613 | "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 614 | # Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 615 | }, |
| 616 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 617 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 618 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 619 | }, |
| 620 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 621 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 622 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 623 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 624 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 625 | "hosts": [ # The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 626 | "A String", |
| 627 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 628 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 629 | "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 630 | }, |
| 631 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 632 | "name": "A String", # Name 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 633 | } |
| 634 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 635 | requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. |
| 636 | |
| 637 | For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| 638 | |
| 639 | The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 640 | |
| 641 | Returns: |
| 642 | An object of the form: |
| 643 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 644 | { # Represents an Operation resource. |
| 645 | # |
| 646 | # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. |
| 647 | # |
| 648 | # Operations can be global, regional or zonal. |
| 649 | # - For global operations, use the globalOperations resource. |
| 650 | # - For regional operations, use the regionOperations resource. |
| 651 | # - For zonal operations, use the zonalOperations resource. |
| 652 | # |
| 653 | # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 654 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 655 | "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 656 | "creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 657 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 658 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 659 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 660 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 661 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 662 | "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| 663 | "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 664 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 665 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 666 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 667 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 668 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 669 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 670 | "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. |
| 671 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 672 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 673 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 674 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 675 | "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 676 | }, |
| 677 | ], |
| 678 | }, |
| 679 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 680 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 681 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 682 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 683 | "name": "A String", # [Output Only] Name of the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 684 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 685 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 686 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 687 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 688 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 689 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 690 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 691 | }, |
| 692 | ], |
| 693 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 694 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 695 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 696 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 697 | }</pre> |
| 698 | </div> |
| 699 | |
| 700 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 701 | <code class="details" id="update">update(project, urlMap, body, requestId=None)</code> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 702 | <pre>Updates the specified UrlMap resource with the data included in the request. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 703 | |
| 704 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 705 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 706 | urlMap: string, Name of the UrlMap resource to update. (required) |
| 707 | body: object, The request body. (required) |
| 708 | The object takes the form of: |
| 709 | |
| 710 | { # A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the "longest-match" of the URL's host and path. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 711 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 712 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 713 | "defaultService": "A String", # The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 714 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 715 | "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 716 | { # Message for the expected URL mappings. |
| 717 | "path": "A String", # Path portion of the URL. |
| 718 | "host": "A String", # Host portion of the URL. |
| 719 | "description": "A String", # Description of this test case. |
| 720 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 721 | }, |
| 722 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 723 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 724 | "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be 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. |
| 725 | # |
| 726 | # To see the latest fingerprint, make a get() request to retrieve a UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 727 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 728 | { # A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 729 | "defaultService": "A String", # The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 730 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 731 | # - compute/v1/projects/project/global/backendServices/backendService |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 732 | # - global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. |
| 733 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 734 | # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: |
| 735 | # - compute.backendBuckets.use |
| 736 | # - compute.backendServices.use |
| 737 | "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. |
| 738 | # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. |
| 739 | # Only one of pathRules or routeRules must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 740 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 741 | "paths": [ # The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| 742 | "A String", |
| 743 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 744 | "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 745 | # Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 746 | }, |
| 747 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 748 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 749 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 750 | }, |
| 751 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 752 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 753 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 754 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 755 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 756 | "hosts": [ # The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 757 | "A String", |
| 758 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 759 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 760 | "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 761 | }, |
| 762 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 763 | "name": "A String", # Name 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 764 | } |
| 765 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 766 | requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. |
| 767 | |
| 768 | For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| 769 | |
| 770 | The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 771 | |
| 772 | Returns: |
| 773 | An object of the form: |
| 774 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 775 | { # Represents an Operation resource. |
| 776 | # |
| 777 | # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. |
| 778 | # |
| 779 | # Operations can be global, regional or zonal. |
| 780 | # - For global operations, use the globalOperations resource. |
| 781 | # - For regional operations, use the regionOperations resource. |
| 782 | # - For zonal operations, use the zonalOperations resource. |
| 783 | # |
| 784 | # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 785 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 786 | "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 787 | "creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 788 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 789 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 790 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 791 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 792 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 793 | "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| 794 | "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 795 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 796 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 797 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 798 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 799 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 800 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 801 | "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. |
| 802 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 803 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 804 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 805 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 806 | "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 807 | }, |
| 808 | ], |
| 809 | }, |
| 810 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 811 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 812 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 813 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 814 | "name": "A String", # [Output Only] Name of the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 815 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 816 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 817 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 818 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 819 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 820 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 821 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 822 | }, |
| 823 | ], |
| 824 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 825 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 826 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 827 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 828 | }</pre> |
| 829 | </div> |
| 830 | |
| 831 | <div class="method"> |
| 832 | <code class="details" id="validate">validate(project, urlMap, body)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 833 | <pre>Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 834 | |
| 835 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 836 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 837 | urlMap: string, Name of the UrlMap resource to be validated as. (required) |
| 838 | body: object, The request body. (required) |
| 839 | The object takes the form of: |
| 840 | |
| 841 | { |
| 842 | "resource": { # A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the "longest-match" of the URL's host and path. # Content of the UrlMap to be validated. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 843 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 844 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 845 | "defaultService": "A String", # The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 846 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 847 | "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 848 | { # Message for the expected URL mappings. |
| 849 | "path": "A String", # Path portion of the URL. |
| 850 | "host": "A String", # Host portion of the URL. |
| 851 | "description": "A String", # Description of this test case. |
| 852 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 853 | }, |
| 854 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 855 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 856 | "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be 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. |
| 857 | # |
| 858 | # To see the latest fingerprint, make a get() request to retrieve a UrlMap. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 859 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 860 | { # A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 861 | "defaultService": "A String", # The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 862 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 863 | # - compute/v1/projects/project/global/backendServices/backendService |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 864 | # - global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. |
| 865 | # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| 866 | # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: |
| 867 | # - compute.backendBuckets.use |
| 868 | # - compute.backendServices.use |
| 869 | "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. |
| 870 | # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. |
| 871 | # Only one of pathRules or routeRules must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 872 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 873 | "paths": [ # The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| 874 | "A String", |
| 875 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 876 | "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. |
| 877 | # Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 878 | }, |
| 879 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 880 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 881 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 882 | }, |
| 883 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 884 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 885 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 886 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 887 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 888 | "hosts": [ # The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 889 | "A String", |
| 890 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 891 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 892 | "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 893 | }, |
| 894 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 895 | "name": "A String", # Name 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 896 | }, |
| 897 | } |
| 898 | |
| 899 | |
| 900 | Returns: |
| 901 | An object of the form: |
| 902 | |
| 903 | { |
| 904 | "result": { # Message representing the validation result for a UrlMap. |
| 905 | "testFailures": [ |
| 906 | { |
| 907 | "path": "A String", |
| 908 | "actualService": "A String", |
| 909 | "host": "A String", |
| 910 | "expectedService": "A String", |
| 911 | }, |
| 912 | ], |
| 913 | "loadErrors": [ |
| 914 | "A String", |
| 915 | ], |
| 916 | "testPassed": True or False, # If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure. |
| 917 | "loadSucceeded": True or False, # Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons. |
| 918 | }, |
| 919 | }</pre> |
| 920 | </div> |
| 921 | |
| 922 | </body></html> |