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"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 83 | <code><a href="#clone">clone(parent, body=None, x__xgafv=None)</a></code></p> |
| 84 | <p class="firstline">Creates a new version on the target site using the content of the specified version.</p> |
| 85 | <p class="toc_element"> |
| 86 | <code><a href="#close">close()</a></code></p> |
| 87 | <p class="firstline">Close httplib2 connections.</p> |
| 88 | <p class="toc_element"> |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 89 | <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] | 90 | <p class="firstline">Creates a new version for a site.</p> |
| 91 | <p class="toc_element"> |
| 92 | <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> |
| 93 | <p class="firstline">Deletes the specified version.</p> |
| 94 | <p class="toc_element"> |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 95 | <code><a href="#list">list(parent, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 96 | <p class="firstline">Lists the versions that have been created on the specified site. Will include filtering in the future.</p> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 97 | <p class="toc_element"> |
| 98 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 99 | <p class="firstline">Retrieves the next page of results.</p> |
| 100 | <p class="toc_element"> |
| 101 | <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 102 | <p class="firstline">Updates the specified metadata for a version. Note that this method will fail with `FAILED_PRECONDITION` in the event of an invalid state transition. The only valid transition for a version is currently from a `CREATED` status to a `FINALIZED` status. Use [`DeleteVersion`](../sites.versions/delete) to set the status of a version to `DELETED`.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 103 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 104 | <code><a href="#populateFiles">populateFiles(parent, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 105 | <p class="firstline">Adds content files to a version. Each file must be under 2 GB.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 106 | <h3>Method Details</h3> |
| 107 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 108 | <code class="details" id="clone">clone(parent, body=None, x__xgafv=None)</code> |
| 109 | <pre>Creates a new version on the target site using the content of the specified version. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 110 | |
| 111 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 112 | parent: string, Required. The target site where the cloned version will reside, in the format: `sites/{site}` (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 113 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 114 | The object takes the form of: |
| 115 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 116 | { # The request sent to CloneVersion. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 117 | "exclude": { # A representation of filter path. # If provided, only paths that do not match any of the regexes in this list will be included in the new version. |
| 118 | "regexes": [ # An array of regexes to filter by. |
| 119 | "A String", |
| 120 | ], |
| 121 | }, |
| 122 | "sourceVersion": "A String", # Required. The name of the version to be cloned, in the format: `sites/{site}/versions/{version}` |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 123 | "finalize": True or False, # If true, immediately finalize the version after cloning is complete. |
| 124 | "include": { # A representation of filter path. # If provided, only paths that match one or more regexes in this list will be included in the new version. |
| 125 | "regexes": [ # An array of regexes to filter by. |
| 126 | "A String", |
| 127 | ], |
| 128 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 129 | } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 130 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 131 | x__xgafv: string, V1 error format. |
| 132 | Allowed values |
| 133 | 1 - v1 error format |
| 134 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 135 | |
| 136 | Returns: |
| 137 | An object of the form: |
| 138 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 139 | { # This resource represents a long-running operation that is the result of a network API call. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 140 | "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| 141 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 142 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 143 | "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 144 | "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 145 | "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 146 | { |
| 147 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 148 | }, |
| 149 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 150 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 151 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 152 | "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| 153 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 154 | }, |
| 155 | "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| 156 | "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 157 | }</pre> |
| 158 | </div> |
| 159 | |
| 160 | <div class="method"> |
| 161 | <code class="details" id="close">close()</code> |
| 162 | <pre>Close httplib2 connections.</pre> |
| 163 | </div> |
| 164 | |
| 165 | <div class="method"> |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 166 | <code class="details" id="create">create(parent, body=None, sizeBytes=None, versionId=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 167 | <pre>Creates a new version for a site. |
| 168 | |
| 169 | Args: |
| 170 | parent: string, Required. The parent to create the version for, in the format: sites/ site-name (required) |
| 171 | body: object, The request body. |
| 172 | The object takes the form of: |
| 173 | |
| 174 | { # A `Version` is the collection of configuration and [static files](sites.versions.files) that determine how a site is displayed. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 175 | "status": "A String", # The deploy status of a version. For a successful deploy, call the [`CreateVersion`](sites.versions/create) endpoint to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling the [`DeleteVersion`](sites.versions/delete) endpoint. |
| 176 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `DELETED` the version. |
| 177 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 178 | "email": "A String", # The email address of the user when the user performed the action. |
| 179 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 180 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 181 | "name": "A String", # The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. |
| 182 | "createUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who created the version. |
| 183 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 184 | "email": "A String", # The email address of the user when the user performed the action. |
| 185 | }, |
| 186 | "labels": { # The labels used for extra metadata and/or filtering. |
| 187 | "a_key": "A String", |
| 188 | }, |
| 189 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 190 | "config": { # The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 191 | "redirects": [ # An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. |
| 192 | { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 193 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 194 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 195 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 196 | "location": "A String", # Required. The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a `:` prefix to identify the segment and an optional `*` to capture the rest of the URL. For example: "glob": "/:capture*", "statusCode": 301, "location": "https://example.com/foo/:capture" |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 197 | }, |
| 198 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 199 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 200 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 201 | "headers": [ # An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. |
| 202 | { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. |
| 203 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 204 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 205 | "headers": { # Required. The additional headers to add to the response. |
| 206 | "a_key": "A String", |
| 207 | }, |
| 208 | }, |
| 209 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 210 | "appAssociation": "A String", # How to handle well known App Association files. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 211 | "i18n": { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior. |
| 212 | "root": "A String", # Required. The user-supplied path where country and language specific content will be looked for within the public directory. |
| 213 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 214 | "rewrites": [ # An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. |
| 215 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. |
| 216 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 217 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 218 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 219 | "path": "A String", # The URL path to rewrite the request to. |
| 220 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). # The request will be forwarded to Cloud Run. |
| 221 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 222 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied. |
| 223 | }, |
| 224 | "function": "A String", # The function to proxy requests to. Must match the exported function name exactly. |
| 225 | }, |
| 226 | ], |
| 227 | }, |
| 228 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `FINALIZED` the version. |
| 229 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 230 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 231 | }, |
| 232 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 233 | "preview": { # Version preview configuration. If active and unexpired, this version will be accessible via a custom URL even if it is not the currently released version. Deprecated in favor of site channels. # Deprecated in favor of site channels. Version preview configuration for the site version. This configuration specifies whether previewing is enabled for this site version. Version previews allow you to preview your site at a custom URL before releasing it as the live version. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 234 | "active": True or False, # If true, preview URLs are enabled for this version. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 235 | "expireTime": "A String", # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 236 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 237 | "createTime": "A String", # Output only. The time at which the version was created. |
| 238 | "fileCount": "A String", # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 239 | } |
| 240 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 241 | sizeBytes: string, The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 242 | versionId: string, A unique id for the new version. This is was only specified for legacy version creations, and should be blank. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 243 | x__xgafv: string, V1 error format. |
| 244 | Allowed values |
| 245 | 1 - v1 error format |
| 246 | 2 - v2 error format |
| 247 | |
| 248 | Returns: |
| 249 | An object of the form: |
| 250 | |
| 251 | { # A `Version` is the collection of configuration and [static files](sites.versions.files) that determine how a site is displayed. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 252 | "status": "A String", # The deploy status of a version. For a successful deploy, call the [`CreateVersion`](sites.versions/create) endpoint to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling the [`DeleteVersion`](sites.versions/delete) endpoint. |
| 253 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `DELETED` the version. |
| 254 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 255 | "email": "A String", # The email address of the user when the user performed the action. |
| 256 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 257 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 258 | "name": "A String", # The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. |
| 259 | "createUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who created the version. |
| 260 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 261 | "email": "A String", # The email address of the user when the user performed the action. |
| 262 | }, |
| 263 | "labels": { # The labels used for extra metadata and/or filtering. |
| 264 | "a_key": "A String", |
| 265 | }, |
| 266 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 267 | "config": { # The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 268 | "redirects": [ # An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. |
| 269 | { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 270 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 271 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 272 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 273 | "location": "A String", # Required. The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a `:` prefix to identify the segment and an optional `*` to capture the rest of the URL. For example: "glob": "/:capture*", "statusCode": 301, "location": "https://example.com/foo/:capture" |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 274 | }, |
| 275 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 276 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 277 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 278 | "headers": [ # An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. |
| 279 | { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. |
| 280 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 281 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 282 | "headers": { # Required. The additional headers to add to the response. |
| 283 | "a_key": "A String", |
| 284 | }, |
| 285 | }, |
| 286 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 287 | "appAssociation": "A String", # How to handle well known App Association files. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 288 | "i18n": { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior. |
| 289 | "root": "A String", # Required. The user-supplied path where country and language specific content will be looked for within the public directory. |
| 290 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 291 | "rewrites": [ # An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. |
| 292 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. |
| 293 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 294 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 295 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 296 | "path": "A String", # The URL path to rewrite the request to. |
| 297 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). # The request will be forwarded to Cloud Run. |
| 298 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 299 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied. |
| 300 | }, |
| 301 | "function": "A String", # The function to proxy requests to. Must match the exported function name exactly. |
| 302 | }, |
| 303 | ], |
| 304 | }, |
| 305 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `FINALIZED` the version. |
| 306 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 307 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 308 | }, |
| 309 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 310 | "preview": { # Version preview configuration. If active and unexpired, this version will be accessible via a custom URL even if it is not the currently released version. Deprecated in favor of site channels. # Deprecated in favor of site channels. Version preview configuration for the site version. This configuration specifies whether previewing is enabled for this site version. Version previews allow you to preview your site at a custom URL before releasing it as the live version. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 311 | "active": True or False, # If true, preview URLs are enabled for this version. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 312 | "expireTime": "A String", # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 313 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 314 | "createTime": "A String", # Output only. The time at which the version was created. |
| 315 | "fileCount": "A String", # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 316 | }</pre> |
| 317 | </div> |
| 318 | |
| 319 | <div class="method"> |
| 320 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> |
| 321 | <pre>Deletes the specified version. |
| 322 | |
| 323 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 324 | name: string, Required. The name of the version to be deleted, in the format: sites/ site-name/versions/versionID (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 325 | x__xgafv: string, V1 error format. |
| 326 | Allowed values |
| 327 | 1 - v1 error format |
| 328 | 2 - v2 error format |
| 329 | |
| 330 | Returns: |
| 331 | An object of the form: |
| 332 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 333 | { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 334 | }</pre> |
| 335 | </div> |
| 336 | |
| 337 | <div class="method"> |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 338 | <code class="details" id="list">list(parent, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 339 | <pre>Lists the versions that have been created on the specified site. Will include filtering in the future. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 340 | |
| 341 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 342 | parent: string, Required. The parent for which to list files, in the format: sites/site-name (required) |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 343 | pageSize: integer, The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 versions will be returned. The maximum value is 100; values above 100 will be coerced to 100 |
| 344 | filter: string, The filter string used to return a subset of versions in the response. Currently supported fields for filtering are: name, status, and create_time. Filter processing will be implemented in accordance with go/filtering. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 345 | pageToken: string, The next_page_token from a previous request, if provided. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 346 | x__xgafv: string, V1 error format. |
| 347 | Allowed values |
| 348 | 1 - v1 error format |
| 349 | 2 - v2 error format |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 350 | |
| 351 | Returns: |
| 352 | An object of the form: |
| 353 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 354 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 355 | "versions": [ # The list of versions, if any exist. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 356 | { # A `Version` is the collection of configuration and [static files](sites.versions.files) that determine how a site is displayed. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 357 | "status": "A String", # The deploy status of a version. For a successful deploy, call the [`CreateVersion`](sites.versions/create) endpoint to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling the [`DeleteVersion`](sites.versions/delete) endpoint. |
| 358 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `DELETED` the version. |
| 359 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 360 | "email": "A String", # The email address of the user when the user performed the action. |
| 361 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 362 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 363 | "name": "A String", # The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. |
| 364 | "createUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who created the version. |
| 365 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 366 | "email": "A String", # The email address of the user when the user performed the action. |
| 367 | }, |
| 368 | "labels": { # The labels used for extra metadata and/or filtering. |
| 369 | "a_key": "A String", |
| 370 | }, |
| 371 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 372 | "config": { # The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 373 | "redirects": [ # An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. |
| 374 | { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 375 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 376 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 377 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 378 | "location": "A String", # Required. The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a `:` prefix to identify the segment and an optional `*` to capture the rest of the URL. For example: "glob": "/:capture*", "statusCode": 301, "location": "https://example.com/foo/:capture" |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 379 | }, |
| 380 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 381 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 382 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 383 | "headers": [ # An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. |
| 384 | { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. |
| 385 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 386 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 387 | "headers": { # Required. The additional headers to add to the response. |
| 388 | "a_key": "A String", |
| 389 | }, |
| 390 | }, |
| 391 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 392 | "appAssociation": "A String", # How to handle well known App Association files. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 393 | "i18n": { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior. |
| 394 | "root": "A String", # Required. The user-supplied path where country and language specific content will be looked for within the public directory. |
| 395 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 396 | "rewrites": [ # An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. |
| 397 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. |
| 398 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 399 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 400 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 401 | "path": "A String", # The URL path to rewrite the request to. |
| 402 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). # The request will be forwarded to Cloud Run. |
| 403 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 404 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied. |
| 405 | }, |
| 406 | "function": "A String", # The function to proxy requests to. Must match the exported function name exactly. |
| 407 | }, |
| 408 | ], |
| 409 | }, |
| 410 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `FINALIZED` the version. |
| 411 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 412 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 413 | }, |
| 414 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 415 | "preview": { # Version preview configuration. If active and unexpired, this version will be accessible via a custom URL even if it is not the currently released version. Deprecated in favor of site channels. # Deprecated in favor of site channels. Version preview configuration for the site version. This configuration specifies whether previewing is enabled for this site version. Version previews allow you to preview your site at a custom URL before releasing it as the live version. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 416 | "active": True or False, # If true, preview URLs are enabled for this version. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 417 | "expireTime": "A String", # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 418 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 419 | "createTime": "A String", # Output only. The time at which the version was created. |
| 420 | "fileCount": "A String", # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 421 | }, |
| 422 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 423 | "nextPageToken": "A String", # The pagination token, if more results exist |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 424 | }</pre> |
| 425 | </div> |
| 426 | |
| 427 | <div class="method"> |
| 428 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 429 | <pre>Retrieves the next page of results. |
| 430 | |
| 431 | Args: |
| 432 | previous_request: The request for the previous page. (required) |
| 433 | previous_response: The response from the request for the previous page. (required) |
| 434 | |
| 435 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 436 | 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] | 437 | page. Returns None if there are no more items in the collection. |
| 438 | </pre> |
| 439 | </div> |
| 440 | |
| 441 | <div class="method"> |
| 442 | <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 443 | <pre>Updates the specified metadata for a version. Note that this method will fail with `FAILED_PRECONDITION` in the event of an invalid state transition. The only valid transition for a version is currently from a `CREATED` status to a `FINALIZED` status. Use [`DeleteVersion`](../sites.versions/delete) to set the status of a version to `DELETED`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 444 | |
| 445 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 446 | name: string, The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 447 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 448 | The object takes the form of: |
| 449 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 450 | { # A `Version` is the collection of configuration and [static files](sites.versions.files) that determine how a site is displayed. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 451 | "status": "A String", # The deploy status of a version. For a successful deploy, call the [`CreateVersion`](sites.versions/create) endpoint to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling the [`DeleteVersion`](sites.versions/delete) endpoint. |
| 452 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `DELETED` the version. |
| 453 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 454 | "email": "A String", # The email address of the user when the user performed the action. |
| 455 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 456 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 457 | "name": "A String", # The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. |
| 458 | "createUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who created the version. |
| 459 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 460 | "email": "A String", # The email address of the user when the user performed the action. |
| 461 | }, |
| 462 | "labels": { # The labels used for extra metadata and/or filtering. |
| 463 | "a_key": "A String", |
| 464 | }, |
| 465 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 466 | "config": { # The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 467 | "redirects": [ # An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. |
| 468 | { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 469 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 470 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 471 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 472 | "location": "A String", # Required. The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a `:` prefix to identify the segment and an optional `*` to capture the rest of the URL. For example: "glob": "/:capture*", "statusCode": 301, "location": "https://example.com/foo/:capture" |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 473 | }, |
| 474 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 475 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 476 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 477 | "headers": [ # An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. |
| 478 | { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. |
| 479 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 480 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 481 | "headers": { # Required. The additional headers to add to the response. |
| 482 | "a_key": "A String", |
| 483 | }, |
| 484 | }, |
| 485 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 486 | "appAssociation": "A String", # How to handle well known App Association files. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 487 | "i18n": { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior. |
| 488 | "root": "A String", # Required. The user-supplied path where country and language specific content will be looked for within the public directory. |
| 489 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 490 | "rewrites": [ # An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. |
| 491 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. |
| 492 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 493 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 494 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 495 | "path": "A String", # The URL path to rewrite the request to. |
| 496 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). # The request will be forwarded to Cloud Run. |
| 497 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 498 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied. |
| 499 | }, |
| 500 | "function": "A String", # The function to proxy requests to. Must match the exported function name exactly. |
| 501 | }, |
| 502 | ], |
| 503 | }, |
| 504 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `FINALIZED` the version. |
| 505 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 506 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 507 | }, |
| 508 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 509 | "preview": { # Version preview configuration. If active and unexpired, this version will be accessible via a custom URL even if it is not the currently released version. Deprecated in favor of site channels. # Deprecated in favor of site channels. Version preview configuration for the site version. This configuration specifies whether previewing is enabled for this site version. Version previews allow you to preview your site at a custom URL before releasing it as the live version. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 510 | "active": True or False, # If true, preview URLs are enabled for this version. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 511 | "expireTime": "A String", # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 512 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 513 | "createTime": "A String", # Output only. The time at which the version was created. |
| 514 | "fileCount": "A String", # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 515 | } |
| 516 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 517 | updateMask: string, A set of field names from your [version](../sites.versions) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`status`](../sites.versions#Version.FIELDS.status) will be used. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 518 | x__xgafv: string, V1 error format. |
| 519 | Allowed values |
| 520 | 1 - v1 error format |
| 521 | 2 - v2 error format |
| 522 | |
| 523 | Returns: |
| 524 | An object of the form: |
| 525 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 526 | { # A `Version` is the collection of configuration and [static files](sites.versions.files) that determine how a site is displayed. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 527 | "status": "A String", # The deploy status of a version. For a successful deploy, call the [`CreateVersion`](sites.versions/create) endpoint to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling the [`DeleteVersion`](sites.versions/delete) endpoint. |
| 528 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `DELETED` the version. |
| 529 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 530 | "email": "A String", # The email address of the user when the user performed the action. |
| 531 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 532 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 533 | "name": "A String", # The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. |
| 534 | "createUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who created the version. |
| 535 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 536 | "email": "A String", # The email address of the user when the user performed the action. |
| 537 | }, |
| 538 | "labels": { # The labels used for extra metadata and/or filtering. |
| 539 | "a_key": "A String", |
| 540 | }, |
| 541 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 542 | "config": { # The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 543 | "redirects": [ # An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. |
| 544 | { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 545 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 546 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 547 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 548 | "location": "A String", # Required. The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a `:` prefix to identify the segment and an optional `*` to capture the rest of the URL. For example: "glob": "/:capture*", "statusCode": 301, "location": "https://example.com/foo/:capture" |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 549 | }, |
| 550 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 551 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 552 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 553 | "headers": [ # An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. |
| 554 | { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. |
| 555 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 556 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 557 | "headers": { # Required. The additional headers to add to the response. |
| 558 | "a_key": "A String", |
| 559 | }, |
| 560 | }, |
| 561 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 562 | "appAssociation": "A String", # How to handle well known App Association files. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 563 | "i18n": { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior. |
| 564 | "root": "A String", # Required. The user-supplied path where country and language specific content will be looked for within the public directory. |
| 565 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 566 | "rewrites": [ # An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. |
| 567 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. |
| 568 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 569 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 570 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 571 | "path": "A String", # The URL path to rewrite the request to. |
| 572 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). # The request will be forwarded to Cloud Run. |
| 573 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 574 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied. |
| 575 | }, |
| 576 | "function": "A String", # The function to proxy requests to. Must match the exported function name exactly. |
| 577 | }, |
| 578 | ], |
| 579 | }, |
| 580 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `FINALIZED` the version. |
| 581 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account. |
| 582 | "email": "A String", # The email address of the user when the user performed the action. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 583 | }, |
| 584 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 585 | "preview": { # Version preview configuration. If active and unexpired, this version will be accessible via a custom URL even if it is not the currently released version. Deprecated in favor of site channels. # Deprecated in favor of site channels. Version preview configuration for the site version. This configuration specifies whether previewing is enabled for this site version. Version previews allow you to preview your site at a custom URL before releasing it as the live version. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 586 | "active": True or False, # If true, preview URLs are enabled for this version. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 587 | "expireTime": "A String", # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 588 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 589 | "createTime": "A String", # Output only. The time at which the version was created. |
| 590 | "fileCount": "A String", # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 591 | }</pre> |
| 592 | </div> |
| 593 | |
| 594 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 595 | <code class="details" id="populateFiles">populateFiles(parent, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 596 | <pre>Adds content files to a version. Each file must be under 2 GB. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 597 | |
| 598 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 599 | parent: string, Required. The version to add files to, in the format: sites/site-name /versions/versionID (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 600 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 601 | The object takes the form of: |
| 602 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 603 | { # The request to populate a Version's Files. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 604 | "files": { # A set of file paths to the hashes corresponding to assets that should be added to the version. Note that a file path to an empty hash will remove the path from the version. Calculate a hash by Gzipping the file then taking the SHA256 hash of the newly compressed file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 605 | "a_key": "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 606 | }, |
| 607 | } |
| 608 | |
| 609 | x__xgafv: string, V1 error format. |
| 610 | Allowed values |
| 611 | 1 - v1 error format |
| 612 | 2 - v2 error format |
| 613 | |
| 614 | Returns: |
| 615 | An object of the form: |
| 616 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 617 | { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 618 | "uploadRequiredHashes": [ # The content hashes of the specified files that need to be uploaded to the specified endpoint. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 619 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 620 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 621 | "uploadUrl": "A String", # The URL to which the files should be uploaded, in the format: "https://upload-firebasehosting.googleapis.com/upload/sites/site-name /versions/versionID/files". Perform a multipart `POST` of the Gzipped file contents to the URL using a forward slash and the hash of the file appended to the end. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 622 | }</pre> |
| 623 | </div> |
| 624 | |
| 625 | </body></html> |