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.iam.v1.AuditConfig
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > AuditConfigImplements
AuditConfigOrBuilderStatic Fields
AUDIT_LOG_CONFIGS_FIELD_NUMBER
public static final int AUDIT_LOG_CONFIGS_FIELD_NUMBER
Type | Description |
int |
SERVICE_FIELD_NUMBER
public static final int SERVICE_FIELD_NUMBER
Type | Description |
int |
Static Methods
getDefaultInstance()
public static AuditConfig getDefaultInstance()
Type | Description |
AuditConfig |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
newBuilder()
public static AuditConfig.Builder newBuilder()
Type | Description |
AuditConfig.Builder |
newBuilder(AuditConfig prototype)
public static AuditConfig.Builder newBuilder(AuditConfig prototype)
Name | Description |
prototype | AuditConfig |
Type | Description |
AuditConfig.Builder |
parseDelimitedFrom(InputStream input)
public static AuditConfig parseDelimitedFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
AuditConfig |
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static AuditConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
AuditConfig |
Type | Description |
IOException |
parseFrom(byte[] data)
public static AuditConfig parseFrom(byte[] data)
Name | Description |
data | byte[] |
Type | Description |
AuditConfig |
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static AuditConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
AuditConfig |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static AuditConfig parseFrom(ByteString data)
Name | Description |
data | ByteString |
Type | Description |
AuditConfig |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AuditConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
AuditConfig |
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static AuditConfig parseFrom(CodedInputStream input)
Name | Description |
input | CodedInputStream |
Type | Description |
AuditConfig |
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static AuditConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
AuditConfig |
Type | Description |
IOException |
parseFrom(InputStream input)
public static AuditConfig parseFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
AuditConfig |
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static AuditConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
AuditConfig |
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static AuditConfig parseFrom(ByteBuffer data)
Name | Description |
data | ByteBuffer |
Type | Description |
AuditConfig |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static AuditConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteBuffer |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
AuditConfig |
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<AuditConfig> parser()
Type | Description |
Parser<AuditConfig> |
Methods
equals(Object obj)
public boolean equals(Object obj)
Name | Description |
obj | Object |
Type | Description |
boolean |
getAuditLogConfigs(int index)
public AuditLogConfig getAuditLogConfigs(int index)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
Name | Description |
index | int |
Type | Description |
AuditLogConfig |
getAuditLogConfigsCount()
public int getAuditLogConfigsCount()
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
Type | Description |
int |
getAuditLogConfigsList()
public List<AuditLogConfig> getAuditLogConfigsList()
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
Type | Description |
List<AuditLogConfig> |
getAuditLogConfigsOrBuilder(int index)
public AuditLogConfigOrBuilder getAuditLogConfigsOrBuilder(int index)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
Name | Description |
index | int |
Type | Description |
AuditLogConfigOrBuilder |
getAuditLogConfigsOrBuilderList()
public List<? extends AuditLogConfigOrBuilder> getAuditLogConfigsOrBuilderList()
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
Type | Description |
List<? extends com.google.iam.v1.AuditLogConfigOrBuilder> |
getDefaultInstanceForType()
public AuditConfig getDefaultInstanceForType()
Type | Description |
AuditConfig |
getParserForType()
public Parser<AuditConfig> getParserForType()
Type | Description |
Parser<AuditConfig> |
getSerializedSize()
public int getSerializedSize()
Type | Description |
int |
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.
string service = 1;
Type | Description |
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.
string service = 1;
Type | Description |
ByteString | The bytes for service. |
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Type | Description |
UnknownFieldSet |
hashCode()
public int hashCode()
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
newBuilderForType()
public AuditConfig.Builder newBuilderForType()
Type | Description |
AuditConfig.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected AuditConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Name | Description |
parent | BuilderParent |
Type | Description |
AuditConfig.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Name | Description |
unused | UnusedPrivateParameter |
Type | Description |
Object |
toBuilder()
public AuditConfig.Builder toBuilder()
Type | Description |
AuditConfig.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Name | Description |
output | CodedOutputStream |
Type | Description |
IOException |