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