Google Cloud BigQuery C++ Client 2.13.0
A C++ Client Library for Google Cloud BigQuery
|
Data Policy Service provides APIs for managing the label-policy bindings. More...
#include <google/cloud/bigquery/datapolicies/v1/data_policy_client.h>
Public Member Functions | |
DataPolicyServiceClient (std::shared_ptr< DataPolicyServiceConnection > connection, Options opts={}) | |
~DataPolicyServiceClient () | |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > | CreateDataPolicy (std::string const &parent, google::cloud::bigquery::datapolicies::v1::DataPolicy const &data_policy, Options opts={}) |
Creates a new data policy under a project with the given dataPolicyId (used as the display name), policy tag, and data policy type. More... | |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > | CreateDataPolicy (google::cloud::bigquery::datapolicies::v1::CreateDataPolicyRequest const &request, Options opts={}) |
Creates a new data policy under a project with the given dataPolicyId (used as the display name), policy tag, and data policy type. More... | |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > | UpdateDataPolicy (google::cloud::bigquery::datapolicies::v1::DataPolicy const &data_policy, google::protobuf::FieldMask const &update_mask, Options opts={}) |
Updates the metadata for an existing data policy. More... | |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > | UpdateDataPolicy (google::cloud::bigquery::datapolicies::v1::UpdateDataPolicyRequest const &request, Options opts={}) |
Updates the metadata for an existing data policy. More... | |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > | RenameDataPolicy (std::string const &name, std::string const &new_data_policy_id, Options opts={}) |
Renames the id (display name) of the specified data policy. More... | |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > | RenameDataPolicy (google::cloud::bigquery::datapolicies::v1::RenameDataPolicyRequest const &request, Options opts={}) |
Renames the id (display name) of the specified data policy. More... | |
Status | DeleteDataPolicy (std::string const &name, Options opts={}) |
Deletes the data policy specified by its resource name. More... | |
Status | DeleteDataPolicy (google::cloud::bigquery::datapolicies::v1::DeleteDataPolicyRequest const &request, Options opts={}) |
Deletes the data policy specified by its resource name. More... | |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > | GetDataPolicy (std::string const &name, Options opts={}) |
Gets the data policy specified by its resource name. More... | |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > | GetDataPolicy (google::cloud::bigquery::datapolicies::v1::GetDataPolicyRequest const &request, Options opts={}) |
Gets the data policy specified by its resource name. More... | |
StreamRange< google::cloud::bigquery::datapolicies::v1::DataPolicy > | ListDataPolicies (std::string const &parent, Options opts={}) |
List all of the data policies in the specified parent project. More... | |
StreamRange< google::cloud::bigquery::datapolicies::v1::DataPolicy > | ListDataPolicies (google::cloud::bigquery::datapolicies::v1::ListDataPoliciesRequest request, Options opts={}) |
List all of the data policies in the specified parent project. More... | |
StatusOr< google::iam::v1::Policy > | GetIamPolicy (google::iam::v1::GetIamPolicyRequest const &request, Options opts={}) |
Gets the IAM policy for the specified data policy. More... | |
StatusOr< google::iam::v1::Policy > | SetIamPolicy (google::iam::v1::SetIamPolicyRequest const &request, Options opts={}) |
Sets the IAM policy for the specified data policy. More... | |
StatusOr< google::iam::v1::TestIamPermissionsResponse > | TestIamPermissions (google::iam::v1::TestIamPermissionsRequest const &request, Options opts={}) |
Returns the caller's permission on the specified data policy resource. More... | |
Copy and move support | |
DataPolicyServiceClient (DataPolicyServiceClient const &)=default | |
DataPolicyServiceClient & | operator= (DataPolicyServiceClient const &)=default |
DataPolicyServiceClient (DataPolicyServiceClient &&)=default | |
DataPolicyServiceClient & | operator= (DataPolicyServiceClient &&)=default |
Friends | |
Equality | |
bool | operator== (DataPolicyServiceClient const &a, DataPolicyServiceClient const &b) |
bool | operator!= (DataPolicyServiceClient const &a, DataPolicyServiceClient const &b) |
Data Policy Service provides APIs for managing the label-policy bindings.
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.
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.
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.
|
explicit |
google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::~DataPolicyServiceClient | ( | ) |
|
default |
|
default |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::CreateDataPolicy | ( | google::cloud::bigquery::datapolicies::v1::CreateDataPolicyRequest const & | request, |
Options | opts = {} |
||
) |
Creates a new data policy under a project with the given dataPolicyId
(used as the display name), policy tag, and data policy type.
request | 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.bigquery.datapolicies.v1.CreateDataPolicyRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::CreateDataPolicy | ( | std::string const & | parent, |
google::cloud::bigquery::datapolicies::v1::DataPolicy const & | data_policy, | ||
Options | opts = {} |
||
) |
Creates a new data policy under a project with the given dataPolicyId
(used as the display name), policy tag, and data policy type.
parent | Required. Resource name of the project that the data policy will belong to. The format is projects/{project_number}/locations/{location_id} . |
data_policy | Required. The data policy to create. The name field does not need to be provided for the data policy creation. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
Status google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::DeleteDataPolicy | ( | google::cloud::bigquery::datapolicies::v1::DeleteDataPolicyRequest const & | request, |
Options | opts = {} |
||
) |
Deletes the data policy specified by its resource name.
request | 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.bigquery.datapolicies.v1.DeleteDataPolicyRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
Status google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::DeleteDataPolicy | ( | std::string const & | name, |
Options | opts = {} |
||
) |
Deletes the data policy specified by its resource name.
name | Required. Resource name of the data policy to delete. Format is projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id} . |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::GetDataPolicy | ( | google::cloud::bigquery::datapolicies::v1::GetDataPolicyRequest const & | request, |
Options | opts = {} |
||
) |
Gets the data policy specified by its resource name.
request | 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.bigquery.datapolicies.v1.GetDataPolicyRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::GetDataPolicy | ( | std::string const & | name, |
Options | opts = {} |
||
) |
Gets the data policy specified by its resource name.
name | Required. Resource name of the requested data policy. Format is projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id} . |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::iam::v1::Policy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::GetIamPolicy | ( | google::iam::v1::GetIamPolicyRequest const & | request, |
Options | opts = {} |
||
) |
Gets the IAM policy for the specified data policy.
request | 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 | Optional. Override the class-level options, such as retry and backoff policies. |
StreamRange< google::cloud::bigquery::datapolicies::v1::DataPolicy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::ListDataPolicies | ( | google::cloud::bigquery::datapolicies::v1::ListDataPoliciesRequest | request, |
Options | opts = {} |
||
) |
List all of the data policies in the specified parent project.
request | 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.bigquery.datapolicies.v1.ListDataPoliciesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.bigquery.datapolicies.v1.DataPolicy, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules. StreamRange< google::cloud::bigquery::datapolicies::v1::DataPolicy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::ListDataPolicies | ( | std::string const & | parent, |
Options | opts = {} |
||
) |
List all of the data policies in the specified parent project.
parent | Required. Resource name of the project for which to list data policies. Format is projects/{project_number}/locations/{location_id} . |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.bigquery.datapolicies.v1.DataPolicy, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.
|
default |
|
default |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::RenameDataPolicy | ( | google::cloud::bigquery::datapolicies::v1::RenameDataPolicyRequest const & | request, |
Options | opts = {} |
||
) |
Renames the id (display name) of the specified data policy.
request | 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.bigquery.datapolicies.v1.RenameDataPolicyRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::RenameDataPolicy | ( | std::string const & | name, |
std::string const & | new_data_policy_id, | ||
Options | opts = {} |
||
) |
Renames the id (display name) of the specified data policy.
name | Required. Resource name of the data policy to rename. The format is projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id} |
new_data_policy_id | Required. The new data policy id. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::iam::v1::Policy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::SetIamPolicy | ( | google::iam::v1::SetIamPolicyRequest const & | request, |
Options | opts = {} |
||
) |
Sets the IAM policy for the specified data policy.
request | 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 | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::iam::v1::TestIamPermissionsResponse > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::TestIamPermissions | ( | google::iam::v1::TestIamPermissionsRequest const & | request, |
Options | opts = {} |
||
) |
Returns the caller's permission on the specified data policy resource.
request | 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 | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::UpdateDataPolicy | ( | google::cloud::bigquery::datapolicies::v1::DataPolicy const & | data_policy, |
google::protobuf::FieldMask const & | update_mask, | ||
Options | opts = {} |
||
) |
Updates the metadata for an existing data policy.
The target data policy can be specified by the resource name.
data_policy | Required. Update the data policy's metadata. The target data policy is determined by the name field. Other fields are updated to the specified values based on the field masks. |
update_mask | The update mask applies to the resource. For the FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If not set, defaults to all of the fields that are allowed to update. Updates to the name and dataPolicyId fields are not allowed. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::UpdateDataPolicy | ( | google::cloud::bigquery::datapolicies::v1::UpdateDataPolicyRequest const & | request, |
Options | opts = {} |
||
) |
Updates the metadata for an existing data policy.
The target data policy can be specified by the resource name.
request | 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.bigquery.datapolicies.v1.UpdateDataPolicyRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
|
friend |
|
friend |