R - the data type of roles (should be serializable)public abstract class IamPolicy<R> extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
IamPolicy.Builder<R,B extends IamPolicy.Builder<R,B>>
Builder for an IAM Policy.
|
| Modifier | Constructor and Description |
|---|---|
protected |
IamPolicy(IamPolicy.Builder<R,? extends IamPolicy.Builder<R,?>> builder) |
| Modifier and Type | Method and Description |
|---|---|
Map<R,Set<Identity>> |
bindings()
The map of bindings that comprises the policy.
|
boolean |
equals(Object obj) |
String |
etag()
The policy's etag.
|
int |
hashCode() |
abstract IamPolicy.Builder<R,? extends IamPolicy.Builder<R,?>> |
toBuilder()
Returns a builder containing the properties of this IAM Policy.
|
Integer |
version()
Sets the version of the policy.
|
protected IamPolicy(IamPolicy.Builder<R,? extends IamPolicy.Builder<R,?>> builder)
public abstract IamPolicy.Builder<R,? extends IamPolicy.Builder<R,?>> toBuilder()
public String etag()
Etags are used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions. An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy. If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly.
public Integer version()
Copyright © 2016 Google. All rights reserved.