public final class Policy extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Policy.Builder
A builder for
Policy objects. |
static class |
Policy.DefaultMarshaller |
static class |
Policy.Marshaller<T> |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Map<Role,Set<Identity>> |
getBindings()
Returns the map of bindings that comprises the policy.
|
String |
getEtag()
Returns the policy's etag.
|
int |
getVersion()
Returns the version of the policy.
|
int |
hashCode() |
static Policy.Builder |
newBuilder()
Returns a builder for
Policy objects. |
Policy.Builder |
toBuilder()
Returns a builder containing the properties of this IAM Policy.
|
String |
toString() |
public Policy.Builder toBuilder()
public Map<Role,Set<Identity>> getBindings()
public String getEtag()
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 int getVersion()
public static Policy.Builder newBuilder()
Policy
objects.Copyright © 2019 Google LLC. All rights reserved.