Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -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="firebasehosting_v1beta1.html">Firebase Hosting API</a> . <a href="firebasehosting_v1beta1.sites.html">sites</a> . <a href="firebasehosting_v1beta1.sites.versions.html">versions</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="firebasehosting_v1beta1.sites.versions.files.html">files()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the files Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 83 | <code><a href="#create">create(parent, body=None, sizeBytes=None, versionId=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 84 | <p class="firstline">Creates a new version for a site.</p> |
| 85 | <p class="toc_element"> |
| 86 | <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> |
| 87 | <p class="firstline">Deletes the specified version.</p> |
| 88 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 89 | <code><a href="#list">list(parent, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</a></code></p> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <p class="firstline">Lists the versions that have been created on the specified site.</p> |
| 91 | <p class="toc_element"> |
| 92 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 93 | <p class="firstline">Retrieves the next page of results.</p> |
| 94 | <p class="toc_element"> |
| 95 | <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 96 | <p class="firstline">Updates the specified metadata for a version. Note that this method will</p> |
| 97 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 98 | <code><a href="#populateFiles">populateFiles(parent, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 99 | <p class="firstline">Adds content files to a version.</p> |
| 100 | <h3>Method Details</h3> |
| 101 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 102 | <code class="details" id="create">create(parent, body=None, sizeBytes=None, versionId=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 103 | <pre>Creates a new version for a site. |
| 104 | |
| 105 | Args: |
| 106 | parent: string, Required. The parent to create the version for, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 107 | <code>sites/<var>site-name</var></code> (required) |
| 108 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 109 | The object takes the form of: |
| 110 | |
| 111 | { # A `Version` is the collection of configuration and |
| 112 | # [static files](sites.versions.files) that determine how a site is displayed. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 113 | "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 114 | # a release or finalizing a version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 115 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 116 | # changed their email address or deleted their account. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 117 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 118 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 119 | "name": "A String", # The unique identifier for a version, in the format: |
| 120 | # <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> |
| 121 | # This name is provided in the response body when you call the |
| 122 | # [`CreateVersion`](../sites.versions/create) endpoint. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 123 | "labels": { # The labels used for extra metadata and/or filtering. |
| 124 | "a_key": "A String", |
| 125 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 126 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 127 | "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists |
| 128 | # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
| 129 | # processed before serving content. The URL request paths are matched against |
| 130 | # the specified URL patterns in the configuration, then Hosting applies the |
| 131 | # applicable configuration according to a specific |
| 132 | # [priority order](/docs/hosting/full-config#hosting_priority_order). |
| 133 | "headers": [ # An array of objects, where each object specifies a URL pattern that, if |
| 134 | # matched to the request URL path, triggers Hosting to apply the specified |
| 135 | # custom response headers. |
| 136 | { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies |
| 137 | # a URL pattern that, if matched to the request URL path, triggers Hosting to |
| 138 | # apply the specified custom response headers. |
| 139 | "glob": "A String", # The user-supplied |
| 140 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 141 | # against the request URL path. |
| 142 | "headers": { # Required. The additional headers to add to the response. |
| 143 | "a_key": "A String", |
| 144 | }, |
| 145 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 146 | # URL path. |
| 147 | }, |
| 148 | ], |
| 149 | "redirects": [ # An array of objects (called redirect rules), where each rule specifies a |
| 150 | # URL pattern that, if matched to the request URL path, triggers Hosting to |
| 151 | # respond with a redirect to the specified destination path. |
| 152 | { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL |
| 153 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 154 | # respond with a redirect to the specified destination path. |
| 155 | "location": "A String", # Required. The value to put in the HTTP location header of the response. |
| 156 | # <br>The location can contain capture group values from the pattern using |
| 157 | # a `:` prefix to identify the segment and an optional `*` to capture the |
| 158 | # rest of the URL. |
| 159 | # For example: |
| 160 | # <code>"glob": "/:capture*", |
| 161 | # <br>"statusCode": 301, |
| 162 | # <br>"location": "https://example.com/foo/:capture"</code> |
| 163 | "glob": "A String", # The user-supplied |
| 164 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 165 | # against the request URL path. |
| 166 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a |
| 167 | # valid 3xx status code. |
| 168 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 169 | # URL path. |
| 170 | }, |
| 171 | ], |
| 172 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 173 | "rewrites": [ # An array of objects (called rewrite rules), where each rule specifies a URL |
| 174 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 175 | # respond as if the service were given the specified destination URL. |
| 176 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL |
| 177 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 178 | # respond as if the service were given the specified destination URL. |
| 179 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 180 | "path": "A String", # The URL path to rewrite the request to. |
| 181 | "glob": "A String", # The user-supplied |
| 182 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 183 | # against the request URL path. |
| 184 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 185 | # URL path. |
| 186 | "function": "A String", # The function to proxy requests to. Must match the exported function |
| 187 | # name exactly. |
| 188 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run. |
| 189 | # Cloud Run service does not exist when setting or updating your Firebase |
| 190 | # Hosting configuration, then the request fails. Any errors from the Cloud Run |
| 191 | # service are passed to the end user (for example, if you delete a service, any |
| 192 | # requests directed to that service receive a `404` error). |
| 193 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.<br> |
| 194 | # Defaults to `us-central1` if not supplied. |
| 195 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 196 | }, |
| 197 | }, |
| 198 | ], |
| 199 | "appAssociation": "A String", # How to handle well known App Association files. |
| 200 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 201 | }, |
| 202 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 203 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version. |
| 204 | # a release or finalizing a version. |
| 205 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 206 | # changed their email address or deleted their account. |
| 207 | "email": "A String", # The email address of the user when the user performed the action. |
| 208 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 209 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. |
| 210 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 211 | "createTime": "A String", # Output only. The time at which the version was created. |
| 212 | "fileCount": "A String", # Output only. The total number of files associated with the version. |
| 213 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 214 | "status": "A String", # The deploy status of a version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 215 | # <br> |
| 216 | # <br>For a successful deploy, call the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 217 | # [`CreateVersion`](sites.versions/create) endpoint to make a new version |
| 218 | # (`CREATED` status), |
| 219 | # [upload all desired files](sites.versions/populateFiles) to the version, |
| 220 | # then [update](sites.versions/patch) the version to the `FINALIZED` status. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 221 | # <br> |
| 222 | # <br>Note that if you leave the version in the `CREATED` state for more |
| 223 | # than 12&nbsp;hours, the system will automatically mark the version as |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 224 | # `ABANDONED`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 225 | # <br> |
| 226 | # <br>You can also change the status of a version to `DELETED` by calling the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 227 | # [`DeleteVersion`](sites.versions/delete) endpoint. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 228 | "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration |
| 229 | # specfies whether previewing is enabled for this site version. Version |
| 230 | # previews allow you to preview your site at a custom URL before |
| 231 | # releasing it as the live version. |
| 232 | # this version will be accessible via a custom URL even |
| 233 | # if it is not the currently released version. |
| 234 | "expireTime": "A String", # Indicates the expiration time for previewing this |
| 235 | # version; preview URL requests received after this time will 404. |
| 236 | "active": True or False, # If true, preview URLs are enabled for this version. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 237 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 238 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 239 | # a release or finalizing a version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 240 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 241 | # changed their email address or deleted their account. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 242 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 243 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 244 | } |
| 245 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 246 | sizeBytes: string, The self-reported size of the version. This value is used for a pre-emptive |
| 247 | quota check for legacy version uploads. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 248 | versionId: string, A unique id for the new version. This is only specified for legacy version |
| 249 | creations. |
| 250 | x__xgafv: string, V1 error format. |
| 251 | Allowed values |
| 252 | 1 - v1 error format |
| 253 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 254 | |
| 255 | Returns: |
| 256 | An object of the form: |
| 257 | |
| 258 | { # A `Version` is the collection of configuration and |
| 259 | # [static files](sites.versions.files) that determine how a site is displayed. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 260 | "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 261 | # a release or finalizing a version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 262 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 263 | # changed their email address or deleted their account. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 264 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 265 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 266 | "name": "A String", # The unique identifier for a version, in the format: |
| 267 | # <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> |
| 268 | # This name is provided in the response body when you call the |
| 269 | # [`CreateVersion`](../sites.versions/create) endpoint. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 270 | "labels": { # The labels used for extra metadata and/or filtering. |
| 271 | "a_key": "A String", |
| 272 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 273 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 274 | "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists |
| 275 | # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
| 276 | # processed before serving content. The URL request paths are matched against |
| 277 | # the specified URL patterns in the configuration, then Hosting applies the |
| 278 | # applicable configuration according to a specific |
| 279 | # [priority order](/docs/hosting/full-config#hosting_priority_order). |
| 280 | "headers": [ # An array of objects, where each object specifies a URL pattern that, if |
| 281 | # matched to the request URL path, triggers Hosting to apply the specified |
| 282 | # custom response headers. |
| 283 | { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies |
| 284 | # a URL pattern that, if matched to the request URL path, triggers Hosting to |
| 285 | # apply the specified custom response headers. |
| 286 | "glob": "A String", # The user-supplied |
| 287 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 288 | # against the request URL path. |
| 289 | "headers": { # Required. The additional headers to add to the response. |
| 290 | "a_key": "A String", |
| 291 | }, |
| 292 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 293 | # URL path. |
| 294 | }, |
| 295 | ], |
| 296 | "redirects": [ # An array of objects (called redirect rules), where each rule specifies a |
| 297 | # URL pattern that, if matched to the request URL path, triggers Hosting to |
| 298 | # respond with a redirect to the specified destination path. |
| 299 | { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL |
| 300 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 301 | # respond with a redirect to the specified destination path. |
| 302 | "location": "A String", # Required. The value to put in the HTTP location header of the response. |
| 303 | # <br>The location can contain capture group values from the pattern using |
| 304 | # a `:` prefix to identify the segment and an optional `*` to capture the |
| 305 | # rest of the URL. |
| 306 | # For example: |
| 307 | # <code>"glob": "/:capture*", |
| 308 | # <br>"statusCode": 301, |
| 309 | # <br>"location": "https://example.com/foo/:capture"</code> |
| 310 | "glob": "A String", # The user-supplied |
| 311 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 312 | # against the request URL path. |
| 313 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a |
| 314 | # valid 3xx status code. |
| 315 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 316 | # URL path. |
| 317 | }, |
| 318 | ], |
| 319 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 320 | "rewrites": [ # An array of objects (called rewrite rules), where each rule specifies a URL |
| 321 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 322 | # respond as if the service were given the specified destination URL. |
| 323 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL |
| 324 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 325 | # respond as if the service were given the specified destination URL. |
| 326 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 327 | "path": "A String", # The URL path to rewrite the request to. |
| 328 | "glob": "A String", # The user-supplied |
| 329 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 330 | # against the request URL path. |
| 331 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 332 | # URL path. |
| 333 | "function": "A String", # The function to proxy requests to. Must match the exported function |
| 334 | # name exactly. |
| 335 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run. |
| 336 | # Cloud Run service does not exist when setting or updating your Firebase |
| 337 | # Hosting configuration, then the request fails. Any errors from the Cloud Run |
| 338 | # service are passed to the end user (for example, if you delete a service, any |
| 339 | # requests directed to that service receive a `404` error). |
| 340 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.<br> |
| 341 | # Defaults to `us-central1` if not supplied. |
| 342 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 343 | }, |
| 344 | }, |
| 345 | ], |
| 346 | "appAssociation": "A String", # How to handle well known App Association files. |
| 347 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 348 | }, |
| 349 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 350 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version. |
| 351 | # a release or finalizing a version. |
| 352 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 353 | # changed their email address or deleted their account. |
| 354 | "email": "A String", # The email address of the user when the user performed the action. |
| 355 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 356 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. |
| 357 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 358 | "createTime": "A String", # Output only. The time at which the version was created. |
| 359 | "fileCount": "A String", # Output only. The total number of files associated with the version. |
| 360 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 361 | "status": "A String", # The deploy status of a version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 362 | # <br> |
| 363 | # <br>For a successful deploy, call the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 364 | # [`CreateVersion`](sites.versions/create) endpoint to make a new version |
| 365 | # (`CREATED` status), |
| 366 | # [upload all desired files](sites.versions/populateFiles) to the version, |
| 367 | # then [update](sites.versions/patch) the version to the `FINALIZED` status. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 368 | # <br> |
| 369 | # <br>Note that if you leave the version in the `CREATED` state for more |
| 370 | # than 12&nbsp;hours, the system will automatically mark the version as |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 371 | # `ABANDONED`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 372 | # <br> |
| 373 | # <br>You can also change the status of a version to `DELETED` by calling the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 374 | # [`DeleteVersion`](sites.versions/delete) endpoint. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 375 | "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration |
| 376 | # specfies whether previewing is enabled for this site version. Version |
| 377 | # previews allow you to preview your site at a custom URL before |
| 378 | # releasing it as the live version. |
| 379 | # this version will be accessible via a custom URL even |
| 380 | # if it is not the currently released version. |
| 381 | "expireTime": "A String", # Indicates the expiration time for previewing this |
| 382 | # version; preview URL requests received after this time will 404. |
| 383 | "active": True or False, # If true, preview URLs are enabled for this version. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 384 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 385 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 386 | # a release or finalizing a version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 387 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 388 | # changed their email address or deleted their account. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 389 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 390 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 391 | }</pre> |
| 392 | </div> |
| 393 | |
| 394 | <div class="method"> |
| 395 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> |
| 396 | <pre>Deletes the specified version. |
| 397 | |
| 398 | Args: |
| 399 | name: string, Required. The name of the version to be deleted, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 400 | <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 401 | x__xgafv: string, V1 error format. |
| 402 | Allowed values |
| 403 | 1 - v1 error format |
| 404 | 2 - v2 error format |
| 405 | |
| 406 | Returns: |
| 407 | An object of the form: |
| 408 | |
| 409 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 410 | # empty messages in your APIs. A typical example is to use it as the request |
| 411 | # or the response type of an API method. For instance: |
| 412 | # |
| 413 | # service Foo { |
| 414 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 415 | # } |
| 416 | # |
| 417 | # The JSON representation for `Empty` is empty JSON object `{}`. |
| 418 | }</pre> |
| 419 | </div> |
| 420 | |
| 421 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 422 | <code class="details" id="list">list(parent, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</code> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 423 | <pre>Lists the versions that have been created on the specified site. |
| 424 | Will include filtering in the future. |
| 425 | |
| 426 | Args: |
| 427 | parent: string, Required. The parent for which to list files, in the format: |
| 428 | <code>sites/<var>site-name</var></code> (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 429 | pageToken: string, The next_page_token from a previous request, if provided. |
| 430 | pageSize: integer, The maximum number of versions to return. The service may return fewer than |
| 431 | this value. |
| 432 | If unspecified, at most 25 versions will be returned. |
| 433 | The maximum value is 100; values above 100 will be coerced to 100 |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 434 | filter: string, The filter string used to return a subset of versions in the response. |
| 435 | Currently supported fields for filtering are: name, status, |
| 436 | and create_time. Filter processing will be implemented in accordance |
| 437 | with go/filtering. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 438 | x__xgafv: string, V1 error format. |
| 439 | Allowed values |
| 440 | 1 - v1 error format |
| 441 | 2 - v2 error format |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 442 | |
| 443 | Returns: |
| 444 | An object of the form: |
| 445 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 446 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 447 | "versions": [ # The list of versions, if any exist. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 448 | { # A `Version` is the collection of configuration and |
| 449 | # [static files](sites.versions.files) that determine how a site is displayed. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 450 | "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 451 | # a release or finalizing a version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 452 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 453 | # changed their email address or deleted their account. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 454 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 455 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 456 | "name": "A String", # The unique identifier for a version, in the format: |
| 457 | # <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> |
| 458 | # This name is provided in the response body when you call the |
| 459 | # [`CreateVersion`](../sites.versions/create) endpoint. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 460 | "labels": { # The labels used for extra metadata and/or filtering. |
| 461 | "a_key": "A String", |
| 462 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 463 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 464 | "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists |
| 465 | # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
| 466 | # processed before serving content. The URL request paths are matched against |
| 467 | # the specified URL patterns in the configuration, then Hosting applies the |
| 468 | # applicable configuration according to a specific |
| 469 | # [priority order](/docs/hosting/full-config#hosting_priority_order). |
| 470 | "headers": [ # An array of objects, where each object specifies a URL pattern that, if |
| 471 | # matched to the request URL path, triggers Hosting to apply the specified |
| 472 | # custom response headers. |
| 473 | { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies |
| 474 | # a URL pattern that, if matched to the request URL path, triggers Hosting to |
| 475 | # apply the specified custom response headers. |
| 476 | "glob": "A String", # The user-supplied |
| 477 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 478 | # against the request URL path. |
| 479 | "headers": { # Required. The additional headers to add to the response. |
| 480 | "a_key": "A String", |
| 481 | }, |
| 482 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 483 | # URL path. |
| 484 | }, |
| 485 | ], |
| 486 | "redirects": [ # An array of objects (called redirect rules), where each rule specifies a |
| 487 | # URL pattern that, if matched to the request URL path, triggers Hosting to |
| 488 | # respond with a redirect to the specified destination path. |
| 489 | { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL |
| 490 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 491 | # respond with a redirect to the specified destination path. |
| 492 | "location": "A String", # Required. The value to put in the HTTP location header of the response. |
| 493 | # <br>The location can contain capture group values from the pattern using |
| 494 | # a `:` prefix to identify the segment and an optional `*` to capture the |
| 495 | # rest of the URL. |
| 496 | # For example: |
| 497 | # <code>"glob": "/:capture*", |
| 498 | # <br>"statusCode": 301, |
| 499 | # <br>"location": "https://example.com/foo/:capture"</code> |
| 500 | "glob": "A String", # The user-supplied |
| 501 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 502 | # against the request URL path. |
| 503 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a |
| 504 | # valid 3xx status code. |
| 505 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 506 | # URL path. |
| 507 | }, |
| 508 | ], |
| 509 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 510 | "rewrites": [ # An array of objects (called rewrite rules), where each rule specifies a URL |
| 511 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 512 | # respond as if the service were given the specified destination URL. |
| 513 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL |
| 514 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 515 | # respond as if the service were given the specified destination URL. |
| 516 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 517 | "path": "A String", # The URL path to rewrite the request to. |
| 518 | "glob": "A String", # The user-supplied |
| 519 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 520 | # against the request URL path. |
| 521 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 522 | # URL path. |
| 523 | "function": "A String", # The function to proxy requests to. Must match the exported function |
| 524 | # name exactly. |
| 525 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run. |
| 526 | # Cloud Run service does not exist when setting or updating your Firebase |
| 527 | # Hosting configuration, then the request fails. Any errors from the Cloud Run |
| 528 | # service are passed to the end user (for example, if you delete a service, any |
| 529 | # requests directed to that service receive a `404` error). |
| 530 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.<br> |
| 531 | # Defaults to `us-central1` if not supplied. |
| 532 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 533 | }, |
| 534 | }, |
| 535 | ], |
| 536 | "appAssociation": "A String", # How to handle well known App Association files. |
| 537 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 538 | }, |
| 539 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 540 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version. |
| 541 | # a release or finalizing a version. |
| 542 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 543 | # changed their email address or deleted their account. |
| 544 | "email": "A String", # The email address of the user when the user performed the action. |
| 545 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 546 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. |
| 547 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 548 | "createTime": "A String", # Output only. The time at which the version was created. |
| 549 | "fileCount": "A String", # Output only. The total number of files associated with the version. |
| 550 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 551 | "status": "A String", # The deploy status of a version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 552 | # <br> |
| 553 | # <br>For a successful deploy, call the |
| 554 | # [`CreateVersion`](sites.versions/create) endpoint to make a new version |
| 555 | # (`CREATED` status), |
| 556 | # [upload all desired files](sites.versions/populateFiles) to the version, |
| 557 | # then [update](sites.versions/patch) the version to the `FINALIZED` status. |
| 558 | # <br> |
| 559 | # <br>Note that if you leave the version in the `CREATED` state for more |
| 560 | # than 12&nbsp;hours, the system will automatically mark the version as |
| 561 | # `ABANDONED`. |
| 562 | # <br> |
| 563 | # <br>You can also change the status of a version to `DELETED` by calling the |
| 564 | # [`DeleteVersion`](sites.versions/delete) endpoint. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 565 | "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration |
| 566 | # specfies whether previewing is enabled for this site version. Version |
| 567 | # previews allow you to preview your site at a custom URL before |
| 568 | # releasing it as the live version. |
| 569 | # this version will be accessible via a custom URL even |
| 570 | # if it is not the currently released version. |
| 571 | "expireTime": "A String", # Indicates the expiration time for previewing this |
| 572 | # version; preview URL requests received after this time will 404. |
| 573 | "active": True or False, # If true, preview URLs are enabled for this version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 574 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 575 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 576 | # a release or finalizing a version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 577 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 578 | # changed their email address or deleted their account. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 579 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 580 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 581 | }, |
| 582 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 583 | "nextPageToken": "A String", # The pagination token, if more results exist |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 584 | }</pre> |
| 585 | </div> |
| 586 | |
| 587 | <div class="method"> |
| 588 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 589 | <pre>Retrieves the next page of results. |
| 590 | |
| 591 | Args: |
| 592 | previous_request: The request for the previous page. (required) |
| 593 | previous_response: The response from the request for the previous page. (required) |
| 594 | |
| 595 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 596 | A request object that you can call 'execute()' on to request the next |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 597 | page. Returns None if there are no more items in the collection. |
| 598 | </pre> |
| 599 | </div> |
| 600 | |
| 601 | <div class="method"> |
| 602 | <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 603 | <pre>Updates the specified metadata for a version. Note that this method will |
| 604 | fail with `FAILED_PRECONDITION` in the event of an invalid state |
| 605 | transition. The only valid transition for a version is currently from a |
| 606 | `CREATED` status to a `FINALIZED` status. |
| 607 | Use [`DeleteVersion`](../sites.versions/delete) to set the status of a |
| 608 | version to `DELETED`. |
| 609 | |
| 610 | Args: |
| 611 | name: string, The unique identifier for a version, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 612 | <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 613 | This name is provided in the response body when you call the |
| 614 | [`CreateVersion`](../sites.versions/create) endpoint. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 615 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 616 | The object takes the form of: |
| 617 | |
| 618 | { # A `Version` is the collection of configuration and |
| 619 | # [static files](sites.versions.files) that determine how a site is displayed. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 620 | "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 621 | # a release or finalizing a version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 622 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 623 | # changed their email address or deleted their account. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 624 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 625 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 626 | "name": "A String", # The unique identifier for a version, in the format: |
| 627 | # <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> |
| 628 | # This name is provided in the response body when you call the |
| 629 | # [`CreateVersion`](../sites.versions/create) endpoint. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 630 | "labels": { # The labels used for extra metadata and/or filtering. |
| 631 | "a_key": "A String", |
| 632 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 633 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 634 | "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists |
| 635 | # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
| 636 | # processed before serving content. The URL request paths are matched against |
| 637 | # the specified URL patterns in the configuration, then Hosting applies the |
| 638 | # applicable configuration according to a specific |
| 639 | # [priority order](/docs/hosting/full-config#hosting_priority_order). |
| 640 | "headers": [ # An array of objects, where each object specifies a URL pattern that, if |
| 641 | # matched to the request URL path, triggers Hosting to apply the specified |
| 642 | # custom response headers. |
| 643 | { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies |
| 644 | # a URL pattern that, if matched to the request URL path, triggers Hosting to |
| 645 | # apply the specified custom response headers. |
| 646 | "glob": "A String", # The user-supplied |
| 647 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 648 | # against the request URL path. |
| 649 | "headers": { # Required. The additional headers to add to the response. |
| 650 | "a_key": "A String", |
| 651 | }, |
| 652 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 653 | # URL path. |
| 654 | }, |
| 655 | ], |
| 656 | "redirects": [ # An array of objects (called redirect rules), where each rule specifies a |
| 657 | # URL pattern that, if matched to the request URL path, triggers Hosting to |
| 658 | # respond with a redirect to the specified destination path. |
| 659 | { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL |
| 660 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 661 | # respond with a redirect to the specified destination path. |
| 662 | "location": "A String", # Required. The value to put in the HTTP location header of the response. |
| 663 | # <br>The location can contain capture group values from the pattern using |
| 664 | # a `:` prefix to identify the segment and an optional `*` to capture the |
| 665 | # rest of the URL. |
| 666 | # For example: |
| 667 | # <code>"glob": "/:capture*", |
| 668 | # <br>"statusCode": 301, |
| 669 | # <br>"location": "https://example.com/foo/:capture"</code> |
| 670 | "glob": "A String", # The user-supplied |
| 671 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 672 | # against the request URL path. |
| 673 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a |
| 674 | # valid 3xx status code. |
| 675 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 676 | # URL path. |
| 677 | }, |
| 678 | ], |
| 679 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 680 | "rewrites": [ # An array of objects (called rewrite rules), where each rule specifies a URL |
| 681 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 682 | # respond as if the service were given the specified destination URL. |
| 683 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL |
| 684 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 685 | # respond as if the service were given the specified destination URL. |
| 686 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 687 | "path": "A String", # The URL path to rewrite the request to. |
| 688 | "glob": "A String", # The user-supplied |
| 689 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 690 | # against the request URL path. |
| 691 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 692 | # URL path. |
| 693 | "function": "A String", # The function to proxy requests to. Must match the exported function |
| 694 | # name exactly. |
| 695 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run. |
| 696 | # Cloud Run service does not exist when setting or updating your Firebase |
| 697 | # Hosting configuration, then the request fails. Any errors from the Cloud Run |
| 698 | # service are passed to the end user (for example, if you delete a service, any |
| 699 | # requests directed to that service receive a `404` error). |
| 700 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.<br> |
| 701 | # Defaults to `us-central1` if not supplied. |
| 702 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 703 | }, |
| 704 | }, |
| 705 | ], |
| 706 | "appAssociation": "A String", # How to handle well known App Association files. |
| 707 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 708 | }, |
| 709 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 710 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version. |
| 711 | # a release or finalizing a version. |
| 712 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 713 | # changed their email address or deleted their account. |
| 714 | "email": "A String", # The email address of the user when the user performed the action. |
| 715 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 716 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. |
| 717 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 718 | "createTime": "A String", # Output only. The time at which the version was created. |
| 719 | "fileCount": "A String", # Output only. The total number of files associated with the version. |
| 720 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 721 | "status": "A String", # The deploy status of a version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 722 | # <br> |
| 723 | # <br>For a successful deploy, call the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 724 | # [`CreateVersion`](sites.versions/create) endpoint to make a new version |
| 725 | # (`CREATED` status), |
| 726 | # [upload all desired files](sites.versions/populateFiles) to the version, |
| 727 | # then [update](sites.versions/patch) the version to the `FINALIZED` status. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 728 | # <br> |
| 729 | # <br>Note that if you leave the version in the `CREATED` state for more |
| 730 | # than 12&nbsp;hours, the system will automatically mark the version as |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 731 | # `ABANDONED`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 732 | # <br> |
| 733 | # <br>You can also change the status of a version to `DELETED` by calling the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 734 | # [`DeleteVersion`](sites.versions/delete) endpoint. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 735 | "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration |
| 736 | # specfies whether previewing is enabled for this site version. Version |
| 737 | # previews allow you to preview your site at a custom URL before |
| 738 | # releasing it as the live version. |
| 739 | # this version will be accessible via a custom URL even |
| 740 | # if it is not the currently released version. |
| 741 | "expireTime": "A String", # Indicates the expiration time for previewing this |
| 742 | # version; preview URL requests received after this time will 404. |
| 743 | "active": True or False, # If true, preview URLs are enabled for this version. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 744 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 745 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 746 | # a release or finalizing a version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 747 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 748 | # changed their email address or deleted their account. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 749 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 750 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 751 | } |
| 752 | |
| 753 | updateMask: string, A set of field names from your [version](../sites.versions) that you want |
| 754 | to update. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 755 | <br>A field will be overwritten if, and only if, it's in the mask. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 756 | <br>If a mask is not provided then a default mask of only |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 757 | [`status`](../sites.versions#Version.FIELDS.status) will be used. |
| 758 | x__xgafv: string, V1 error format. |
| 759 | Allowed values |
| 760 | 1 - v1 error format |
| 761 | 2 - v2 error format |
| 762 | |
| 763 | Returns: |
| 764 | An object of the form: |
| 765 | |
| 766 | { # A `Version` is the collection of configuration and |
| 767 | # [static files](sites.versions.files) that determine how a site is displayed. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 768 | "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 769 | # a release or finalizing a version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 770 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 771 | # changed their email address or deleted their account. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 772 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 773 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 774 | "name": "A String", # The unique identifier for a version, in the format: |
| 775 | # <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> |
| 776 | # This name is provided in the response body when you call the |
| 777 | # [`CreateVersion`](../sites.versions/create) endpoint. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 778 | "labels": { # The labels used for extra metadata and/or filtering. |
| 779 | "a_key": "A String", |
| 780 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 781 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 782 | "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists |
| 783 | # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
| 784 | # processed before serving content. The URL request paths are matched against |
| 785 | # the specified URL patterns in the configuration, then Hosting applies the |
| 786 | # applicable configuration according to a specific |
| 787 | # [priority order](/docs/hosting/full-config#hosting_priority_order). |
| 788 | "headers": [ # An array of objects, where each object specifies a URL pattern that, if |
| 789 | # matched to the request URL path, triggers Hosting to apply the specified |
| 790 | # custom response headers. |
| 791 | { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies |
| 792 | # a URL pattern that, if matched to the request URL path, triggers Hosting to |
| 793 | # apply the specified custom response headers. |
| 794 | "glob": "A String", # The user-supplied |
| 795 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 796 | # against the request URL path. |
| 797 | "headers": { # Required. The additional headers to add to the response. |
| 798 | "a_key": "A String", |
| 799 | }, |
| 800 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 801 | # URL path. |
| 802 | }, |
| 803 | ], |
| 804 | "redirects": [ # An array of objects (called redirect rules), where each rule specifies a |
| 805 | # URL pattern that, if matched to the request URL path, triggers Hosting to |
| 806 | # respond with a redirect to the specified destination path. |
| 807 | { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL |
| 808 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 809 | # respond with a redirect to the specified destination path. |
| 810 | "location": "A String", # Required. The value to put in the HTTP location header of the response. |
| 811 | # <br>The location can contain capture group values from the pattern using |
| 812 | # a `:` prefix to identify the segment and an optional `*` to capture the |
| 813 | # rest of the URL. |
| 814 | # For example: |
| 815 | # <code>"glob": "/:capture*", |
| 816 | # <br>"statusCode": 301, |
| 817 | # <br>"location": "https://example.com/foo/:capture"</code> |
| 818 | "glob": "A String", # The user-supplied |
| 819 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 820 | # against the request URL path. |
| 821 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a |
| 822 | # valid 3xx status code. |
| 823 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 824 | # URL path. |
| 825 | }, |
| 826 | ], |
| 827 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 828 | "rewrites": [ # An array of objects (called rewrite rules), where each rule specifies a URL |
| 829 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 830 | # respond as if the service were given the specified destination URL. |
| 831 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL |
| 832 | # pattern that, if matched to the request URL path, triggers Hosting to |
| 833 | # respond as if the service were given the specified destination URL. |
| 834 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 835 | "path": "A String", # The URL path to rewrite the request to. |
| 836 | "glob": "A String", # The user-supplied |
| 837 | # [glob](/docs/hosting/full-config#glob_pattern_matching) to match |
| 838 | # against the request URL path. |
| 839 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 840 | # URL path. |
| 841 | "function": "A String", # The function to proxy requests to. Must match the exported function |
| 842 | # name exactly. |
| 843 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run. |
| 844 | # Cloud Run service does not exist when setting or updating your Firebase |
| 845 | # Hosting configuration, then the request fails. Any errors from the Cloud Run |
| 846 | # service are passed to the end user (for example, if you delete a service, any |
| 847 | # requests directed to that service receive a `404` error). |
| 848 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.<br> |
| 849 | # Defaults to `us-central1` if not supplied. |
| 850 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 851 | }, |
| 852 | }, |
| 853 | ], |
| 854 | "appAssociation": "A String", # How to handle well known App Association files. |
| 855 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 856 | }, |
| 857 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 858 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version. |
| 859 | # a release or finalizing a version. |
| 860 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 861 | # changed their email address or deleted their account. |
| 862 | "email": "A String", # The email address of the user when the user performed the action. |
| 863 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 864 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. |
| 865 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 866 | "createTime": "A String", # Output only. The time at which the version was created. |
| 867 | "fileCount": "A String", # Output only. The total number of files associated with the version. |
| 868 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 869 | "status": "A String", # The deploy status of a version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 870 | # <br> |
| 871 | # <br>For a successful deploy, call the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 872 | # [`CreateVersion`](sites.versions/create) endpoint to make a new version |
| 873 | # (`CREATED` status), |
| 874 | # [upload all desired files](sites.versions/populateFiles) to the version, |
| 875 | # then [update](sites.versions/patch) the version to the `FINALIZED` status. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 876 | # <br> |
| 877 | # <br>Note that if you leave the version in the `CREATED` state for more |
| 878 | # than 12&nbsp;hours, the system will automatically mark the version as |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 879 | # `ABANDONED`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 880 | # <br> |
| 881 | # <br>You can also change the status of a version to `DELETED` by calling the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 882 | # [`DeleteVersion`](sites.versions/delete) endpoint. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 883 | "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration |
| 884 | # specfies whether previewing is enabled for this site version. Version |
| 885 | # previews allow you to preview your site at a custom URL before |
| 886 | # releasing it as the live version. |
| 887 | # this version will be accessible via a custom URL even |
| 888 | # if it is not the currently released version. |
| 889 | "expireTime": "A String", # Indicates the expiration time for previewing this |
| 890 | # version; preview URL requests received after this time will 404. |
| 891 | "active": True or False, # If true, preview URLs are enabled for this version. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 892 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 893 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 894 | # a release or finalizing a version. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 895 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 896 | # changed their email address or deleted their account. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 897 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 898 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 899 | }</pre> |
| 900 | </div> |
| 901 | |
| 902 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 903 | <code class="details" id="populateFiles">populateFiles(parent, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 904 | <pre>Adds content files to a version. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 905 | Each file must be under 2 GB. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 906 | |
| 907 | Args: |
| 908 | parent: string, Required. The version to add files to, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 909 | <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> (required) |
| 910 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 911 | The object takes the form of: |
| 912 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 913 | { # The request to populate a Version's Files. |
| 914 | "files": { # A set of file paths to the hashes corresponding to assets that should be |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 915 | # added to the version. Note that a file path to an empty hash will remove |
| 916 | # the path from the version. Calculate a hash by Gzipping the file then |
| 917 | # taking the SHA256 hash of the newly compressed file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 918 | "a_key": "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 919 | }, |
| 920 | } |
| 921 | |
| 922 | x__xgafv: string, V1 error format. |
| 923 | Allowed values |
| 924 | 1 - v1 error format |
| 925 | 2 - v2 error format |
| 926 | |
| 927 | Returns: |
| 928 | An object of the form: |
| 929 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 930 | { |
| 931 | "uploadRequiredHashes": [ # The content hashes of the specified files that need to be uploaded to the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 932 | # specified endpoint. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 933 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 934 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 935 | "uploadUrl": "A String", # The URL to which the files should be uploaded, in the format: |
| 936 | # <br>"https://upload-firebasehosting.googleapis.com/upload/sites/<var>site-name</var>/versions/<var>versionID</var>/files". |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 937 | # <br>Perform a multipart `POST` of the Gzipped file contents to the URL |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 938 | # using a forward slash and the hash of the file appended to the end. |
| 939 | }</pre> |
| 940 | </div> |
| 941 | |
| 942 | </body></html> |