Creates a new bucket.
Arguments
predefinedAcl
enum
Apply a predefined set of access controls to this bucket.
authenticatedRead
private
projectPrivate
publicRead
publicReadWrite
predefinedDefaultObjectAcl
enum
Apply a predefined set of default object access controls to this bucket.
authenticatedRead
bucketOwnerFullControl
bucketOwnerRead
private
projectPrivate
publicRead
project
string
A valid API project identifier.
projection
enum
Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.
full
noAcl
userProject
string
The project to be billed for this request.
body
object ( Bucket
)
Required.
Raised exceptions
ConnectionError
HttpError
TimeoutError
TypeError
ValueError
Response
If successful, the response contains an instance of Bucket
.
Subworkflow snippet
Some fields might be optional or required. To identify required fields, refer to the API documentation .
YAML
- insert : call : googleapis.storage.v1.buckets.insert args : predefinedAcl : ... predefinedDefaultObjectAcl : ... project : ... projection : ... userProject : ... body : acl : ... autoclass : enabled : ... toggleTime : ... billing : requesterPays : ... cors : maxAgeSeconds : ... method : ... origin : ... responseHeader : ... customPlacementConfig : dataLocations : ... defaultEventBasedHold : ... defaultObjectAcl : ... encryption : defaultKmsKeyName : ... etag : ... iamConfiguration : bucketPolicyOnly : enabled : ... lockedTime : ... publicAccessPrevention : ... uniformBucketLevelAccess : enabled : ... lockedTime : ... id : ... kind : ... labels : ... lifecycle : rule : action : storageClass : ... type : ... condition : age : ... createdBefore : ... customTimeBefore : ... daysSinceCustomTime : ... daysSinceNoncurrentTime : ... isLive : ... matchesPattern : ... matchesPrefix : ... matchesStorageClass : ... matchesSuffix : ... noncurrentTimeBefore : ... numNewerVersions : ... location : ... locationType : ... logging : logBucket : ... logObjectPrefix : ... metageneration : ... name : ... owner : entity : ... entityId : ... projectNumber : ... retentionPolicy : effectiveTime : ... isLocked : ... retentionPeriod : ... rpo : ... satisfiesPZS : ... selfLink : ... storageClass : ... timeCreated : ... updated : ... versioning : enabled : ... website : mainPageSuffix : ... notFoundPage : ... result : insertResult
JSON
[ { "insert" : { "call" : "googleapis.storage.v1.buckets.insert" , "args" : { "predefinedAcl" : "..." , "predefinedDefaultObjectAcl" : "..." , "project" : "..." , "projection" : "..." , "userProject" : "..." , "body" : { "acl" : "..." , "autoclass" : { "enabled" : "..." , "toggleTime" : "..." }, "billing" : { "requesterPays" : "..." }, "cors" : { "maxAgeSeconds" : "..." , "method" : "..." , "origin" : "..." , "responseHeader" : "..." }, "customPlacementConfig" : { "dataLocations" : "..." }, "defaultEventBasedHold" : "..." , "defaultObjectAcl" : "..." , "encryption" : { "defaultKmsKeyName" : "..." }, "etag" : "..." , "iamConfiguration" : { "bucketPolicyOnly" : { "enabled" : "..." , "lockedTime" : "..." }, "publicAccessPrevention" : "..." , "uniformBucketLevelAccess" : { "enabled" : "..." , "lockedTime" : "..." } }, "id" : "..." , "kind" : "..." , "labels" : "..." , "lifecycle" : { "rule" : { "action" : { "storageClass" : "..." , "type" : "..." }, "condition" : { "age" : "..." , "createdBefore" : "..." , "customTimeBefore" : "..." , "daysSinceCustomTime" : "..." , "daysSinceNoncurrentTime" : "..." , "isLive" : "..." , "matchesPattern" : "..." , "matchesPrefix" : "..." , "matchesStorageClass" : "..." , "matchesSuffix" : "..." , "noncurrentTimeBefore" : "..." , "numNewerVersions" : "..." } } }, "location" : "..." , "locationType" : "..." , "logging" : { "logBucket" : "..." , "logObjectPrefix" : "..." }, "metageneration" : "..." , "name" : "..." , "owner" : { "entity" : "..." , "entityId" : "..." }, "projectNumber" : "..." , "retentionPolicy" : { "effectiveTime" : "..." , "isLocked" : "..." , "retentionPeriod" : "..." }, "rpo" : "..." , "satisfiesPZS" : "..." , "selfLink" : "..." , "storageClass" : "..." , "timeCreated" : "..." , "updated" : "..." , "versioning" : { "enabled" : "..." }, "website" : { "mainPageSuffix" : "..." , "notFoundPage" : "..." } } }, "result" : "insertResult" } } ]

