Creates a new bucket.
Arguments
Parameters | |
---|---|
predefinedAcl |
Apply a predefined set of access controls to this bucket.
|
Enum type. Can be one of the following: | |
authenticatedRead |
Project team owners get OWNER access, and allAuthenticatedUsers get READER access. |
private |
Project team owners get OWNER access. |
projectPrivate |
Project team members get access according to their roles. |
publicRead |
Project team owners get OWNER access, and allUsers get READER access. |
publicReadWrite |
Project team owners get OWNER access, and allUsers get WRITER access. |
predefinedDefaultObjectAcl |
Apply a predefined set of default object access controls to this bucket.
|
Enum type. Can be one of the following: | |
authenticatedRead |
Object owner gets OWNER access, and allAuthenticatedUsers get READER access. |
bucketOwnerFullControl |
Object owner gets OWNER access, and project team owners get OWNER access. |
bucketOwnerRead |
Object owner gets OWNER access, and project team owners get READER access. |
private |
Object owner gets OWNER access. |
projectPrivate |
Object owner gets OWNER access, and project team members get access according to their roles. |
publicRead |
Object owner gets OWNER access, and allUsers get READER access. |
project |
A valid API project identifier.
|
projection |
Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.
|
Enum type. Can be one of the following: | |
full |
Include all properties. |
noAcl |
Omit owner, acl and defaultObjectAcl properties. |
userProject |
The project to be billed for this request.
|
body |
Required.
|
Raised exceptions
Exceptions | |
---|---|
ConnectionError |
In case of a network problem (such as DNS failure or refused connection). |
HttpError |
If the response status is >= 400 (excluding 429 and 503). |
TimeoutError |
If a long-running operation takes longer to finish than the specified timeout limit. |
TypeError |
If an operation or function receives an argument of the wrong type. |
ValueError |
If an operation or function receives an argument of the right type but an inappropriate value. For example, a negative timeout. |
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" } } ]