public static final class AuditConfig.Builder extends GeneratedMessageV3.Builder<AuditConfig.Builder> 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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addAllAuditLogConfigs(Iterable<? extends AuditLogConfig> values)
public AuditConfig.Builder addAllAuditLogConfigs(Iterable<? extends AuditLogConfig> values)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
Parameter |
Name |
Description |
values |
Iterable<? extends com.google.iam.v1.AuditLogConfig>
|
addAuditLogConfigs(AuditLogConfig value)
public AuditConfig.Builder addAuditLogConfigs(AuditLogConfig value)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
addAuditLogConfigs(AuditLogConfig.Builder builderForValue)
public AuditConfig.Builder addAuditLogConfigs(AuditLogConfig.Builder builderForValue)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
addAuditLogConfigs(int index, AuditLogConfig value)
public AuditConfig.Builder addAuditLogConfigs(int index, AuditLogConfig value)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
addAuditLogConfigs(int index, AuditLogConfig.Builder builderForValue)
public AuditConfig.Builder addAuditLogConfigs(int index, AuditLogConfig.Builder builderForValue)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
addAuditLogConfigsBuilder()
public AuditLogConfig.Builder addAuditLogConfigsBuilder()
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
addAuditLogConfigsBuilder(int index)
public AuditLogConfig.Builder addAuditLogConfigsBuilder(int index)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
Parameter |
Name |
Description |
index |
int
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public AuditConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public AuditConfig build()
buildPartial()
public AuditConfig buildPartial()
clear()
public AuditConfig.Builder clear()
Overrides
clearAuditLogConfigs()
public AuditConfig.Builder clearAuditLogConfigs()
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
clearField(Descriptors.FieldDescriptor field)
public AuditConfig.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public AuditConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearService()
public AuditConfig.Builder clearService()
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;
clone()
public AuditConfig.Builder clone()
Overrides
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;
Parameter |
Name |
Description |
index |
int
|
getAuditLogConfigsBuilder(int index)
public AuditLogConfig.Builder getAuditLogConfigsBuilder(int index)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
Parameter |
Name |
Description |
index |
int
|
getAuditLogConfigsBuilderList()
public List<AuditLogConfig.Builder> getAuditLogConfigsBuilderList()
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
getAuditLogConfigsCount()
public int getAuditLogConfigsCount()
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
Returns |
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;
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;
Parameter |
Name |
Description |
index |
int
|
getAuditLogConfigsOrBuilderList()
public List<? extends AuditLogConfigOrBuilder> getAuditLogConfigsOrBuilderList()
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
Returns |
Type |
Description |
List<? extends com.google.iam.v1.AuditLogConfigOrBuilder> |
|
getDefaultInstanceForType()
public AuditConfig getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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.
string service = 1;
Returns |
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;
Returns |
Type |
Description |
ByteString |
The bytes for service.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(AuditConfig other)
public AuditConfig.Builder mergeFrom(AuditConfig other)
public AuditConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public AuditConfig.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final AuditConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
removeAuditLogConfigs(int index)
public AuditConfig.Builder removeAuditLogConfigs(int index)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
Parameter |
Name |
Description |
index |
int
|
setAuditLogConfigs(int index, AuditLogConfig value)
public AuditConfig.Builder setAuditLogConfigs(int index, AuditLogConfig value)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
setAuditLogConfigs(int index, AuditLogConfig.Builder builderForValue)
public AuditConfig.Builder setAuditLogConfigs(int index, AuditLogConfig.Builder builderForValue)
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
setField(Descriptors.FieldDescriptor field, Object value)
public AuditConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public AuditConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setService(String value)
public AuditConfig.Builder setService(String value)
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;
Parameter |
Name |
Description |
value |
String
The service to set.
|
setServiceBytes(ByteString value)
public AuditConfig.Builder setServiceBytes(ByteString value)
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;
Parameter |
Name |
Description |
value |
ByteString
The bytes for service to set.
|
setUnknownFields(UnknownFieldSet unknownFields)
public final AuditConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides