Data Policy Service provides APIs for managing the BigQuery Data Policy.
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
DataPolicyServiceClient(DataPolicyServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
DataPolicyServiceClient const &
|
DataPolicyServiceClient(DataPolicyServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
DataPolicyServiceClient &&
|
DataPolicyServiceClient(std::shared_ptr< DataPolicyServiceConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< DataPolicyServiceConnection >
|
opts |
Options
|
Operators
operator=(DataPolicyServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
DataPolicyServiceClient const &
|
Returns | |
---|---|
Type | Description |
DataPolicyServiceClient & |
operator=(DataPolicyServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
DataPolicyServiceClient &&
|
Returns | |
---|---|
Type | Description |
DataPolicyServiceClient & |
Functions
CreateDataPolicy(std::string const &, google::cloud::bigquery::datapolicies::v2::DataPolicy const &, std::string const &, Options)
Creates a new data policy under a project with the given data_policy_id
(used as the display name), and data policy type.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. Resource name of the project that the data policy will belong to. The format is |
data_policy |
google::cloud::bigquery::datapolicies::v2::DataPolicy const &
Required. The data policy to create. The |
data_policy_id |
std::string const &
Required. User-assigned (human readable) ID of the data policy that needs to be unique within a project. Used as {data_policy_id} in part of the resource name. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v2.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateDataPolicy(google::cloud::bigquery::datapolicies::v2::CreateDataPolicyRequest const &, Options)
Creates a new data policy under a project with the given data_policy_id
(used as the display name), and data policy type.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v2::CreateDataPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v2.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
AddGrantees(std::string const &, std::vector< std::string > const &, Options)
Adds new grantees to a data policy.
The new grantees will be added to the existing grantees. If the request contains a duplicate grantee, the grantee will be ignored. If the request contains a grantee that already exists, the grantee will be ignored.
Parameters | |
---|---|
Name | Description |
data_policy |
std::string const &
Required. Resource name of this data policy, in the format of |
grantees |
std::vector< std::string > const &
Required. IAM principal that should be granted Fine Grained Access to the underlying data goverened by the data policy. The target data policy is determined by the
|
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v2.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
AddGrantees(google::cloud::bigquery::datapolicies::v2::AddGranteesRequest const &, Options)
Adds new grantees to a data policy.
The new grantees will be added to the existing grantees. If the request contains a duplicate grantee, the grantee will be ignored. If the request contains a grantee that already exists, the grantee will be ignored.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v2::AddGranteesRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v2.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
RemoveGrantees(std::string const &, std::vector< std::string > const &, Options)
Removes grantees from a data policy.
The grantees will be removed from the existing grantees. If the request contains a grantee that does not exist, the grantee will be ignored.
Parameters | |
---|---|
Name | Description |
data_policy |
std::string const &
Required. Resource name of this data policy, in the format of |
grantees |
std::vector< std::string > const &
Required. IAM principal that should be revoked from Fine Grained Access to the underlying data goverened by the data policy. The target data policy is determined by the
|
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v2.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
RemoveGrantees(google::cloud::bigquery::datapolicies::v2::RemoveGranteesRequest const &, Options)
Removes grantees from a data policy.
The grantees will be removed from the existing grantees. If the request contains a grantee that does not exist, the grantee will be ignored.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v2::RemoveGranteesRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v2.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateDataPolicy(google::cloud::bigquery::datapolicies::v2::DataPolicy const &, google::protobuf::FieldMask const &, Options)
Updates the metadata for an existing data policy.
The target data policy can be specified by the resource name.
Parameters | |
---|---|
Name | Description |
data_policy |
google::cloud::bigquery::datapolicies::v2::DataPolicy const &
Required. Update the data policy's metadata. |
update_mask |
google::protobuf::FieldMask const &
Optional. The update mask applies to the resource. For the |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v2.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateDataPolicy(google::cloud::bigquery::datapolicies::v2::UpdateDataPolicyRequest const &, Options)
Updates the metadata for an existing data policy.
The target data policy can be specified by the resource name.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v2::UpdateDataPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v2.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
DeleteDataPolicy(std::string const &, Options)
Deletes the data policy specified by its resource name.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. Resource name of the data policy to delete. Format is |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
DeleteDataPolicy(google::cloud::bigquery::datapolicies::v2::DeleteDataPolicyRequest const &, Options)
Deletes the data policy specified by its resource name.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v2::DeleteDataPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
GetDataPolicy(std::string const &, Options)
Gets the data policy specified by its resource name.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. Resource name of the requested data policy. Format is |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v2.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetDataPolicy(google::cloud::bigquery::datapolicies::v2::GetDataPolicyRequest const &, Options)
Gets the data policy specified by its resource name.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v2::GetDataPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v2.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListDataPolicies(std::string const &, Options)
List all of the data policies in the specified parent project.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. Resource name of the project for which to list data policies. Format is |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListDataPolicies(google::cloud::bigquery::datapolicies::v2::ListDataPoliciesRequest, Options)
List all of the data policies in the specified parent project.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v2::ListDataPoliciesRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::bigquery::datapolicies::v2::DataPolicy > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &, Options)
Gets the IAM policy for the specified data policy.
Parameters | |
---|---|
Name | Description |
request |
google::iam::v1::GetIamPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
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 |
SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &, Options)
Sets the IAM policy for the specified data policy.
Parameters | |
---|---|
Name | Description |
request |
google::iam::v1::SetIamPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
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 |
TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &, Options)
Returns the caller's permission on the specified data policy resource.
Parameters | |
---|---|
Name | Description |
request |
google::iam::v1::TestIamPermissionsRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
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 |