Class CredentialAccessBoundary.AccessBoundaryRule.Builder (1.24.0)

public static class CredentialAccessBoundary.AccessBoundaryRule.Builder

Inheritance

java.lang.Object > CredentialAccessBoundary.AccessBoundaryRule.Builder

Methods

addAvailablePermission(String availablePermission)

public CredentialAccessBoundary.AccessBoundaryRule.Builder addAvailablePermission(String availablePermission)

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()

public CredentialAccessBoundary.AccessBoundaryRule build()
Returns
Type Description
CredentialAccessBoundary.AccessBoundaryRule

setAvailabilityCondition(CredentialAccessBoundary.AccessBoundaryRule.AvailabilityCondition availabilityCondition)

public CredentialAccessBoundary.AccessBoundaryRule.Builder setAvailabilityCondition(CredentialAccessBoundary.AccessBoundaryRule.AvailabilityCondition availabilityCondition)

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)

public CredentialAccessBoundary.AccessBoundaryRule.Builder setAvailablePermissions(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)

public CredentialAccessBoundary.AccessBoundaryRule.Builder setAvailableResource(String availableResource)

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