Class AccessPolicy (1.55.0)

public final class AccessPolicy extends GeneratedMessageV3 implements AccessPolicyOrBuilder

AccessPolicy is a container for AccessLevels (which define the necessary attributes to use Google Cloud services) and ServicePerimeters (which define regions of services able to freely pass data within a perimeter). An access policy is globally visible within an organization, and the restrictions it specifies apply to all projects within an organization.

Protobuf type google.identity.accesscontextmanager.v1.AccessPolicy

Static Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PARENT_FIELD_NUMBER

public static final int PARENT_FIELD_NUMBER
Field Value
Type Description
int

SCOPES_FIELD_NUMBER

public static final int SCOPES_FIELD_NUMBER
Field Value
Type Description
int

TITLE_FIELD_NUMBER

public static final int TITLE_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AccessPolicy getDefaultInstance()
Returns
Type Description
AccessPolicy

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static AccessPolicy.Builder newBuilder()
Returns
Type Description
AccessPolicy.Builder

newBuilder(AccessPolicy prototype)

public static AccessPolicy.Builder newBuilder(AccessPolicy prototype)
Parameter
Name Description
prototype AccessPolicy
Returns
Type Description
AccessPolicy.Builder

parseDelimitedFrom(InputStream input)

public static AccessPolicy parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AccessPolicy
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccessPolicy
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AccessPolicy parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AccessPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccessPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AccessPolicy parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AccessPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccessPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AccessPolicy parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AccessPolicy
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccessPolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AccessPolicy parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AccessPolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccessPolicy
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AccessPolicy parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AccessPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccessPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AccessPolicy> parser()
Returns
Type Description
Parser<AccessPolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. Time the AccessPolicy was created in UTC.

.google.protobuf.Timestamp create_time = 4;

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time the AccessPolicy was created in UTC.

.google.protobuf.Timestamp create_time = 4;

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public AccessPolicy getDefaultInstanceForType()
Returns
Type Description
AccessPolicy

getEtag()

public String getEtag()

Output only. An opaque identifier for the current version of the AccessPolicy. This will always be a strongly validated etag, meaning that two Access Polices will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.

string etag = 6;

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

Output only. An opaque identifier for the current version of the AccessPolicy. This will always be a strongly validated etag, meaning that two Access Polices will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.

string etag = 6;

Returns
Type Description
ByteString

The bytes for etag.

getName()

public String getName()

Output only. Resource name of the AccessPolicy. Format: accessPolicies/{access_policy}

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Resource name of the AccessPolicy. Format: accessPolicies/{access_policy}

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParent()

public String getParent()

Required. The parent of this AccessPolicy in the Cloud Resource Hierarchy. Currently immutable once created. Format: organizations/{organization_id}

string parent = 2;

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The parent of this AccessPolicy in the Cloud Resource Hierarchy. Currently immutable once created. Format: organizations/{organization_id}

string parent = 2;

Returns
Type Description
ByteString

The bytes for parent.

getParserForType()

public Parser<AccessPolicy> getParserForType()
Returns
Type Description
Parser<AccessPolicy>
Overrides

getScopes(int index)

public String getScopes(int index)

The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=["folders/123"] has the following behavior:

  • vpcsc perimeters can only restrict projects within folders/123
  • access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes "folders/123" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of folders/{folder_number} or projects/{project_number}

repeated string scopes = 7;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The scopes at the given index.

getScopesBytes(int index)

public ByteString getScopesBytes(int index)

The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=["folders/123"] has the following behavior:

  • vpcsc perimeters can only restrict projects within folders/123
  • access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes "folders/123" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of folders/{folder_number} or projects/{project_number}

repeated string scopes = 7;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the scopes at the given index.

getScopesCount()

public int getScopesCount()

The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=["folders/123"] has the following behavior:

  • vpcsc perimeters can only restrict projects within folders/123
  • access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes "folders/123" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of folders/{folder_number} or projects/{project_number}

repeated string scopes = 7;

Returns
Type Description
int

The count of scopes.

getScopesList()

public ProtocolStringList getScopesList()

The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=["folders/123"] has the following behavior:

  • vpcsc perimeters can only restrict projects within folders/123
  • access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes "folders/123" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of folders/{folder_number} or projects/{project_number}

repeated string scopes = 7;

Returns
Type Description
ProtocolStringList

A list containing the scopes.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTitle()

public String getTitle()

Required. Human readable title. Does not affect behavior.

string title = 3;

Returns
Type Description
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Required. Human readable title. Does not affect behavior.

string title = 3;

Returns
Type Description
ByteString

The bytes for title.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Time the AccessPolicy was updated in UTC.

.google.protobuf.Timestamp update_time = 5;

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Time the AccessPolicy was updated in UTC.

.google.protobuf.Timestamp update_time = 5;

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Time the AccessPolicy was created in UTC.

.google.protobuf.Timestamp create_time = 4;

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Time the AccessPolicy was updated in UTC.

.google.protobuf.Timestamp update_time = 5;

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AccessPolicy.Builder newBuilderForType()
Returns
Type Description
AccessPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AccessPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AccessPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AccessPolicy.Builder toBuilder()
Returns
Type Description
AccessPolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException