Debian Codegraph @

docs/dyn/firebasehosting_v1beta1.projects.sites.versions.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="firebasehosting_v1beta1.html">Firebase Hosting API</a> . <a href="firebasehosting_v1beta1.projects.html">projects</a> . <a href="firebasehosting_v1beta1.projects.sites.html">sites</a> . <a href="firebasehosting_v1beta1.projects.sites.versions.html">versions</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="firebasehosting_v1beta1.projects.sites.versions.files.html">files()</a></code>
79 </p>
80 <p class="firstline">Returns the files Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="#clone">clone(parent, body=None, x__xgafv=None)</a></code></p>
84 <p class="firstline">Creates a new version on the specified target site using the content of the specified version.</p>
85 <p class="toc_element">
86 <code><a href="#close">close()</a></code></p>
87 <p class="firstline">Close httplib2 connections.</p>
88 <p class="toc_element">
89 <code><a href="#create">create(parent, body=None, sizeBytes=None, versionId=None, x__xgafv=None)</a></code></p>
90 <p class="firstline">Creates a new version for the specified site.</p>
91 <p class="toc_element">
92 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
93 <p class="firstline">Deletes the specified version.</p>
94 <p class="toc_element">
95 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
96 <p class="firstline">Get the specified version that has been created for the specified site. This can include versions that were created for the default `live` channel or for any active preview channels for the specified site.</p>
97 <p class="toc_element">
98 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
99 <p class="firstline">Lists the versions that have been created for the specified site. This list includes versions for both the default `live` channel and any active preview channels for the specified site.</p>
100 <p class="toc_element">
101 <code><a href="#list_next">list_next()</a></code></p>
102 <p class="firstline">Retrieves the next page of results.</p>
103 <p class="toc_element">
104 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
105 <p class="firstline"> Updates the specified metadata for the specified version. This method will fail with `FAILED_PRECONDITION` in the event of an invalid state transition. The supported [state](../sites.versions#versionstatus) transitions for a version are from `CREATED` to `FINALIZED`. Use [`DeleteVersion`](delete) to set the status of a version to `DELETED`.</p>
106 <p class="toc_element">
107 <code><a href="#populateFiles">populateFiles(parent, body=None, x__xgafv=None)</a></code></p>
108 <p class="firstline"> Adds content files to the specified version. Each file must be under 2 GB.</p>
109 <h3>Method Details</h3>
110 <div class="method">
111 <code class="details" id="clone">clone(parent, body=None, x__xgafv=None)</code>
112 <pre>Creates a new version on the specified target site using the content of the specified version.
113
114 Args:
115 parent: string, Required. The target site for the cloned version, in the format: sites/ SITE_ID (required)
116 body: object, The request body.
117 The object takes the form of:
118
119 {
120 &quot;exclude&quot;: { # A representation of filter path. # If provided, only paths that do not match any of the RegEx values in this list will be included in the new version.
121 &quot;regexes&quot;: [ # An array of RegEx values by which to filter.
122 &quot;A String&quot;,
123 ],
124 },
125 &quot;finalize&quot;: True or False, # If true, the call to `CloneVersion` immediately finalizes the version after cloning is complete. If false, the cloned version will have a status of `CREATED`. Use [`UpdateVersion`](patch) to set the status of the version to `FINALIZED`.
126 &quot;include&quot;: { # A representation of filter path. # If provided, only paths that match one or more RegEx values in this list will be included in the new version.
127 &quot;regexes&quot;: [ # An array of RegEx values by which to filter.
128 &quot;A String&quot;,
129 ],
130 },
131 &quot;sourceVersion&quot;: &quot;A String&quot;, # Required. The unique identifier for the version to be cloned, in the format: sites/SITE_ID/versions/VERSION_ID
132 }
133
134 x__xgafv: string, V1 error format.
135 Allowed values
136 1 - v1 error format
137 2 - v2 error format
138
139 Returns:
140 An object of the form:
141
142 { # This resource represents a long-running operation that is the result of a network API call.
143 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
144 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
145 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
146 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
147 {
148 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
149 },
150 ],
151 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
152 },
153 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
154 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
155 },
156 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
157 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
158 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
159 },
160 }</pre>
161 </div>
162
163 <div class="method">
164 <code class="details" id="close">close()</code>
165 <pre>Close httplib2 connections.</pre>
166 </div>
167
168 <div class="method">
169 <code class="details" id="create">create(parent, body=None, sizeBytes=None, versionId=None, x__xgafv=None)</code>
170 <pre>Creates a new version for the specified site.
171
172 Args:
173 parent: string, Required. The site in which to create the version, in the format: sites/ SITE_ID (required)
174 body: object, The request body.
175 The object takes the form of:
176
177 { # A `Version` is a configuration and a collection of static files which determine how a site is displayed.
178 &quot;config&quot;: { # The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](https://firebase.google.com/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](https://firebase.google.com/docs/cli/#the_firebasejson_file) file.
179 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
180 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
181 &quot;headers&quot;: [ # An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
182 { # A [`Header`](https://firebase.google.com/docs/hosting/full-config#headers) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
183 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
184 &quot;headers&quot;: { # Required. The additional headers to add to the response.
185 &quot;a_key&quot;: &quot;A String&quot;,
186 },
187 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
188 },
189 ],
190 &quot;i18n&quot;: { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior.
191 &quot;root&quot;: &quot;A String&quot;, # Required. The user-supplied path where country and language specific content will be looked for within the public directory.
192 },
193 &quot;redirects&quot;: [ # An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
194 { # A [`Redirect`](https://firebase.google.com/docs/hosting/full-config#redirects) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
195 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
196 &quot;location&quot;: &quot;A String&quot;, # Required. The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a `:` prefix to identify the segment and an optional `*` to capture the rest of the URL. For example: &quot;glob&quot;: &quot;/:capture*&quot;, &quot;statusCode&quot;: 301, &quot;location&quot;: &quot;https://example.com/foo/:capture&quot;
197 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
198 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code.
199 },
200 ],
201 &quot;rewrites&quot;: [ # An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
202 { # A [`Rewrite`](https://firebase.google.com/docs/hosting/full-config#rewrites) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
203 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
204 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function name exactly.
205 &quot;functionRegion&quot;: &quot;A String&quot;, # Optional. Specify a Cloud region for rewritten Functions invocations. If not provided, defaults to us-central1.
206 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
207 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
208 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
209 &quot;run&quot;: { # A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). # The request will be forwarded to Cloud Run.
210 &quot;region&quot;: &quot;A String&quot;, # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied.
211 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
212 &quot;tag&quot;: &quot;A String&quot;, # Optional. User-provided TrafficConfig tag to send traffic to. When omitted, traffic is sent to the service-wide URI
213 },
214 },
215 ],
216 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
217 },
218 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
219 &quot;createUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who created the version.
220 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
221 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
222 },
223 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
224 &quot;deleteUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `DELETED` the version.
225 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
226 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
227 },
228 &quot;fileCount&quot;: &quot;A String&quot;, # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`.
229 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
230 &quot;finalizeUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `FINALIZED` the version.
231 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
232 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
233 },
234 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
235 &quot;a_key&quot;: &quot;A String&quot;,
236 },
237 &quot;name&quot;: &quot;A String&quot;, # The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).
238 &quot;status&quot;: &quot;A String&quot;, # The deploy status of the version. For a successful deploy, call [`CreateVersion`](sites.versions/create) to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling [`DeleteVersion`](sites.versions/delete).
239 &quot;versionBytes&quot;: &quot;A String&quot;, # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`.
240 }
241
242 sizeBytes: string, The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads.
243 versionId: string, A unique id for the new version. This is was only specified for legacy version creations, and should be blank.
244 x__xgafv: string, V1 error format.
245 Allowed values
246 1 - v1 error format
247 2 - v2 error format
248
249 Returns:
250 An object of the form:
251
252 { # A `Version` is a configuration and a collection of static files which determine how a site is displayed.
253 &quot;config&quot;: { # The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](https://firebase.google.com/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](https://firebase.google.com/docs/cli/#the_firebasejson_file) file.
254 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
255 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
256 &quot;headers&quot;: [ # An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
257 { # A [`Header`](https://firebase.google.com/docs/hosting/full-config#headers) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
258 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
259 &quot;headers&quot;: { # Required. The additional headers to add to the response.
260 &quot;a_key&quot;: &quot;A String&quot;,
261 },
262 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
263 },
264 ],
265 &quot;i18n&quot;: { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior.
266 &quot;root&quot;: &quot;A String&quot;, # Required. The user-supplied path where country and language specific content will be looked for within the public directory.
267 },
268 &quot;redirects&quot;: [ # An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
269 { # A [`Redirect`](https://firebase.google.com/docs/hosting/full-config#redirects) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
270 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
271 &quot;location&quot;: &quot;A String&quot;, # Required. The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a `:` prefix to identify the segment and an optional `*` to capture the rest of the URL. For example: &quot;glob&quot;: &quot;/:capture*&quot;, &quot;statusCode&quot;: 301, &quot;location&quot;: &quot;https://example.com/foo/:capture&quot;
272 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
273 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code.
274 },
275 ],
276 &quot;rewrites&quot;: [ # An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
277 { # A [`Rewrite`](https://firebase.google.com/docs/hosting/full-config#rewrites) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
278 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
279 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function name exactly.
280 &quot;functionRegion&quot;: &quot;A String&quot;, # Optional. Specify a Cloud region for rewritten Functions invocations. If not provided, defaults to us-central1.
281 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
282 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
283 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
284 &quot;run&quot;: { # A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). # The request will be forwarded to Cloud Run.
285 &quot;region&quot;: &quot;A String&quot;, # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied.
286 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
287 &quot;tag&quot;: &quot;A String&quot;, # Optional. User-provided TrafficConfig tag to send traffic to. When omitted, traffic is sent to the service-wide URI
288 },
289 },
290 ],
291 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
292 },
293 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
294 &quot;createUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who created the version.
295 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
296 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
297 },
298 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
299 &quot;deleteUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `DELETED` the version.
300 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
301 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
302 },
303 &quot;fileCount&quot;: &quot;A String&quot;, # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`.
304 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
305 &quot;finalizeUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `FINALIZED` the version.
306 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
307 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
308 },
309 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
310 &quot;a_key&quot;: &quot;A String&quot;,
311 },
312 &quot;name&quot;: &quot;A String&quot;, # The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).
313 &quot;status&quot;: &quot;A String&quot;, # The deploy status of the version. For a successful deploy, call [`CreateVersion`](sites.versions/create) to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling [`DeleteVersion`](sites.versions/delete).
314 &quot;versionBytes&quot;: &quot;A String&quot;, # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`.
315 }</pre>
316 </div>
317
318 <div class="method">
319 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
320 <pre>Deletes the specified version.
321
322 Args:
323 name: string, Required. The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID (required)
324 x__xgafv: string, V1 error format.
325 Allowed values
326 1 - v1 error format
327 2 - v2 error format
328
329 Returns:
330 An object of the form:
331
332 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
333 }</pre>
334 </div>
335
336 <div class="method">
337 <code class="details" id="get">get(name, x__xgafv=None)</code>
338 <pre>Get the specified version that has been created for the specified site. This can include versions that were created for the default `live` channel or for any active preview channels for the specified site.
339
340 Args:
341 name: string, Required. The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID (required)
342 x__xgafv: string, V1 error format.
343 Allowed values
344 1 - v1 error format
345 2 - v2 error format
346
347 Returns:
348 An object of the form:
349
350 { # A `Version` is a configuration and a collection of static files which determine how a site is displayed.
351 &quot;config&quot;: { # The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](https://firebase.google.com/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](https://firebase.google.com/docs/cli/#the_firebasejson_file) file.
352 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
353 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
354 &quot;headers&quot;: [ # An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
355 { # A [`Header`](https://firebase.google.com/docs/hosting/full-config#headers) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
356 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
357 &quot;headers&quot;: { # Required. The additional headers to add to the response.
358 &quot;a_key&quot;: &quot;A String&quot;,
359 },
360 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
361 },
362 ],
363 &quot;i18n&quot;: { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior.
364 &quot;root&quot;: &quot;A String&quot;, # Required. The user-supplied path where country and language specific content will be looked for within the public directory.
365 },
366 &quot;redirects&quot;: [ # An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
367 { # A [`Redirect`](https://firebase.google.com/docs/hosting/full-config#redirects) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
368 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
369 &quot;location&quot;: &quot;A String&quot;, # Required. The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a `:` prefix to identify the segment and an optional `*` to capture the rest of the URL. For example: &quot;glob&quot;: &quot;/:capture*&quot;, &quot;statusCode&quot;: 301, &quot;location&quot;: &quot;https://example.com/foo/:capture&quot;
370 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
371 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code.
372 },
373 ],
374 &quot;rewrites&quot;: [ # An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
375 { # A [`Rewrite`](https://firebase.google.com/docs/hosting/full-config#rewrites) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
376 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
377 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function name exactly.
378 &quot;functionRegion&quot;: &quot;A String&quot;, # Optional. Specify a Cloud region for rewritten Functions invocations. If not provided, defaults to us-central1.
379 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
380 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
381 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
382 &quot;run&quot;: { # A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). # The request will be forwarded to Cloud Run.
383 &quot;region&quot;: &quot;A String&quot;, # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied.
384 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
385 &quot;tag&quot;: &quot;A String&quot;, # Optional. User-provided TrafficConfig tag to send traffic to. When omitted, traffic is sent to the service-wide URI
386 },
387 },
388 ],
389 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
390 },
391 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
392 &quot;createUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who created the version.
393 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
394 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
395 },
396 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
397 &quot;deleteUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `DELETED` the version.
398 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
399 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
400 },
401 &quot;fileCount&quot;: &quot;A String&quot;, # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`.
402 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
403 &quot;finalizeUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `FINALIZED` the version.
404 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
405 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
406 },
407 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
408 &quot;a_key&quot;: &quot;A String&quot;,
409 },
410 &quot;name&quot;: &quot;A String&quot;, # The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).
411 &quot;status&quot;: &quot;A String&quot;, # The deploy status of the version. For a successful deploy, call [`CreateVersion`](sites.versions/create) to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling [`DeleteVersion`](sites.versions/delete).
412 &quot;versionBytes&quot;: &quot;A String&quot;, # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`.
413 }</pre>
414 </div>
415
416 <div class="method">
417 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
418 <pre>Lists the versions that have been created for the specified site. This list includes versions for both the default `live` channel and any active preview channels for the specified site.
419
420 Args:
421 parent: string, Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID (required)
422 filter: string, A filter string used to return a subset of versions in the response. The currently supported fields for filtering are: `name`, `status`, and `create_time`. Learn more about filtering in Google&#x27;s [AIP 160 standard](https://google.aip.dev/160).
423 pageSize: integer, The maximum number of versions to return. The service may return a lower number if fewer versions exist than this maximum number. If unspecified, defaults to 25. The maximum value is 100; values above 100 will be coerced to 100.
424 pageToken: string, A token from a previous call to `ListVersions` that tells the server where to resume listing.
425 x__xgafv: string, V1 error format.
426 Allowed values
427 1 - v1 error format
428 2 - v2 error format
429
430 Returns:
431 An object of the form:
432
433 {
434 &quot;nextPageToken&quot;: &quot;A String&quot;, # The pagination token, if more results exist beyond the ones in this response. Include this token in your next call to `ListVersions`. Page tokens are short-lived and should not be stored.
435 &quot;versions&quot;: [ # The list of versions, if any exist.
436 { # A `Version` is a configuration and a collection of static files which determine how a site is displayed.
437 &quot;config&quot;: { # The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](https://firebase.google.com/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](https://firebase.google.com/docs/cli/#the_firebasejson_file) file.
438 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
439 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
440 &quot;headers&quot;: [ # An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
441 { # A [`Header`](https://firebase.google.com/docs/hosting/full-config#headers) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
442 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
443 &quot;headers&quot;: { # Required. The additional headers to add to the response.
444 &quot;a_key&quot;: &quot;A String&quot;,
445 },
446 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
447 },
448 ],
449 &quot;i18n&quot;: { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior.
450 &quot;root&quot;: &quot;A String&quot;, # Required. The user-supplied path where country and language specific content will be looked for within the public directory.
451 },
452 &quot;redirects&quot;: [ # An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
453 { # A [`Redirect`](https://firebase.google.com/docs/hosting/full-config#redirects) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
454 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
455 &quot;location&quot;: &quot;A String&quot;, # Required. The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a `:` prefix to identify the segment and an optional `*` to capture the rest of the URL. For example: &quot;glob&quot;: &quot;/:capture*&quot;, &quot;statusCode&quot;: 301, &quot;location&quot;: &quot;https://example.com/foo/:capture&quot;
456 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
457 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code.
458 },
459 ],
460 &quot;rewrites&quot;: [ # An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
461 { # A [`Rewrite`](https://firebase.google.com/docs/hosting/full-config#rewrites) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
462 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
463 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function name exactly.
464 &quot;functionRegion&quot;: &quot;A String&quot;, # Optional. Specify a Cloud region for rewritten Functions invocations. If not provided, defaults to us-central1.
465 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
466 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
467 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
468 &quot;run&quot;: { # A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). # The request will be forwarded to Cloud Run.
469 &quot;region&quot;: &quot;A String&quot;, # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied.
470 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
471 &quot;tag&quot;: &quot;A String&quot;, # Optional. User-provided TrafficConfig tag to send traffic to. When omitted, traffic is sent to the service-wide URI
472 },
473 },
474 ],
475 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
476 },
477 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
478 &quot;createUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who created the version.
479 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
480 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
481 },
482 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
483 &quot;deleteUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `DELETED` the version.
484 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
485 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
486 },
487 &quot;fileCount&quot;: &quot;A String&quot;, # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`.
488 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
489 &quot;finalizeUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `FINALIZED` the version.
490 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
491 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
492 },
493 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
494 &quot;a_key&quot;: &quot;A String&quot;,
495 },
496 &quot;name&quot;: &quot;A String&quot;, # The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).
497 &quot;status&quot;: &quot;A String&quot;, # The deploy status of the version. For a successful deploy, call [`CreateVersion`](sites.versions/create) to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling [`DeleteVersion`](sites.versions/delete).
498 &quot;versionBytes&quot;: &quot;A String&quot;, # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`.
499 },
500 ],
501 }</pre>
502 </div>
503
504 <div class="method">
505 <code class="details" id="list_next">list_next()</code>
506 <pre>Retrieves the next page of results.
507
508 Args:
509 previous_request: The request for the previous page. (required)
510 previous_response: The response from the request for the previous page. (required)
511
512 Returns:
513 A request object that you can call &#x27;execute()&#x27; on to request the next
514 page. Returns None if there are no more items in the collection.
515 </pre>
516 </div>
517
518 <div class="method">
519 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
520 <pre> Updates the specified metadata for the specified version. This method will fail with `FAILED_PRECONDITION` in the event of an invalid state transition. The supported [state](../sites.versions#versionstatus) transitions for a version are from `CREATED` to `FINALIZED`. Use [`DeleteVersion`](delete) to set the status of a version to `DELETED`.
521
522 Args:
523 name: string, The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create). (required)
524 body: object, The request body.
525 The object takes the form of:
526
527 { # A `Version` is a configuration and a collection of static files which determine how a site is displayed.
528 &quot;config&quot;: { # The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](https://firebase.google.com/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](https://firebase.google.com/docs/cli/#the_firebasejson_file) file.
529 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
530 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
531 &quot;headers&quot;: [ # An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
532 { # A [`Header`](https://firebase.google.com/docs/hosting/full-config#headers) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
533 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
534 &quot;headers&quot;: { # Required. The additional headers to add to the response.
535 &quot;a_key&quot;: &quot;A String&quot;,
536 },
537 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
538 },
539 ],
540 &quot;i18n&quot;: { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior.
541 &quot;root&quot;: &quot;A String&quot;, # Required. The user-supplied path where country and language specific content will be looked for within the public directory.
542 },
543 &quot;redirects&quot;: [ # An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
544 { # A [`Redirect`](https://firebase.google.com/docs/hosting/full-config#redirects) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
545 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
546 &quot;location&quot;: &quot;A String&quot;, # Required. The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a `:` prefix to identify the segment and an optional `*` to capture the rest of the URL. For example: &quot;glob&quot;: &quot;/:capture*&quot;, &quot;statusCode&quot;: 301, &quot;location&quot;: &quot;https://example.com/foo/:capture&quot;
547 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
548 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code.
549 },
550 ],
551 &quot;rewrites&quot;: [ # An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
552 { # A [`Rewrite`](https://firebase.google.com/docs/hosting/full-config#rewrites) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
553 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
554 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function name exactly.
555 &quot;functionRegion&quot;: &quot;A String&quot;, # Optional. Specify a Cloud region for rewritten Functions invocations. If not provided, defaults to us-central1.
556 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
557 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
558 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
559 &quot;run&quot;: { # A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). # The request will be forwarded to Cloud Run.
560 &quot;region&quot;: &quot;A String&quot;, # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied.
561 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
562 &quot;tag&quot;: &quot;A String&quot;, # Optional. User-provided TrafficConfig tag to send traffic to. When omitted, traffic is sent to the service-wide URI
563 },
564 },
565 ],
566 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
567 },
568 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
569 &quot;createUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who created the version.
570 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
571 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
572 },
573 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
574 &quot;deleteUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `DELETED` the version.
575 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
576 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
577 },
578 &quot;fileCount&quot;: &quot;A String&quot;, # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`.
579 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
580 &quot;finalizeUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `FINALIZED` the version.
581 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
582 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
583 },
584 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
585 &quot;a_key&quot;: &quot;A String&quot;,
586 },
587 &quot;name&quot;: &quot;A String&quot;, # The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).
588 &quot;status&quot;: &quot;A String&quot;, # The deploy status of the version. For a successful deploy, call [`CreateVersion`](sites.versions/create) to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling [`DeleteVersion`](sites.versions/delete).
589 &quot;versionBytes&quot;: &quot;A String&quot;, # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`.
590 }
591
592 updateMask: string, A set of field names from your [version](../sites.versions) that you want to update. A field will be overwritten if, and only if, it&#x27;s in the mask. If a mask is not provided then a default mask of only [`status`](../sites.versions#Version.FIELDS.status) will be used.
593 x__xgafv: string, V1 error format.
594 Allowed values
595 1 - v1 error format
596 2 - v2 error format
597
598 Returns:
599 An object of the form:
600
601 { # A `Version` is a configuration and a collection of static files which determine how a site is displayed.
602 &quot;config&quot;: { # The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](https://firebase.google.com/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](https://firebase.google.com/docs/cli/#the_firebasejson_file) file.
603 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
604 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
605 &quot;headers&quot;: [ # An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
606 { # A [`Header`](https://firebase.google.com/docs/hosting/full-config#headers) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
607 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
608 &quot;headers&quot;: { # Required. The additional headers to add to the response.
609 &quot;a_key&quot;: &quot;A String&quot;,
610 },
611 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
612 },
613 ],
614 &quot;i18n&quot;: { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior.
615 &quot;root&quot;: &quot;A String&quot;, # Required. The user-supplied path where country and language specific content will be looked for within the public directory.
616 },
617 &quot;redirects&quot;: [ # An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
618 { # A [`Redirect`](https://firebase.google.com/docs/hosting/full-config#redirects) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
619 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
620 &quot;location&quot;: &quot;A String&quot;, # Required. The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a `:` prefix to identify the segment and an optional `*` to capture the rest of the URL. For example: &quot;glob&quot;: &quot;/:capture*&quot;, &quot;statusCode&quot;: 301, &quot;location&quot;: &quot;https://example.com/foo/:capture&quot;
621 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
622 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code.
623 },
624 ],
625 &quot;rewrites&quot;: [ # An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
626 { # A [`Rewrite`](https://firebase.google.com/docs/hosting/full-config#rewrites) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
627 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
628 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function name exactly.
629 &quot;functionRegion&quot;: &quot;A String&quot;, # Optional. Specify a Cloud region for rewritten Functions invocations. If not provided, defaults to us-central1.
630 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
631 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
632 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
633 &quot;run&quot;: { # A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). # The request will be forwarded to Cloud Run.
634 &quot;region&quot;: &quot;A String&quot;, # Optional. User-provided region where the Cloud Run service is hosted. Defaults to `us-central1` if not supplied.
635 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
636 &quot;tag&quot;: &quot;A String&quot;, # Optional. User-provided TrafficConfig tag to send traffic to. When omitted, traffic is sent to the service-wide URI
637 },
638 },
639 ],
640 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
641 },
642 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
643 &quot;createUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who created the version.
644 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
645 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
646 },
647 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
648 &quot;deleteUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `DELETED` the version.
649 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
650 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
651 },
652 &quot;fileCount&quot;: &quot;A String&quot;, # Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`.
653 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
654 &quot;finalizeUser&quot;: { # Contains metadata about the user who performed an action, such as creating a release or finalizing a version. # Output only. Identifies the user who `FINALIZED` the version.
655 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
656 &quot;imageUrl&quot;: &quot;A String&quot;, # A profile image URL for the user. May not be present if the user has changed their email address or deleted their account.
657 },
658 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
659 &quot;a_key&quot;: &quot;A String&quot;,
660 },
661 &quot;name&quot;: &quot;A String&quot;, # The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).
662 &quot;status&quot;: &quot;A String&quot;, # The deploy status of the version. For a successful deploy, call [`CreateVersion`](sites.versions/create) to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling [`DeleteVersion`](sites.versions/delete).
663 &quot;versionBytes&quot;: &quot;A String&quot;, # Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`.
664 }</pre>
665 </div>
666
667 <div class="method">
668 <code class="details" id="populateFiles">populateFiles(parent, body=None, x__xgafv=None)</code>
669 <pre> Adds content files to the specified version. Each file must be under 2 GB.
670
671 Args:
672 parent: string, Required. The version to which to add files, in the format: sites/SITE_ID /versions/VERSION_ID (required)
673 body: object, The request body.
674 The object takes the form of:
675
676 {
677 &quot;files&quot;: { # A set of file paths to the hashes corresponding to assets that should be added to the version. A file path to an empty hash will remove the path from the version. Calculate a hash by Gzipping the file then taking the SHA256 hash of the newly compressed file.
678 &quot;a_key&quot;: &quot;A String&quot;,
679 },
680 }
681
682 x__xgafv: string, V1 error format.
683 Allowed values
684 1 - v1 error format
685 2 - v2 error format
686
687 Returns:
688 An object of the form:
689
690 {
691 &quot;uploadRequiredHashes&quot;: [ # The content hashes of the specified files that need to be uploaded to the specified URL.
692 &quot;A String&quot;,
693 ],
694 &quot;uploadUrl&quot;: &quot;A String&quot;, # The URL to which the files should be uploaded, in the format: &quot;https://upload-firebasehosting.googleapis.com/upload/sites/SITE_ID /versions/VERSION_ID/files&quot; Perform a multipart `POST` of the Gzipped file contents to the URL using a forward slash and the hash of the file appended to the end.
695 }</pre>
696 </div>
697
698 </body></html>