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