Class PolicyTagManagerClient (2.11.0)

Policy Tag Manager API service allows you to manage your policy tags and taxonomies.

Policy tags are used to tag BigQuery columns and apply additional access control policies. A taxonomy is a hierarchical grouping of policy tags that classify data along a common axis.

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

PolicyTagManagerClient(PolicyTagManagerClient const &)

Copy and move support

Parameter
Name Description
PolicyTagManagerClient const &

PolicyTagManagerClient(PolicyTagManagerClient &&)

Copy and move support

Parameter
Name Description
PolicyTagManagerClient &&

PolicyTagManagerClient(std::shared_ptr< PolicyTagManagerConnection >, Options)

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

Operators

operator=(PolicyTagManagerClient const &)

Copy and move support

Parameter
Name Description
PolicyTagManagerClient const &
Returns
Type Description
PolicyTagManagerClient &

operator=(PolicyTagManagerClient &&)

Copy and move support

Parameter
Name Description
PolicyTagManagerClient &&
Returns
Type Description
PolicyTagManagerClient &

Functions

CreateTaxonomy(std::string const &, google::cloud::datacatalog::v1::Taxonomy const &, Options)

Creates a taxonomy in a specified project.

The taxonomy is initially empty, that is, it doesn't contain policy tags.

Parameters
Name Description
parent std::string const &

Required. Resource name of the project that the taxonomy will belong to.

taxonomy google::cloud::datacatalog::v1::Taxonomy const &

The taxonomy to create.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::Taxonomy >

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

CreateTaxonomy(google::cloud::datacatalog::v1::CreateTaxonomyRequest const &, Options)

Creates a taxonomy in a specified project.

The taxonomy is initially empty, that is, it doesn't contain policy tags.

Parameters
Name Description
request google::cloud::datacatalog::v1::CreateTaxonomyRequest 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.cloud.datacatalog.v1.CreateTaxonomyRequest. 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::cloud::datacatalog::v1::Taxonomy >

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

DeleteTaxonomy(std::string const &, Options)

Deletes a taxonomy, including all policy tags in this taxonomy, their associated policies, and the policy tags references from BigQuery columns.

Parameters
Name Description
name std::string const &

Required. Resource name of the taxonomy to delete.
Note: All policy tags in this taxonomy are also deleted.

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.

DeleteTaxonomy(google::cloud::datacatalog::v1::DeleteTaxonomyRequest const &, Options)

Deletes a taxonomy, including all policy tags in this taxonomy, their associated policies, and the policy tags references from BigQuery columns.

Parameters
Name Description
request google::cloud::datacatalog::v1::DeleteTaxonomyRequest 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.cloud.datacatalog.v1.DeleteTaxonomyRequest. 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.

UpdateTaxonomy(google::cloud::datacatalog::v1::Taxonomy const &, Options)

Updates a taxonomy, including its display name, description, and activated policy types.

Parameters
Name Description
taxonomy google::cloud::datacatalog::v1::Taxonomy const &

The taxonomy to update. You can update only its description, display name, and activated policy types.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::Taxonomy >

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

UpdateTaxonomy(google::cloud::datacatalog::v1::UpdateTaxonomyRequest const &, Options)

Updates a taxonomy, including its display name, description, and activated policy types.

Parameters
Name Description
request google::cloud::datacatalog::v1::UpdateTaxonomyRequest 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.cloud.datacatalog.v1.UpdateTaxonomyRequest. 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::cloud::datacatalog::v1::Taxonomy >

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

ListTaxonomies(std::string const &, Options)

Lists all taxonomies in a project in a particular location that you have a permission to view.

Parameters
Name Description
parent std::string const &

Required. Resource name of the project to list the taxonomies of.

opts Options

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

Returns
Type Description
StreamRange< google::cloud::datacatalog::v1::Taxonomy >

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.cloud.datacatalog.v1.Taxonomy, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListTaxonomies(google::cloud::datacatalog::v1::ListTaxonomiesRequest, Options)

Lists all taxonomies in a project in a particular location that you have a permission to view.

Parameters
Name Description
request google::cloud::datacatalog::v1::ListTaxonomiesRequest

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.cloud.datacatalog.v1.ListTaxonomiesRequest. 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::cloud::datacatalog::v1::Taxonomy >

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.cloud.datacatalog.v1.Taxonomy, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetTaxonomy(std::string const &, Options)

Gets a taxonomy.

Parameters
Name Description
name std::string const &

Required. Resource name of the taxonomy to get.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::Taxonomy >

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

GetTaxonomy(google::cloud::datacatalog::v1::GetTaxonomyRequest const &, Options)

Gets a taxonomy.

Parameters
Name Description
request google::cloud::datacatalog::v1::GetTaxonomyRequest 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.cloud.datacatalog.v1.GetTaxonomyRequest. 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::cloud::datacatalog::v1::Taxonomy >

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

CreatePolicyTag(std::string const &, google::cloud::datacatalog::v1::PolicyTag const &, Options)

Creates a policy tag in a taxonomy.

Parameters
Name Description
parent std::string const &

Required. Resource name of the taxonomy that the policy tag will belong to.

policy_tag google::cloud::datacatalog::v1::PolicyTag const &

The policy tag to create.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::PolicyTag >

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

CreatePolicyTag(google::cloud::datacatalog::v1::CreatePolicyTagRequest const &, Options)

Creates a policy tag in a taxonomy.

Parameters
Name Description
request google::cloud::datacatalog::v1::CreatePolicyTagRequest 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.cloud.datacatalog.v1.CreatePolicyTagRequest. 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::cloud::datacatalog::v1::PolicyTag >

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

DeletePolicyTag(std::string const &, Options)

Deletes a policy tag together with the following:

  • All of its descendant policy tags, if any
  • Policies associated with the policy tag and its descendants
  • References from BigQuery table schema of the policy tag and its descendants
Parameters
Name Description
name std::string const &

Required. Resource name of the policy tag to delete.
Note: All of its descendant policy tags are also deleted.

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.

DeletePolicyTag(google::cloud::datacatalog::v1::DeletePolicyTagRequest const &, Options)

Deletes a policy tag together with the following:

  • All of its descendant policy tags, if any
  • Policies associated with the policy tag and its descendants
  • References from BigQuery table schema of the policy tag and its descendants
Parameters
Name Description
request google::cloud::datacatalog::v1::DeletePolicyTagRequest 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.cloud.datacatalog.v1.DeletePolicyTagRequest. 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.

UpdatePolicyTag(google::cloud::datacatalog::v1::PolicyTag const &, Options)

Updates a policy tag, including its display name, description, and parent policy tag.

Parameters
Name Description
policy_tag google::cloud::datacatalog::v1::PolicyTag const &

The policy tag to update. You can update only its description, display name, and parent policy tag fields.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::PolicyTag >

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

UpdatePolicyTag(google::cloud::datacatalog::v1::UpdatePolicyTagRequest const &, Options)

Updates a policy tag, including its display name, description, and parent policy tag.

Parameters
Name Description
request google::cloud::datacatalog::v1::UpdatePolicyTagRequest 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.cloud.datacatalog.v1.UpdatePolicyTagRequest. 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::cloud::datacatalog::v1::PolicyTag >

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

ListPolicyTags(std::string const &, Options)

Lists all policy tags in a taxonomy.

Parameters
Name Description
parent std::string const &

Required. Resource name of the taxonomy to list the policy tags of.

opts Options

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

Returns
Type Description
StreamRange< google::cloud::datacatalog::v1::PolicyTag >

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.cloud.datacatalog.v1.PolicyTag, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListPolicyTags(google::cloud::datacatalog::v1::ListPolicyTagsRequest, Options)

Lists all policy tags in a taxonomy.

Parameters
Name Description
request google::cloud::datacatalog::v1::ListPolicyTagsRequest

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.cloud.datacatalog.v1.ListPolicyTagsRequest. 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::cloud::datacatalog::v1::PolicyTag >

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.cloud.datacatalog.v1.PolicyTag, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetPolicyTag(std::string const &, Options)

Gets a policy tag.

Parameters
Name Description
name std::string const &

Required. Resource name of the policy tag.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::PolicyTag >

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

GetPolicyTag(google::cloud::datacatalog::v1::GetPolicyTagRequest const &, Options)

Gets a policy tag.

Parameters
Name Description
request google::cloud::datacatalog::v1::GetPolicyTagRequest 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.cloud.datacatalog.v1.GetPolicyTagRequest. 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::cloud::datacatalog::v1::PolicyTag >

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

GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &, Options)

Gets the IAM policy for a policy tag or a taxonomy.

Parameters
Name Description
request google::iam::v1::GetIamPolicyRequest 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.iam.v1.GetIamPolicyRequest. 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::iam::v1::Policy >

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

SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &, Options)

Sets the IAM policy for a policy tag or a taxonomy.

Parameters
Name Description
request google::iam::v1::SetIamPolicyRequest 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.iam.v1.SetIamPolicyRequest. 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::iam::v1::Policy >

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

TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &, Options)

Returns your permissions on a specified policy tag or taxonomy.

Parameters
Name Description
request google::iam::v1::TestIamPermissionsRequest 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.iam.v1.TestIamPermissionsRequest. 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::iam::v1::TestIamPermissionsResponse >

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