Class: Google::Apis::ServicecontrolV1::AuditLog
- Inherits:
-
Object
- Object
- Google::Apis::ServicecontrolV1::AuditLog
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/servicecontrol_v1/classes.rb,
generated/google/apis/servicecontrol_v1/representations.rb,
generated/google/apis/servicecontrol_v1/representations.rb
Overview
Common audit log format for Google Cloud Platform API operations.
Instance Attribute Summary collapse
-
#authentication_info ⇒ Google::Apis::ServicecontrolV1::AuthenticationInfo
Authentication information for the operation.
-
#authorization_info ⇒ Array<Google::Apis::ServicecontrolV1::AuthorizationInfo>
Authorization information.
-
#method_name ⇒ String
The name of the service method or operation.
-
#num_response_items ⇒ Fixnum
The number of items returned from a List or Query API method, if applicable.
-
#request ⇒ Hash<String,Object>
The operation request.
-
#request_metadata ⇒ Google::Apis::ServicecontrolV1::RequestMetadata
Metadata about the request.
-
#resource_name ⇒ String
The resource or collection that is the target of the operation.
-
#response ⇒ Hash<String,Object>
The operation response.
-
#service_data ⇒ Hash<String,Object>
Other service-specific data about the request, response, and other activities.
-
#service_name ⇒ String
The name of the API service performing the operation.
-
#status ⇒ Google::Apis::ServicecontrolV1::Status
The
Status
type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AuditLog
constructor
A new instance of AuditLog.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ AuditLog
Returns a new instance of AuditLog
230 231 232 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 230 def initialize(**args) update!(**args) end |
Instance Attribute Details
#authentication_info ⇒ Google::Apis::ServicecontrolV1::AuthenticationInfo
Authentication information for the operation.
Corresponds to the JSON property authenticationInfo
117 118 119 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 117 def authentication_info @authentication_info end |
#authorization_info ⇒ Array<Google::Apis::ServicecontrolV1::AuthorizationInfo>
Authorization information. If there are multiple
resources or permissions involved, then there is
one AuthorizationInfo element for each resource, permission
tuple.
Corresponds to the JSON property authorizationInfo
124 125 126 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 124 def @authorization_info end |
#method_name ⇒ String
The name of the service method or operation.
For API calls, this should be the name of the API method.
For example,
"google.datastore.v1.Datastore.RunQuery"
"google.logging.v1.LoggingService.DeleteLog"
Corresponds to the JSON property methodName
133 134 135 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 133 def method_name @method_name end |
#num_response_items ⇒ Fixnum
The number of items returned from a List or Query API method,
if applicable.
Corresponds to the JSON property numResponseItems
139 140 141 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 139 def num_response_items @num_response_items end |
#request ⇒ Hash<String,Object>
The operation request. This may not include all request parameters,
such as those that are too large, privacy-sensitive, or duplicated
elsewhere in the log record.
It should never include user-generated data, such as file contents.
When the JSON object represented here has a proto equivalent, the proto
name will be indicated in the @type
property.
Corresponds to the JSON property request
149 150 151 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 149 def request @request end |
#request_metadata ⇒ Google::Apis::ServicecontrolV1::RequestMetadata
Metadata about the request.
Corresponds to the JSON property requestMetadata
154 155 156 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 154 def @request_metadata end |
#resource_name ⇒ String
The resource or collection that is the target of the operation.
The name is a scheme-less URI, not including the API service name.
For example:
"shelves/SHELF_ID/books"
"shelves/SHELF_ID/books/BOOK_ID"
Corresponds to the JSON property resourceName
163 164 165 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 163 def resource_name @resource_name end |
#response ⇒ Hash<String,Object>
The operation response. This may not include all response elements,
such as those that are too large, privacy-sensitive, or duplicated
elsewhere in the log record.
It should never include user-generated data, such as file contents.
When the JSON object represented here has a proto equivalent, the proto
name will be indicated in the @type
property.
Corresponds to the JSON property response
173 174 175 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 173 def response @response end |
#service_data ⇒ Hash<String,Object>
Other service-specific data about the request, response, and other
activities.
Corresponds to the JSON property serviceData
179 180 181 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 179 def service_data @service_data end |
#service_name ⇒ String
The name of the API service performing the operation. For example,
"datastore.googleapis.com"
.
Corresponds to the JSON property serviceName
185 186 187 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 185 def service_name @service_name end |
#status ⇒ Google::Apis::ServicecontrolV1::Status
The Status
type defines a logical error model that is suitable for different
programming environments, including REST APIs and RPC APIs. It is used by
gRPC. The error model is designed to be:
- Simple to use and understand for most users
- Flexible enough to meet unexpected needs
# Overview
The
Status
message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the packagegoogle.rpc
that can be used for common error conditions. # Language mapping TheStatus
message is the logical representation of the error model, but it is not necessarily the actual wire format. When theStatus
message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and theStatus
message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client,
it may embed the
Status
in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may
have a
Status
message for error reporting. - Batch operations. If a client uses batch request and batch response, the
Status
message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation
results in its response, the status of those operations should be
represented directly using the
Status
message. - Logging. If some API errors are stored in logs, the message
Status
could be used directly after any stripping needed for security/privacy reasons. Corresponds to the JSON propertystatus
228 229 230 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 228 def status @status end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 235 def update!(**args) @authentication_info = args[:authentication_info] if args.key?(:authentication_info) @authorization_info = args[:authorization_info] if args.key?(:authorization_info) @method_name = args[:method_name] if args.key?(:method_name) @num_response_items = args[:num_response_items] if args.key?(:num_response_items) @request = args[:request] if args.key?(:request) @request_metadata = args[:request_metadata] if args.key?(:request_metadata) @resource_name = args[:resource_name] if args.key?(:resource_name) @response = args[:response] if args.key?(:response) @service_data = args[:service_data] if args.key?(:service_data) @service_name = args[:service_name] if args.key?(:service_name) @status = args[:status] if args.key?(:status) end |