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

Data Catalog API service allows you to discover, understand, and manage your data.

Implementations§

source§

impl<T> DataCatalogClient<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, ) -> DataCatalogClient<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 search_catalog( &mut self, request: impl IntoRequest<SearchCatalogRequest>, ) -> Result<Response<SearchCatalogResponse>, Status>

Searches Data Catalog for multiple resources like entries and tags that match a query.

This is a [Custom Method] (https://cloud.google.com/apis/design/custom_methods) that doesn’t return all information on a resource, only its ID and high level fields. To get more information, you can subsequently call specific get methods.

Note: Data Catalog search queries don’t guarantee full recall. Results that match your query might not be returned, even in subsequent result pages. Additionally, returned (and not returned) results can vary if you repeat search queries.

For more information, see [Data Catalog search syntax] (https://cloud.google.com/data-catalog/docs/how-to/search-reference).

source

pub async fn create_entry_group( &mut self, request: impl IntoRequest<CreateEntryGroupRequest>, ) -> Result<Response<EntryGroup>, Status>

Creates an entry group.

An entry group contains logically related entries together with Cloud Identity and Access Management policies. These policies specify users who can create, edit, and view entries within entry groups.

Data Catalog automatically creates entry groups with names that start with the @ symbol for the following resources:

  • BigQuery entries (@bigquery)
  • Pub/Sub topics (@pubsub)
  • Dataproc Metastore services (@dataproc_metastore_{SERVICE_NAME_HASH})

You can create your own entry groups for Cloud Storage fileset entries and custom entries together with the corresponding IAM policies. User-created entry groups can’t contain the @ symbol, it is reserved for automatically created groups.

Entry groups, like entries, can be searched.

A maximum of 10,000 entry groups may be created per organization across all locations.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

source

pub async fn get_entry_group( &mut self, request: impl IntoRequest<GetEntryGroupRequest>, ) -> Result<Response<EntryGroup>, Status>

Gets an entry group.

source

pub async fn update_entry_group( &mut self, request: impl IntoRequest<UpdateEntryGroupRequest>, ) -> Result<Response<EntryGroup>, Status>

Updates an entry group.

You must enable the Data Catalog API in the project identified by the entry_group.name parameter. For more information, see Data Catalog resource project.

source

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

Deletes an entry group.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

source

pub async fn list_entry_groups( &mut self, request: impl IntoRequest<ListEntryGroupsRequest>, ) -> Result<Response<ListEntryGroupsResponse>, Status>

Lists entry groups.

source

pub async fn create_entry( &mut self, request: impl IntoRequest<CreateEntryRequest>, ) -> Result<Response<Entry>, Status>

Creates an entry.

You can create entries only with ‘FILESET’, ‘CLUSTER’, ‘DATA_STREAM’, or custom types. Data Catalog automatically creates entries with other types during metadata ingestion from integrated systems.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

An entry group can have a maximum of 100,000 entries.

source

pub async fn update_entry( &mut self, request: impl IntoRequest<UpdateEntryRequest>, ) -> Result<Response<Entry>, Status>

Updates an existing entry.

You must enable the Data Catalog API in the project identified by the entry.name parameter. For more information, see Data Catalog resource project.

source

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

Deletes an existing entry.

You can delete only the entries created by the [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] method.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

source

pub async fn get_entry( &mut self, request: impl IntoRequest<GetEntryRequest>, ) -> Result<Response<Entry>, Status>

Gets an entry.

source

pub async fn lookup_entry( &mut self, request: impl IntoRequest<LookupEntryRequest>, ) -> Result<Response<Entry>, Status>

Gets an entry by its target resource name.

The resource name comes from the source Google Cloud Platform service.

source

pub async fn list_entries( &mut self, request: impl IntoRequest<ListEntriesRequest>, ) -> Result<Response<ListEntriesResponse>, Status>

Lists entries.

Note: Currently, this method can list only custom entries. To get a list of both custom and automatically created entries, use [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].

source

pub async fn modify_entry_overview( &mut self, request: impl IntoRequest<ModifyEntryOverviewRequest>, ) -> Result<Response<EntryOverview>, Status>

Modifies entry overview, part of the business context of an [Entry][google.cloud.datacatalog.v1.Entry].

To call this method, you must have the datacatalog.entries.updateOverview IAM permission on the corresponding project.

source

pub async fn modify_entry_contacts( &mut self, request: impl IntoRequest<ModifyEntryContactsRequest>, ) -> Result<Response<Contacts>, Status>

Modifies contacts, part of the business context of an [Entry][google.cloud.datacatalog.v1.Entry].

To call this method, you must have the datacatalog.entries.updateContacts IAM permission on the corresponding project.

source

pub async fn create_tag_template( &mut self, request: impl IntoRequest<CreateTagTemplateRequest>, ) -> Result<Response<TagTemplate>, Status>

Creates a tag template.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see [Data Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project).

source

pub async fn get_tag_template( &mut self, request: impl IntoRequest<GetTagTemplateRequest>, ) -> Result<Response<TagTemplate>, Status>

Gets a tag template.

source

pub async fn update_tag_template( &mut self, request: impl IntoRequest<UpdateTagTemplateRequest>, ) -> Result<Response<TagTemplate>, Status>

Updates a tag template.

You can’t update template fields with this method. These fields are separate resources with their own create, update, and delete methods.

You must enable the Data Catalog API in the project identified by the tag_template.name parameter. For more information, see Data Catalog resource project.

source

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

Deletes a tag template and all tags that use it.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

source

pub async fn create_tag_template_field( &mut self, request: impl IntoRequest<CreateTagTemplateFieldRequest>, ) -> Result<Response<TagTemplateField>, Status>

Creates a field in a tag template.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

source

pub async fn update_tag_template_field( &mut self, request: impl IntoRequest<UpdateTagTemplateFieldRequest>, ) -> Result<Response<TagTemplateField>, Status>

Updates a field in a tag template.

You can’t update the field type with this method.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

source

pub async fn rename_tag_template_field( &mut self, request: impl IntoRequest<RenameTagTemplateFieldRequest>, ) -> Result<Response<TagTemplateField>, Status>

Renames a field in a tag template.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see [Data Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project).

source

pub async fn rename_tag_template_field_enum_value( &mut self, request: impl IntoRequest<RenameTagTemplateFieldEnumValueRequest>, ) -> Result<Response<TagTemplateField>, Status>

Renames an enum value in a tag template.

Within a single enum field, enum values must be unique.

source

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

Deletes a field in a tag template and all uses of this field from the tags based on this template.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

source

pub async fn create_tag( &mut self, request: impl IntoRequest<CreateTagRequest>, ) -> Result<Response<Tag>, Status>

Creates a tag and assigns it to:

  • An [Entry][google.cloud.datacatalog.v1.Entry] if the method name is projects.locations.entryGroups.entries.tags.create.
  • Or [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]if the method name is projects.locations.entryGroups.tags.create.

Note: The project identified by the parent parameter for the [tag] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be in the same organization.

source

pub async fn update_tag( &mut self, request: impl IntoRequest<UpdateTagRequest>, ) -> Result<Response<Tag>, Status>

Updates an existing tag.

source

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

Deletes a tag.

source

pub async fn list_tags( &mut self, request: impl IntoRequest<ListTagsRequest>, ) -> Result<Response<ListTagsResponse>, Status>

Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry]. The [columns][google.cloud.datacatalog.v1.Tag.column] in the response are lowercased.

source

pub async fn reconcile_tags( &mut self, request: impl IntoRequest<ReconcileTagsRequest>, ) -> Result<Response<Operation>, Status>

ReconcileTags creates or updates a list of tags on the entry. If the [ReconcileTagsRequest.force_delete_missing][google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing] parameter is set, the operation deletes tags not included in the input tag list.

ReconcileTags returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with [Operations.GetOperation][google.longrunning.Operations.GetOperation] to return [ReconcileTagsMetadata] [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and a [ReconcileTagsResponse] [google.cloud.datacatalog.v1.ReconcileTagsResponse] message.

source

pub async fn star_entry( &mut self, request: impl IntoRequest<StarEntryRequest>, ) -> Result<Response<StarEntryResponse>, Status>

Marks an [Entry][google.cloud.datacatalog.v1.Entry] as starred by the current user. Starring information is private to each user.

source

pub async fn unstar_entry( &mut self, request: impl IntoRequest<UnstarEntryRequest>, ) -> Result<Response<UnstarEntryResponse>, Status>

Marks an [Entry][google.cloud.datacatalog.v1.Entry] as NOT starred by the current user. Starring information is private to each user.

source

pub async fn set_iam_policy( &mut self, request: impl IntoRequest<SetIamPolicyRequest>, ) -> Result<Response<Policy>, Status>

Sets an access control policy for a resource. Replaces any existing policy.

Supported resources are:

  • Tag templates
  • Entry groups

Note: This method sets policies only within Data Catalog and can’t be used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources synced with the Data Catalog.

To call this method, you must have the following Google IAM permissions:

  • datacatalog.tagTemplates.setIamPolicy to set policies on tag templates.
  • datacatalog.entryGroups.setIamPolicy to set policies on entry groups.
source

pub async fn get_iam_policy( &mut self, request: impl IntoRequest<GetIamPolicyRequest>, ) -> Result<Response<Policy>, Status>

Gets the access control policy for a resource.

May return:

  • ANOT_FOUND error if the resource doesn’t exist or you don’t have the permission to view it.
  • An empty policy if the resource exists but doesn’t have a set policy.

Supported resources are:

  • Tag templates
  • Entry groups

Note: This method doesn’t get policies from Google Cloud Platform resources ingested into Data Catalog.

To call this method, you must have the following Google IAM permissions:

  • datacatalog.tagTemplates.getIamPolicy to get policies on tag templates.
  • datacatalog.entryGroups.getIamPolicy to get policies on entry groups.
source

pub async fn test_iam_permissions( &mut self, request: impl IntoRequest<TestIamPermissionsRequest>, ) -> Result<Response<TestIamPermissionsResponse>, Status>

Gets your permissions on a resource.

Returns an empty set of permissions if the resource doesn’t exist.

Supported resources are:

  • Tag templates
  • Entry groups

Note: This method gets policies only within Data Catalog and can’t be used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources ingested into Data Catalog.

No Google IAM permissions are required to call this method.

source

pub async fn import_entries( &mut self, request: impl IntoRequest<ImportEntriesRequest>, ) -> Result<Response<Operation>, Status>

Imports entries from a source, such as data previously dumped into a Cloud Storage bucket, into Data Catalog. Import of entries is a sync operation that reconciles the state of the third-party system with the Data Catalog.

ImportEntries accepts source data snapshots of a third-party system. Snapshot should be delivered as a .wire or base65-encoded .txt file containing a sequence of Protocol Buffer messages of [DumpItem][google.cloud.datacatalog.v1.DumpItem] type.

ImportEntries returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with [Operations.GetOperation][google.longrunning.Operations.GetOperation] to return [ImportEntriesMetadata][google.cloud.datacatalog.v1.ImportEntriesMetadata] and an [ImportEntriesResponse][google.cloud.datacatalog.v1.ImportEntriesResponse] message.

Trait Implementations§

source§

impl<T: Clone> Clone for DataCatalogClient<T>

source§

fn clone(&self) -> DataCatalogClient<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 DataCatalogClient<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 DataCatalogClient<T>

§

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

§

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

§

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

§

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

§

impl<T> UnwindSafe for DataCatalogClient<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