default_bucket
Creates, updates, deletes, gets or lists a default_bucket
resource.
Overview
Name | default_bucket |
Type | Resource |
Id | firebase.storage.default_bucket |
Fields
The following fields are returned by SELECT
queries:
- get_default_bucket
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Resource name of the default bucket. |
bucket | object | A storage bucket and its relation to a parent Firebase project. (id: Bucket) |
location | string | Immutable. Location of the default bucket. |
storageClass | string | Immutable. Storage class of the default bucket. Supported values are available at https://cloud.google.com/storage/docs/storage-classes#classes. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_default_bucket | select | projectsId | Gets the default bucket. | |
create | insert | projectsId | Creates a Spark tier-eligible Cloud Storage bucket and links it to your Firebase project. If the default bucket already exists, this method will re-link it to your Firebase project. See https://firebase.google.com/pricing for pricing details. | |
delete_default_bucket | delete | projectsId | Unlinks and deletes the default bucket. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
projectsId | string |
SELECT
examples
- get_default_bucket
Gets the default bucket.
SELECT
name,
bucket,
location,
storageClass
FROM firebase.storage.default_bucket
WHERE projectsId = '{{ projectsId }}' -- required;
INSERT
examples
- create
- Manifest
Creates a Spark tier-eligible Cloud Storage bucket and links it to your Firebase project. If the default bucket already exists, this method will re-link it to your Firebase project. See https://firebase.google.com/pricing for pricing details.
INSERT INTO firebase.storage.default_bucket (
data__name,
data__location,
data__storageClass,
projectsId
)
SELECT
'{{ name }}',
'{{ location }}',
'{{ storageClass }}',
'{{ projectsId }}'
RETURNING
name,
bucket,
location,
storageClass
;
# Description fields are for documentation purposes
- name: default_bucket
props:
- name: projectsId
value: string
description: Required parameter for the default_bucket resource.
- name: name
value: string
description: >
Resource name of the default bucket.
- name: location
value: string
description: >
Immutable. Location of the default bucket.
- name: storageClass
value: string
description: >
Immutable. Storage class of the default bucket. Supported values are available at https://cloud.google.com/storage/docs/storage-classes#classes.
DELETE
examples
- delete_default_bucket
Unlinks and deletes the default bucket.
DELETE FROM firebase.storage.default_bucket
WHERE projectsId = '{{ projectsId }}' --required;