Class CredentialAccessBoundary.AccessBoundaryRule.Builder (1.39.1)

publicstaticclass CredentialAccessBoundary.AccessBoundaryRule.Builder

Inheritance

java.lang.Object > CredentialAccessBoundary.AccessBoundaryRule.Builder

Methods

addAvailablePermission(String availablePermission)

publicCredentialAccessBoundary.AccessBoundaryRule.BuilderaddAvailablePermission(StringavailablePermission)

Adds a permission that can be used on the resource. This should be an IAM role prefixed by inRole.

For example: "inRole:roles/storage.objectViewer".

Parameter
Name Description
availablePermission String

a permission to add, should not be null

Returns
Type Description
CredentialAccessBoundary.AccessBoundaryRule.Builder

this Builder object

build()

publicCredentialAccessBoundary.AccessBoundaryRulebuild()
Returns
Type Description
CredentialAccessBoundary.AccessBoundaryRule

setAvailabilityCondition(CredentialAccessBoundary.AccessBoundaryRule.AvailabilityCondition availabilityCondition)

publicCredentialAccessBoundary.AccessBoundaryRule.BuildersetAvailabilityCondition(CredentialAccessBoundary.AccessBoundaryRule.AvailabilityConditionavailabilityCondition)

Sets the availability condition which is an IAM condition that defines constraints to apply to the token expressed in CEL format.

Parameter
Name Description
availabilityCondition CredentialAccessBoundary.AccessBoundaryRule.AvailabilityCondition

the AvailabilityCondition to set

Returns
Type Description
CredentialAccessBoundary.AccessBoundaryRule.Builder

this Builder object

setAvailablePermissions(List<String> availablePermissions)

publicCredentialAccessBoundary.AccessBoundaryRule.BuildersetAvailablePermissions(List<String>availablePermissions)

Sets the list of permissions that can be used on the resource. This should be a list of IAM roles prefixed by inRole.

For example: {"inRole:roles/storage.objectViewer"}.

Parameter
Name Description
availablePermissions List<String>

the collection of permissions to set, should not be null

Returns
Type Description
CredentialAccessBoundary.AccessBoundaryRule.Builder

this Builder object

setAvailableResource(String availableResource)

publicCredentialAccessBoundary.AccessBoundaryRule.BuildersetAvailableResource(StringavailableResource)

Sets the available resource, which is the full resource name of the GCP resource to allow access to.

For example: "//storage.googleapis.com/projects/_/buckets/example".

Parameter
Name Description
availableResource String

the resource name to set

Returns
Type Description
CredentialAccessBoundary.AccessBoundaryRule.Builder

this Builder object

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.