Class ConfigServiceV2Client (2.15.1)

Service for configuring sinks used to route log entries.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

ConfigServiceV2Client(ConfigServiceV2Client const &)

Copy and move support

Parameter
Name Description
ConfigServiceV2Client const &

ConfigServiceV2Client(ConfigServiceV2Client &&)

Copy and move support

Parameter
Name Description
ConfigServiceV2Client &&

ConfigServiceV2Client(std::shared_ptr< ConfigServiceV2Connection >, Options)

Parameters
Name Description
connection std::shared_ptr< ConfigServiceV2Connection >
opts Options

Operators

operator=(ConfigServiceV2Client const &)

Copy and move support

Parameter
Name Description
ConfigServiceV2Client const &
Returns
Type Description
ConfigServiceV2Client &

operator=(ConfigServiceV2Client &&)

Copy and move support

Parameter
Name Description
ConfigServiceV2Client &&
Returns
Type Description
ConfigServiceV2Client &

Functions

ListBuckets(std::string const &, Options)

Lists log buckets.

Parameters
Name Description
parent std::string const &

Required. The parent resource whose buckets are to be listed:
"projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
Note: The locations portion of the resource must be specified, but supplying the character - in place of [LOCATION_ID] will return all buckets.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::logging::v2::LogBucket >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.logging.v2.LogBucket, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListBuckets(google::logging::v2::ListBucketsRequest, Options)

Lists log buckets.

Parameters
Name Description
request google::logging::v2::ListBucketsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.ListBucketsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::logging::v2::LogBucket >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.logging.v2.LogBucket, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetBucket(google::logging::v2::GetBucketRequest const &, Options)

Gets a log bucket.

Parameters
Name Description
request google::logging::v2::GetBucketRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.GetBucketRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogBucket >

the result of the RPC. The response message type (google.logging.v2.LogBucket) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateBucketAsync(google::logging::v2::CreateBucketRequest const &, Options)

Creates a log bucket asynchronously that can be used to store log entries.

After a bucket has been created, the bucket's location cannot be changed.

Parameters
Name Description
request google::logging::v2::CreateBucketRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.CreateBucketRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::logging::v2::LogBucket > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.logging.v2.LogBucket proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UpdateBucketAsync(google::logging::v2::UpdateBucketRequest const &, Options)

Updates a log bucket asynchronously.

If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.

After a bucket has been created, the bucket's location cannot be changed.

Parameters
Name Description
request google::logging::v2::UpdateBucketRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.UpdateBucketRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::logging::v2::LogBucket > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.logging.v2.LogBucket proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateBucket(google::logging::v2::CreateBucketRequest const &, Options)

Creates a log bucket that can be used to store log entries.

After a bucket has been created, the bucket's location cannot be changed.

Parameters
Name Description
request google::logging::v2::CreateBucketRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.CreateBucketRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogBucket >

the result of the RPC. The response message type (google.logging.v2.LogBucket) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateBucket(google::logging::v2::UpdateBucketRequest const &, Options)

Updates a log bucket.

If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.

After a bucket has been created, the bucket's location cannot be changed.

Parameters
Name Description
request google::logging::v2::UpdateBucketRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.UpdateBucketRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogBucket >

the result of the RPC. The response message type (google.logging.v2.LogBucket) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteBucket(google::logging::v2::DeleteBucketRequest const &, Options)

Deletes a log bucket.

Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.

Parameters
Name Description
request google::logging::v2::DeleteBucketRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.DeleteBucketRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

UndeleteBucket(google::logging::v2::UndeleteBucketRequest const &, Options)

Undeletes a log bucket.

A bucket that has been deleted can be undeleted within the grace period of 7 days.

Parameters
Name Description
request google::logging::v2::UndeleteBucketRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.UndeleteBucketRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

ListViews(std::string const &, Options)

Lists views on a log bucket.

Parameters
Name Description
parent std::string const &

Required. The bucket whose views are to be listed:
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::logging::v2::LogView >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.logging.v2.LogView, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListViews(google::logging::v2::ListViewsRequest, Options)

Lists views on a log bucket.

Parameters
Name Description
request google::logging::v2::ListViewsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.ListViewsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::logging::v2::LogView >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.logging.v2.LogView, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetView(google::logging::v2::GetViewRequest const &, Options)

Gets a view on a log bucket.

Parameters
Name Description
request google::logging::v2::GetViewRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.GetViewRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogView >

the result of the RPC. The response message type (google.logging.v2.LogView) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateView(google::logging::v2::CreateViewRequest const &, Options)

Creates a view over log entries in a log bucket.

A bucket may contain a maximum of 30 views.

Parameters
Name Description
request google::logging::v2::CreateViewRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.CreateViewRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogView >

the result of the RPC. The response message type (google.logging.v2.LogView) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateView(google::logging::v2::UpdateViewRequest const &, Options)

Updates a view on a log bucket.

This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes.

Parameters
Name Description
request google::logging::v2::UpdateViewRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.UpdateViewRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogView >

the result of the RPC. The response message type (google.logging.v2.LogView) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteView(google::logging::v2::DeleteViewRequest const &, Options)

Deletes a view on a log bucket.

If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes.

Parameters
Name Description
request google::logging::v2::DeleteViewRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.DeleteViewRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

ListSinks(std::string const &, Options)

Lists sinks.

Parameters
Name Description
parent std::string const &

Required. The parent resource whose sinks are to be listed:
"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::logging::v2::LogSink >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.logging.v2.LogSink, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListSinks(google::logging::v2::ListSinksRequest, Options)

Lists sinks.

Parameters
Name Description
request google::logging::v2::ListSinksRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.ListSinksRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::logging::v2::LogSink >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.logging.v2.LogSink, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetSink(std::string const &, Options)

Gets a sink.

Parameters
Name Description
sink_name std::string const &

Required. The resource name of the sink:
"projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]"
For example:
"projects/my-project/sinks/my-sink"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogSink >

the result of the RPC. The response message type (google.logging.v2.LogSink) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetSink(google::logging::v2::GetSinkRequest const &, Options)

Gets a sink.

Parameters
Name Description
request google::logging::v2::GetSinkRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.GetSinkRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogSink >

the result of the RPC. The response message type (google.logging.v2.LogSink) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateSink(std::string const &, google::logging::v2::LogSink const &, Options)

Creates a sink that exports specified log entries to a destination.

The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.

Parameters
Name Description
parent std::string const &

Required. The resource in which to create the sink:
"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
For examples:
"projects/my-project"``"organizations/123456789"

sink google::logging::v2::LogSink const &

Required. The new sink, whose name parameter is a sink identifier that is not already in use.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogSink >

the result of the RPC. The response message type (google.logging.v2.LogSink) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateSink(google::logging::v2::CreateSinkRequest const &, Options)

Creates a sink that exports specified log entries to a destination.

The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.

Parameters
Name Description
request google::logging::v2::CreateSinkRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.CreateSinkRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogSink >

the result of the RPC. The response message type (google.logging.v2.LogSink) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateSink(std::string const &, google::logging::v2::LogSink const &, google::protobuf::FieldMask const &, Options)

Updates a sink.

This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.

The updated sink might also have a new writer_identity; see the unique_writer_identity field.

Parameters
Name Description
sink_name std::string const &

Required. The full resource name of the sink to update, including the parent resource and the sink identifier:
"projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]"
For example:
"projects/my-project/sinks/my-sink"

sink google::logging::v2::LogSink const &

Required. The updated sink, whose name is the same identifier that appears as part of sink_name.

update_mask google::protobuf::FieldMask const &

Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.
An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:
destination,filter,includeChildren
At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.
For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
For example: updateMask=filter

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogSink >

the result of the RPC. The response message type (google.logging.v2.LogSink) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateSink(std::string const &, google::logging::v2::LogSink const &, Options)

Updates a sink.

This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.

The updated sink might also have a new writer_identity; see the unique_writer_identity field.

Parameters
Name Description
sink_name std::string const &

Required. The full resource name of the sink to update, including the parent resource and the sink identifier:
"projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]"
For example:
"projects/my-project/sinks/my-sink"

sink google::logging::v2::LogSink const &

Required. The updated sink, whose name is the same identifier that appears as part of sink_name.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogSink >

the result of the RPC. The response message type (google.logging.v2.LogSink) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateSink(google::logging::v2::UpdateSinkRequest const &, Options)

Updates a sink.

This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.

The updated sink might also have a new writer_identity; see the unique_writer_identity field.

Parameters
Name Description
request google::logging::v2::UpdateSinkRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.UpdateSinkRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogSink >

the result of the RPC. The response message type (google.logging.v2.LogSink) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteSink(std::string const &, Options)

Deletes a sink.

If the sink has a unique writer_identity, then that service account is also deleted.

Parameters
Name Description
sink_name std::string const &

Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:
"projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]"
For example:
"projects/my-project/sinks/my-sink"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteSink(google::logging::v2::DeleteSinkRequest const &, Options)

Deletes a sink.

If the sink has a unique writer_identity, then that service account is also deleted.

Parameters
Name Description
request google::logging::v2::DeleteSinkRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.DeleteSinkRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

CreateLink(std::string const &, google::logging::v2::Link const &, std::string const &, Options)

Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket.

A log bucket may currently only contain one link.

Parameters
Name Description
parent std::string const &

Required. The full resource name of the bucket to create a link for.
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"

link google::logging::v2::Link const &

Required. The new link.

link_id std::string const &

Required. The ID to use for the link. The link_id can have up to 100 characters. A valid link_id must only have alphanumeric characters and underscores within it.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::logging::v2::Link > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.logging.v2.Link proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateLink(google::logging::v2::CreateLinkRequest const &, Options)

Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket.

A log bucket may currently only contain one link.

Parameters
Name Description
request google::logging::v2::CreateLinkRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.CreateLinkRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::logging::v2::Link > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.logging.v2.Link proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteLink(std::string const &, Options)

Deletes a link.

This will also delete the corresponding BigQuery linked dataset.

Parameters
Name Description
name std::string const &

Required. The full resource name of the link to delete.
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::logging::v2::LinkMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.logging.v2.LinkMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteLink(google::logging::v2::DeleteLinkRequest const &, Options)

Deletes a link.

This will also delete the corresponding BigQuery linked dataset.

Parameters
Name Description
request google::logging::v2::DeleteLinkRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.DeleteLinkRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::logging::v2::LinkMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.logging.v2.LinkMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ListLinks(std::string const &, Options)

Lists links.

Parameters
Name Description
parent std::string const &

Required. The parent resource whose links are to be listed:
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::logging::v2::Link >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.logging.v2.Link, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListLinks(google::logging::v2::ListLinksRequest, Options)

Lists links.

Parameters
Name Description
request google::logging::v2::ListLinksRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.ListLinksRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::logging::v2::Link >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.logging.v2.Link, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetLink(std::string const &, Options)

Gets a link.

Parameters
Name Description
name std::string const &

Required. The resource name of the link:
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::Link >

the result of the RPC. The response message type (google.logging.v2.Link) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetLink(google::logging::v2::GetLinkRequest const &, Options)

Gets a link.

Parameters
Name Description
request google::logging::v2::GetLinkRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.GetLinkRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::Link >

the result of the RPC. The response message type (google.logging.v2.Link) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListExclusions(std::string const &, Options)

Lists all the exclusions on the _Default sink in a parent resource.

Parameters
Name Description
parent std::string const &

Required. The parent resource whose exclusions are to be listed.
"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::logging::v2::LogExclusion >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.logging.v2.LogExclusion, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListExclusions(google::logging::v2::ListExclusionsRequest, Options)

Lists all the exclusions on the _Default sink in a parent resource.

Parameters
Name Description
request google::logging::v2::ListExclusionsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.ListExclusionsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::logging::v2::LogExclusion >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.logging.v2.LogExclusion, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetExclusion(std::string const &, Options)

Gets the description of an exclusion in the _Default sink.

Parameters
Name Description
name std::string const &

Required. The resource name of an existing exclusion:
"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
For example:
"projects/my-project/exclusions/my-exclusion"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogExclusion >

the result of the RPC. The response message type (google.logging.v2.LogExclusion) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetExclusion(google::logging::v2::GetExclusionRequest const &, Options)

Gets the description of an exclusion in the _Default sink.

Parameters
Name Description
request google::logging::v2::GetExclusionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.GetExclusionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogExclusion >

the result of the RPC. The response message type (google.logging.v2.LogExclusion) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateExclusion(std::string const &, google::logging::v2::LogExclusion const &, Options)

Creates a new exclusion in the _Default sink in a specified parent resource.

Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.

Parameters
Name Description
parent std::string const &

Required. The parent resource in which to create the exclusion:
"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
For examples:
"projects/my-logging-project"``"organizations/123456789"

exclusion google::logging::v2::LogExclusion const &

Required. The new exclusion, whose name parameter is an exclusion name that is not already used in the parent resource.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogExclusion >

the result of the RPC. The response message type (google.logging.v2.LogExclusion) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateExclusion(google::logging::v2::CreateExclusionRequest const &, Options)

Creates a new exclusion in the _Default sink in a specified parent resource.

Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.

Parameters
Name Description
request google::logging::v2::CreateExclusionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.CreateExclusionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogExclusion >

the result of the RPC. The response message type (google.logging.v2.LogExclusion) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateExclusion(std::string const &, google::logging::v2::LogExclusion const &, google::protobuf::FieldMask const &, Options)

Changes one or more properties of an existing exclusion in the _Default sink.

Parameters
Name Description
name std::string const &

Required. The resource name of the exclusion to update:
"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
For example:
"projects/my-project/exclusions/my-exclusion"

exclusion google::logging::v2::LogExclusion const &

Required. New values for the existing exclusion. Only the fields specified in update_mask are relevant.

update_mask google::protobuf::FieldMask const &

Required. A non-empty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.
For example, to change the filter and description of an exclusion, specify an update_mask of "filter,description".

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogExclusion >

the result of the RPC. The response message type (google.logging.v2.LogExclusion) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateExclusion(google::logging::v2::UpdateExclusionRequest const &, Options)

Changes one or more properties of an existing exclusion in the _Default sink.

Parameters
Name Description
request google::logging::v2::UpdateExclusionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.UpdateExclusionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::LogExclusion >

the result of the RPC. The response message type (google.logging.v2.LogExclusion) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteExclusion(std::string const &, Options)

Deletes an exclusion in the _Default sink.

Parameters
Name Description
name std::string const &

Required. The resource name of an existing exclusion to delete:
"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
For example:
"projects/my-project/exclusions/my-exclusion"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteExclusion(google::logging::v2::DeleteExclusionRequest const &, Options)

Deletes an exclusion in the _Default sink.

Parameters
Name Description
request google::logging::v2::DeleteExclusionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.DeleteExclusionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

GetCmekSettings(google::logging::v2::GetCmekSettingsRequest const &, Options)

Gets the Logging CMEK settings for the given resource.

Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.

See Enabling CMEK for Log Router for more information.

Parameters
Name Description
request google::logging::v2::GetCmekSettingsRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.GetCmekSettingsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::CmekSettings >

the result of the RPC. The response message type (google.logging.v2.CmekSettings) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateCmekSettings(google::logging::v2::UpdateCmekSettingsRequest const &, Options)

Updates the Log Router CMEK settings for the given resource.

Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.

UpdateCmekSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled.

See Enabling CMEK for Log Router for more information.

Parameters
Name Description
request google::logging::v2::UpdateCmekSettingsRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.UpdateCmekSettingsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::CmekSettings >

the result of the RPC. The response message type (google.logging.v2.CmekSettings) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetSettings(std::string const &, Options)

Gets the Log Router settings for the given resource.

Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.

See Enabling CMEK for Log Router for more information.

Parameters
Name Description
name std::string const &

Required. The resource for which to retrieve settings.
"projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings"
For example:
"organizations/12345/settings"
Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::Settings >

the result of the RPC. The response message type (google.logging.v2.Settings) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetSettings(google::logging::v2::GetSettingsRequest const &, Options)

Gets the Log Router settings for the given resource.

Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.

See Enabling CMEK for Log Router for more information.

Parameters
Name Description
request google::logging::v2::GetSettingsRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.GetSettingsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::Settings >

the result of the RPC. The response message type (google.logging.v2.Settings) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateSettings(google::logging::v2::Settings const &, google::protobuf::FieldMask const &, Options)

Updates the Log Router settings for the given resource.

Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.

UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled. 4) location_id is not supported by Logging. 5) location_id violate OrgPolicy.

See Enabling CMEK for Log Router for more information.

Parameters
Name Description
settings google::logging::v2::Settings const &

Required. The settings to update.
See Enabling CMEK for Log Router for more information.

update_mask google::protobuf::FieldMask const &

Optional. Field mask identifying which fields from settings should be updated. A field will be overwritten if and only if it is in the update mask. Output only fields cannot be updated.
See [FieldMask][google.protobuf.FieldMask] for more information.
For example: "updateMask=kmsKeyName"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::Settings >

the result of the RPC. The response message type (google.logging.v2.Settings) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateSettings(google::logging::v2::UpdateSettingsRequest const &, Options)

Updates the Log Router settings for the given resource.

Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.

UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled. 4) location_id is not supported by Logging. 5) location_id violate OrgPolicy.

See Enabling CMEK for Log Router for more information.

Parameters
Name Description
request google::logging::v2::UpdateSettingsRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.UpdateSettingsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::logging::v2::Settings >

the result of the RPC. The response message type (google.logging.v2.Settings) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CopyLogEntries(google::logging::v2::CopyLogEntriesRequest const &, Options)

Copies a set of log entries from a log bucket to a Cloud Storage bucket.

Parameters
Name Description
request google::logging::v2::CopyLogEntriesRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.logging.v2.CopyLogEntriesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::logging::v2::CopyLogEntriesResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.logging.v2.CopyLogEntriesResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.