Class AuditConfig (1.39.0)

public final class AuditConfig extends GeneratedMessageV3 implements AuditConfigOrBuilder

Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both allServices and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.

Protobuf type google.cloud.compute.v1.AuditConfig

Static Fields

AUDIT_LOG_CONFIGS_FIELD_NUMBER

public static final int AUDIT_LOG_CONFIGS_FIELD_NUMBER
Field Value
TypeDescription
int

EXEMPTED_MEMBERS_FIELD_NUMBER

public static final int EXEMPTED_MEMBERS_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICE_FIELD_NUMBER

public static final int SERVICE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AuditConfig getDefaultInstance()
Returns
TypeDescription
AuditConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static AuditConfig.Builder newBuilder()
Returns
TypeDescription
AuditConfig.Builder

newBuilder(AuditConfig prototype)

public static AuditConfig.Builder newBuilder(AuditConfig prototype)
Parameter
NameDescription
prototypeAuditConfig
Returns
TypeDescription
AuditConfig.Builder

parseDelimitedFrom(InputStream input)

public static AuditConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuditConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static AuditConfig parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AuditConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AuditConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AuditConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AuditConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AuditConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static AuditConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuditConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static AuditConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AuditConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<AuditConfig> parser()
Returns
TypeDescription
Parser<AuditConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAuditLogConfigs(int index)

public AuditLogConfig getAuditLogConfigs(int index)

The configuration for logging of each type of permission.

repeated .google.cloud.compute.v1.AuditLogConfig audit_log_configs = 488420626;

Parameter
NameDescription
indexint
Returns
TypeDescription
AuditLogConfig

getAuditLogConfigsCount()

public int getAuditLogConfigsCount()

The configuration for logging of each type of permission.

repeated .google.cloud.compute.v1.AuditLogConfig audit_log_configs = 488420626;

Returns
TypeDescription
int

getAuditLogConfigsList()

public List<AuditLogConfig> getAuditLogConfigsList()

The configuration for logging of each type of permission.

repeated .google.cloud.compute.v1.AuditLogConfig audit_log_configs = 488420626;

Returns
TypeDescription
List<AuditLogConfig>

getAuditLogConfigsOrBuilder(int index)

public AuditLogConfigOrBuilder getAuditLogConfigsOrBuilder(int index)

The configuration for logging of each type of permission.

repeated .google.cloud.compute.v1.AuditLogConfig audit_log_configs = 488420626;

Parameter
NameDescription
indexint
Returns
TypeDescription
AuditLogConfigOrBuilder

getAuditLogConfigsOrBuilderList()

public List<? extends AuditLogConfigOrBuilder> getAuditLogConfigsOrBuilderList()

The configuration for logging of each type of permission.

repeated .google.cloud.compute.v1.AuditLogConfig audit_log_configs = 488420626;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.AuditLogConfigOrBuilder>

getDefaultInstanceForType()

public AuditConfig getDefaultInstanceForType()
Returns
TypeDescription
AuditConfig

getExemptedMembers(int index)

public String getExemptedMembers(int index)

This is deprecated and has no effect. Do not use.

repeated string exempted_members = 232615576;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The exemptedMembers at the given index.

getExemptedMembersBytes(int index)

public ByteString getExemptedMembersBytes(int index)

This is deprecated and has no effect. Do not use.

repeated string exempted_members = 232615576;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the exemptedMembers at the given index.

getExemptedMembersCount()

public int getExemptedMembersCount()

This is deprecated and has no effect. Do not use.

repeated string exempted_members = 232615576;

Returns
TypeDescription
int

The count of exemptedMembers.

getExemptedMembersList()

public ProtocolStringList getExemptedMembersList()

This is deprecated and has no effect. Do not use.

repeated string exempted_members = 232615576;

Returns
TypeDescription
ProtocolStringList

A list containing the exemptedMembers.

getParserForType()

public Parser<AuditConfig> getParserForType()
Returns
TypeDescription
Parser<AuditConfig>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getService()

public String getService()

Specifies a service that will be enabled for audit logging. For example, storage.googleapis.com, cloudsql.googleapis.com. allServices is a special value that covers all services.

optional string service = 373540533;

Returns
TypeDescription
String

The service.

getServiceBytes()

public ByteString getServiceBytes()

Specifies a service that will be enabled for audit logging. For example, storage.googleapis.com, cloudsql.googleapis.com. allServices is a special value that covers all services.

optional string service = 373540533;

Returns
TypeDescription
ByteString

The bytes for service.

hasService()

public boolean hasService()

Specifies a service that will be enabled for audit logging. For example, storage.googleapis.com, cloudsql.googleapis.com. allServices is a special value that covers all services.

optional string service = 373540533;

Returns
TypeDescription
boolean

Whether the service field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public AuditConfig.Builder newBuilderForType()
Returns
TypeDescription
AuditConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AuditConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
AuditConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public AuditConfig.Builder toBuilder()
Returns
TypeDescription
AuditConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException