blob: 80d6053679541792f2b0e0b49214aaa132d1f865 [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">
Dan O'Mearadd494642020-05-01 07:42:23 -070083 <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</p>
85<p class="toc_element">
86 <code><a href="#create">create(parent, body=None, versionId=None, x__xgafv=None, sizeBytes=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087<p class="firstline">Creates a new version for a site.</p>
88<p class="toc_element">
89 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
90<p class="firstline">Deletes the specified version.</p>
91<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070092 <code><a href="#list">list(parent, pageToken=None, x__xgafv=None, pageSize=None, filter=None)</a></code></p>
93<p class="firstline">Lists the versions that have been created on the specified site.</p>
94<p class="toc_element">
95 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
96<p class="firstline">Retrieves the next page of results.</p>
97<p class="toc_element">
98 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099<p class="firstline">Updates the specified metadata for a version. Note that this method will</p>
100<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700101 <code><a href="#populateFiles">populateFiles(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102<p class="firstline">Adds content files to a version.</p>
103<h3>Method Details</h3>
104<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code class="details" id="clone">clone(parent, body=None, x__xgafv=None)</code>
106 <pre>Creates a new version on the target site using the content
107of the specified version.
108
109Args:
110 parent: string, Required. The target site where the cloned version will reside,
111in the format: `sites/{site}` (required)
112 body: object, The request body.
113 The object takes the form of:
114
115{ # The request sent to CloneVersion.
116 "sourceVersion": "A String", # Required. The name of the version to be cloned, in the format:
117 # `sites/{site}/versions/{version}`
118 "exclude": { # A representation of filter path. # If provided, only paths that do not match any of the regexes in this
119 # list will be included in the new version.
120 "regexes": [ # An array of regexes to filter by.
121 "A String",
122 ],
123 },
124 "include": { # A representation of filter path. # If provided, only paths that match one or more regexes in this list
125 # will be included in the new version.
126 "regexes": [ # An array of regexes to filter by.
127 "A String",
128 ],
129 },
130 "finalize": True or False, # If true, immediately finalize the version after cloning is complete.
131 }
132
133 x__xgafv: string, V1 error format.
134 Allowed values
135 1 - v1 error format
136 2 - v2 error format
137
138Returns:
139 An object of the form:
140
141 { # This resource represents a long-running operation that is the result of a
142 # network API call.
143 "response": { # The normal response of the operation in case of success. If the original
144 # method returns no data on success, such as `Delete`, the response is
145 # `google.protobuf.Empty`. If the original method is standard
146 # `Get`/`Create`/`Update`, the response should be the resource. For other
147 # methods, the response should have the type `XxxResponse`, where `Xxx`
148 # is the original method name. For example, if the original method name
149 # is `TakeSnapshot()`, the inferred response type is
150 # `TakeSnapshotResponse`.
151 "a_key": "", # Properties of the object. Contains field @type with type URL.
152 },
153 "metadata": { # Service-specific metadata associated with the operation. It typically
154 # contains progress information and common metadata such as create time.
155 # Some services might not provide such metadata. Any method that returns a
156 # long-running operation should document the metadata type, if any.
157 "a_key": "", # Properties of the object. Contains field @type with type URL.
158 },
159 "done": True or False, # If the value is `false`, it means the operation is still in progress.
160 # If `true`, the operation is completed, and either `error` or `response` is
161 # available.
162 "name": "A String", # The server-assigned name, which is only unique within the same service that
163 # originally returns it. If you use the default HTTP mapping, the
164 # `name` should be a resource name ending with `operations/{unique_id}`.
165 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
166 # different programming environments, including REST APIs and RPC APIs. It is
167 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
168 # three pieces of data: error code, error message, and error details.
169 #
170 # You can find out more about this error model and how to work with it in the
171 # [API Design Guide](https://cloud.google.com/apis/design/errors).
172 "message": "A String", # A developer-facing error message, which should be in English. Any
173 # user-facing error message should be localized and sent in the
174 # google.rpc.Status.details field, or localized by the client.
175 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
176 "details": [ # A list of messages that carry the error details. There is a common set of
177 # message types for APIs to use.
178 {
179 "a_key": "", # Properties of the object. Contains field @type with type URL.
180 },
181 ],
182 },
183 }</pre>
184</div>
185
186<div class="method">
187 <code class="details" id="create">create(parent, body=None, versionId=None, x__xgafv=None, sizeBytes=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700188 <pre>Creates a new version for a site.
189
190Args:
191 parent: string, Required. The parent to create the version for, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700192&lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;&lt;/code&gt; (required)
193 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700194 The object takes the form of:
195
196{ # A `Version` is the collection of configuration and
197 # [static files](sites.versions.files) that determine how a site is displayed.
198 "status": "A String", # The deploy status of a version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700199 # &lt;br&gt;
200 # &lt;br&gt;For a successful deploy, call the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700201 # [`CreateVersion`](sites.versions/create) endpoint to make a new version
202 # (`CREATED` status),
203 # [upload all desired files](sites.versions/populateFiles) to the version,
204 # then [update](sites.versions/patch) the version to the `FINALIZED` status.
Dan O'Mearadd494642020-05-01 07:42:23 -0700205 # &lt;br&gt;
206 # &lt;br&gt;Note that if you leave the version in the `CREATED` state for more
207 # than 12&amp;nbsp;hours, the system will automatically mark the version as
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208 # `ABANDONED`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700209 # &lt;br&gt;
210 # &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 -0700211 # [`DeleteVersion`](sites.versions/delete) endpoint.
212 "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version.
213 # a release or finalizing a version.
214 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
215 # changed their email address or deleted their account.
216 "email": "A String", # The email address of the user when the user performed the action.
217 },
218 "name": "A String", # The unique identifier for a version, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700219 # &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 -0700220 # This name is provided in the response body when you call the
221 # [`CreateVersion`](../sites.versions/create) endpoint.
222 "versionBytes": "A String", # Output only. The total stored bytesize of the version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700223 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224 "labels": { # The labels used for extra metadata and/or filtering.
225 "a_key": "A String",
226 },
227 "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version.
228 # a release or finalizing a version.
229 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
230 # changed their email address or deleted their account.
231 "email": "A String", # The email address of the user when the user performed the action.
232 },
233 "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`.
234 "deleteTime": "A String", # Output only. The time at which the version was `DELETED`.
235 "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version.
236 # a release or finalizing a version.
237 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
238 # changed their email address or deleted their account.
239 "email": "A String", # The email address of the user when the user performed the action.
240 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700241 "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration
242 # specfies whether previewing is enabled for this site version. Version
243 # previews allow you to preview your site at a custom URL before
244 # releasing it as the live version.
245 # this version will be accessible via a custom URL even
246 # if it is not the currently released version.
247 "expireTime": "A String", # Indicates the expiration time for previewing this
248 # version; preview URL requests received after this time will 404.
249 "active": True or False, # If true, preview URLs are enabled for this version.
250 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists
252 # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
253 # processed before serving content. The patterns are matched and applied
254 # according to a specific
255 # [priority order](/docs/hosting/full-config#hosting_priority_order).
256 "redirects": [ # A list of globs that will cause the response to redirect to another
257 # location.
258 { # A [`redirect`](/docs/hosting/full-config#redirects) represents the
259 # configuration for returning an HTTP redirect response given a matching
260 # request URL path.
Dan O'Mearadd494642020-05-01 07:42:23 -0700261 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
262 # URL path.
263 "glob": "A String", # The user-supplied [glob
264 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700265 # against the request URL path.
266 "location": "A String", # Required. The value to put in the HTTP location header of the response.
Dan O'Mearadd494642020-05-01 07:42:23 -0700267 # &lt;br&gt;The location can contain capture group values from the pattern using
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268 # a `:` prefix to identify the segment and an optional `*` to capture the
269 # rest of the URL.
270 # For example:
Dan O'Mearadd494642020-05-01 07:42:23 -0700271 # &lt;code&gt;"glob": "/:capture*",
272 # &lt;br&gt;"statusCode": 301,
273 # &lt;br&gt;"location": "https://example.com/foo/:capture"&lt;/code&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700274 "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a
275 # valid 3xx status code.
276 },
277 ],
278 "appAssociation": "A String", # How to handle well known App Association files.
279 "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path.
280 "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files.
281 "headers": [ # A list of custom response headers that are added to the content if the
282 # request URL path matches the glob.
283 { # A [`header`](/docs/hosting/full-config#headers) defines custom headers to
284 # add to a response should the request URL path match the pattern.
Dan O'Mearadd494642020-05-01 07:42:23 -0700285 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
286 # URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700287 "headers": { # Required. The additional headers to add to the response.
288 "a_key": "A String",
289 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700290 "glob": "A String", # The user-supplied [glob
291 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 # against the request URL path.
293 },
294 ],
295 "rewrites": [ # A list of rewrites that will act as if the service were given the
296 # destination URL.
297 { # A [`rewrite`](/docs/hosting/full-config#rewrites) represents an internal
298 # content rewrite on the version. If the pattern matches, the request will be
299 # handled as if it were to the destination path specified in the
300 # configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -0700301 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
302 # URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 "function": "A String", # The function to proxy requests to. Must match the exported function
304 # name exactly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700305 "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run.
306 # Cloud Run service does not exist when setting or updating your Firebase
307 # Hosting configuration, then the request fails. Any errors from the Cloud Run
308 # service are passed to the end user (for example, if you delete a service, any
309 # requests directed to that service receive a `404` error).
Dan O'Mearadd494642020-05-01 07:42:23 -0700310 "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.&lt;br&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700311 # Defaults to `us-central1` if not supplied.
312 "serviceId": "A String", # Required. User-defined ID of the Cloud Run service.
313 },
314 "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links.
Dan O'Mearadd494642020-05-01 07:42:23 -0700315 "path": "A String", # The URL path to rewrite the request to.
316 "glob": "A String", # The user-supplied [glob
317 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
318 # against the request URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700319 },
320 ],
321 },
322 "createTime": "A String", # Output only. The time at which the version was created.
323 "fileCount": "A String", # Output only. The total number of files associated with the version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700324 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700325}
326
327 versionId: string, A unique id for the new version. This is only specified for legacy version
328creations.
329 x__xgafv: string, V1 error format.
330 Allowed values
331 1 - v1 error format
332 2 - v2 error format
333 sizeBytes: string, The self-reported size of the version. This value is used for a pre-emptive
334quota check for legacy version uploads.
335
336Returns:
337 An object of the form:
338
339 { # A `Version` is the collection of configuration and
340 # [static files](sites.versions.files) that determine how a site is displayed.
341 "status": "A String", # The deploy status of a version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700342 # &lt;br&gt;
343 # &lt;br&gt;For a successful deploy, call the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700344 # [`CreateVersion`](sites.versions/create) endpoint to make a new version
345 # (`CREATED` status),
346 # [upload all desired files](sites.versions/populateFiles) to the version,
347 # then [update](sites.versions/patch) the version to the `FINALIZED` status.
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 # &lt;br&gt;
349 # &lt;br&gt;Note that if you leave the version in the `CREATED` state for more
350 # than 12&amp;nbsp;hours, the system will automatically mark the version as
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700351 # `ABANDONED`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700352 # &lt;br&gt;
353 # &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 -0700354 # [`DeleteVersion`](sites.versions/delete) endpoint.
355 "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version.
356 # a release or finalizing a version.
357 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
358 # changed their email address or deleted their account.
359 "email": "A String", # The email address of the user when the user performed the action.
360 },
361 "name": "A String", # The unique identifier for a version, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 # &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 -0700363 # This name is provided in the response body when you call the
364 # [`CreateVersion`](../sites.versions/create) endpoint.
365 "versionBytes": "A String", # Output only. The total stored bytesize of the version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700366 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700367 "labels": { # The labels used for extra metadata and/or filtering.
368 "a_key": "A String",
369 },
370 "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version.
371 # a release or finalizing a version.
372 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
373 # changed their email address or deleted their account.
374 "email": "A String", # The email address of the user when the user performed the action.
375 },
376 "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`.
377 "deleteTime": "A String", # Output only. The time at which the version was `DELETED`.
378 "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version.
379 # a release or finalizing a version.
380 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
381 # changed their email address or deleted their account.
382 "email": "A String", # The email address of the user when the user performed the action.
383 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700384 "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration
385 # specfies whether previewing is enabled for this site version. Version
386 # previews allow you to preview your site at a custom URL before
387 # releasing it as the live version.
388 # this version will be accessible via a custom URL even
389 # if it is not the currently released version.
390 "expireTime": "A String", # Indicates the expiration time for previewing this
391 # version; preview URL requests received after this time will 404.
392 "active": True or False, # If true, preview URLs are enabled for this version.
393 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists
395 # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
396 # processed before serving content. The patterns are matched and applied
397 # according to a specific
398 # [priority order](/docs/hosting/full-config#hosting_priority_order).
399 "redirects": [ # A list of globs that will cause the response to redirect to another
400 # location.
401 { # A [`redirect`](/docs/hosting/full-config#redirects) represents the
402 # configuration for returning an HTTP redirect response given a matching
403 # request URL path.
Dan O'Mearadd494642020-05-01 07:42:23 -0700404 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
405 # URL path.
406 "glob": "A String", # The user-supplied [glob
407 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700408 # against the request URL path.
409 "location": "A String", # Required. The value to put in the HTTP location header of the response.
Dan O'Mearadd494642020-05-01 07:42:23 -0700410 # &lt;br&gt;The location can contain capture group values from the pattern using
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 # a `:` prefix to identify the segment and an optional `*` to capture the
412 # rest of the URL.
413 # For example:
Dan O'Mearadd494642020-05-01 07:42:23 -0700414 # &lt;code&gt;"glob": "/:capture*",
415 # &lt;br&gt;"statusCode": 301,
416 # &lt;br&gt;"location": "https://example.com/foo/:capture"&lt;/code&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700417 "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a
418 # valid 3xx status code.
419 },
420 ],
421 "appAssociation": "A String", # How to handle well known App Association files.
422 "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path.
423 "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files.
424 "headers": [ # A list of custom response headers that are added to the content if the
425 # request URL path matches the glob.
426 { # A [`header`](/docs/hosting/full-config#headers) defines custom headers to
427 # add to a response should the request URL path match the pattern.
Dan O'Mearadd494642020-05-01 07:42:23 -0700428 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
429 # URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430 "headers": { # Required. The additional headers to add to the response.
431 "a_key": "A String",
432 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700433 "glob": "A String", # The user-supplied [glob
434 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700435 # against the request URL path.
436 },
437 ],
438 "rewrites": [ # A list of rewrites that will act as if the service were given the
439 # destination URL.
440 { # A [`rewrite`](/docs/hosting/full-config#rewrites) represents an internal
441 # content rewrite on the version. If the pattern matches, the request will be
442 # handled as if it were to the destination path specified in the
443 # configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -0700444 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
445 # URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700446 "function": "A String", # The function to proxy requests to. Must match the exported function
447 # name exactly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448 "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run.
449 # Cloud Run service does not exist when setting or updating your Firebase
450 # Hosting configuration, then the request fails. Any errors from the Cloud Run
451 # service are passed to the end user (for example, if you delete a service, any
452 # requests directed to that service receive a `404` error).
Dan O'Mearadd494642020-05-01 07:42:23 -0700453 "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.&lt;br&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700454 # Defaults to `us-central1` if not supplied.
455 "serviceId": "A String", # Required. User-defined ID of the Cloud Run service.
456 },
457 "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links.
Dan O'Mearadd494642020-05-01 07:42:23 -0700458 "path": "A String", # The URL path to rewrite the request to.
459 "glob": "A String", # The user-supplied [glob
460 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
461 # against the request URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 },
463 ],
464 },
465 "createTime": "A String", # Output only. The time at which the version was created.
466 "fileCount": "A String", # Output only. The total number of files associated with the version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700467 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700468 }</pre>
469</div>
470
471<div class="method">
472 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
473 <pre>Deletes the specified version.
474
475Args:
476 name: string, Required. The name of the version to be deleted, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700477&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 -0700478 x__xgafv: string, V1 error format.
479 Allowed values
480 1 - v1 error format
481 2 - v2 error format
482
483Returns:
484 An object of the form:
485
486 { # A generic empty message that you can re-use to avoid defining duplicated
487 # empty messages in your APIs. A typical example is to use it as the request
488 # or the response type of an API method. For instance:
489 #
490 # service Foo {
491 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
492 # }
493 #
494 # The JSON representation for `Empty` is empty JSON object `{}`.
495 }</pre>
496</div>
497
498<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700499 <code class="details" id="list">list(parent, pageToken=None, x__xgafv=None, pageSize=None, filter=None)</code>
500 <pre>Lists the versions that have been created on the specified site.
501Will include filtering in the future.
502
503Args:
504 parent: string, Required. The parent for which to list files, in the format:
505&lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;&lt;/code&gt; (required)
506 pageToken: string, The next_page_token from a previous request, if provided.
507 x__xgafv: string, V1 error format.
508 Allowed values
509 1 - v1 error format
510 2 - v2 error format
511 pageSize: integer, The maximum number of versions to return. The service may return fewer than
512this value.
513If unspecified, at most 25 versions will be returned.
514The maximum value is 100; values above 100 will be coerced to 100
515 filter: string, The filter string used to return a subset of versions in the response.
516Currently supported fields for filtering are: name, status,
517and create_time. Filter processing will be implemented in accordance
518with go/filtering.
519
520Returns:
521 An object of the form:
522
523 { # The response when listing Versions.
524 "nextPageToken": "A String", # The pagination token, if more results exist
525 "versions": [ # The list of versions, if any exist.
526 { # A `Version` is the collection of configuration and
527 # [static files](sites.versions.files) that determine how a site is displayed.
528 "status": "A String", # The deploy status of a version.
529 # &lt;br&gt;
530 # &lt;br&gt;For a successful deploy, call the
531 # [`CreateVersion`](sites.versions/create) endpoint to make a new version
532 # (`CREATED` status),
533 # [upload all desired files](sites.versions/populateFiles) to the version,
534 # then [update](sites.versions/patch) the version to the `FINALIZED` status.
535 # &lt;br&gt;
536 # &lt;br&gt;Note that if you leave the version in the `CREATED` state for more
537 # than 12&amp;nbsp;hours, the system will automatically mark the version as
538 # `ABANDONED`.
539 # &lt;br&gt;
540 # &lt;br&gt;You can also change the status of a version to `DELETED` by calling the
541 # [`DeleteVersion`](sites.versions/delete) endpoint.
542 "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version.
543 # a release or finalizing a version.
544 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
545 # changed their email address or deleted their account.
546 "email": "A String", # The email address of the user when the user performed the action.
547 },
548 "name": "A String", # The unique identifier for a version, in the format:
549 # &lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;&lt;/code&gt;
550 # This name is provided in the response body when you call the
551 # [`CreateVersion`](../sites.versions/create) endpoint.
552 "versionBytes": "A String", # Output only. The total stored bytesize of the version.
553 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
554 "labels": { # The labels used for extra metadata and/or filtering.
555 "a_key": "A String",
556 },
557 "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version.
558 # a release or finalizing a version.
559 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
560 # changed their email address or deleted their account.
561 "email": "A String", # The email address of the user when the user performed the action.
562 },
563 "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`.
564 "deleteTime": "A String", # Output only. The time at which the version was `DELETED`.
565 "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version.
566 # a release or finalizing a version.
567 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
568 # changed their email address or deleted their account.
569 "email": "A String", # The email address of the user when the user performed the action.
570 },
571 "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration
572 # specfies whether previewing is enabled for this site version. Version
573 # previews allow you to preview your site at a custom URL before
574 # releasing it as the live version.
575 # this version will be accessible via a custom URL even
576 # if it is not the currently released version.
577 "expireTime": "A String", # Indicates the expiration time for previewing this
578 # version; preview URL requests received after this time will 404.
579 "active": True or False, # If true, preview URLs are enabled for this version.
580 },
581 "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists
582 # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
583 # processed before serving content. The patterns are matched and applied
584 # according to a specific
585 # [priority order](/docs/hosting/full-config#hosting_priority_order).
586 "redirects": [ # A list of globs that will cause the response to redirect to another
587 # location.
588 { # A [`redirect`](/docs/hosting/full-config#redirects) represents the
589 # configuration for returning an HTTP redirect response given a matching
590 # request URL path.
591 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
592 # URL path.
593 "glob": "A String", # The user-supplied [glob
594 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
595 # against the request URL path.
596 "location": "A String", # Required. The value to put in the HTTP location header of the response.
597 # &lt;br&gt;The location can contain capture group values from the pattern using
598 # a `:` prefix to identify the segment and an optional `*` to capture the
599 # rest of the URL.
600 # For example:
601 # &lt;code&gt;"glob": "/:capture*",
602 # &lt;br&gt;"statusCode": 301,
603 # &lt;br&gt;"location": "https://example.com/foo/:capture"&lt;/code&gt;
604 "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a
605 # valid 3xx status code.
606 },
607 ],
608 "appAssociation": "A String", # How to handle well known App Association files.
609 "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path.
610 "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files.
611 "headers": [ # A list of custom response headers that are added to the content if the
612 # request URL path matches the glob.
613 { # A [`header`](/docs/hosting/full-config#headers) defines custom headers to
614 # add to a response should the request URL path match the pattern.
615 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
616 # URL path.
617 "headers": { # Required. The additional headers to add to the response.
618 "a_key": "A String",
619 },
620 "glob": "A String", # The user-supplied [glob
621 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
622 # against the request URL path.
623 },
624 ],
625 "rewrites": [ # A list of rewrites that will act as if the service were given the
626 # destination URL.
627 { # A [`rewrite`](/docs/hosting/full-config#rewrites) represents an internal
628 # content rewrite on the version. If the pattern matches, the request will be
629 # handled as if it were to the destination path specified in the
630 # configuration.
631 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
632 # URL path.
633 "function": "A String", # The function to proxy requests to. Must match the exported function
634 # name exactly.
635 "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run.
636 # Cloud Run service does not exist when setting or updating your Firebase
637 # Hosting configuration, then the request fails. Any errors from the Cloud Run
638 # service are passed to the end user (for example, if you delete a service, any
639 # requests directed to that service receive a `404` error).
640 "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.&lt;br&gt;
641 # Defaults to `us-central1` if not supplied.
642 "serviceId": "A String", # Required. User-defined ID of the Cloud Run service.
643 },
644 "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links.
645 "path": "A String", # The URL path to rewrite the request to.
646 "glob": "A String", # The user-supplied [glob
647 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
648 # against the request URL path.
649 },
650 ],
651 },
652 "createTime": "A String", # Output only. The time at which the version was created.
653 "fileCount": "A String", # Output only. The total number of files associated with the version.
654 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
655 },
656 ],
657 }</pre>
658</div>
659
660<div class="method">
661 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
662 <pre>Retrieves the next page of results.
663
664Args:
665 previous_request: The request for the previous page. (required)
666 previous_response: The response from the request for the previous page. (required)
667
668Returns:
669 A request object that you can call 'execute()' on to request the next
670 page. Returns None if there are no more items in the collection.
671 </pre>
672</div>
673
674<div class="method">
675 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 <pre>Updates the specified metadata for a version. Note that this method will
677fail with `FAILED_PRECONDITION` in the event of an invalid state
678transition. The only valid transition for a version is currently from a
679`CREATED` status to a `FINALIZED` status.
680Use [`DeleteVersion`](../sites.versions/delete) to set the status of a
681version to `DELETED`.
682
683Args:
684 name: string, The unique identifier for a version, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700685&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 -0700686This name is provided in the response body when you call the
687[`CreateVersion`](../sites.versions/create) endpoint. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700688 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 The object takes the form of:
690
691{ # A `Version` is the collection of configuration and
692 # [static files](sites.versions.files) that determine how a site is displayed.
693 "status": "A String", # The deploy status of a version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700694 # &lt;br&gt;
695 # &lt;br&gt;For a successful deploy, call the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700696 # [`CreateVersion`](sites.versions/create) endpoint to make a new version
697 # (`CREATED` status),
698 # [upload all desired files](sites.versions/populateFiles) to the version,
699 # then [update](sites.versions/patch) the version to the `FINALIZED` status.
Dan O'Mearadd494642020-05-01 07:42:23 -0700700 # &lt;br&gt;
701 # &lt;br&gt;Note that if you leave the version in the `CREATED` state for more
702 # than 12&amp;nbsp;hours, the system will automatically mark the version as
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700703 # `ABANDONED`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700704 # &lt;br&gt;
705 # &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 -0700706 # [`DeleteVersion`](sites.versions/delete) endpoint.
707 "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version.
708 # a release or finalizing a version.
709 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
710 # changed their email address or deleted their account.
711 "email": "A String", # The email address of the user when the user performed the action.
712 },
713 "name": "A String", # The unique identifier for a version, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700714 # &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 -0700715 # This name is provided in the response body when you call the
716 # [`CreateVersion`](../sites.versions/create) endpoint.
717 "versionBytes": "A String", # Output only. The total stored bytesize of the version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700718 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700719 "labels": { # The labels used for extra metadata and/or filtering.
720 "a_key": "A String",
721 },
722 "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version.
723 # a release or finalizing a version.
724 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
725 # changed their email address or deleted their account.
726 "email": "A String", # The email address of the user when the user performed the action.
727 },
728 "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`.
729 "deleteTime": "A String", # Output only. The time at which the version was `DELETED`.
730 "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version.
731 # a release or finalizing a version.
732 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
733 # changed their email address or deleted their account.
734 "email": "A String", # The email address of the user when the user performed the action.
735 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700736 "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration
737 # specfies whether previewing is enabled for this site version. Version
738 # previews allow you to preview your site at a custom URL before
739 # releasing it as the live version.
740 # this version will be accessible via a custom URL even
741 # if it is not the currently released version.
742 "expireTime": "A String", # Indicates the expiration time for previewing this
743 # version; preview URL requests received after this time will 404.
744 "active": True or False, # If true, preview URLs are enabled for this version.
745 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists
747 # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
748 # processed before serving content. The patterns are matched and applied
749 # according to a specific
750 # [priority order](/docs/hosting/full-config#hosting_priority_order).
751 "redirects": [ # A list of globs that will cause the response to redirect to another
752 # location.
753 { # A [`redirect`](/docs/hosting/full-config#redirects) represents the
754 # configuration for returning an HTTP redirect response given a matching
755 # request URL path.
Dan O'Mearadd494642020-05-01 07:42:23 -0700756 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
757 # URL path.
758 "glob": "A String", # The user-supplied [glob
759 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700760 # against the request URL path.
761 "location": "A String", # Required. The value to put in the HTTP location header of the response.
Dan O'Mearadd494642020-05-01 07:42:23 -0700762 # &lt;br&gt;The location can contain capture group values from the pattern using
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700763 # a `:` prefix to identify the segment and an optional `*` to capture the
764 # rest of the URL.
765 # For example:
Dan O'Mearadd494642020-05-01 07:42:23 -0700766 # &lt;code&gt;"glob": "/:capture*",
767 # &lt;br&gt;"statusCode": 301,
768 # &lt;br&gt;"location": "https://example.com/foo/:capture"&lt;/code&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700769 "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a
770 # valid 3xx status code.
771 },
772 ],
773 "appAssociation": "A String", # How to handle well known App Association files.
774 "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path.
775 "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files.
776 "headers": [ # A list of custom response headers that are added to the content if the
777 # request URL path matches the glob.
778 { # A [`header`](/docs/hosting/full-config#headers) defines custom headers to
779 # add to a response should the request URL path match the pattern.
Dan O'Mearadd494642020-05-01 07:42:23 -0700780 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
781 # URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700782 "headers": { # Required. The additional headers to add to the response.
783 "a_key": "A String",
784 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700785 "glob": "A String", # The user-supplied [glob
786 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700787 # against the request URL path.
788 },
789 ],
790 "rewrites": [ # A list of rewrites that will act as if the service were given the
791 # destination URL.
792 { # A [`rewrite`](/docs/hosting/full-config#rewrites) represents an internal
793 # content rewrite on the version. If the pattern matches, the request will be
794 # handled as if it were to the destination path specified in the
795 # configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -0700796 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
797 # URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700798 "function": "A String", # The function to proxy requests to. Must match the exported function
799 # name exactly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700800 "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run.
801 # Cloud Run service does not exist when setting or updating your Firebase
802 # Hosting configuration, then the request fails. Any errors from the Cloud Run
803 # service are passed to the end user (for example, if you delete a service, any
804 # requests directed to that service receive a `404` error).
Dan O'Mearadd494642020-05-01 07:42:23 -0700805 "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.&lt;br&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700806 # Defaults to `us-central1` if not supplied.
807 "serviceId": "A String", # Required. User-defined ID of the Cloud Run service.
808 },
809 "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links.
Dan O'Mearadd494642020-05-01 07:42:23 -0700810 "path": "A String", # The URL path to rewrite the request to.
811 "glob": "A String", # The user-supplied [glob
812 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
813 # against the request URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700814 },
815 ],
816 },
817 "createTime": "A String", # Output only. The time at which the version was created.
818 "fileCount": "A String", # Output only. The total number of files associated with the version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700819 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700820}
821
822 updateMask: string, A set of field names from your [version](../sites.versions) that you want
823to update.
Dan O'Mearadd494642020-05-01 07:42:23 -0700824&lt;br&gt;A field will be overwritten if, and only if, it's in the mask.
825&lt;br&gt;If a mask is not provided then a default mask of only
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700826[`status`](../sites.versions#Version.FIELDS.status) will be used.
827 x__xgafv: string, V1 error format.
828 Allowed values
829 1 - v1 error format
830 2 - v2 error format
831
832Returns:
833 An object of the form:
834
835 { # A `Version` is the collection of configuration and
836 # [static files](sites.versions.files) that determine how a site is displayed.
837 "status": "A String", # The deploy status of a version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700838 # &lt;br&gt;
839 # &lt;br&gt;For a successful deploy, call the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700840 # [`CreateVersion`](sites.versions/create) endpoint to make a new version
841 # (`CREATED` status),
842 # [upload all desired files](sites.versions/populateFiles) to the version,
843 # then [update](sites.versions/patch) the version to the `FINALIZED` status.
Dan O'Mearadd494642020-05-01 07:42:23 -0700844 # &lt;br&gt;
845 # &lt;br&gt;Note that if you leave the version in the `CREATED` state for more
846 # than 12&amp;nbsp;hours, the system will automatically mark the version as
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700847 # `ABANDONED`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700848 # &lt;br&gt;
849 # &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 -0700850 # [`DeleteVersion`](sites.versions/delete) endpoint.
851 "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version.
852 # a release or finalizing a version.
853 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
854 # changed their email address or deleted their account.
855 "email": "A String", # The email address of the user when the user performed the action.
856 },
857 "name": "A String", # The unique identifier for a version, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700858 # &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 -0700859 # This name is provided in the response body when you call the
860 # [`CreateVersion`](../sites.versions/create) endpoint.
861 "versionBytes": "A String", # Output only. The total stored bytesize of the version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700862 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700863 "labels": { # The labels used for extra metadata and/or filtering.
864 "a_key": "A String",
865 },
866 "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version.
867 # a release or finalizing a version.
868 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
869 # changed their email address or deleted their account.
870 "email": "A String", # The email address of the user when the user performed the action.
871 },
872 "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`.
873 "deleteTime": "A String", # Output only. The time at which the version was `DELETED`.
874 "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version.
875 # a release or finalizing a version.
876 "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has
877 # changed their email address or deleted their account.
878 "email": "A String", # The email address of the user when the user performed the action.
879 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700880 "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration
881 # specfies whether previewing is enabled for this site version. Version
882 # previews allow you to preview your site at a custom URL before
883 # releasing it as the live version.
884 # this version will be accessible via a custom URL even
885 # if it is not the currently released version.
886 "expireTime": "A String", # Indicates the expiration time for previewing this
887 # version; preview URL requests received after this time will 404.
888 "active": True or False, # If true, preview URLs are enabled for this version.
889 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700890 "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists
891 # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
892 # processed before serving content. The patterns are matched and applied
893 # according to a specific
894 # [priority order](/docs/hosting/full-config#hosting_priority_order).
895 "redirects": [ # A list of globs that will cause the response to redirect to another
896 # location.
897 { # A [`redirect`](/docs/hosting/full-config#redirects) represents the
898 # configuration for returning an HTTP redirect response given a matching
899 # request URL path.
Dan O'Mearadd494642020-05-01 07:42:23 -0700900 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
901 # URL path.
902 "glob": "A String", # The user-supplied [glob
903 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700904 # against the request URL path.
905 "location": "A String", # Required. The value to put in the HTTP location header of the response.
Dan O'Mearadd494642020-05-01 07:42:23 -0700906 # &lt;br&gt;The location can contain capture group values from the pattern using
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700907 # a `:` prefix to identify the segment and an optional `*` to capture the
908 # rest of the URL.
909 # For example:
Dan O'Mearadd494642020-05-01 07:42:23 -0700910 # &lt;code&gt;"glob": "/:capture*",
911 # &lt;br&gt;"statusCode": 301,
912 # &lt;br&gt;"location": "https://example.com/foo/:capture"&lt;/code&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700913 "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a
914 # valid 3xx status code.
915 },
916 ],
917 "appAssociation": "A String", # How to handle well known App Association files.
918 "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path.
919 "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files.
920 "headers": [ # A list of custom response headers that are added to the content if the
921 # request URL path matches the glob.
922 { # A [`header`](/docs/hosting/full-config#headers) defines custom headers to
923 # add to a response should the request URL path match the pattern.
Dan O'Mearadd494642020-05-01 07:42:23 -0700924 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
925 # URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700926 "headers": { # Required. The additional headers to add to the response.
927 "a_key": "A String",
928 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700929 "glob": "A String", # The user-supplied [glob
930 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700931 # against the request URL path.
932 },
933 ],
934 "rewrites": [ # A list of rewrites that will act as if the service were given the
935 # destination URL.
936 { # A [`rewrite`](/docs/hosting/full-config#rewrites) represents an internal
937 # content rewrite on the version. If the pattern matches, the request will be
938 # handled as if it were to the destination path specified in the
939 # configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -0700940 "regex": "A String", # The user-supplied RE2 regular expression to match against the request
941 # URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700942 "function": "A String", # The function to proxy requests to. Must match the exported function
943 # name exactly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700944 "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run.
945 # Cloud Run service does not exist when setting or updating your Firebase
946 # Hosting configuration, then the request fails. Any errors from the Cloud Run
947 # service are passed to the end user (for example, if you delete a service, any
948 # requests directed to that service receive a `404` error).
Dan O'Mearadd494642020-05-01 07:42:23 -0700949 "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.&lt;br&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700950 # Defaults to `us-central1` if not supplied.
951 "serviceId": "A String", # Required. User-defined ID of the Cloud Run service.
952 },
953 "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links.
Dan O'Mearadd494642020-05-01 07:42:23 -0700954 "path": "A String", # The URL path to rewrite the request to.
955 "glob": "A String", # The user-supplied [glob
956 # pattern](/docs/hosting/full-config#glob_pattern_matching) to match
957 # against the request URL path.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700958 },
959 ],
960 },
961 "createTime": "A String", # Output only. The time at which the version was created.
962 "fileCount": "A String", # Output only. The total number of files associated with the version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700963 # &lt;br&gt;This value is calculated after a version is `FINALIZED`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700964 }</pre>
965</div>
966
967<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700968 <code class="details" id="populateFiles">populateFiles(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700969 <pre>Adds content files to a version.
970
971Args:
972 parent: string, Required. The version to add files to, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700973&lt;code&gt;sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;&lt;/code&gt; (required)
974 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700975 The object takes the form of:
976
Dan O'Mearadd494642020-05-01 07:42:23 -0700977{ # The request to populate a Version's Files.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700978 "files": { # A set of file paths to the hashes corresponding to assets that should be
979 # added to the version. Note that a file path to an empty hash will remove
980 # the path from the version. Calculate a hash by Gzipping the file then
981 # taking the SHA256 hash of the newly compressed file.
982 "a_key": "A String",
983 },
984 }
985
986 x__xgafv: string, V1 error format.
987 Allowed values
988 1 - v1 error format
989 2 - v2 error format
990
991Returns:
992 An object of the form:
993
Dan O'Mearadd494642020-05-01 07:42:23 -0700994 { # The response to a PopulateVersionFilesRequest.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700995 "uploadRequiredHashes": [ # The content hashes of the specified files that need to be uploaded to the
996 # specified endpoint.
997 "A String",
998 ],
999 "uploadUrl": "A String", # The URL to which the files should be uploaded, in the format:
Dan O'Mearadd494642020-05-01 07:42:23 -07001000 # &lt;br&gt;"https://upload-firebasehosting.googleapis.com/upload/sites/&lt;var&gt;site-name&lt;/var&gt;/versions/&lt;var&gt;versionID&lt;/var&gt;/files".
1001 # &lt;br&gt;Perform a multipart `POST` of the Gzipped file contents to the URL
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001002 # using a forward slash and the hash of the file appended to the end.
1003 }</pre>
1004</div>
1005
1006</body></html>