Common Protos for Google Cloud APIs Client - Class AuditLog (0.4.2)

Reference documentation and code samples for the Common Protos for Google Cloud APIs Client class AuditLog.

Common audit log format for Google Cloud Platform API operations.

Generated from protobuf message google.cloud.audit.AuditLog

Namespace

Google \ Cloud \ Audit

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ service_name string

The name of the API service performing the operation. For example, "compute.googleapis.com".

↳ 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.cloud.bigquery.v2.TableService.InsertTable" "google.logging.v2.ConfigServiceV2.CreateSink"

↳ 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: "projects/PROJECT_ID/zones/us-central1-a/instances" "projects/PROJECT_ID/datasets/DATASET_ID"

↳ resource_location Google\Cloud\Audit\ResourceLocation

The resource location information.

↳ resource_original_state Google\Protobuf\Struct

The resource's original state before mutation. Present only for operations which have successfully modified the targeted resource(s). In general, this field should contain all changed fields, except those that are already been included in request, response, metadata or service_data fields. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

↳ num_response_items int|string

The number of items returned from a List or Query API method, if applicable.

↳ status Google\Rpc\Status

The status of the overall operation.

↳ authentication_info Google\Cloud\Audit\AuthenticationInfo

Authentication information.

↳ authorization_info array<Google\Cloud\Audit\AuthorizationInfo>

Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple.

↳ policy_violation_info Google\Cloud\Audit\PolicyViolationInfo

Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here.

↳ request_metadata Google\Cloud\Audit\RequestMetadata

Metadata about the operation.

↳ request Google\Protobuf\Struct

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.

↳ response Google\Protobuf\Struct

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.

↳ metadata Google\Protobuf\Struct

Other service-specific data about the request, response, and other information associated with the current audited event.

↳ service_data Google\Protobuf\Any

Deprecated. Use the metadata field instead. Other service-specific data about the request, response, and other activities.

getServiceName

The name of the API service performing the operation. For example, "compute.googleapis.com".

Returns
TypeDescription
string

setServiceName

The name of the API service performing the operation. For example, "compute.googleapis.com".

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMethodName

The name of the service method or operation.

For API calls, this should be the name of the API method. For example, "google.cloud.bigquery.v2.TableService.InsertTable" "google.logging.v2.ConfigServiceV2.CreateSink"

Returns
TypeDescription
string

setMethodName

The name of the service method or operation.

For API calls, this should be the name of the API method. For example, "google.cloud.bigquery.v2.TableService.InsertTable" "google.logging.v2.ConfigServiceV2.CreateSink"

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getResourceName

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: "projects/PROJECT_ID/zones/us-central1-a/instances" "projects/PROJECT_ID/datasets/DATASET_ID"

Returns
TypeDescription
string

setResourceName

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: "projects/PROJECT_ID/zones/us-central1-a/instances" "projects/PROJECT_ID/datasets/DATASET_ID"

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getResourceLocation

The resource location information.

Returns
TypeDescription
Google\Cloud\Audit\ResourceLocation|null

hasResourceLocation

clearResourceLocation

setResourceLocation

The resource location information.

Parameter
NameDescription
var Google\Cloud\Audit\ResourceLocation
Returns
TypeDescription
$this

getResourceOriginalState

The resource's original state before mutation. Present only for operations which have successfully modified the targeted resource(s).

In general, this field should contain all changed fields, except those that are already been included in request, response, metadata or service_data fields. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

Returns
TypeDescription
Google\Protobuf\Struct|null

hasResourceOriginalState

clearResourceOriginalState

setResourceOriginalState

The resource's original state before mutation. Present only for operations which have successfully modified the targeted resource(s).

In general, this field should contain all changed fields, except those that are already been included in request, response, metadata or service_data fields. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

Parameter
NameDescription
var Google\Protobuf\Struct
Returns
TypeDescription
$this

getNumResponseItems

The number of items returned from a List or Query API method, if applicable.

Returns
TypeDescription
int|string

setNumResponseItems

The number of items returned from a List or Query API method, if applicable.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getStatus

The status of the overall operation.

Returns
TypeDescription
Google\Rpc\Status|null

hasStatus

clearStatus

setStatus

The status of the overall operation.

Parameter
NameDescription
var Google\Rpc\Status
Returns
TypeDescription
$this

getAuthenticationInfo

Authentication information.

Returns
TypeDescription
Google\Cloud\Audit\AuthenticationInfo|null

hasAuthenticationInfo

clearAuthenticationInfo

setAuthenticationInfo

Authentication information.

Parameter
NameDescription
var Google\Cloud\Audit\AuthenticationInfo
Returns
TypeDescription
$this

getAuthorizationInfo

Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAuthorizationInfo

Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple.

Parameter
NameDescription
var array<Google\Cloud\Audit\AuthorizationInfo>
Returns
TypeDescription
$this

getPolicyViolationInfo

Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here.

Returns
TypeDescription
Google\Cloud\Audit\PolicyViolationInfo|null

hasPolicyViolationInfo

clearPolicyViolationInfo

setPolicyViolationInfo

Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here.

Parameter
NameDescription
var Google\Cloud\Audit\PolicyViolationInfo
Returns
TypeDescription
$this

getRequestMetadata

Metadata about the operation.

Returns
TypeDescription
Google\Cloud\Audit\RequestMetadata|null

hasRequestMetadata

clearRequestMetadata

setRequestMetadata

Metadata about the operation.

Parameter
NameDescription
var Google\Cloud\Audit\RequestMetadata
Returns
TypeDescription
$this

getRequest

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.

Returns
TypeDescription
Google\Protobuf\Struct|null

hasRequest

clearRequest

setRequest

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.

Parameter
NameDescription
var Google\Protobuf\Struct
Returns
TypeDescription
$this

getResponse

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.

Returns
TypeDescription
Google\Protobuf\Struct|null

hasResponse

clearResponse

setResponse

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.

Parameter
NameDescription
var Google\Protobuf\Struct
Returns
TypeDescription
$this

getMetadata

Other service-specific data about the request, response, and other information associated with the current audited event.

Returns
TypeDescription
Google\Protobuf\Struct|null

hasMetadata

clearMetadata

setMetadata

Other service-specific data about the request, response, and other information associated with the current audited event.

Parameter
NameDescription
var Google\Protobuf\Struct
Returns
TypeDescription
$this

getServiceData

Deprecated. Use the metadata field instead.

Other service-specific data about the request, response, and other activities.

Returns
TypeDescription
Google\Protobuf\Any|null

hasServiceData

clearServiceData

setServiceData

Deprecated. Use the metadata field instead.

Other service-specific data about the request, response, and other activities.

Parameter
NameDescription
var Google\Protobuf\Any
Returns
TypeDescription
$this