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.releases.html">releases</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 78 | <code><a href="#create">create(parent, body=None, versionName=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 79 | <p class="firstline">Creates a new release which makes the content of the specified version</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#list">list(parent, pageToken=None, x__xgafv=None, pageSize=None)</a></code></p> |
| 82 | <p class="firstline">Lists the releases that have been created on the specified site.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 85 | <p class="firstline">Retrieves the next page of results.</p> |
| 86 | <h3>Method Details</h3> |
| 87 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 88 | <code class="details" id="create">create(parent, body=None, versionName=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 89 | <pre>Creates a new release which makes the content of the specified version |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 90 | actively display on the appropriate URL(s). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 91 | |
| 92 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 93 | parent: string, Required. The site that the release belongs to, in the format: |
| 94 | <code>sites/<var>site-name</var></code> (required) |
| 95 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 96 | The object takes the form of: |
| 97 | |
| 98 | { # A `Release` is a particular |
| 99 | # [collection of configurations and files](sites.versions) |
| 100 | # that is set to be public at a particular time. |
| 101 | "name": "A String", # Output only. The unique identifier for the release, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 102 | # <code>sites/<var>site-name</var>/releases/<var>releaseID</var></code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 103 | # This name is provided in the response body when you call the |
| 104 | # [`CreateRelease`](sites.releases/create) endpoint. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 105 | "version": { # A `Version` is the collection of configuration and # Output only. The configuration and content that was released. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 106 | # [static files](sites.versions.files) that determine how a site is displayed. |
| 107 | "status": "A String", # The deploy status of a version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 108 | # <br> |
| 109 | # <br>For a successful deploy, call the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 110 | # [`CreateVersion`](sites.versions/create) endpoint to make a new version |
| 111 | # (`CREATED` status), |
| 112 | # [upload all desired files](sites.versions/populateFiles) to the version, |
| 113 | # then [update](sites.versions/patch) the version to the `FINALIZED` status. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 114 | # <br> |
| 115 | # <br>Note that if you leave the version in the `CREATED` state for more |
| 116 | # than 12&nbsp;hours, the system will automatically mark the version as |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 117 | # `ABANDONED`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 118 | # <br> |
| 119 | # <br>You can also change the status of a version to `DELETED` by calling the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 120 | # [`DeleteVersion`](sites.versions/delete) endpoint. |
| 121 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version. |
| 122 | # a release or finalizing a version. |
| 123 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 124 | # changed their email address or deleted their account. |
| 125 | "email": "A String", # The email address of the user when the user performed the action. |
| 126 | }, |
| 127 | "name": "A String", # The unique identifier for a version, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 128 | # <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 129 | # This name is provided in the response body when you call the |
| 130 | # [`CreateVersion`](../sites.versions/create) endpoint. |
| 131 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 132 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 133 | "labels": { # The labels used for extra metadata and/or filtering. |
| 134 | "a_key": "A String", |
| 135 | }, |
| 136 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version. |
| 137 | # a release or finalizing a version. |
| 138 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 139 | # changed their email address or deleted their account. |
| 140 | "email": "A String", # The email address of the user when the user performed the action. |
| 141 | }, |
| 142 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 143 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 144 | "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version. |
| 145 | # a release or finalizing a version. |
| 146 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 147 | # changed their email address or deleted their account. |
| 148 | "email": "A String", # The email address of the user when the user performed the action. |
| 149 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 150 | "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration |
| 151 | # specfies whether previewing is enabled for this site version. Version |
| 152 | # previews allow you to preview your site at a custom URL before |
| 153 | # releasing it as the live version. |
| 154 | # this version will be accessible via a custom URL even |
| 155 | # if it is not the currently released version. |
| 156 | "expireTime": "A String", # Indicates the expiration time for previewing this |
| 157 | # version; preview URL requests received after this time will 404. |
| 158 | "active": True or False, # If true, preview URLs are enabled for this version. |
| 159 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 160 | "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists |
| 161 | # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
| 162 | # processed before serving content. The patterns are matched and applied |
| 163 | # according to a specific |
| 164 | # [priority order](/docs/hosting/full-config#hosting_priority_order). |
| 165 | "redirects": [ # A list of globs that will cause the response to redirect to another |
| 166 | # location. |
| 167 | { # A [`redirect`](/docs/hosting/full-config#redirects) represents the |
| 168 | # configuration for returning an HTTP redirect response given a matching |
| 169 | # request URL path. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 170 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 171 | # URL path. |
| 172 | "glob": "A String", # The user-supplied [glob |
| 173 | # pattern](/docs/hosting/full-config#glob_pattern_matching) to match |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 174 | # against the request URL path. |
| 175 | "location": "A String", # Required. The value to put in the HTTP location header of the response. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 176 | # <br>The location can contain capture group values from the pattern using |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 177 | # a `:` prefix to identify the segment and an optional `*` to capture the |
| 178 | # rest of the URL. |
| 179 | # For example: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 180 | # <code>"glob": "/:capture*", |
| 181 | # <br>"statusCode": 301, |
| 182 | # <br>"location": "https://example.com/foo/:capture"</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 183 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a |
| 184 | # valid 3xx status code. |
| 185 | }, |
| 186 | ], |
| 187 | "appAssociation": "A String", # How to handle well known App Association files. |
| 188 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 189 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 190 | "headers": [ # A list of custom response headers that are added to the content if the |
| 191 | # request URL path matches the glob. |
| 192 | { # A [`header`](/docs/hosting/full-config#headers) defines custom headers to |
| 193 | # add to a response should the request URL path match the pattern. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 194 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 195 | # URL path. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 196 | "headers": { # Required. The additional headers to add to the response. |
| 197 | "a_key": "A String", |
| 198 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 199 | "glob": "A String", # The user-supplied [glob |
| 200 | # pattern](/docs/hosting/full-config#glob_pattern_matching) to match |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 201 | # against the request URL path. |
| 202 | }, |
| 203 | ], |
| 204 | "rewrites": [ # A list of rewrites that will act as if the service were given the |
| 205 | # destination URL. |
| 206 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) represents an internal |
| 207 | # content rewrite on the version. If the pattern matches, the request will be |
| 208 | # handled as if it were to the destination path specified in the |
| 209 | # configuration. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 210 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 211 | # URL path. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 212 | "function": "A String", # The function to proxy requests to. Must match the exported function |
| 213 | # name exactly. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 214 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run. |
| 215 | # Cloud Run service does not exist when setting or updating your Firebase |
| 216 | # Hosting configuration, then the request fails. Any errors from the Cloud Run |
| 217 | # service are passed to the end user (for example, if you delete a service, any |
| 218 | # requests directed to that service receive a `404` error). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 219 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.<br> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 220 | # Defaults to `us-central1` if not supplied. |
| 221 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 222 | }, |
| 223 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 224 | "path": "A String", # The URL path to rewrite the request to. |
| 225 | "glob": "A String", # The user-supplied [glob |
| 226 | # pattern](/docs/hosting/full-config#glob_pattern_matching) to match |
| 227 | # against the request URL path. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 228 | }, |
| 229 | ], |
| 230 | }, |
| 231 | "createTime": "A String", # Output only. The time at which the version was created. |
| 232 | "fileCount": "A String", # Output only. The total number of files associated with the version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 233 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 234 | }, |
| 235 | "releaseUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the release. |
| 236 | # a release or finalizing a version. |
| 237 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 238 | # changed their email address or deleted their account. |
| 239 | "email": "A String", # The email address of the user when the user performed the action. |
| 240 | }, |
| 241 | "message": "A String", # The deploy description when the release was created. The value can be up to |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 242 | # 512&nbsp;characters. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 243 | "type": "A String", # Explains the reason for the release. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 244 | # <br>Specify a value for this field only when creating a `SITE_DISABLE` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 245 | # type release. |
| 246 | "releaseTime": "A String", # Output only. The time at which the version is set to be public. |
| 247 | } |
| 248 | |
| 249 | versionName: string, The unique identifier for a version, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 250 | <code>/sites/<var>site-name</var>/versions/<var>versionID</var></code> |
| 251 | The <var>site-name</var> in this version identifier must match the |
| 252 | <var>site-name</var> in the `parent` parameter. |
| 253 | <br> |
| 254 | <br>This query parameter must be empty if the `type` field in the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 255 | request body is `SITE_DISABLE`. |
| 256 | x__xgafv: string, V1 error format. |
| 257 | Allowed values |
| 258 | 1 - v1 error format |
| 259 | 2 - v2 error format |
| 260 | |
| 261 | Returns: |
| 262 | An object of the form: |
| 263 | |
| 264 | { # A `Release` is a particular |
| 265 | # [collection of configurations and files](sites.versions) |
| 266 | # that is set to be public at a particular time. |
| 267 | "name": "A String", # Output only. The unique identifier for the release, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 268 | # <code>sites/<var>site-name</var>/releases/<var>releaseID</var></code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 269 | # This name is provided in the response body when you call the |
| 270 | # [`CreateRelease`](sites.releases/create) endpoint. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 271 | "version": { # A `Version` is the collection of configuration and # Output only. The configuration and content that was released. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 272 | # [static files](sites.versions.files) that determine how a site is displayed. |
| 273 | "status": "A String", # The deploy status of a version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 274 | # <br> |
| 275 | # <br>For a successful deploy, call the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 276 | # [`CreateVersion`](sites.versions/create) endpoint to make a new version |
| 277 | # (`CREATED` status), |
| 278 | # [upload all desired files](sites.versions/populateFiles) to the version, |
| 279 | # then [update](sites.versions/patch) the version to the `FINALIZED` status. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 280 | # <br> |
| 281 | # <br>Note that if you leave the version in the `CREATED` state for more |
| 282 | # than 12&nbsp;hours, the system will automatically mark the version as |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 283 | # `ABANDONED`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 284 | # <br> |
| 285 | # <br>You can also change the status of a version to `DELETED` by calling the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 286 | # [`DeleteVersion`](sites.versions/delete) endpoint. |
| 287 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version. |
| 288 | # a release or finalizing a version. |
| 289 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 290 | # changed their email address or deleted their account. |
| 291 | "email": "A String", # The email address of the user when the user performed the action. |
| 292 | }, |
| 293 | "name": "A String", # The unique identifier for a version, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 294 | # <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 295 | # This name is provided in the response body when you call the |
| 296 | # [`CreateVersion`](../sites.versions/create) endpoint. |
| 297 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 298 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 299 | "labels": { # The labels used for extra metadata and/or filtering. |
| 300 | "a_key": "A String", |
| 301 | }, |
| 302 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version. |
| 303 | # a release or finalizing a version. |
| 304 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 305 | # changed their email address or deleted their account. |
| 306 | "email": "A String", # The email address of the user when the user performed the action. |
| 307 | }, |
| 308 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 309 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 310 | "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version. |
| 311 | # a release or finalizing a version. |
| 312 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 313 | # changed their email address or deleted their account. |
| 314 | "email": "A String", # The email address of the user when the user performed the action. |
| 315 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 316 | "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration |
| 317 | # specfies whether previewing is enabled for this site version. Version |
| 318 | # previews allow you to preview your site at a custom URL before |
| 319 | # releasing it as the live version. |
| 320 | # this version will be accessible via a custom URL even |
| 321 | # if it is not the currently released version. |
| 322 | "expireTime": "A String", # Indicates the expiration time for previewing this |
| 323 | # version; preview URL requests received after this time will 404. |
| 324 | "active": True or False, # If true, preview URLs are enabled for this version. |
| 325 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 326 | "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists |
| 327 | # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
| 328 | # processed before serving content. The patterns are matched and applied |
| 329 | # according to a specific |
| 330 | # [priority order](/docs/hosting/full-config#hosting_priority_order). |
| 331 | "redirects": [ # A list of globs that will cause the response to redirect to another |
| 332 | # location. |
| 333 | { # A [`redirect`](/docs/hosting/full-config#redirects) represents the |
| 334 | # configuration for returning an HTTP redirect response given a matching |
| 335 | # request URL path. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 336 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 337 | # URL path. |
| 338 | "glob": "A String", # The user-supplied [glob |
| 339 | # pattern](/docs/hosting/full-config#glob_pattern_matching) to match |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 340 | # against the request URL path. |
| 341 | "location": "A String", # Required. The value to put in the HTTP location header of the response. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 342 | # <br>The location can contain capture group values from the pattern using |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 343 | # a `:` prefix to identify the segment and an optional `*` to capture the |
| 344 | # rest of the URL. |
| 345 | # For example: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 346 | # <code>"glob": "/:capture*", |
| 347 | # <br>"statusCode": 301, |
| 348 | # <br>"location": "https://example.com/foo/:capture"</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 349 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a |
| 350 | # valid 3xx status code. |
| 351 | }, |
| 352 | ], |
| 353 | "appAssociation": "A String", # How to handle well known App Association files. |
| 354 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 355 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 356 | "headers": [ # A list of custom response headers that are added to the content if the |
| 357 | # request URL path matches the glob. |
| 358 | { # A [`header`](/docs/hosting/full-config#headers) defines custom headers to |
| 359 | # add to a response should the request URL path match the pattern. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 360 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 361 | # URL path. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 362 | "headers": { # Required. The additional headers to add to the response. |
| 363 | "a_key": "A String", |
| 364 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 365 | "glob": "A String", # The user-supplied [glob |
| 366 | # pattern](/docs/hosting/full-config#glob_pattern_matching) to match |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 367 | # against the request URL path. |
| 368 | }, |
| 369 | ], |
| 370 | "rewrites": [ # A list of rewrites that will act as if the service were given the |
| 371 | # destination URL. |
| 372 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) represents an internal |
| 373 | # content rewrite on the version. If the pattern matches, the request will be |
| 374 | # handled as if it were to the destination path specified in the |
| 375 | # configuration. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 376 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 377 | # URL path. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 378 | "function": "A String", # The function to proxy requests to. Must match the exported function |
| 379 | # name exactly. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 380 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run. |
| 381 | # Cloud Run service does not exist when setting or updating your Firebase |
| 382 | # Hosting configuration, then the request fails. Any errors from the Cloud Run |
| 383 | # service are passed to the end user (for example, if you delete a service, any |
| 384 | # requests directed to that service receive a `404` error). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 385 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.<br> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 386 | # Defaults to `us-central1` if not supplied. |
| 387 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 388 | }, |
| 389 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 390 | "path": "A String", # The URL path to rewrite the request to. |
| 391 | "glob": "A String", # The user-supplied [glob |
| 392 | # pattern](/docs/hosting/full-config#glob_pattern_matching) to match |
| 393 | # against the request URL path. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 394 | }, |
| 395 | ], |
| 396 | }, |
| 397 | "createTime": "A String", # Output only. The time at which the version was created. |
| 398 | "fileCount": "A String", # Output only. The total number of files associated with the version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 399 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 400 | }, |
| 401 | "releaseUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the release. |
| 402 | # a release or finalizing a version. |
| 403 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 404 | # changed their email address or deleted their account. |
| 405 | "email": "A String", # The email address of the user when the user performed the action. |
| 406 | }, |
| 407 | "message": "A String", # The deploy description when the release was created. The value can be up to |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 408 | # 512&nbsp;characters. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 409 | "type": "A String", # Explains the reason for the release. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 410 | # <br>Specify a value for this field only when creating a `SITE_DISABLE` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 411 | # type release. |
| 412 | "releaseTime": "A String", # Output only. The time at which the version is set to be public. |
| 413 | }</pre> |
| 414 | </div> |
| 415 | |
| 416 | <div class="method"> |
| 417 | <code class="details" id="list">list(parent, pageToken=None, x__xgafv=None, pageSize=None)</code> |
| 418 | <pre>Lists the releases that have been created on the specified site. |
| 419 | |
| 420 | Args: |
| 421 | parent: string, Required. The parent for which to list files, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 422 | <code>sites/<var>site-name</var></code> (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 423 | pageToken: string, The next_page_token from a previous request, if provided. |
| 424 | x__xgafv: string, V1 error format. |
| 425 | Allowed values |
| 426 | 1 - v1 error format |
| 427 | 2 - v2 error format |
| 428 | pageSize: integer, The page size to return. Defaults to 100. |
| 429 | |
| 430 | Returns: |
| 431 | An object of the form: |
| 432 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 433 | { # The response when listing Releases. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 434 | "nextPageToken": "A String", # If there are additional releases remaining beyond the ones in this |
| 435 | # response, then supply this token in the next |
| 436 | # [`list`](../sites.versions.files/list) call to continue with the next set |
| 437 | # of releases. |
| 438 | "releases": [ # The list of hashes of files that still need to be uploaded, if any exist. |
| 439 | { # A `Release` is a particular |
| 440 | # [collection of configurations and files](sites.versions) |
| 441 | # that is set to be public at a particular time. |
| 442 | "name": "A String", # Output only. The unique identifier for the release, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 443 | # <code>sites/<var>site-name</var>/releases/<var>releaseID</var></code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 444 | # This name is provided in the response body when you call the |
| 445 | # [`CreateRelease`](sites.releases/create) endpoint. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 446 | "version": { # A `Version` is the collection of configuration and # Output only. The configuration and content that was released. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 447 | # [static files](sites.versions.files) that determine how a site is displayed. |
| 448 | "status": "A String", # The deploy status of a version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 449 | # <br> |
| 450 | # <br>For a successful deploy, call the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 451 | # [`CreateVersion`](sites.versions/create) endpoint to make a new version |
| 452 | # (`CREATED` status), |
| 453 | # [upload all desired files](sites.versions/populateFiles) to the version, |
| 454 | # then [update](sites.versions/patch) the version to the `FINALIZED` status. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 455 | # <br> |
| 456 | # <br>Note that if you leave the version in the `CREATED` state for more |
| 457 | # than 12&nbsp;hours, the system will automatically mark the version as |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 458 | # `ABANDONED`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 459 | # <br> |
| 460 | # <br>You can also change the status of a version to `DELETED` by calling the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 461 | # [`DeleteVersion`](sites.versions/delete) endpoint. |
| 462 | "deleteUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `DELETED` the version. |
| 463 | # a release or finalizing a version. |
| 464 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 465 | # changed their email address or deleted their account. |
| 466 | "email": "A String", # The email address of the user when the user performed the action. |
| 467 | }, |
| 468 | "name": "A String", # The unique identifier for a version, in the format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 469 | # <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 470 | # This name is provided in the response body when you call the |
| 471 | # [`CreateVersion`](../sites.versions/create) endpoint. |
| 472 | "versionBytes": "A String", # Output only. The total stored bytesize of the version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 473 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 474 | "labels": { # The labels used for extra metadata and/or filtering. |
| 475 | "a_key": "A String", |
| 476 | }, |
| 477 | "finalizeUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who `FINALIZED` the version. |
| 478 | # a release or finalizing a version. |
| 479 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 480 | # changed their email address or deleted their account. |
| 481 | "email": "A String", # The email address of the user when the user performed the action. |
| 482 | }, |
| 483 | "finalizeTime": "A String", # Output only. The time at which the version was `FINALIZED`. |
| 484 | "deleteTime": "A String", # Output only. The time at which the version was `DELETED`. |
| 485 | "createUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the version. |
| 486 | # a release or finalizing a version. |
| 487 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 488 | # changed their email address or deleted their account. |
| 489 | "email": "A String", # The email address of the user when the user performed the action. |
| 490 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 491 | "preview": { # Version preview configuration. If active and unexpired, # Version preview configuration for the site version. This configuration |
| 492 | # specfies whether previewing is enabled for this site version. Version |
| 493 | # previews allow you to preview your site at a custom URL before |
| 494 | # releasing it as the live version. |
| 495 | # this version will be accessible via a custom URL even |
| 496 | # if it is not the currently released version. |
| 497 | "expireTime": "A String", # Indicates the expiration time for previewing this |
| 498 | # version; preview URL requests received after this time will 404. |
| 499 | "active": True or False, # If true, preview URLs are enabled for this version. |
| 500 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 501 | "config": { # The configuration for how incoming requests to a site should be routed and # The configuration for the behavior of the site. This configuration exists |
| 502 | # in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. |
| 503 | # processed before serving content. The patterns are matched and applied |
| 504 | # according to a specific |
| 505 | # [priority order](/docs/hosting/full-config#hosting_priority_order). |
| 506 | "redirects": [ # A list of globs that will cause the response to redirect to another |
| 507 | # location. |
| 508 | { # A [`redirect`](/docs/hosting/full-config#redirects) represents the |
| 509 | # configuration for returning an HTTP redirect response given a matching |
| 510 | # request URL path. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 511 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 512 | # URL path. |
| 513 | "glob": "A String", # The user-supplied [glob |
| 514 | # pattern](/docs/hosting/full-config#glob_pattern_matching) to match |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 515 | # against the request URL path. |
| 516 | "location": "A String", # Required. The value to put in the HTTP location header of the response. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 517 | # <br>The location can contain capture group values from the pattern using |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 518 | # a `:` prefix to identify the segment and an optional `*` to capture the |
| 519 | # rest of the URL. |
| 520 | # For example: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 521 | # <code>"glob": "/:capture*", |
| 522 | # <br>"statusCode": 301, |
| 523 | # <br>"location": "https://example.com/foo/:capture"</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 524 | "statusCode": 42, # Required. The status HTTP code to return in the response. It must be a |
| 525 | # valid 3xx status code. |
| 526 | }, |
| 527 | ], |
| 528 | "appAssociation": "A String", # How to handle well known App Association files. |
| 529 | "trailingSlashBehavior": "A String", # Defines how to handle a trailing slash in the URL path. |
| 530 | "cleanUrls": True or False, # Defines whether to drop the file extension from uploaded files. |
| 531 | "headers": [ # A list of custom response headers that are added to the content if the |
| 532 | # request URL path matches the glob. |
| 533 | { # A [`header`](/docs/hosting/full-config#headers) defines custom headers to |
| 534 | # add to a response should the request URL path match the pattern. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 535 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 536 | # URL path. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 537 | "headers": { # Required. The additional headers to add to the response. |
| 538 | "a_key": "A String", |
| 539 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 540 | "glob": "A String", # The user-supplied [glob |
| 541 | # pattern](/docs/hosting/full-config#glob_pattern_matching) to match |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 542 | # against the request URL path. |
| 543 | }, |
| 544 | ], |
| 545 | "rewrites": [ # A list of rewrites that will act as if the service were given the |
| 546 | # destination URL. |
| 547 | { # A [`rewrite`](/docs/hosting/full-config#rewrites) represents an internal |
| 548 | # content rewrite on the version. If the pattern matches, the request will be |
| 549 | # handled as if it were to the destination path specified in the |
| 550 | # configuration. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 551 | "regex": "A String", # The user-supplied RE2 regular expression to match against the request |
| 552 | # URL path. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 553 | "function": "A String", # The function to proxy requests to. Must match the exported function |
| 554 | # name exactly. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 555 | "run": { # A configured rewrite that directs requests to a Cloud Run service. If the # The request will be forwarded to Cloud Run. |
| 556 | # Cloud Run service does not exist when setting or updating your Firebase |
| 557 | # Hosting configuration, then the request fails. Any errors from the Cloud Run |
| 558 | # service are passed to the end user (for example, if you delete a service, any |
| 559 | # requests directed to that service receive a `404` error). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 560 | "region": "A String", # Optional. User-provided region where the Cloud Run service is hosted.<br> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 561 | # Defaults to `us-central1` if not supplied. |
| 562 | "serviceId": "A String", # Required. User-defined ID of the Cloud Run service. |
| 563 | }, |
| 564 | "dynamicLinks": True or False, # The request will be forwarded to Firebase Dynamic Links. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 565 | "path": "A String", # The URL path to rewrite the request to. |
| 566 | "glob": "A String", # The user-supplied [glob |
| 567 | # pattern](/docs/hosting/full-config#glob_pattern_matching) to match |
| 568 | # against the request URL path. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 569 | }, |
| 570 | ], |
| 571 | }, |
| 572 | "createTime": "A String", # Output only. The time at which the version was created. |
| 573 | "fileCount": "A String", # Output only. The total number of files associated with the version. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 574 | # <br>This value is calculated after a version is `FINALIZED`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 575 | }, |
| 576 | "releaseUser": { # Contains metadata about the user who performed an action, such as creating # Output only. Identifies the user who created the release. |
| 577 | # a release or finalizing a version. |
| 578 | "imageUrl": "A String", # A profile image URL for the user. May not be present if the user has |
| 579 | # changed their email address or deleted their account. |
| 580 | "email": "A String", # The email address of the user when the user performed the action. |
| 581 | }, |
| 582 | "message": "A String", # The deploy description when the release was created. The value can be up to |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 583 | # 512&nbsp;characters. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 584 | "type": "A String", # Explains the reason for the release. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 585 | # <br>Specify a value for this field only when creating a `SITE_DISABLE` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 586 | # type release. |
| 587 | "releaseTime": "A String", # Output only. The time at which the version is set to be public. |
| 588 | }, |
| 589 | ], |
| 590 | }</pre> |
| 591 | </div> |
| 592 | |
| 593 | <div class="method"> |
| 594 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 595 | <pre>Retrieves the next page of results. |
| 596 | |
| 597 | Args: |
| 598 | previous_request: The request for the previous page. (required) |
| 599 | previous_response: The response from the request for the previous page. (required) |
| 600 | |
| 601 | Returns: |
| 602 | A request object that you can call 'execute()' on to request the next |
| 603 | page. Returns None if there are no more items in the collection. |
| 604 | </pre> |
| 605 | </div> |
| 606 | |
| 607 | </body></html> |