Package com.google.cloud.storage
Class BucketInfo.IamConfiguration.Builder
java.lang.Object
com.google.cloud.storage.BucketInfo.IamConfiguration.Builder
- Enclosing class:
- BucketInfo.IamConfiguration
Builder for
IamConfiguration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds anIamConfiguration
objectsetIsBucketPolicyOnlyEnabled
(Boolean isBucketPolicyOnlyEnabled) Deprecated.setIsUniformBucketLevelAccessEnabled
(Boolean isUniformBucketLevelAccessEnabled) Sets whether uniform bucket-level access is enabled for this bucket.setPublicAccessPrevention
(BucketInfo.PublicAccessPrevention publicAccessPrevention) Sets the bucket's Public Access Prevention configuration.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setIsBucketPolicyOnlyEnabled
@Deprecated public BucketInfo.IamConfiguration.Builder setIsBucketPolicyOnlyEnabled(Boolean isBucketPolicyOnlyEnabled) Deprecated.Deprecated in favor of setIsUniformBucketLevelAccessEnabled(). -
setIsUniformBucketLevelAccessEnabled
public BucketInfo.IamConfiguration.Builder setIsUniformBucketLevelAccessEnabled(Boolean isUniformBucketLevelAccessEnabled) Sets whether uniform bucket-level access is enabled for this bucket. When this is enabled, access to the bucket will be configured through IAM, and legacy ACL policies will not work. When this is first enabled,uniformBucketLevelAccess.lockedTime
will be set by the API automatically. This field can then be disabled until the time specified, after which it will become immutable and calls to change it will fail. If this is enabled, calls to access legacy ACL information will fail. -
setPublicAccessPrevention
public BucketInfo.IamConfiguration.Builder setPublicAccessPrevention(BucketInfo.PublicAccessPrevention publicAccessPrevention) Sets the bucket's Public Access Prevention configuration. Currently supported options areBucketInfo.PublicAccessPrevention.INHERITED
orBucketInfo.PublicAccessPrevention.ENFORCED
- See Also:
-
build
Builds anIamConfiguration
object
-