pub struct DlpServiceClient<T> { /* private fields */ }
Expand description

The Cloud Data Loss Prevention (DLP) API is a service that allows clients to detect the presence of Personally Identifiable Information (PII) and other privacy-sensitive data in user-supplied, unstructured data streams, like text blocks or images. The service also includes methods for sensitive data redaction and scheduling of data scans on Google Cloud Platform based data sets.

To learn more about concepts and find how-to guides see https://cloud.google.com/sensitive-data-protection/docs/.

Implementations§

source§

impl<T> DlpServiceClient<T>
where T: GrpcService<BoxBody>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,

source

pub fn new(inner: T) -> Self

source

pub fn with_origin(inner: T, origin: Uri) -> Self

source

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> DlpServiceClient<InterceptedService<T, F>>
where F: Interceptor, T::ResponseBody: Default, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,

source

pub fn send_compressed(self, encoding: CompressionEncoding) -> Self

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

source

pub async fn inspect_content( &mut self, request: impl IntoRequest<InspectContentRequest>, ) -> Result<Response<InspectContentResponse>, Status>

Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size.

When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.

For how to guides, see https://cloud.google.com/sensitive-data-protection/docs/inspecting-images and https://cloud.google.com/sensitive-data-protection/docs/inspecting-text,

source

pub async fn redact_image( &mut self, request: impl IntoRequest<RedactImageRequest>, ) -> Result<Response<RedactImageResponse>, Status>

Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images to learn more.

When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.

source

pub async fn deidentify_content( &mut self, request: impl IntoRequest<DeidentifyContentRequest>, ) -> Result<Response<DeidentifyContentResponse>, Status>

De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data to learn more.

When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.

source

pub async fn reidentify_content( &mut self, request: impl IntoRequest<ReidentifyContentRequest>, ) -> Result<Response<ReidentifyContentResponse>, Status>

Re-identifies content that has been de-identified. See https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.

source

pub async fn list_info_types( &mut self, request: impl IntoRequest<ListInfoTypesRequest>, ) -> Result<Response<ListInfoTypesResponse>, Status>

Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.

source

pub async fn create_inspect_template( &mut self, request: impl IntoRequest<CreateInspectTemplateRequest>, ) -> Result<Response<InspectTemplate>, Status>

Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

source

pub async fn update_inspect_template( &mut self, request: impl IntoRequest<UpdateInspectTemplateRequest>, ) -> Result<Response<InspectTemplate>, Status>

Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

source

pub async fn get_inspect_template( &mut self, request: impl IntoRequest<GetInspectTemplateRequest>, ) -> Result<Response<InspectTemplate>, Status>

Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

source

pub async fn list_inspect_templates( &mut self, request: impl IntoRequest<ListInspectTemplatesRequest>, ) -> Result<Response<ListInspectTemplatesResponse>, Status>

Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

source

pub async fn delete_inspect_template( &mut self, request: impl IntoRequest<DeleteInspectTemplateRequest>, ) -> Result<Response<()>, Status>

Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

source

pub async fn create_deidentify_template( &mut self, request: impl IntoRequest<CreateDeidentifyTemplateRequest>, ) -> Result<Response<DeidentifyTemplate>, Status>

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.

source

pub async fn update_deidentify_template( &mut self, request: impl IntoRequest<UpdateDeidentifyTemplateRequest>, ) -> Result<Response<DeidentifyTemplate>, Status>

Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.

source

pub async fn get_deidentify_template( &mut self, request: impl IntoRequest<GetDeidentifyTemplateRequest>, ) -> Result<Response<DeidentifyTemplate>, Status>

Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.

source

pub async fn list_deidentify_templates( &mut self, request: impl IntoRequest<ListDeidentifyTemplatesRequest>, ) -> Result<Response<ListDeidentifyTemplatesResponse>, Status>

Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.

source

pub async fn delete_deidentify_template( &mut self, request: impl IntoRequest<DeleteDeidentifyTemplateRequest>, ) -> Result<Response<()>, Status>

Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.

source

pub async fn create_job_trigger( &mut self, request: impl IntoRequest<CreateJobTriggerRequest>, ) -> Result<Response<JobTrigger>, Status>

Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.

source

pub async fn update_job_trigger( &mut self, request: impl IntoRequest<UpdateJobTriggerRequest>, ) -> Result<Response<JobTrigger>, Status>

Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.

source

pub async fn hybrid_inspect_job_trigger( &mut self, request: impl IntoRequest<HybridInspectJobTriggerRequest>, ) -> Result<Response<HybridInspectResponse>, Status>

Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.

source

pub async fn get_job_trigger( &mut self, request: impl IntoRequest<GetJobTriggerRequest>, ) -> Result<Response<JobTrigger>, Status>

Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.

source

pub async fn list_job_triggers( &mut self, request: impl IntoRequest<ListJobTriggersRequest>, ) -> Result<Response<ListJobTriggersResponse>, Status>

Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.

source

pub async fn delete_job_trigger( &mut self, request: impl IntoRequest<DeleteJobTriggerRequest>, ) -> Result<Response<()>, Status>

Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.

source

pub async fn activate_job_trigger( &mut self, request: impl IntoRequest<ActivateJobTriggerRequest>, ) -> Result<Response<DlpJob>, Status>

Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.

source

pub async fn create_discovery_config( &mut self, request: impl IntoRequest<CreateDiscoveryConfigRequest>, ) -> Result<Response<DiscoveryConfig>, Status>

Creates a config for discovery to scan and profile storage.

source

pub async fn update_discovery_config( &mut self, request: impl IntoRequest<UpdateDiscoveryConfigRequest>, ) -> Result<Response<DiscoveryConfig>, Status>

Updates a discovery configuration.

source

pub async fn get_discovery_config( &mut self, request: impl IntoRequest<GetDiscoveryConfigRequest>, ) -> Result<Response<DiscoveryConfig>, Status>

Gets a discovery configuration.

source

pub async fn list_discovery_configs( &mut self, request: impl IntoRequest<ListDiscoveryConfigsRequest>, ) -> Result<Response<ListDiscoveryConfigsResponse>, Status>

Lists discovery configurations.

source

pub async fn delete_discovery_config( &mut self, request: impl IntoRequest<DeleteDiscoveryConfigRequest>, ) -> Result<Response<()>, Status>

Deletes a discovery configuration.

source

pub async fn create_dlp_job( &mut self, request: impl IntoRequest<CreateDlpJobRequest>, ) -> Result<Response<DlpJob>, Status>

Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.

source

pub async fn list_dlp_jobs( &mut self, request: impl IntoRequest<ListDlpJobsRequest>, ) -> Result<Response<ListDlpJobsResponse>, Status>

Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.

source

pub async fn get_dlp_job( &mut self, request: impl IntoRequest<GetDlpJobRequest>, ) -> Result<Response<DlpJob>, Status>

Gets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.

source

pub async fn delete_dlp_job( &mut self, request: impl IntoRequest<DeleteDlpJobRequest>, ) -> Result<Response<()>, Status>

Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.

source

pub async fn cancel_dlp_job( &mut self, request: impl IntoRequest<CancelDlpJobRequest>, ) -> Result<Response<()>, Status>

Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.

source

pub async fn create_stored_info_type( &mut self, request: impl IntoRequest<CreateStoredInfoTypeRequest>, ) -> Result<Response<StoredInfoType>, Status>

Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.

source

pub async fn update_stored_info_type( &mut self, request: impl IntoRequest<UpdateStoredInfoTypeRequest>, ) -> Result<Response<StoredInfoType>, Status>

Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.

source

pub async fn get_stored_info_type( &mut self, request: impl IntoRequest<GetStoredInfoTypeRequest>, ) -> Result<Response<StoredInfoType>, Status>

Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.

source

pub async fn list_stored_info_types( &mut self, request: impl IntoRequest<ListStoredInfoTypesRequest>, ) -> Result<Response<ListStoredInfoTypesResponse>, Status>

Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.

source

pub async fn delete_stored_info_type( &mut self, request: impl IntoRequest<DeleteStoredInfoTypeRequest>, ) -> Result<Response<()>, Status>

Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.

source

pub async fn list_project_data_profiles( &mut self, request: impl IntoRequest<ListProjectDataProfilesRequest>, ) -> Result<Response<ListProjectDataProfilesResponse>, Status>

Lists project data profiles for an organization.

source

pub async fn list_table_data_profiles( &mut self, request: impl IntoRequest<ListTableDataProfilesRequest>, ) -> Result<Response<ListTableDataProfilesResponse>, Status>

Lists table data profiles for an organization.

source

pub async fn list_column_data_profiles( &mut self, request: impl IntoRequest<ListColumnDataProfilesRequest>, ) -> Result<Response<ListColumnDataProfilesResponse>, Status>

Lists column data profiles for an organization.

source

pub async fn get_project_data_profile( &mut self, request: impl IntoRequest<GetProjectDataProfileRequest>, ) -> Result<Response<ProjectDataProfile>, Status>

Gets a project data profile.

source

pub async fn list_file_store_data_profiles( &mut self, request: impl IntoRequest<ListFileStoreDataProfilesRequest>, ) -> Result<Response<ListFileStoreDataProfilesResponse>, Status>

Lists file store data profiles for an organization.

source

pub async fn get_file_store_data_profile( &mut self, request: impl IntoRequest<GetFileStoreDataProfileRequest>, ) -> Result<Response<FileStoreDataProfile>, Status>

Gets a file store data profile.

source

pub async fn delete_file_store_data_profile( &mut self, request: impl IntoRequest<DeleteFileStoreDataProfileRequest>, ) -> Result<Response<()>, Status>

Delete a FileStoreDataProfile. Will not prevent the profile from being regenerated if the resource is still included in a discovery configuration.

source

pub async fn get_table_data_profile( &mut self, request: impl IntoRequest<GetTableDataProfileRequest>, ) -> Result<Response<TableDataProfile>, Status>

Gets a table data profile.

source

pub async fn get_column_data_profile( &mut self, request: impl IntoRequest<GetColumnDataProfileRequest>, ) -> Result<Response<ColumnDataProfile>, Status>

Gets a column data profile.

source

pub async fn delete_table_data_profile( &mut self, request: impl IntoRequest<DeleteTableDataProfileRequest>, ) -> Result<Response<()>, Status>

Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration.

source

pub async fn hybrid_inspect_dlp_job( &mut self, request: impl IntoRequest<HybridInspectDlpJobRequest>, ) -> Result<Response<HybridInspectResponse>, Status>

Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.

source

pub async fn finish_dlp_job( &mut self, request: impl IntoRequest<FinishDlpJobRequest>, ) -> Result<Response<()>, Status>

Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run.

source

pub async fn create_connection( &mut self, request: impl IntoRequest<CreateConnectionRequest>, ) -> Result<Response<Connection>, Status>

Create a Connection to an external data source.

source

pub async fn get_connection( &mut self, request: impl IntoRequest<GetConnectionRequest>, ) -> Result<Response<Connection>, Status>

Get a Connection by name.

source

pub async fn list_connections( &mut self, request: impl IntoRequest<ListConnectionsRequest>, ) -> Result<Response<ListConnectionsResponse>, Status>

Lists Connections in a parent. Use SearchConnections to see all connections within an organization.

source

pub async fn search_connections( &mut self, request: impl IntoRequest<SearchConnectionsRequest>, ) -> Result<Response<SearchConnectionsResponse>, Status>

Searches for Connections in a parent.

source

pub async fn delete_connection( &mut self, request: impl IntoRequest<DeleteConnectionRequest>, ) -> Result<Response<()>, Status>

Delete a Connection.

source

pub async fn update_connection( &mut self, request: impl IntoRequest<UpdateConnectionRequest>, ) -> Result<Response<Connection>, Status>

Update a Connection.

Trait Implementations§

source§

impl<T: Clone> Clone for DlpServiceClient<T>

source§

fn clone(&self) -> DlpServiceClient<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for DlpServiceClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for DlpServiceClient<T>

§

impl<T> RefUnwindSafe for DlpServiceClient<T>
where T: RefUnwindSafe,

§

impl<T> Send for DlpServiceClient<T>
where T: Send,

§

impl<T> Sync for DlpServiceClient<T>
where T: Sync,

§

impl<T> Unpin for DlpServiceClient<T>
where T: Unpin,

§

impl<T> UnwindSafe for DlpServiceClient<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more