pub struct ConfigServiceV2 { /* private fields */ }Expand description
Implements a client for the Cloud Logging API.
§Example
let client = ConfigServiceV2::builder().build().await?;
// use `client` to make requests to the Cloud Logging API.§Service Description
Service for configuring sinks used to route log entries.
§Configuration
To configure ConfigServiceV2 use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://logging.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
ConfigServiceV2 holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap ConfigServiceV2 in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl ConfigServiceV2
impl ConfigServiceV2
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for ConfigServiceV2.
let client = ConfigServiceV2::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: ConfigServiceV2 + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: ConfigServiceV2 + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn list_buckets(&self) -> ListBuckets
pub fn list_buckets(&self) -> ListBuckets
Lists log buckets.
Sourcepub fn get_bucket(&self) -> GetBucket
pub fn get_bucket(&self) -> GetBucket
Gets a log bucket.
Sourcepub fn create_bucket_async(&self) -> CreateBucketAsync
pub fn create_bucket_async(&self) -> CreateBucketAsync
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.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn update_bucket_async(&self) -> UpdateBucketAsync
pub fn update_bucket_async(&self) -> UpdateBucketAsync
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.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn create_bucket(&self) -> CreateBucket
pub fn create_bucket(&self) -> CreateBucket
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.
Sourcepub fn update_bucket(&self) -> UpdateBucket
pub fn update_bucket(&self) -> UpdateBucket
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.
Sourcepub fn delete_bucket(&self) -> DeleteBucket
pub fn delete_bucket(&self) -> DeleteBucket
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.
Sourcepub fn undelete_bucket(&self) -> UndeleteBucket
pub fn undelete_bucket(&self) -> UndeleteBucket
Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.
Sourcepub fn list_views(&self) -> ListViews
pub fn list_views(&self) -> ListViews
Lists views on a log bucket.
Sourcepub fn create_view(&self) -> CreateView
pub fn create_view(&self) -> CreateView
Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.
Sourcepub fn update_view(&self) -> UpdateView
pub fn update_view(&self) -> UpdateView
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.
Sourcepub fn delete_view(&self) -> DeleteView
pub fn delete_view(&self) -> DeleteView
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.
Sourcepub fn list_sinks(&self) -> ListSinks
pub fn list_sinks(&self) -> ListSinks
Lists sinks.
Sourcepub fn create_sink(&self) -> CreateSink
pub fn create_sink(&self) -> CreateSink
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.
Sourcepub fn update_sink(&self) -> UpdateSink
pub fn update_sink(&self) -> UpdateSink
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.
Sourcepub fn delete_sink(&self) -> DeleteSink
pub fn delete_sink(&self) -> DeleteSink
Deletes a sink. If the sink has a unique writer_identity, then that
service account is also deleted.
Sourcepub fn create_link(&self) -> CreateLink
pub fn create_link(&self) -> CreateLink
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.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn delete_link(&self) -> DeleteLink
pub fn delete_link(&self) -> DeleteLink
Deletes a link. This will also delete the corresponding BigQuery linked dataset.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_links(&self) -> ListLinks
pub fn list_links(&self) -> ListLinks
Lists links.
Sourcepub fn list_exclusions(&self) -> ListExclusions
pub fn list_exclusions(&self) -> ListExclusions
Lists all the exclusions on the _Default sink in a parent resource.
Sourcepub fn get_exclusion(&self) -> GetExclusion
pub fn get_exclusion(&self) -> GetExclusion
Gets the description of an exclusion in the _Default sink.
Sourcepub fn create_exclusion(&self) -> CreateExclusion
pub fn create_exclusion(&self) -> CreateExclusion
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.
Sourcepub fn update_exclusion(&self) -> UpdateExclusion
pub fn update_exclusion(&self) -> UpdateExclusion
Changes one or more properties of an existing exclusion in the _Default sink.
Sourcepub fn delete_exclusion(&self) -> DeleteExclusion
pub fn delete_exclusion(&self) -> DeleteExclusion
Deletes an exclusion in the _Default sink.
Sourcepub fn get_cmek_settings(&self) -> GetCmekSettings
pub fn get_cmek_settings(&self) -> GetCmekSettings
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.
Sourcepub fn update_cmek_settings(&self) -> UpdateCmekSettings
pub fn update_cmek_settings(&self) -> UpdateCmekSettings
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.
Sourcepub fn get_settings(&self) -> GetSettings
pub fn get_settings(&self) -> GetSettings
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.
Sourcepub fn update_settings(&self) -> UpdateSettings
pub fn update_settings(&self) -> UpdateSettings
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.
Sourcepub fn copy_log_entries(&self) -> CopyLogEntries
pub fn copy_log_entries(&self) -> CopyLogEntries
Copies a set of log entries from a log bucket to a Cloud Storage bucket.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for ConfigServiceV2
impl Clone for ConfigServiceV2
Source§fn clone(&self) -> ConfigServiceV2
fn clone(&self) -> ConfigServiceV2
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more