Skip to main content

Bucket

Provides a bucket storage for a project.

Examples#

Simple Bucket#

const bucket = await provider.makeBucket({
name: "myuniquebucketname",
properties: () => ({ storageClass: "STANDARD" }),
});

Static Website Bucket#

const bucketPublic = await provider.makeBucket({
name: "demo.yourwebite.com",
properties: () => ({
iamConfiguration: {
uniformBucketLevelAccess: {
enabled: true,
},
},
iam: {
bindings: [
{
role: "roles/storage.objectViewer",
members: ["allUsers"],
},
],
},
website: { mainPageSuffix: "index.html", notFoundPage: "404.html" },
}),
});

Example Code#

Properties#

See Bucket create properties

Used By#