Package com.google.iam.v1
Class AuditConfig.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<AuditConfig,AuditConfig.Builder>
com.google.iam.v1.AuditConfig.Builder
- All Implemented Interfaces:
AuditConfigOrBuilder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,Cloneable
- Enclosing class:
- AuditConfig
public static final class AuditConfig.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<AuditConfig,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-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllAuditLogConfigs(Iterable<? extends AuditLogConfig> values) The configuration for logging of each type of permission.addAuditLogConfigs(int index, AuditLogConfig value) The configuration for logging of each type of permission.addAuditLogConfigs(int index, AuditLogConfig.Builder builderForValue) The configuration for logging of each type of permission.addAuditLogConfigs(AuditLogConfig value) The configuration for logging of each type of permission.addAuditLogConfigs(AuditLogConfig.Builder builderForValue) The configuration for logging of each type of permission.The configuration for logging of each type of permission.Specifies a service that will be enabled for audit logging.getAuditLogConfigs(int index) The configuration for logging of each type of permission.intThe configuration for logging of each type of permission.The configuration for logging of each type of permission.Specifies a service that will be enabled for audit logging.com.google.protobuf.ByteStringSpecifies a service that will be enabled for audit logging.removeAuditLogConfigs(int index) The configuration for logging of each type of permission.setAuditLogConfigs(int index, AuditLogConfig value) The configuration for logging of each type of permission.setAuditLogConfigs(int index, AuditLogConfig.Builder builderForValue) The configuration for logging of each type of permission.setService(String value) Specifies a service that will be enabled for audit logging.setServiceBytes(com.google.protobuf.ByteString value) Specifies a service that will be enabled for audit logging.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
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 [json_name = "service"];- Specified by:
getServicein interfaceAuditConfigOrBuilder- Returns:
- The service.
-
getServiceBytes
public com.google.protobuf.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 [json_name = "service"];- Specified by:
getServiceBytesin interfaceAuditConfigOrBuilder- Returns:
- The bytes for service.
-
setService
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 [json_name = "service"];- Parameters:
value- The service to set.- Returns:
- This builder for chaining.
-
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 [json_name = "service"];- Returns:
- This builder for chaining.
-
setServiceBytes
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 [json_name = "service"];- Parameters:
value- The bytes for service to set.- Returns:
- This builder for chaining.
-
getAuditLogConfigsList
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"];- Specified by:
getAuditLogConfigsListin interfaceAuditConfigOrBuilder
-
getAuditLogConfigsCount
public int getAuditLogConfigsCount()The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"];- Specified by:
getAuditLogConfigsCountin interfaceAuditConfigOrBuilder
-
getAuditLogConfigs
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"];- Specified by:
getAuditLogConfigsin interfaceAuditConfigOrBuilder
-
setAuditLogConfigs
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"]; -
setAuditLogConfigs
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"]; -
addAuditLogConfigs
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"]; -
addAuditLogConfigs
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"]; -
addAuditLogConfigs
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"]; -
addAuditLogConfigs
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"]; -
addAllAuditLogConfigs
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"]; -
clearAuditLogConfigs
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"]; -
removeAuditLogConfigs
The configuration for logging of each type of permission.
repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3 [json_name = "auditLogConfigs"];
-