public abstract static class BucketInfo.Builder extends Object
BucketInfo
.Modifier and Type | Method and Description |
---|---|
abstract BucketInfo |
build()
Creates a
BucketInfo object. |
abstract BucketInfo.Builder |
deleteLifecycleRules()
Deletes the lifecycle rules of this bucket.
|
abstract BucketInfo.Builder |
setAcl(Iterable<Acl> acl)
Sets the bucket's access control configuration.
|
abstract BucketInfo.Builder |
setAutoclass(BucketInfo.Autoclass autoclass) |
abstract BucketInfo.Builder |
setCors(Iterable<Cors> cors)
Sets the bucket's Cross-Origin Resource Sharing (CORS) configuration.
|
abstract BucketInfo.Builder |
setCustomPlacementConfig(BucketInfo.CustomPlacementConfig customPlacementConfig) |
abstract BucketInfo.Builder |
setDefaultAcl(Iterable<Acl> acl)
Sets the default access control configuration to apply to bucket's blobs when no other
configuration is specified.
|
abstract BucketInfo.Builder |
setDefaultEventBasedHold(Boolean defaultEventBasedHold)
Sets the default event-based hold for this bucket.
|
abstract BucketInfo.Builder |
setDefaultKmsKeyName(String defaultKmsKeyName)
Sets the default Cloud KMS key name for this bucket.
|
abstract BucketInfo.Builder |
setDeleteRules(Iterable<? extends BucketInfo.DeleteRule> rules)
Deprecated.
Use
setLifecycleRules(Iterable) instead, as in setLifecycleRules(Collections.singletonList( new BucketInfo.LifecycleRule(
LifecycleAction.newDeleteAction(), LifecycleCondition.newBuilder().setAge(5).build()))); |
abstract BucketInfo.Builder |
setIamConfiguration(BucketInfo.IamConfiguration iamConfiguration)
Sets the IamConfiguration to specify whether IAM access should be enabled.
|
abstract BucketInfo.Builder |
setIndexPage(String indexPage)
Sets the bucket's website index page.
|
abstract BucketInfo.Builder |
setLabels(@Nullable Map<String,String> labels)
Sets the label of this bucket.
|
abstract BucketInfo.Builder |
setLifecycleRules(Iterable<? extends BucketInfo.LifecycleRule> rules)
Sets the bucket's lifecycle configuration as a number of lifecycle rules, consisting of an
action and a condition.
|
abstract BucketInfo.Builder |
setLocation(String location)
Sets the bucket's location.
|
abstract BucketInfo.Builder |
setLogging(BucketInfo.Logging logging) |
abstract BucketInfo.Builder |
setName(String name)
Sets the bucket's name.
|
abstract BucketInfo.Builder |
setNotFoundPage(String notFoundPage)
Sets the custom object to return when a requested resource is not found.
|
abstract BucketInfo.Builder |
setRequesterPays(Boolean requesterPays)
Sets whether a user accessing the bucket or an object it contains should assume the transit
costs related to the access.
|
abstract BucketInfo.Builder |
setRetentionPeriod(Long retentionPeriod)
Deprecated.
|
BucketInfo.Builder |
setRetentionPeriodDuration(Duration retentionPeriod)
If policy is not locked this value can be cleared, increased, and decreased.
|
abstract BucketInfo.Builder |
setRpo(Rpo rpo)
Sets the bucket's Recovery Point Objective (RPO).
|
abstract BucketInfo.Builder |
setStorageClass(StorageClass storageClass)
Sets the bucket's storage class.
|
abstract BucketInfo.Builder |
setVersioningEnabled(Boolean enable)
Sets whether versioning should be enabled for this bucket.
|
public abstract BucketInfo.Builder setName(String name)
public abstract BucketInfo.Builder setRequesterPays(Boolean requesterPays)
public abstract BucketInfo.Builder setVersioningEnabled(Boolean enable)
public abstract BucketInfo.Builder setIndexPage(String indexPage)
public abstract BucketInfo.Builder setNotFoundPage(String notFoundPage)
@Deprecated public abstract BucketInfo.Builder setDeleteRules(Iterable<? extends BucketInfo.DeleteRule> rules)
setLifecycleRules(Iterable)
instead, as in setLifecycleRules(Collections.singletonList( new BucketInfo.LifecycleRule(
LifecycleAction.newDeleteAction(), LifecycleCondition.newBuilder().setAge(5).build())));
public abstract BucketInfo.Builder setLifecycleRules(Iterable<? extends BucketInfo.LifecycleRule> rules)
public abstract BucketInfo.Builder deleteLifecycleRules()
public abstract BucketInfo.Builder setRpo(Rpo rpo)
Rpo
class for supported values, and here for additional
details.public abstract BucketInfo.Builder setStorageClass(StorageClass storageClass)
public abstract BucketInfo.Builder setLocation(String location)
public abstract BucketInfo.Builder setCors(Iterable<Cors> cors)
public abstract BucketInfo.Builder setAcl(Iterable<Acl> acl)
public abstract BucketInfo.Builder setDefaultAcl(Iterable<Acl> acl)
public abstract BucketInfo.Builder setLabels(@Nullable Map<String,String> labels)
public abstract BucketInfo.Builder setDefaultKmsKeyName(String defaultKmsKeyName)
@BetaApi public abstract BucketInfo.Builder setDefaultEventBasedHold(Boolean defaultEventBasedHold)
@BetaApi @Deprecated public abstract BucketInfo.Builder setRetentionPeriod(Long retentionPeriod)
setRetentionPeriodDuration(Duration)
@BetaApi public BucketInfo.Builder setRetentionPeriodDuration(Duration retentionPeriod)
@BetaApi public abstract BucketInfo.Builder setIamConfiguration(BucketInfo.IamConfiguration iamConfiguration)
public abstract BucketInfo.Builder setAutoclass(BucketInfo.Autoclass autoclass)
public abstract BucketInfo.Builder setLogging(BucketInfo.Logging logging)
public abstract BucketInfo.Builder setCustomPlacementConfig(BucketInfo.CustomPlacementConfig customPlacementConfig)
public abstract BucketInfo build()
BucketInfo
object.Copyright © 2023 Google LLC. All rights reserved.