Google Cloud BigQuery C++ Client 2.10.1
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
Public Member Functions | List of all members
google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient Class Reference

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
 
DataPolicyServiceClientoperator= (DataPolicyServiceClient const &)=default
 
 DataPolicyServiceClient (DataPolicyServiceClient &&)=default
 
DataPolicyServiceClientoperator= (DataPolicyServiceClient &&)=default
 

Friends

Equality
bool operator== (DataPolicyServiceClient const &a, DataPolicyServiceClient const &b)
 
bool operator!= (DataPolicyServiceClient const &a, DataPolicyServiceClient const &b)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DataPolicyServiceClient() [1/3]

google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::DataPolicyServiceClient ( std::shared_ptr< DataPolicyServiceConnection connection,
Options  opts = {} 
)
explicit

◆ ~DataPolicyServiceClient()

google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::~DataPolicyServiceClient ( )

◆ DataPolicyServiceClient() [2/3]

google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::DataPolicyServiceClient ( DataPolicyServiceClient const &  )
default

◆ DataPolicyServiceClient() [3/3]

google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::DataPolicyServiceClient ( DataPolicyServiceClient &&  )
default

Member Function Documentation

◆ CreateDataPolicy() [1/2]

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.

Parameters
requestgoogle::cloud::bigquery::datapolicies::v1::CreateDataPolicyRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::datapolicies::v1::DataPolicy

◆ CreateDataPolicy() [2/2]

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.

Parameters
parentRequired. Resource name of the project that the data policy will belong to. The format is projects/{project_number}/locations/{location_id}.
data_policyRequired. The data policy to create. The name field does not need to be provided for the data policy creation.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::datapolicies::v1::DataPolicy

◆ DeleteDataPolicy() [1/2]

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.

Parameters
requestgoogle::cloud::bigquery::datapolicies::v1::DeleteDataPolicyRequest
optsOptional. Override the class-level options, such as retry and backoff policies.

◆ DeleteDataPolicy() [2/2]

Status google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::DeleteDataPolicy ( std::string const &  name,
Options  opts = {} 
)

Deletes the data policy specified by its resource name.

Parameters
nameRequired. Resource name of the data policy to delete. Format is projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}.
optsOptional. Override the class-level options, such as retry and backoff policies.

◆ GetDataPolicy() [1/2]

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.

Parameters
requestgoogle::cloud::bigquery::datapolicies::v1::GetDataPolicyRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::datapolicies::v1::DataPolicy

◆ GetDataPolicy() [2/2]

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.

Parameters
nameRequired. Resource name of the requested data policy. Format is projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::datapolicies::v1::DataPolicy

◆ GetIamPolicy()

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.

Parameters
requestgoogle::iam::v1::GetIamPolicyRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::iam::v1::Policy

◆ ListDataPolicies() [1/2]

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.

Parameters
requestgoogle::cloud::bigquery::datapolicies::v1::ListDataPoliciesRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::datapolicies::v1::DataPolicy

◆ ListDataPolicies() [2/2]

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.

Parameters
parentRequired. Resource name of the project for which to list data policies. Format is projects/{project_number}/locations/{location_id}.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::datapolicies::v1::DataPolicy

◆ operator=() [1/2]

DataPolicyServiceClient & google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::operator= ( DataPolicyServiceClient &&  )
default

◆ operator=() [2/2]

DataPolicyServiceClient & google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient::operator= ( DataPolicyServiceClient const &  )
default

◆ RenameDataPolicy() [1/2]

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.

Parameters
requestgoogle::cloud::bigquery::datapolicies::v1::RenameDataPolicyRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::datapolicies::v1::DataPolicy

◆ RenameDataPolicy() [2/2]

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.

Parameters
nameRequired. Resource name of the data policy to rename. The format is projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}
new_data_policy_idRequired. The new data policy id.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::datapolicies::v1::DataPolicy

◆ SetIamPolicy()

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.

Parameters
requestgoogle::iam::v1::SetIamPolicyRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::iam::v1::Policy

◆ TestIamPermissions()

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.

Parameters
requestgoogle::iam::v1::TestIamPermissionsRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::iam::v1::TestIamPermissionsResponse

◆ UpdateDataPolicy() [1/2]

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.

Parameters
data_policyRequired. 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_maskThe 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.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::datapolicies::v1::DataPolicy

◆ UpdateDataPolicy() [2/2]

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.

Parameters
requestgoogle::cloud::bigquery::datapolicies::v1::UpdateDataPolicyRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::datapolicies::v1::DataPolicy

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( DataPolicyServiceClient const &  a,
DataPolicyServiceClient const &  b 
)
friend

◆ operator==

bool operator== ( DataPolicyServiceClient const &  a,
DataPolicyServiceClient const &  b 
)
friend