pub struct BigQueryExportService { /* private fields */ }Expand description
Implements a client for the Chronicle API.
§Example
async fn sample(
project_id: &str,
location_id: &str,
instance_id: &str,
) -> anyhow::Result<()> {
let client = BigQueryExportService::builder().build().await?;
let response = client.get_big_query_export()
.set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/bigQueryExport"))
.send().await?;
println!("response {:?}", response);
Ok(())
}§Service Description
Service for managing BigQuery export configurations for Chronicle instances.
§Configuration
To configure BigQueryExportService 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://chronicle.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured with Private Google Access with VPC Service Controls) may want to 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
BigQueryExportService holds a connection pool internally, it is advised to
create one and reuse it. You do not need to wrap BigQueryExportService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl BigQueryExportService
impl BigQueryExportService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for BigQueryExportService.
let client = BigQueryExportService::builder().build().await?;Sourcepub fn from_stub<T>(stub: impl Into<Arc<T>>) -> Selfwhere
T: BigQueryExportService + 'static,
pub fn from_stub<T>(stub: impl Into<Arc<T>>) -> Selfwhere
T: BigQueryExportService + '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 get_big_query_export(&self) -> GetBigQueryExport
pub fn get_big_query_export(&self) -> GetBigQueryExport
Get the BigQuery export configuration for a Chronicle instance.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &BigQueryExportService, project_id: &str, location_id: &str, instance_id: &str
) -> Result<()> {
let response = client.get_big_query_export()
.set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/bigQueryExport"))
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn update_big_query_export(&self) -> UpdateBigQueryExport
pub fn update_big_query_export(&self) -> UpdateBigQueryExport
Update the BigQuery export configuration for a Chronicle instance.
§Example
use google_cloud_wkt::FieldMask;
use google_cloud_chronicle_v1::model::BigQueryExport;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &BigQueryExportService, project_id: &str, location_id: &str, instance_id: &str
) -> Result<()> {
let response = client.update_big_query_export()
.set_big_query_export(
BigQueryExport::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/bigQueryExport"))/* set fields */
)
.set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn provision_big_query_export(&self) -> ProvisionBigQueryExport
pub fn provision_big_query_export(&self) -> ProvisionBigQueryExport
Provision the BigQuery export for a Chronicle instance. This will create {{gcp_name}} resources like {{storage_name}} buckets, BigQuery datasets and set default export settings for each data source.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &BigQueryExportService
) -> Result<()> {
let response = client.provision_big_query_export()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &BigQueryExportService
) -> Result<()> {
let mut list = client.list_operations()
/* set fields */
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &BigQueryExportService
) -> Result<()> {
let response = client.get_operation()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn delete_operation(&self) -> DeleteOperation
pub fn delete_operation(&self) -> DeleteOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &BigQueryExportService
) -> Result<()> {
client.delete_operation()
/* set fields */
.send().await?;
Ok(())
}Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &BigQueryExportService
) -> Result<()> {
client.cancel_operation()
/* set fields */
.send().await?;
Ok(())
}Trait Implementations§
Source§impl Clone for BigQueryExportService
impl Clone for BigQueryExportService
Source§fn clone(&self) -> BigQueryExportService
fn clone(&self) -> BigQueryExportService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more