Class: Google::Apis::CloudassetV1::AuditLogConfig

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudasset_v1/classes.rb,
lib/google/apis/cloudasset_v1/representations.rb,
lib/google/apis/cloudasset_v1/representations.rb

Overview

Provides the configuration for logging a type of permissions. Example: " audit_log_configs": [ "log_type": "DATA_READ", "exempted_members": [ "user: jose@example.com" ] , "log_type": "DATA_WRITE" ] This enables ' DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AuditLogConfig

Returns a new instance of AuditLogConfig.



638
639
640
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 638

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#exempted_membersArray<String>

Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. Corresponds to the JSON property exemptedMembers

Returns:

  • (Array<String>)


631
632
633
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 631

def exempted_members
  @exempted_members
end

#log_typeString

The log type that this config enables. Corresponds to the JSON property logType

Returns:

  • (String)


636
637
638
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 636

def log_type
  @log_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



643
644
645
646
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 643

def update!(**args)
  @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
  @log_type = args[:log_type] if args.key?(:log_type)
end