blob: bae763f2c99927e75c2c326e3d2ccd17e0eccf4a [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="firebasehosting_v1beta1.html">Firebase Hosting API</a> . <a href="firebasehosting_v1beta1.sites.html">sites</a> . <a href="firebasehosting_v1beta1.sites.versions.html">versions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="firebasehosting_v1beta1.sites.versions.files.html">files()</a></code>
79</p>
80<p class="firstline">Returns the files Resource.</p>
81
82<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070083 <code><a href="#create">create(parent, body=None, sizeBytes=None, versionId=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084<p class="firstline">Creates a new version for a site.</p>
85<p class="toc_element">
86 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
87<p class="firstline">Deletes the specified version.</p>
88<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070089 <code><a href="#list">list(parent, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070090<p class="firstline">Lists the versions that have been created on the specified site.</p>
91<p class="toc_element">
92 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
93<p class="firstline">Retrieves the next page of results.</p>
94<p class="toc_element">
95 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096<p class="firstline">Updates the specified metadata for a version. Note that this method will</p>
97<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070098 <code><a href="#populateFiles">populateFiles(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099<p class="firstline">Adds content files to a version.</p>
100<h3>Method Details</h3>
101<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <code class="details" id="create">create(parent, body=None, sizeBytes=None, versionId=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103 <pre>Creates a new version for a site.
104
105Args:
106 parent: string, Required. The parent to create the version for, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700107&lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;&lt;/code&gt; (required)
108 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109 The object takes the form of:
110
111{ # A `Version` is the collection of configuration and
112 # [static files](sites.versions.files) that determine how a site is displayed.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700113 &quot;createUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700114 # a release or finalizing a version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700115 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
116 # changed their email address or deleted their account.
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700118 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700119 &quot;name&quot;: &quot;A String&quot;, # The unique identifier for a version, in the format:
120 # &lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;&lt;/code&gt;
121 # This name is provided in the response body when you call the
122 # [`CreateVersion`](../sites.versions/create) endpoint.
Bu Sun Kim65020912020-05-20 12:08:20 -0700123 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
124 &quot;a_key&quot;: &quot;A String&quot;,
125 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700126 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
127 &quot;config&quot;: { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists
128 # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
129 # processed before serving content. The URL request paths are matched against
130 # the specified URL patterns in the configuration, then Hosting applies the
131 # applicable configuration according to a specific
132 # [priority order](/docs/hosting/full-config#hosting_priority_order).
133 &quot;headers&quot;: [ # An array of objects, where each object specifies a URL pattern that, if
134 # matched to the request URL path, triggers Hosting to apply the specified
135 # custom response headers.
136 { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies
137 # a URL pattern that, if matched to the request URL path, triggers Hosting to
138 # apply the specified custom response headers.
139 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
140 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
141 # against the request URL path.
142 &quot;headers&quot;: { # Required. The additional headers to add to the response.
143 &quot;a_key&quot;: &quot;A String&quot;,
144 },
145 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
146 # URL path.
147 },
148 ],
149 &quot;redirects&quot;: [ # An array of objects (called redirect rules), where each rule specifies a
150 # URL pattern that, if matched to the request URL path, triggers Hosting to
151 # respond with a redirect to the specified destination path.
152 { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL
153 # pattern that, if matched to the request URL path, triggers Hosting to
154 # respond with a redirect to the specified destination path.
155 &quot;location&quot;: &quot;A String&quot;, # Required. The value to put in the HTTP location header of the response.
156 # &lt;br&gt;The location can contain capture group values from the pattern using
157 # a `:` prefix to identify the segment and an optional `*` to capture the
158 # rest of the URL.
159 # For example:
160 # &lt;code&gt;&quot;glob&quot;: &quot;/:capture*&quot;,
161 # &lt;br&gt;&quot;statusCode&quot;: 301,
162 # &lt;br&gt;&quot;location&quot;: &quot;https://example.com/foo/:capture&quot;&lt;/code&gt;
163 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
164 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
165 # against the request URL path.
166 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a
167 # valid 3xx status code.
168 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
169 # URL path.
170 },
171 ],
172 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
173 &quot;rewrites&quot;: [ # An array of objects (called rewrite rules), where each rule specifies a URL
174 # pattern that, if matched to the request URL path, triggers Hosting to
175 # respond as if the service were given the specified destination URL.
176 { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL
177 # pattern that, if matched to the request URL path, triggers Hosting to
178 # respond as if the service were given the specified destination URL.
179 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
180 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
181 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
182 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
183 # against the request URL path.
184 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
185 # URL path.
186 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function
187 # name exactly.
188 &quot;run&quot;: { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run.
189 # Cloud Run service does not exist when setting or updating your Firebase
190 # Hosting configuration, then the request fails. Any errors from the Cloud Run
191 # service are passed to the end user (for example, if you delete a service, any
192 # requests directed to that service receive a `404` error).
193 &quot;region&quot;: &quot;A String&quot;, # Optional. User-provided region where the Cloud Run service is hosted.&lt;br&gt;
194 # Defaults to `us-central1` if not supplied.
195 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
196 },
197 },
198 ],
199 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
200 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
201 },
202 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
203 &quot;deleteUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version.
204 # a release or finalizing a version.
205 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
206 # changed their email address or deleted their account.
207 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
208 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700209 &quot;versionBytes&quot;: &quot;A String&quot;, # Output only. The total stored bytesize of the version.
210 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700211 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
212 &quot;fileCount&quot;: &quot;A String&quot;, # Output only. The total number of files associated with the version.
213 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 &quot;status&quot;: &quot;A String&quot;, # The deploy status of a version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700215 # &lt;br&gt;
216 # &lt;br&gt;For a successful deploy, call the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217 # [`CreateVersion`](sites.versions/create) endpoint to make a new version
218 # (`CREATED` status),
219 # [upload all desired files](sites.versions/populateFiles) to the version,
220 # then [update](sites.versions/patch) the version to the `FINALIZED` status.
Dan O'Mearadd494642020-05-01 07:42:23 -0700221 # &lt;br&gt;
222 # &lt;br&gt;Note that if you leave the version in the `CREATED` state for more
223 # than 12&amp;nbsp;hours, the system will automatically mark the version as
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224 # `ABANDONED`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700225 # &lt;br&gt;
226 # &lt;br&gt;You can also change the status of a version to `DELETED` by calling the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 # [`DeleteVersion`](sites.versions/delete) endpoint.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700228 &quot;preview&quot;: { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration
229 # specfies whether previewing is enabled for this site version. Version
230 # previews allow you to preview your site at a custom URL before
231 # releasing it as the live version.
232 # this version will be accessible via a custom URL even
233 # if it is not the currently released version.
234 &quot;expireTime&quot;: &quot;A String&quot;, # Indicates the expiration time for previewing this
235 # version; preview URL requests received after this time will 404.
236 &quot;active&quot;: True or False, # If true, preview URLs are enabled for this version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700237 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700238 &quot;finalizeUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 # a release or finalizing a version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700240 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
241 # changed their email address or deleted their account.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700242 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700244}
245
Bu Sun Kim65020912020-05-20 12:08:20 -0700246 sizeBytes: string, The self-reported size of the version. This value is used for a pre-emptive
247quota check for legacy version uploads.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 versionId: string, A unique id for the new version. This is only specified for legacy version
249creations.
250 x__xgafv: string, V1 error format.
251 Allowed values
252 1 - v1 error format
253 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254
255Returns:
256 An object of the form:
257
258 { # A `Version` is the collection of configuration and
259 # [static files](sites.versions.files) that determine how a site is displayed.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700260 &quot;createUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700261 # a release or finalizing a version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
263 # changed their email address or deleted their account.
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700265 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700266 &quot;name&quot;: &quot;A String&quot;, # The unique identifier for a version, in the format:
267 # &lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;&lt;/code&gt;
268 # This name is provided in the response body when you call the
269 # [`CreateVersion`](../sites.versions/create) endpoint.
Bu Sun Kim65020912020-05-20 12:08:20 -0700270 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
271 &quot;a_key&quot;: &quot;A String&quot;,
272 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700273 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
274 &quot;config&quot;: { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists
275 # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
276 # processed before serving content. The URL request paths are matched against
277 # the specified URL patterns in the configuration, then Hosting applies the
278 # applicable configuration according to a specific
279 # [priority order](/docs/hosting/full-config#hosting_priority_order).
280 &quot;headers&quot;: [ # An array of objects, where each object specifies a URL pattern that, if
281 # matched to the request URL path, triggers Hosting to apply the specified
282 # custom response headers.
283 { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies
284 # a URL pattern that, if matched to the request URL path, triggers Hosting to
285 # apply the specified custom response headers.
286 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
287 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
288 # against the request URL path.
289 &quot;headers&quot;: { # Required. The additional headers to add to the response.
290 &quot;a_key&quot;: &quot;A String&quot;,
291 },
292 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
293 # URL path.
294 },
295 ],
296 &quot;redirects&quot;: [ # An array of objects (called redirect rules), where each rule specifies a
297 # URL pattern that, if matched to the request URL path, triggers Hosting to
298 # respond with a redirect to the specified destination path.
299 { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL
300 # pattern that, if matched to the request URL path, triggers Hosting to
301 # respond with a redirect to the specified destination path.
302 &quot;location&quot;: &quot;A String&quot;, # Required. The value to put in the HTTP location header of the response.
303 # &lt;br&gt;The location can contain capture group values from the pattern using
304 # a `:` prefix to identify the segment and an optional `*` to capture the
305 # rest of the URL.
306 # For example:
307 # &lt;code&gt;&quot;glob&quot;: &quot;/:capture*&quot;,
308 # &lt;br&gt;&quot;statusCode&quot;: 301,
309 # &lt;br&gt;&quot;location&quot;: &quot;https://example.com/foo/:capture&quot;&lt;/code&gt;
310 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
311 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
312 # against the request URL path.
313 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a
314 # valid 3xx status code.
315 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
316 # URL path.
317 },
318 ],
319 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
320 &quot;rewrites&quot;: [ # An array of objects (called rewrite rules), where each rule specifies a URL
321 # pattern that, if matched to the request URL path, triggers Hosting to
322 # respond as if the service were given the specified destination URL.
323 { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL
324 # pattern that, if matched to the request URL path, triggers Hosting to
325 # respond as if the service were given the specified destination URL.
326 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
327 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
328 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
329 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
330 # against the request URL path.
331 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
332 # URL path.
333 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function
334 # name exactly.
335 &quot;run&quot;: { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run.
336 # Cloud Run service does not exist when setting or updating your Firebase
337 # Hosting configuration, then the request fails. Any errors from the Cloud Run
338 # service are passed to the end user (for example, if you delete a service, any
339 # requests directed to that service receive a `404` error).
340 &quot;region&quot;: &quot;A String&quot;, # Optional. User-provided region where the Cloud Run service is hosted.&lt;br&gt;
341 # Defaults to `us-central1` if not supplied.
342 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
343 },
344 },
345 ],
346 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
347 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
348 },
349 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
350 &quot;deleteUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version.
351 # a release or finalizing a version.
352 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
353 # changed their email address or deleted their account.
354 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
355 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700356 &quot;versionBytes&quot;: &quot;A String&quot;, # Output only. The total stored bytesize of the version.
357 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700358 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
359 &quot;fileCount&quot;: &quot;A String&quot;, # Output only. The total number of files associated with the version.
360 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 &quot;status&quot;: &quot;A String&quot;, # The deploy status of a version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 # &lt;br&gt;
363 # &lt;br&gt;For a successful deploy, call the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700364 # [`CreateVersion`](sites.versions/create) endpoint to make a new version
365 # (`CREATED` status),
366 # [upload all desired files](sites.versions/populateFiles) to the version,
367 # then [update](sites.versions/patch) the version to the `FINALIZED` status.
Dan O'Mearadd494642020-05-01 07:42:23 -0700368 # &lt;br&gt;
369 # &lt;br&gt;Note that if you leave the version in the `CREATED` state for more
370 # than 12&amp;nbsp;hours, the system will automatically mark the version as
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700371 # `ABANDONED`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700372 # &lt;br&gt;
373 # &lt;br&gt;You can also change the status of a version to `DELETED` by calling the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 # [`DeleteVersion`](sites.versions/delete) endpoint.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700375 &quot;preview&quot;: { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration
376 # specfies whether previewing is enabled for this site version. Version
377 # previews allow you to preview your site at a custom URL before
378 # releasing it as the live version.
379 # this version will be accessible via a custom URL even
380 # if it is not the currently released version.
381 &quot;expireTime&quot;: &quot;A String&quot;, # Indicates the expiration time for previewing this
382 # version; preview URL requests received after this time will 404.
383 &quot;active&quot;: True or False, # If true, preview URLs are enabled for this version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700384 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700385 &quot;finalizeUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700386 # a release or finalizing a version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700387 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
388 # changed their email address or deleted their account.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700389 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700390 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700391 }</pre>
392</div>
393
394<div class="method">
395 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
396 <pre>Deletes the specified version.
397
398Args:
399 name: string, Required. The name of the version to be deleted, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700400&lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;&lt;/code&gt; (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 x__xgafv: string, V1 error format.
402 Allowed values
403 1 - v1 error format
404 2 - v2 error format
405
406Returns:
407 An object of the form:
408
409 { # A generic empty message that you can re-use to avoid defining duplicated
410 # empty messages in your APIs. A typical example is to use it as the request
411 # or the response type of an API method. For instance:
412 #
413 # service Foo {
414 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
415 # }
416 #
417 # The JSON representation for `Empty` is empty JSON object `{}`.
418 }</pre>
419</div>
420
421<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700422 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700423 <pre>Lists the versions that have been created on the specified site.
424Will include filtering in the future.
425
426Args:
427 parent: string, Required. The parent for which to list files, in the format:
428&lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;&lt;/code&gt; (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700429 pageToken: string, The next_page_token from a previous request, if provided.
430 pageSize: integer, The maximum number of versions to return. The service may return fewer than
431this value.
432If unspecified, at most 25 versions will be returned.
433The maximum value is 100; values above 100 will be coerced to 100
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700434 filter: string, The filter string used to return a subset of versions in the response.
435Currently supported fields for filtering are: name, status,
436and create_time. Filter processing will be implemented in accordance
437with go/filtering.
Bu Sun Kim65020912020-05-20 12:08:20 -0700438 x__xgafv: string, V1 error format.
439 Allowed values
440 1 - v1 error format
441 2 - v2 error format
Dan O'Mearadd494642020-05-01 07:42:23 -0700442
443Returns:
444 An object of the form:
445
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700447 &quot;versions&quot;: [ # The list of versions, if any exist.
Dan O'Mearadd494642020-05-01 07:42:23 -0700448 { # A `Version` is the collection of configuration and
449 # [static files](sites.versions.files) that determine how a site is displayed.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700450 &quot;createUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700451 # a release or finalizing a version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700452 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
453 # changed their email address or deleted their account.
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700455 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700456 &quot;name&quot;: &quot;A String&quot;, # The unique identifier for a version, in the format:
457 # &lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;&lt;/code&gt;
458 # This name is provided in the response body when you call the
459 # [`CreateVersion`](../sites.versions/create) endpoint.
Bu Sun Kim65020912020-05-20 12:08:20 -0700460 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
461 &quot;a_key&quot;: &quot;A String&quot;,
462 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700463 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
464 &quot;config&quot;: { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists
465 # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
466 # processed before serving content. The URL request paths are matched against
467 # the specified URL patterns in the configuration, then Hosting applies the
468 # applicable configuration according to a specific
469 # [priority order](/docs/hosting/full-config#hosting_priority_order).
470 &quot;headers&quot;: [ # An array of objects, where each object specifies a URL pattern that, if
471 # matched to the request URL path, triggers Hosting to apply the specified
472 # custom response headers.
473 { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies
474 # a URL pattern that, if matched to the request URL path, triggers Hosting to
475 # apply the specified custom response headers.
476 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
477 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
478 # against the request URL path.
479 &quot;headers&quot;: { # Required. The additional headers to add to the response.
480 &quot;a_key&quot;: &quot;A String&quot;,
481 },
482 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
483 # URL path.
484 },
485 ],
486 &quot;redirects&quot;: [ # An array of objects (called redirect rules), where each rule specifies a
487 # URL pattern that, if matched to the request URL path, triggers Hosting to
488 # respond with a redirect to the specified destination path.
489 { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL
490 # pattern that, if matched to the request URL path, triggers Hosting to
491 # respond with a redirect to the specified destination path.
492 &quot;location&quot;: &quot;A String&quot;, # Required. The value to put in the HTTP location header of the response.
493 # &lt;br&gt;The location can contain capture group values from the pattern using
494 # a `:` prefix to identify the segment and an optional `*` to capture the
495 # rest of the URL.
496 # For example:
497 # &lt;code&gt;&quot;glob&quot;: &quot;/:capture*&quot;,
498 # &lt;br&gt;&quot;statusCode&quot;: 301,
499 # &lt;br&gt;&quot;location&quot;: &quot;https://example.com/foo/:capture&quot;&lt;/code&gt;
500 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
501 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
502 # against the request URL path.
503 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a
504 # valid 3xx status code.
505 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
506 # URL path.
507 },
508 ],
509 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
510 &quot;rewrites&quot;: [ # An array of objects (called rewrite rules), where each rule specifies a URL
511 # pattern that, if matched to the request URL path, triggers Hosting to
512 # respond as if the service were given the specified destination URL.
513 { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL
514 # pattern that, if matched to the request URL path, triggers Hosting to
515 # respond as if the service were given the specified destination URL.
516 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
517 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
518 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
519 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
520 # against the request URL path.
521 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
522 # URL path.
523 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function
524 # name exactly.
525 &quot;run&quot;: { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run.
526 # Cloud Run service does not exist when setting or updating your Firebase
527 # Hosting configuration, then the request fails. Any errors from the Cloud Run
528 # service are passed to the end user (for example, if you delete a service, any
529 # requests directed to that service receive a `404` error).
530 &quot;region&quot;: &quot;A String&quot;, # Optional. User-provided region where the Cloud Run service is hosted.&lt;br&gt;
531 # Defaults to `us-central1` if not supplied.
532 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
533 },
534 },
535 ],
536 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
537 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
538 },
539 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
540 &quot;deleteUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version.
541 # a release or finalizing a version.
542 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
543 # changed their email address or deleted their account.
544 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
545 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 &quot;versionBytes&quot;: &quot;A String&quot;, # Output only. The total stored bytesize of the version.
547 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700548 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
549 &quot;fileCount&quot;: &quot;A String&quot;, # Output only. The total number of files associated with the version.
550 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700551 &quot;status&quot;: &quot;A String&quot;, # The deploy status of a version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700552 # &lt;br&gt;
553 # &lt;br&gt;For a successful deploy, call the
554 # [`CreateVersion`](sites.versions/create) endpoint to make a new version
555 # (`CREATED` status),
556 # [upload all desired files](sites.versions/populateFiles) to the version,
557 # then [update](sites.versions/patch) the version to the `FINALIZED` status.
558 # &lt;br&gt;
559 # &lt;br&gt;Note that if you leave the version in the `CREATED` state for more
560 # than 12&amp;nbsp;hours, the system will automatically mark the version as
561 # `ABANDONED`.
562 # &lt;br&gt;
563 # &lt;br&gt;You can also change the status of a version to `DELETED` by calling the
564 # [`DeleteVersion`](sites.versions/delete) endpoint.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700565 &quot;preview&quot;: { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration
566 # specfies whether previewing is enabled for this site version. Version
567 # previews allow you to preview your site at a custom URL before
568 # releasing it as the live version.
569 # this version will be accessible via a custom URL even
570 # if it is not the currently released version.
571 &quot;expireTime&quot;: &quot;A String&quot;, # Indicates the expiration time for previewing this
572 # version; preview URL requests received after this time will 404.
573 &quot;active&quot;: True or False, # If true, preview URLs are enabled for this version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700574 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700575 &quot;finalizeUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700576 # a release or finalizing a version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700577 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
578 # changed their email address or deleted their account.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700579 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700580 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700581 },
582 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700583 &quot;nextPageToken&quot;: &quot;A String&quot;, # The pagination token, if more results exist
Dan O'Mearadd494642020-05-01 07:42:23 -0700584 }</pre>
585</div>
586
587<div class="method">
588 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
589 <pre>Retrieves the next page of results.
590
591Args:
592 previous_request: The request for the previous page. (required)
593 previous_response: The response from the request for the previous page. (required)
594
595Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700596 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -0700597 page. Returns None if there are no more items in the collection.
598 </pre>
599</div>
600
601<div class="method">
602 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700603 <pre>Updates the specified metadata for a version. Note that this method will
604fail with `FAILED_PRECONDITION` in the event of an invalid state
605transition. The only valid transition for a version is currently from a
606`CREATED` status to a `FINALIZED` status.
607Use [`DeleteVersion`](../sites.versions/delete) to set the status of a
608version to `DELETED`.
609
610Args:
611 name: string, The unique identifier for a version, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700612&lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;&lt;/code&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700613This name is provided in the response body when you call the
614[`CreateVersion`](../sites.versions/create) endpoint. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700615 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 The object takes the form of:
617
618{ # A `Version` is the collection of configuration and
619 # [static files](sites.versions.files) that determine how a site is displayed.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700620 &quot;createUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 # a release or finalizing a version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700622 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
623 # changed their email address or deleted their account.
Bu Sun Kim65020912020-05-20 12:08:20 -0700624 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700625 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700626 &quot;name&quot;: &quot;A String&quot;, # The unique identifier for a version, in the format:
627 # &lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;&lt;/code&gt;
628 # This name is provided in the response body when you call the
629 # [`CreateVersion`](../sites.versions/create) endpoint.
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
631 &quot;a_key&quot;: &quot;A String&quot;,
632 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700633 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
634 &quot;config&quot;: { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists
635 # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
636 # processed before serving content. The URL request paths are matched against
637 # the specified URL patterns in the configuration, then Hosting applies the
638 # applicable configuration according to a specific
639 # [priority order](/docs/hosting/full-config#hosting_priority_order).
640 &quot;headers&quot;: [ # An array of objects, where each object specifies a URL pattern that, if
641 # matched to the request URL path, triggers Hosting to apply the specified
642 # custom response headers.
643 { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies
644 # a URL pattern that, if matched to the request URL path, triggers Hosting to
645 # apply the specified custom response headers.
646 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
647 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
648 # against the request URL path.
649 &quot;headers&quot;: { # Required. The additional headers to add to the response.
650 &quot;a_key&quot;: &quot;A String&quot;,
651 },
652 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
653 # URL path.
654 },
655 ],
656 &quot;redirects&quot;: [ # An array of objects (called redirect rules), where each rule specifies a
657 # URL pattern that, if matched to the request URL path, triggers Hosting to
658 # respond with a redirect to the specified destination path.
659 { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL
660 # pattern that, if matched to the request URL path, triggers Hosting to
661 # respond with a redirect to the specified destination path.
662 &quot;location&quot;: &quot;A String&quot;, # Required. The value to put in the HTTP location header of the response.
663 # &lt;br&gt;The location can contain capture group values from the pattern using
664 # a `:` prefix to identify the segment and an optional `*` to capture the
665 # rest of the URL.
666 # For example:
667 # &lt;code&gt;&quot;glob&quot;: &quot;/:capture*&quot;,
668 # &lt;br&gt;&quot;statusCode&quot;: 301,
669 # &lt;br&gt;&quot;location&quot;: &quot;https://example.com/foo/:capture&quot;&lt;/code&gt;
670 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
671 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
672 # against the request URL path.
673 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a
674 # valid 3xx status code.
675 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
676 # URL path.
677 },
678 ],
679 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
680 &quot;rewrites&quot;: [ # An array of objects (called rewrite rules), where each rule specifies a URL
681 # pattern that, if matched to the request URL path, triggers Hosting to
682 # respond as if the service were given the specified destination URL.
683 { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL
684 # pattern that, if matched to the request URL path, triggers Hosting to
685 # respond as if the service were given the specified destination URL.
686 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
687 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
688 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
689 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
690 # against the request URL path.
691 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
692 # URL path.
693 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function
694 # name exactly.
695 &quot;run&quot;: { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run.
696 # Cloud Run service does not exist when setting or updating your Firebase
697 # Hosting configuration, then the request fails. Any errors from the Cloud Run
698 # service are passed to the end user (for example, if you delete a service, any
699 # requests directed to that service receive a `404` error).
700 &quot;region&quot;: &quot;A String&quot;, # Optional. User-provided region where the Cloud Run service is hosted.&lt;br&gt;
701 # Defaults to `us-central1` if not supplied.
702 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
703 },
704 },
705 ],
706 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
707 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
708 },
709 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
710 &quot;deleteUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version.
711 # a release or finalizing a version.
712 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
713 # changed their email address or deleted their account.
714 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
715 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700716 &quot;versionBytes&quot;: &quot;A String&quot;, # Output only. The total stored bytesize of the version.
717 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700718 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
719 &quot;fileCount&quot;: &quot;A String&quot;, # Output only. The total number of files associated with the version.
720 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700721 &quot;status&quot;: &quot;A String&quot;, # The deploy status of a version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700722 # &lt;br&gt;
723 # &lt;br&gt;For a successful deploy, call the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700724 # [`CreateVersion`](sites.versions/create) endpoint to make a new version
725 # (`CREATED` status),
726 # [upload all desired files](sites.versions/populateFiles) to the version,
727 # then [update](sites.versions/patch) the version to the `FINALIZED` status.
Dan O'Mearadd494642020-05-01 07:42:23 -0700728 # &lt;br&gt;
729 # &lt;br&gt;Note that if you leave the version in the `CREATED` state for more
730 # than 12&amp;nbsp;hours, the system will automatically mark the version as
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700731 # `ABANDONED`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700732 # &lt;br&gt;
733 # &lt;br&gt;You can also change the status of a version to `DELETED` by calling the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 # [`DeleteVersion`](sites.versions/delete) endpoint.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700735 &quot;preview&quot;: { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration
736 # specfies whether previewing is enabled for this site version. Version
737 # previews allow you to preview your site at a custom URL before
738 # releasing it as the live version.
739 # this version will be accessible via a custom URL even
740 # if it is not the currently released version.
741 &quot;expireTime&quot;: &quot;A String&quot;, # Indicates the expiration time for previewing this
742 # version; preview URL requests received after this time will 404.
743 &quot;active&quot;: True or False, # If true, preview URLs are enabled for this version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700744 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700745 &quot;finalizeUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700746 # a release or finalizing a version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700747 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
748 # changed their email address or deleted their account.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700749 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700750 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751}
752
753 updateMask: string, A set of field names from your [version](../sites.versions) that you want
754to update.
Bu Sun Kim65020912020-05-20 12:08:20 -0700755&lt;br&gt;A field will be overwritten if, and only if, it&#x27;s in the mask.
Dan O'Mearadd494642020-05-01 07:42:23 -0700756&lt;br&gt;If a mask is not provided then a default mask of only
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700757[`status`](../sites.versions#Version.FIELDS.status) will be used.
758 x__xgafv: string, V1 error format.
759 Allowed values
760 1 - v1 error format
761 2 - v2 error format
762
763Returns:
764 An object of the form:
765
766 { # A `Version` is the collection of configuration and
767 # [static files](sites.versions.files) that determine how a site is displayed.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700768 &quot;createUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700769 # a release or finalizing a version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700770 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
771 # changed their email address or deleted their account.
Bu Sun Kim65020912020-05-20 12:08:20 -0700772 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700774 &quot;name&quot;: &quot;A String&quot;, # The unique identifier for a version, in the format:
775 # &lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;&lt;/code&gt;
776 # This name is provided in the response body when you call the
777 # [`CreateVersion`](../sites.versions/create) endpoint.
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
779 &quot;a_key&quot;: &quot;A String&quot;,
780 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700781 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
782 &quot;config&quot;: { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists
783 # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
784 # processed before serving content. The URL request paths are matched against
785 # the specified URL patterns in the configuration, then Hosting applies the
786 # applicable configuration according to a specific
787 # [priority order](/docs/hosting/full-config#hosting_priority_order).
788 &quot;headers&quot;: [ # An array of objects, where each object specifies a URL pattern that, if
789 # matched to the request URL path, triggers Hosting to apply the specified
790 # custom response headers.
791 { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies
792 # a URL pattern that, if matched to the request URL path, triggers Hosting to
793 # apply the specified custom response headers.
794 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
795 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
796 # against the request URL path.
797 &quot;headers&quot;: { # Required. The additional headers to add to the response.
798 &quot;a_key&quot;: &quot;A String&quot;,
799 },
800 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
801 # URL path.
802 },
803 ],
804 &quot;redirects&quot;: [ # An array of objects (called redirect rules), where each rule specifies a
805 # URL pattern that, if matched to the request URL path, triggers Hosting to
806 # respond with a redirect to the specified destination path.
807 { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL
808 # pattern that, if matched to the request URL path, triggers Hosting to
809 # respond with a redirect to the specified destination path.
810 &quot;location&quot;: &quot;A String&quot;, # Required. The value to put in the HTTP location header of the response.
811 # &lt;br&gt;The location can contain capture group values from the pattern using
812 # a `:` prefix to identify the segment and an optional `*` to capture the
813 # rest of the URL.
814 # For example:
815 # &lt;code&gt;&quot;glob&quot;: &quot;/:capture*&quot;,
816 # &lt;br&gt;&quot;statusCode&quot;: 301,
817 # &lt;br&gt;&quot;location&quot;: &quot;https://example.com/foo/:capture&quot;&lt;/code&gt;
818 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
819 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
820 # against the request URL path.
821 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a
822 # valid 3xx status code.
823 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
824 # URL path.
825 },
826 ],
827 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
828 &quot;rewrites&quot;: [ # An array of objects (called rewrite rules), where each rule specifies a URL
829 # pattern that, if matched to the request URL path, triggers Hosting to
830 # respond as if the service were given the specified destination URL.
831 { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL
832 # pattern that, if matched to the request URL path, triggers Hosting to
833 # respond as if the service were given the specified destination URL.
834 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
835 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
836 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied
837 # [glob](/docs/hosting/full-config#glob_pattern_matching) to match
838 # against the request URL path.
839 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request
840 # URL path.
841 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function
842 # name exactly.
843 &quot;run&quot;: { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run.
844 # Cloud Run service does not exist when setting or updating your Firebase
845 # Hosting configuration, then the request fails. Any errors from the Cloud Run
846 # service are passed to the end user (for example, if you delete a service, any
847 # requests directed to that service receive a `404` error).
848 &quot;region&quot;: &quot;A String&quot;, # Optional. User-provided region where the Cloud Run service is hosted.&lt;br&gt;
849 # Defaults to `us-central1` if not supplied.
850 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
851 },
852 },
853 ],
854 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
855 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
856 },
857 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
858 &quot;deleteUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version.
859 # a release or finalizing a version.
860 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
861 # changed their email address or deleted their account.
862 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
863 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700864 &quot;versionBytes&quot;: &quot;A String&quot;, # Output only. The total stored bytesize of the version.
865 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700866 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
867 &quot;fileCount&quot;: &quot;A String&quot;, # Output only. The total number of files associated with the version.
868 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 &quot;status&quot;: &quot;A String&quot;, # The deploy status of a version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700870 # &lt;br&gt;
871 # &lt;br&gt;For a successful deploy, call the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700872 # [`CreateVersion`](sites.versions/create) endpoint to make a new version
873 # (`CREATED` status),
874 # [upload all desired files](sites.versions/populateFiles) to the version,
875 # then [update](sites.versions/patch) the version to the `FINALIZED` status.
Dan O'Mearadd494642020-05-01 07:42:23 -0700876 # &lt;br&gt;
877 # &lt;br&gt;Note that if you leave the version in the `CREATED` state for more
878 # than 12&amp;nbsp;hours, the system will automatically mark the version as
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700879 # `ABANDONED`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700880 # &lt;br&gt;
881 # &lt;br&gt;You can also change the status of a version to `DELETED` by calling the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700882 # [`DeleteVersion`](sites.versions/delete) endpoint.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700883 &quot;preview&quot;: { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration
884 # specfies whether previewing is enabled for this site version. Version
885 # previews allow you to preview your site at a custom URL before
886 # releasing it as the live version.
887 # this version will be accessible via a custom URL even
888 # if it is not the currently released version.
889 &quot;expireTime&quot;: &quot;A String&quot;, # Indicates the expiration time for previewing this
890 # version; preview URL requests received after this time will 404.
891 &quot;active&quot;: True or False, # If true, preview URLs are enabled for this version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700892 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700893 &quot;finalizeUser&quot;: { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 # a release or finalizing a version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700895 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has
896 # changed their email address or deleted their account.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700897 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700898 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700899 }</pre>
900</div>
901
902<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700903 <code class="details" id="populateFiles">populateFiles(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700904 <pre>Adds content files to a version.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700905Each file must be under 2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700906
907Args:
908 parent: string, Required. The version to add files to, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700909&lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;&lt;/code&gt; (required)
910 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700911 The object takes the form of:
912
Bu Sun Kim65020912020-05-20 12:08:20 -0700913{ # The request to populate a Version&#x27;s Files.
914 &quot;files&quot;: { # A set of file paths to the hashes corresponding to assets that should be
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700915 # added to the version. Note that a file path to an empty hash will remove
916 # the path from the version. Calculate a hash by Gzipping the file then
917 # taking the SHA256 hash of the newly compressed file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700918 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700919 },
920 }
921
922 x__xgafv: string, V1 error format.
923 Allowed values
924 1 - v1 error format
925 2 - v2 error format
926
927Returns:
928 An object of the form:
929
Bu Sun Kim65020912020-05-20 12:08:20 -0700930 {
931 &quot;uploadRequiredHashes&quot;: [ # The content hashes of the specified files that need to be uploaded to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700932 # specified endpoint.
Bu Sun Kim65020912020-05-20 12:08:20 -0700933 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700934 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700935 &quot;uploadUrl&quot;: &quot;A String&quot;, # The URL to which the files should be uploaded, in the format:
936 # &lt;br&gt;&quot;https://upload-firebasehosting.googleapis.com/upload/sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;/files&quot;.
Dan O'Mearadd494642020-05-01 07:42:23 -0700937 # &lt;br&gt;Perform a multipart `POST` of the Gzipped file contents to the URL
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700938 # using a forward slash and the hash of the file appended to the end.
939 }</pre>
940</div>
941
942</body></html>