Data Policy Service provides APIs for managing the label-policy bindings.
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::v1::DataPolicy const &, Options)
Creates a new data policy under a project with the given dataPolicyId
(used as the display name), policy tag, 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::v1::DataPolicy const &
Required. The data policy to create. The |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v1.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateDataPolicy(google::cloud::bigquery::datapolicies::v1::CreateDataPolicyRequest const &, Options)
Creates a new data policy under a project with the given dataPolicyId
(used as the display name), policy tag, and data policy type.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v1::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::v1::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v1.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateDataPolicy(google::cloud::bigquery::datapolicies::v1::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::v1::DataPolicy const &
Required. Update the data policy's metadata. |
update_mask |
google::protobuf::FieldMask const &
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::v1::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v1.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateDataPolicy(google::cloud::bigquery::datapolicies::v1::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::v1::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::v1::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v1.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
RenameDataPolicy(std::string const &, std::string const &, Options)
Renames the id (display name) of the specified data policy.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. Resource name of the data policy to rename. The format is |
new_data_policy_id |
std::string const &
Required. The new data policy id. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datapolicies::v1::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v1.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
RenameDataPolicy(google::cloud::bigquery::datapolicies::v1::RenameDataPolicyRequest const &, Options)
Renames the id (display name) of the specified data policy.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v1::RenameDataPolicyRequest 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::v1::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v1.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::v1::DeleteDataPolicyRequest const &, Options)
Deletes the data policy specified by its resource name.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v1::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::v1::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v1.DataPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetDataPolicy(google::cloud::bigquery::datapolicies::v1::GetDataPolicyRequest const &, Options)
Gets the data policy specified by its resource name.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v1::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::v1::DataPolicy > |
the result of the RPC. The response message type (google.cloud.bigquery.datapolicies.v1.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::v1::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::v1::ListDataPoliciesRequest, Options)
List all of the data policies in the specified parent project.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datapolicies::v1::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::v1::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 |