pub struct Bucket {Show 26 fields
pub kind: String,
pub id: String,
pub self_link: String,
pub project_number: u64,
pub name: String,
pub time_created: DateTime<Utc>,
pub updated: DateTime<Utc>,
pub default_event_based_hold: Option<bool>,
pub retention_policy: Option<RetentionPolicy>,
pub metageneration: i64,
pub acl: Option<Vec<BucketAccessControl>>,
pub default_object_acl: Option<Vec<DefaultObjectAccessControl>>,
pub iam_configuration: Option<IamConfiguration>,
pub encryption: Option<Encryption>,
pub owner: Option<Owner>,
pub location: Location,
pub location_type: String,
pub website: Option<Website>,
pub logging: Option<Logging>,
pub versioning: Option<Versioning>,
pub cors: Option<Vec<Cors>>,
pub lifecycle: Option<Lifecycle>,
pub labels: Option<HashMap<String, String>>,
pub storage_class: StorageClass,
pub billing: Option<Billing>,
pub etag: String,
}
Expand description
The Buckets resource represents a bucket in Google Cloud Storage. There is a single global namespace shared by all buckets. For more information, see Bucket Name Requirements.
Buckets contain objects which can be accessed by their own methods. In addition to the
ACL property, buckets contain
BucketAccessControls
, for use in fine-grained manipulation of an existing bucket’s access
controls.
A bucket is always owned by the project team owners group.
Fields§
§kind: String
The kind of item this is. For buckets, this is always storage#bucket
.
id: String
The ID of the bucket. For buckets, the id
and name
properties are the same.
self_link: String
The URI of this bucket.
project_number: u64
The project number of the project the bucket belongs to.
name: String
The name of the bucket.
time_created: DateTime<Utc>
The creation time of the bucket in RFC 3339 format.
updated: DateTime<Utc>
The modification time of the bucket in RFC 3339 format.
default_event_based_hold: Option<bool>
Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
retention_policy: Option<RetentionPolicy>
The bucket’s retention policy, which defines the minimum age an object in the bucket must reach before it can be deleted or overwritten.
metageneration: i64
The metadata generation of this bucket.
acl: Option<Vec<BucketAccessControl>>
Access controls on the bucket, containing one or more bucketAccessControls Resources. If iamConfiguration.uniformBucketLevelAccess.enabled is set to true, this field is omitted in responses, and requests that specify this field fail with a 400 Bad Request response.
default_object_acl: Option<Vec<DefaultObjectAccessControl>>
Default access controls to apply to new objects when no ACL is provided. This list contains one or more defaultObjectAccessControls Resources. If iamConfiguration.uniformBucketLevelAccess.enabled is set to true, this field is omitted in responses, and requests that specify this field fail.
iam_configuration: Option<IamConfiguration>
The bucket’s IAM configuration.
encryption: Option<Encryption>
Encryption configuration for a bucket.
owner: Option<Owner>
The owner of the bucket. This is always the project team’s owner group.
location: Location
The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See Cloud Storage bucket locations for the authoritative list.
location_type: String
The type of location that the bucket resides in, as determined by the location property.
website: Option<Website>
The bucket’s website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information.
logging: Option<Logging>
The bucket’s logging configuration, which defines the destination bucket and optional name prefix for the current bucket’s logs.
versioning: Option<Versioning>
The bucket’s versioning configuration.
cors: Option<Vec<Cors>>
The bucket’s Cross-Origin Resource Sharing (CORS) configuration.
lifecycle: Option<Lifecycle>
The bucket’s lifecycle configuration. See lifecycle management for more information.
labels: Option<HashMap<String, String>>
User-provided bucket labels, in key/value pairs.
storage_class: StorageClass
The bucket’s default storage class, used whenever no storageClass is specified for a newly-created object. If storageClass is not specified when the bucket is created, it defaults to STANDARD. For more information, see storage classes.
billing: Option<Billing>
The bucket’s billing configuration.
etag: String
HTTP 1.1 Entity tag for the bucket.