blob: de316bda9963bb0b434c8379156f2a1516e6985a [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -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 of the specified version.</p>
85<p class="toc_element">
86 <code><a href="#close">close()</a></code></p>
87<p class="firstline">Close httplib2 connections.</p>
88<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080089 <code><a href="#create">create(parent, body=None, sizeBytes=None, versionId=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090<p class="firstline">Creates a new version for a site.</p>
91<p class="toc_element">
92 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
93<p class="firstline">Deletes the specified version.</p>
94<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080095 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070096<p class="firstline">Lists the versions that have been created on the specified site. Will include filtering in the future.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -070097<p class="toc_element">
98 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<p class="toc_element">
101 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700102<p class="firstline">Updates the specified metadata for a version. Note that this method will fail with `FAILED_PRECONDITION` in the event of an invalid state transition. The only valid transition for a version is currently from a `CREATED` status to a `FINALIZED` status. Use [`DeleteVersion`](../sites.versions/delete) to set the status of a version to `DELETED`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700104 <code><a href="#populateFiles">populateFiles(parent, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700105<p class="firstline">Adds content files to a version. Each file must be under 2 GB.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<h3>Method Details</h3>
107<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700108 <code class="details" id="clone">clone(parent, body=None, x__xgafv=None)</code>
109 <pre>Creates a new version on the target site using the content of the specified version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110
111Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700112 parent: string, Required. The target site where the cloned version will reside, in the format: `sites/{site}` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700113 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 The object takes the form of:
115
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700116{ # The request sent to CloneVersion.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800117 &quot;exclude&quot;: { # A representation of filter path. # If provided, only paths that do not match any of the regexes in this list will be included in the new version.
118 &quot;regexes&quot;: [ # An array of regexes to filter by.
119 &quot;A String&quot;,
120 ],
121 },
122 &quot;finalize&quot;: True or False, # If true, immediately finalize the version after cloning is complete.
123 &quot;include&quot;: { # A representation of filter path. # If provided, only paths that match one or more regexes in this list will be included in the new version.
124 &quot;regexes&quot;: [ # An array of regexes to filter by.
125 &quot;A String&quot;,
126 ],
127 },
128 &quot;sourceVersion&quot;: &quot;A String&quot;, # Required. The name of the version to be cloned, in the format: `sites/{site}/versions/{version}`
129}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700130
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131 x__xgafv: string, V1 error format.
132 Allowed values
133 1 - v1 error format
134 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135
136Returns:
137 An object of the form:
138
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700139 { # This resource represents a long-running operation that is the result of a network API call.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800140 &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.
141 &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.
142 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
143 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
144 {
145 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
146 },
147 ],
148 &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.
149 },
150 &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.
151 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
152 },
153 &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}`.
154 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
155 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
156 },
157}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700158</div>
159
160<div class="method">
161 <code class="details" id="close">close()</code>
162 <pre>Close httplib2 connections.</pre>
163</div>
164
165<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800166 <code class="details" id="create">create(parent, body=None, sizeBytes=None, versionId=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700167 <pre>Creates a new version for a site.
168
169Args:
170 parent: string, Required. The parent to create the version for, in the format: sites/ site-name (required)
171 body: object, The request body.
172 The object takes the form of:
173
174{ # A `Version` is the collection of configuration and [static files](sites.versions.files) that determine how a site is displayed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800175 &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](/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
176 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
177 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
178 &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.
179 { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
180 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
181 &quot;headers&quot;: { # Required. The additional headers to add to the response.
182 &quot;a_key&quot;: &quot;A String&quot;,
183 },
184 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
185 },
186 ],
187 &quot;i18n&quot;: { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior.
188 &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.
189 },
190 &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.
191 { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
192 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
193 &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;
194 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
195 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code.
196 },
197 ],
198 &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.
199 { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
200 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
201 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function name exactly.
202 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
203 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
204 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
205 &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.
206 &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.
207 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
208 },
209 },
210 ],
211 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
212 },
213 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800214 &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.
215 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
216 &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.
217 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800218 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
219 &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.
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;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`.
224 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
225 &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.
226 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
227 &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.
228 },
229 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
230 &quot;a_key&quot;: &quot;A String&quot;,
231 },
232 &quot;name&quot;: &quot;A String&quot;, # The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800233 &quot;preview&quot;: { # Version preview configuration. If active and unexpired, this version will be accessible via a custom URL even if it is not the currently released version. Deprecated in favor of site channels. # Deprecated in favor of site channels. Version preview configuration for the site version. This configuration specifies whether previewing is enabled for this site version. Version previews allow you to preview your site at a custom URL before releasing it as the live version.
234 &quot;active&quot;: True or False, # If true, preview URLs are enabled for this version.
235 &quot;expireTime&quot;: &quot;A String&quot;, # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800236 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800237 &quot;status&quot;: &quot;A String&quot;, # The deploy status of a version. For a successful deploy, call the [`CreateVersion`](sites.versions/create) endpoint to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling the [`DeleteVersion`](sites.versions/delete) endpoint.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800238 &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`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700239}
240
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800241 sizeBytes: string, The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800242 versionId: string, A unique id for the new version. This is was only specified for legacy version creations, and should be blank.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700243 x__xgafv: string, V1 error format.
244 Allowed values
245 1 - v1 error format
246 2 - v2 error format
247
248Returns:
249 An object of the form:
250
251 { # A `Version` is the collection of configuration and [static files](sites.versions.files) that determine how a site is displayed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800252 &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](/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
253 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
254 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
255 &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.
256 { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
257 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
258 &quot;headers&quot;: { # Required. The additional headers to add to the response.
259 &quot;a_key&quot;: &quot;A String&quot;,
260 },
261 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800262 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800263 ],
264 &quot;i18n&quot;: { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior.
265 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800266 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800267 &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.
268 { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
269 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
270 &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;
271 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
272 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code.
273 },
274 ],
275 &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.
276 { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
277 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
278 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function name exactly.
279 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
280 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
281 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
282 &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.
283 &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.
284 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
285 },
286 },
287 ],
288 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
289 },
290 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
291 &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.
292 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
293 &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.
294 },
295 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
296 &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.
297 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
298 &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.
299 },
300 &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`.
301 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
302 &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.
303 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
304 &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.
305 },
306 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
307 &quot;a_key&quot;: &quot;A String&quot;,
308 },
309 &quot;name&quot;: &quot;A String&quot;, # The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint.
310 &quot;preview&quot;: { # Version preview configuration. If active and unexpired, this version will be accessible via a custom URL even if it is not the currently released version. Deprecated in favor of site channels. # Deprecated in favor of site channels. Version preview configuration for the site version. This configuration specifies whether previewing is enabled for this site version. Version previews allow you to preview your site at a custom URL before releasing it as the live version.
311 &quot;active&quot;: True or False, # If true, preview URLs are enabled for this version.
312 &quot;expireTime&quot;: &quot;A String&quot;, # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404.
313 },
314 &quot;status&quot;: &quot;A String&quot;, # The deploy status of a version. For a successful deploy, call the [`CreateVersion`](sites.versions/create) endpoint to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling the [`DeleteVersion`](sites.versions/delete) endpoint.
315 &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`.
316}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700317</div>
318
319<div class="method">
320 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
321 <pre>Deletes the specified version.
322
323Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700324 name: string, Required. The name of the version to be deleted, in the format: sites/ site-name/versions/versionID (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700325 x__xgafv: string, V1 error format.
326 Allowed values
327 1 - v1 error format
328 2 - v2 error format
329
330Returns:
331 An object of the form:
332
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700333 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800334}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700335</div>
336
337<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800338 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700339 <pre>Lists the versions that have been created on the specified site. Will include filtering in the future.
Dan O'Mearadd494642020-05-01 07:42:23 -0700340
341Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700342 parent: string, Required. The parent for which to list files, in the format: sites/site-name (required)
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800343 filter: string, The filter string used to return a subset of versions in the response. Currently supported fields for filtering are: name, status, and create_time. Filter processing will be implemented in accordance with go/filtering.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800344 pageSize: integer, The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 versions will be returned. The maximum value is 100; values above 100 will be coerced to 100
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800345 pageToken: string, The next_page_token from a previous request, if provided.
Bu Sun Kim65020912020-05-20 12:08:20 -0700346 x__xgafv: string, V1 error format.
347 Allowed values
348 1 - v1 error format
349 2 - v2 error format
Dan O'Mearadd494642020-05-01 07:42:23 -0700350
351Returns:
352 An object of the form:
353
Bu Sun Kim65020912020-05-20 12:08:20 -0700354 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800355 &quot;nextPageToken&quot;: &quot;A String&quot;, # The pagination token, if more results exist
356 &quot;versions&quot;: [ # The list of versions, if any exist.
357 { # A `Version` is the collection of configuration and [static files](sites.versions.files) that determine how a site is displayed.
358 &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](/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
359 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
360 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
361 &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.
362 { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
363 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
364 &quot;headers&quot;: { # Required. The additional headers to add to the response.
365 &quot;a_key&quot;: &quot;A String&quot;,
366 },
367 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800368 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800369 ],
370 &quot;i18n&quot;: { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior.
371 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800372 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800373 &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.
374 { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
375 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
376 &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;
377 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
378 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code.
379 },
380 ],
381 &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.
382 { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
383 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
384 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function name exactly.
385 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
386 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
387 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
388 &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.
389 &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.
390 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
391 },
392 },
393 ],
394 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800396 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
397 &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.
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;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
402 &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.
403 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
404 &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.
405 },
406 &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`.
407 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
408 &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.
409 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
410 &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.
411 },
412 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
413 &quot;a_key&quot;: &quot;A String&quot;,
414 },
415 &quot;name&quot;: &quot;A String&quot;, # The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint.
416 &quot;preview&quot;: { # Version preview configuration. If active and unexpired, this version will be accessible via a custom URL even if it is not the currently released version. Deprecated in favor of site channels. # Deprecated in favor of site channels. Version preview configuration for the site version. This configuration specifies whether previewing is enabled for this site version. Version previews allow you to preview your site at a custom URL before releasing it as the live version.
417 &quot;active&quot;: True or False, # If true, preview URLs are enabled for this version.
418 &quot;expireTime&quot;: &quot;A String&quot;, # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404.
419 },
420 &quot;status&quot;: &quot;A String&quot;, # The deploy status of a version. For a successful deploy, call the [`CreateVersion`](sites.versions/create) endpoint to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling the [`DeleteVersion`](sites.versions/delete) endpoint.
421 &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`.
422 },
423 ],
424}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700425</div>
426
427<div class="method">
428 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
429 <pre>Retrieves the next page of results.
430
431Args:
432 previous_request: The request for the previous page. (required)
433 previous_response: The response from the request for the previous page. (required)
434
435Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700436 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -0700437 page. Returns None if there are no more items in the collection.
438 </pre>
439</div>
440
441<div class="method">
442 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700443 <pre>Updates the specified metadata for a version. Note that this method will fail with `FAILED_PRECONDITION` in the event of an invalid state transition. The only valid transition for a version is currently from a `CREATED` status to a `FINALIZED` status. Use [`DeleteVersion`](../sites.versions/delete) to set the status of a version to `DELETED`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700444
445Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700446 name: string, The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700447 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448 The object takes the form of:
449
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700450{ # A `Version` is the collection of configuration and [static files](sites.versions.files) that determine how a site is displayed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800451 &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](/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
452 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
453 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
454 &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.
455 { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
456 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
457 &quot;headers&quot;: { # Required. The additional headers to add to the response.
458 &quot;a_key&quot;: &quot;A String&quot;,
459 },
460 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
461 },
462 ],
463 &quot;i18n&quot;: { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior.
464 &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.
465 },
466 &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.
467 { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
468 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
469 &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;
470 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
471 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code.
472 },
473 ],
474 &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.
475 { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
476 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
477 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function name exactly.
478 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
479 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
480 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
481 &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.
482 &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.
483 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
484 },
485 },
486 ],
487 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
488 },
489 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800490 &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.
491 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
492 &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.
493 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800494 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
495 &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.
496 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
497 &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.
498 },
499 &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`.
500 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
501 &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.
502 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
503 &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.
504 },
505 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
506 &quot;a_key&quot;: &quot;A String&quot;,
507 },
508 &quot;name&quot;: &quot;A String&quot;, # The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800509 &quot;preview&quot;: { # Version preview configuration. If active and unexpired, this version will be accessible via a custom URL even if it is not the currently released version. Deprecated in favor of site channels. # Deprecated in favor of site channels. Version preview configuration for the site version. This configuration specifies whether previewing is enabled for this site version. Version previews allow you to preview your site at a custom URL before releasing it as the live version.
510 &quot;active&quot;: True or False, # If true, preview URLs are enabled for this version.
511 &quot;expireTime&quot;: &quot;A String&quot;, # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800512 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800513 &quot;status&quot;: &quot;A String&quot;, # The deploy status of a version. For a successful deploy, call the [`CreateVersion`](sites.versions/create) endpoint to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling the [`DeleteVersion`](sites.versions/delete) endpoint.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800514 &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`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700515}
516
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700517 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700518 x__xgafv: string, V1 error format.
519 Allowed values
520 1 - v1 error format
521 2 - v2 error format
522
523Returns:
524 An object of the form:
525
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700526 { # A `Version` is the collection of configuration and [static files](sites.versions.files) that determine how a site is displayed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800527 &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](/docs/hosting/full-config#hosting_priority_order). # The configuration for the behavior of the site. This configuration exists in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file.
528 &quot;appAssociation&quot;: &quot;A String&quot;, # How to handle well known App Association files.
529 &quot;cleanUrls&quot;: True or False, # Defines whether to drop the file extension from uploaded files.
530 &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.
531 { # A [`header`](/docs/hosting/full-config#headers) is an object that specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
532 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
533 &quot;headers&quot;: { # Required. The additional headers to add to the response.
534 &quot;a_key&quot;: &quot;A String&quot;,
535 },
536 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800537 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800538 ],
539 &quot;i18n&quot;: { # If provided, i18n rewrites are enabled. # Optional. Defines i18n rewrite behavior.
540 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800541 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800542 &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.
543 { # A [`redirect`](/docs/hosting/full-config#redirects) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
544 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
545 &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;
546 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
547 &quot;statusCode&quot;: 42, # Required. The status HTTP code to return in the response. It must be a valid 3xx status code.
548 },
549 ],
550 &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.
551 { # A [`rewrite`](/docs/hosting/full-config#rewrites) object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
552 &quot;dynamicLinks&quot;: True or False, # The request will be forwarded to Firebase Dynamic Links.
553 &quot;function&quot;: &quot;A String&quot;, # The function to proxy requests to. Must match the exported function name exactly.
554 &quot;glob&quot;: &quot;A String&quot;, # The user-supplied [glob](/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
555 &quot;path&quot;: &quot;A String&quot;, # The URL path to rewrite the request to.
556 &quot;regex&quot;: &quot;A String&quot;, # The user-supplied RE2 regular expression to match against the request URL path.
557 &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.
558 &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.
559 &quot;serviceId&quot;: &quot;A String&quot;, # Required. User-defined ID of the Cloud Run service.
560 },
561 },
562 ],
563 &quot;trailingSlashBehavior&quot;: &quot;A String&quot;, # Defines how to handle a trailing slash in the URL path.
564 },
565 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was created.
566 &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.
567 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
568 &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.
569 },
570 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `DELETED`.
571 &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.
572 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
573 &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.
574 },
575 &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`.
576 &quot;finalizeTime&quot;: &quot;A String&quot;, # Output only. The time at which the version was `FINALIZED`.
577 &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.
578 &quot;email&quot;: &quot;A String&quot;, # The email address of the user when the user performed the action.
579 &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.
580 },
581 &quot;labels&quot;: { # The labels used for extra metadata and/or filtering.
582 &quot;a_key&quot;: &quot;A String&quot;,
583 },
584 &quot;name&quot;: &quot;A String&quot;, # The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint.
585 &quot;preview&quot;: { # Version preview configuration. If active and unexpired, this version will be accessible via a custom URL even if it is not the currently released version. Deprecated in favor of site channels. # Deprecated in favor of site channels. Version preview configuration for the site version. This configuration specifies whether previewing is enabled for this site version. Version previews allow you to preview your site at a custom URL before releasing it as the live version.
586 &quot;active&quot;: True or False, # If true, preview URLs are enabled for this version.
587 &quot;expireTime&quot;: &quot;A String&quot;, # Indicates the expiration time for previewing this version; preview URL requests received after this time will 404.
588 },
589 &quot;status&quot;: &quot;A String&quot;, # The deploy status of a version. For a successful deploy, call the [`CreateVersion`](sites.versions/create) endpoint to make a new version (`CREATED` status), [upload all desired files](sites.versions/populateFiles) to the version, then [update](sites.versions/patch) the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling the [`DeleteVersion`](sites.versions/delete) endpoint.
590 &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`.
591}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592</div>
593
594<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700595 <code class="details" id="populateFiles">populateFiles(parent, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700596 <pre>Adds content files to a version. Each file must be under 2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597
598Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700599 parent: string, Required. The version to add files to, in the format: sites/site-name /versions/versionID (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700600 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700601 The object takes the form of:
602
Bu Sun Kim65020912020-05-20 12:08:20 -0700603{ # The request to populate a Version&#x27;s Files.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800604 &quot;files&quot;: { # A set of file paths to the hashes corresponding to assets that should be added to the version. Note that a file path to an empty hash will remove the path from the version. Calculate a hash by Gzipping the file then taking the SHA256 hash of the newly compressed file.
605 &quot;a_key&quot;: &quot;A String&quot;,
606 },
607}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608
609 x__xgafv: string, V1 error format.
610 Allowed values
611 1 - v1 error format
612 2 - v2 error format
613
614Returns:
615 An object of the form:
616
Bu Sun Kim65020912020-05-20 12:08:20 -0700617 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800618 &quot;uploadRequiredHashes&quot;: [ # The content hashes of the specified files that need to be uploaded to the specified endpoint.
619 &quot;A String&quot;,
620 ],
621 &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-name /versions/versionID/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.
622}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700623</div>
624
625</body></html>