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"> |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [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"> |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 95 | <code><a href="#list">list(parent, filter=None, pageSize=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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [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 | "finalize": True or False, # If true, immediately finalize the version after cloning is complete. |
| 123 | "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. |
| 124 | "regexes": [ # An array of regexes to filter by. |
| 125 | "A String", |
| 126 | ], |
| 127 | }, |
| 128 | "sourceVersion": "A String", # Required. The name of the version to be cloned, in the format: `sites/{site}/versions/{version}` |
| 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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 140 | "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. |
| 141 | "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. |
| 142 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 143 | "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 144 | { |
| 145 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 146 | }, |
| 147 | ], |
| 148 | "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. |
| 149 | }, |
| 150 | "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. |
| 151 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 152 | }, |
| 153 | "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}`. |
| 154 | "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`. |
| 155 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 156 | }, |
| 157 | }</pre> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 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"> |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [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 | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 175 | "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. |
| 176 | "appAssociation": "A String", # How to handle well known App Association files. |
| 177 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 178 | "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. |
| 179 | { # 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. |
| 180 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 181 | "headers": { # Required. The additional headers to add to the response. |
| 182 | "a_key": "A String", |
| 183 | }, |
| 184 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 185 | }, |
| 186 | ], |
| 187 | "i18n": { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior. |
| 188 | "root": "A String", # Required. The user-supplied path where country and language specific content will be looked for within the public directory. |
| 189 | }, |
| 190 | "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. |
| 191 | { # 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. |
| 192 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 193 | "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" |
| 194 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 195 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code. |
| 196 | }, |
| 197 | ], |
| 198 | "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. |
| 199 | { # 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. |
| 200 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 201 | "function": "A String", # The function to proxy requests to. Must match the exported function name exactly. |
| 202 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 203 | "path": "A String", # The URL path to rewrite the request to. |
| 204 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 205 | "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. |
| 206 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied. |
| 207 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 208 | }, |
| 209 | }, |
| 210 | ], |
| 211 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 212 | }, |
| 213 | "createTime": "A String", # Output only. The time at which the version was created. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 214 | "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. |
| 215 | "email": "A String", # The email address of the user when the user performed the action. |
| 216 | "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. |
| 217 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 218 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 219 | "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. |
| 220 | "email": "A String", # The email address of the user when the user performed the action. |
| 221 | "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. |
| 222 | }, |
| 223 | "fileCount": "A String", # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
| 224 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 225 | "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. |
| 226 | "email": "A String", # The email address of the user when the user performed the action. |
| 227 | "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. |
| 228 | }, |
| 229 | "labels": { # The labels used for extra metadata and/or filtering. |
| 230 | "a_key": "A String", |
| 231 | }, |
| 232 | "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. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [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. |
| 234 | "active": True or False, # If true, preview URLs are enabled for this version. |
| 235 | "expireTime": "A String", # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 236 | }, |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 237 | "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. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 238 | "versionBytes": "A String", # Output only. The total stored bytesize of 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 | |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [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 | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 252 | "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. |
| 253 | "appAssociation": "A String", # How to handle well known App Association files. |
| 254 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 255 | "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. |
| 256 | { # 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. |
| 257 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 258 | "headers": { # Required. The additional headers to add to the response. |
| 259 | "a_key": "A String", |
| 260 | }, |
| 261 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 262 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 263 | ], |
| 264 | "i18n": { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior. |
| 265 | "root": "A String", # Required. The user-supplied path where country and language specific content will be looked for within the public directory. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 266 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 267 | "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. |
| 268 | { # 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. |
| 269 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 270 | "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" |
| 271 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 272 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code. |
| 273 | }, |
| 274 | ], |
| 275 | "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. |
| 276 | { # 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. |
| 277 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 278 | "function": "A String", # The function to proxy requests to. Must match the exported function name exactly. |
| 279 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 280 | "path": "A String", # The URL path to rewrite the request to. |
| 281 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 282 | "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. |
| 283 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied. |
| 284 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 285 | }, |
| 286 | }, |
| 287 | ], |
| 288 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 289 | }, |
| 290 | "createTime": "A String", # Output only. The time at which the version was created. |
| 291 | "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. |
| 292 | "email": "A String", # The email address of the user when the user performed the action. |
| 293 | "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. |
| 294 | }, |
| 295 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 296 | "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. |
| 297 | "email": "A String", # The email address of the user when the user performed the action. |
| 298 | "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. |
| 299 | }, |
| 300 | "fileCount": "A String", # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
| 301 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 302 | "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. |
| 303 | "email": "A String", # The email address of the user when the user performed the action. |
| 304 | "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. |
| 305 | }, |
| 306 | "labels": { # The labels used for extra metadata and/or filtering. |
| 307 | "a_key": "A String", |
| 308 | }, |
| 309 | "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. |
| 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. |
| 311 | "active": True or False, # If true, preview URLs are enabled for this version. |
| 312 | "expireTime": "A String", # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404. |
| 313 | }, |
| 314 | "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. |
| 315 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
| 316 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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 `{}`. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 334 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 335 | </div> |
| 336 | |
| 337 | <div class="method"> |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 338 | <code class="details" id="list">list(parent, filter=None, pageSize=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) |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 343 | 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. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 344 | 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 |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [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 | { |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 355 | "nextPageToken": "A String", # The pagination token, if more results exist |
| 356 | "versions": [ # The list of versions, if any exist. |
| 357 | { # A `Version` is the collection of configuration and [static files](sites.versions.files) that determine how a site is displayed. |
| 358 | "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. |
| 359 | "appAssociation": "A String", # How to handle well known App Association files. |
| 360 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 361 | "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. |
| 362 | { # 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. |
| 363 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 364 | "headers": { # Required. The additional headers to add to the response. |
| 365 | "a_key": "A String", |
| 366 | }, |
| 367 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 368 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 369 | ], |
| 370 | "i18n": { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior. |
| 371 | "root": "A String", # Required. The user-supplied path where country and language specific content will be looked for within the public directory. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 372 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [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. |
| 375 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 376 | "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" |
| 377 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 378 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code. |
| 379 | }, |
| 380 | ], |
| 381 | "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. |
| 382 | { # 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. |
| 383 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 384 | "function": "A String", # The function to proxy requests to. Must match the exported function name exactly. |
| 385 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 386 | "path": "A String", # The URL path to rewrite the request to. |
| 387 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 388 | "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. |
| 389 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied. |
| 390 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 391 | }, |
| 392 | }, |
| 393 | ], |
| 394 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 395 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 396 | "createTime": "A String", # Output only. The time at which the version was created. |
| 397 | "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. |
| 398 | "email": "A String", # The email address of the user when the user performed the action. |
| 399 | "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. |
| 400 | }, |
| 401 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 402 | "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. |
| 403 | "email": "A String", # The email address of the user when the user performed the action. |
| 404 | "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. |
| 405 | }, |
| 406 | "fileCount": "A String", # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
| 407 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 408 | "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. |
| 409 | "email": "A String", # The email address of the user when the user performed the action. |
| 410 | "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. |
| 411 | }, |
| 412 | "labels": { # The labels used for extra metadata and/or filtering. |
| 413 | "a_key": "A String", |
| 414 | }, |
| 415 | "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. |
| 416 | "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. |
| 417 | "active": True or False, # If true, preview URLs are enabled for this version. |
| 418 | "expireTime": "A String", # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404. |
| 419 | }, |
| 420 | "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. |
| 421 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
| 422 | }, |
| 423 | ], |
| 424 | }</pre> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 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 | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 451 | "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. |
| 452 | "appAssociation": "A String", # How to handle well known App Association files. |
| 453 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 454 | "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. |
| 455 | { # 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. |
| 456 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 457 | "headers": { # Required. The additional headers to add to the response. |
| 458 | "a_key": "A String", |
| 459 | }, |
| 460 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 461 | }, |
| 462 | ], |
| 463 | "i18n": { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior. |
| 464 | "root": "A String", # Required. The user-supplied path where country and language specific content will be looked for within the public directory. |
| 465 | }, |
| 466 | "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. |
| 467 | { # 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. |
| 468 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 469 | "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" |
| 470 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 471 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code. |
| 472 | }, |
| 473 | ], |
| 474 | "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. |
| 475 | { # 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. |
| 476 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 477 | "function": "A String", # The function to proxy requests to. Must match the exported function name exactly. |
| 478 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 479 | "path": "A String", # The URL path to rewrite the request to. |
| 480 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 481 | "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. |
| 482 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied. |
| 483 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 484 | }, |
| 485 | }, |
| 486 | ], |
| 487 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 488 | }, |
| 489 | "createTime": "A String", # Output only. The time at which the version was created. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 490 | "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. |
| 491 | "email": "A String", # The email address of the user when the user performed the action. |
| 492 | "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. |
| 493 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 494 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 495 | "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. |
| 496 | "email": "A String", # The email address of the user when the user performed the action. |
| 497 | "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. |
| 498 | }, |
| 499 | "fileCount": "A String", # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
| 500 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 501 | "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. |
| 502 | "email": "A String", # The email address of the user when the user performed the action. |
| 503 | "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. |
| 504 | }, |
| 505 | "labels": { # The labels used for extra metadata and/or filtering. |
| 506 | "a_key": "A String", |
| 507 | }, |
| 508 | "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. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [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. |
| 510 | "active": True or False, # If true, preview URLs are enabled for this version. |
| 511 | "expireTime": "A String", # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 512 | }, |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 513 | "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. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 514 | "versionBytes": "A String", # Output only. The total stored bytesize of 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 | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 527 | "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. |
| 528 | "appAssociation": "A String", # How to handle well known App Association files. |
| 529 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 530 | "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. |
| 531 | { # 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. |
| 532 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 533 | "headers": { # Required. The additional headers to add to the response. |
| 534 | "a_key": "A String", |
| 535 | }, |
| 536 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 537 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 538 | ], |
| 539 | "i18n": { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior. |
| 540 | "root": "A String", # Required. The user-supplied path where country and language specific content will be looked for within the public directory. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 541 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 542 | "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. |
| 543 | { # 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. |
| 544 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 545 | "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" |
| 546 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 547 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code. |
| 548 | }, |
| 549 | ], |
| 550 | "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. |
| 551 | { # 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. |
| 552 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
| 553 | "function": "A String", # The function to proxy requests to. Must match the exported function name exactly. |
| 554 | "glob": "A String", # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path. |
| 555 | "path": "A String", # The URL path to rewrite the request to. |
| 556 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request URL path. |
| 557 | "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. |
| 558 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied. |
| 559 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 560 | }, |
| 561 | }, |
| 562 | ], |
| 563 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 564 | }, |
| 565 | "createTime": "A String", # Output only. The time at which the version was created. |
| 566 | "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. |
| 567 | "email": "A String", # The email address of the user when the user performed the action. |
| 568 | "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. |
| 569 | }, |
| 570 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 571 | "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. |
| 572 | "email": "A String", # The email address of the user when the user performed the action. |
| 573 | "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. |
| 574 | }, |
| 575 | "fileCount": "A String", # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
| 576 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 577 | "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. |
| 578 | "email": "A String", # The email address of the user when the user performed the action. |
| 579 | "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. |
| 580 | }, |
| 581 | "labels": { # The labels used for extra metadata and/or filtering. |
| 582 | "a_key": "A String", |
| 583 | }, |
| 584 | "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. |
| 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. |
| 586 | "active": True or False, # If true, preview URLs are enabled for this version. |
| 587 | "expireTime": "A String", # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404. |
| 588 | }, |
| 589 | "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. |
| 590 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
| 591 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [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. |
| 605 | "a_key": "A String", |
| 606 | }, |
| 607 | } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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 | { |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame^] | 618 | "uploadRequiredHashes": [ # The content hashes of the specified files that need to be uploaded to the specified endpoint. |
| 619 | "A String", |
| 620 | ], |
| 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. |
| 622 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 623 | </div> |
| 624 | |
| 625 | </body></html> |