Google Cloud BigQuery C++ Client 2.13.0
A C++ Client Library for Google Cloud BigQuery
|
Manages external data source connections and credentials. More...
#include <google/cloud/bigquery/connection/v1/connection_client.h>
Public Member Functions | |
ConnectionServiceClient (std::shared_ptr< ConnectionServiceConnection > connection, Options opts={}) | |
~ConnectionServiceClient () | |
StatusOr< google::cloud::bigquery::connection::v1::Connection > | CreateConnection (std::string const &parent, google::cloud::bigquery::connection::v1::Connection const &connection, std::string const &connection_id, Options opts={}) |
Creates a new connection. More... | |
StatusOr< google::cloud::bigquery::connection::v1::Connection > | CreateConnection (google::cloud::bigquery::connection::v1::CreateConnectionRequest const &request, Options opts={}) |
Creates a new connection. More... | |
StatusOr< google::cloud::bigquery::connection::v1::Connection > | GetConnection (std::string const &name, Options opts={}) |
Returns specified connection. More... | |
StatusOr< google::cloud::bigquery::connection::v1::Connection > | GetConnection (google::cloud::bigquery::connection::v1::GetConnectionRequest const &request, Options opts={}) |
Returns specified connection. More... | |
StreamRange< google::cloud::bigquery::connection::v1::Connection > | ListConnections (std::string const &parent, Options opts={}) |
Returns a list of connections in the given project. More... | |
StreamRange< google::cloud::bigquery::connection::v1::Connection > | ListConnections (google::cloud::bigquery::connection::v1::ListConnectionsRequest request, Options opts={}) |
Returns a list of connections in the given project. More... | |
StatusOr< google::cloud::bigquery::connection::v1::Connection > | UpdateConnection (std::string const &name, google::cloud::bigquery::connection::v1::Connection const &connection, google::protobuf::FieldMask const &update_mask, Options opts={}) |
Updates the specified connection. More... | |
StatusOr< google::cloud::bigquery::connection::v1::Connection > | UpdateConnection (google::cloud::bigquery::connection::v1::UpdateConnectionRequest const &request, Options opts={}) |
Updates the specified connection. More... | |
Status | DeleteConnection (std::string const &name, Options opts={}) |
Deletes connection and associated credential. More... | |
Status | DeleteConnection (google::cloud::bigquery::connection::v1::DeleteConnectionRequest const &request, Options opts={}) |
Deletes connection and associated credential. More... | |
StatusOr< google::iam::v1::Policy > | GetIamPolicy (std::string const &resource, google::iam::v1::GetPolicyOptions const &options, Options opts={}) |
Gets the access control policy for a resource. More... | |
StatusOr< google::iam::v1::Policy > | GetIamPolicy (google::iam::v1::GetIamPolicyRequest const &request, Options opts={}) |
Gets the access control policy for a resource. More... | |
StatusOr< google::iam::v1::Policy > | SetIamPolicy (std::string const &resource, google::iam::v1::Policy const &policy, Options opts={}) |
Sets the access control policy on the specified resource. More... | |
StatusOr< google::iam::v1::Policy > | SetIamPolicy (google::iam::v1::SetIamPolicyRequest const &request, Options opts={}) |
Sets the access control policy on the specified resource. More... | |
StatusOr< google::iam::v1::TestIamPermissionsResponse > | TestIamPermissions (std::string const &resource, std::vector< std::string > const &permissions, Options opts={}) |
Returns permissions that a caller has on the specified resource. More... | |
StatusOr< google::iam::v1::TestIamPermissionsResponse > | TestIamPermissions (google::iam::v1::TestIamPermissionsRequest const &request, Options opts={}) |
Returns permissions that a caller has on the specified resource. More... | |
Copy and move support | |
ConnectionServiceClient (ConnectionServiceClient const &)=default | |
ConnectionServiceClient & | operator= (ConnectionServiceClient const &)=default |
ConnectionServiceClient (ConnectionServiceClient &&)=default | |
ConnectionServiceClient & | operator= (ConnectionServiceClient &&)=default |
Friends | |
Equality | |
bool | operator== (ConnectionServiceClient const &a, ConnectionServiceClient const &b) |
bool | operator!= (ConnectionServiceClient const &a, ConnectionServiceClient const &b) |
Manages external data source connections and credentials.
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_connection_v1::ConnectionServiceClient::~ConnectionServiceClient | ( | ) |
|
default |
|
default |
StatusOr< google::cloud::bigquery::connection::v1::Connection > google::cloud::bigquery_connection_v1::ConnectionServiceClient::CreateConnection | ( | google::cloud::bigquery::connection::v1::CreateConnectionRequest const & | request, |
Options | opts = {} |
||
) |
Creates a new connection.
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.connection.v1.CreateConnectionRequest. 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::connection::v1::Connection > google::cloud::bigquery_connection_v1::ConnectionServiceClient::CreateConnection | ( | std::string const & | parent, |
google::cloud::bigquery::connection::v1::Connection const & | connection, | ||
std::string const & | connection_id, | ||
Options | opts = {} |
||
) |
Creates a new connection.
parent | Required. Parent resource name. Must be in the format projects/{project_id}/locations/{location_id} |
connection | Required. Connection to create. |
connection_id | Optional. Connection id that should be assigned to the created connection. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
Status google::cloud::bigquery_connection_v1::ConnectionServiceClient::DeleteConnection | ( | google::cloud::bigquery::connection::v1::DeleteConnectionRequest const & | request, |
Options | opts = {} |
||
) |
Deletes connection and associated credential.
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.connection.v1.DeleteConnectionRequest. 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_connection_v1::ConnectionServiceClient::DeleteConnection | ( | std::string const & | name, |
Options | opts = {} |
||
) |
Deletes connection and associated credential.
name | Required. Name of the deleted connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id} |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::cloud::bigquery::connection::v1::Connection > google::cloud::bigquery_connection_v1::ConnectionServiceClient::GetConnection | ( | google::cloud::bigquery::connection::v1::GetConnectionRequest const & | request, |
Options | opts = {} |
||
) |
Returns specified connection.
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.connection.v1.GetConnectionRequest. 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::connection::v1::Connection > google::cloud::bigquery_connection_v1::ConnectionServiceClient::GetConnection | ( | std::string const & | name, |
Options | opts = {} |
||
) |
Returns specified connection.
name | Required. Name of the requested connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id} |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::iam::v1::Policy > google::cloud::bigquery_connection_v1::ConnectionServiceClient::GetIamPolicy | ( | google::iam::v1::GetIamPolicyRequest const & | request, |
Options | opts = {} |
||
) |
Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy set.
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. |
StatusOr< google::iam::v1::Policy > google::cloud::bigquery_connection_v1::ConnectionServiceClient::GetIamPolicy | ( | std::string const & | resource, |
google::iam::v1::GetPolicyOptions const & | options, | ||
Options | opts = {} |
||
) |
Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy set.
resource | REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
options | OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy . |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StreamRange< google::cloud::bigquery::connection::v1::Connection > google::cloud::bigquery_connection_v1::ConnectionServiceClient::ListConnections | ( | google::cloud::bigquery::connection::v1::ListConnectionsRequest | request, |
Options | opts = {} |
||
) |
Returns a list of connections in the given 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.connection.v1.ListConnectionsRequest. 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.connection.v1.Connection, 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::connection::v1::Connection > google::cloud::bigquery_connection_v1::ConnectionServiceClient::ListConnections | ( | std::string const & | parent, |
Options | opts = {} |
||
) |
Returns a list of connections in the given project.
parent | Required. Parent resource name. Must be in the form: projects/{project_id}/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.connection.v1.Connection, 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::iam::v1::Policy > google::cloud::bigquery_connection_v1::ConnectionServiceClient::SetIamPolicy | ( | google::iam::v1::SetIamPolicyRequest const & | request, |
Options | opts = {} |
||
) |
Sets the access control policy on the specified resource.
Replaces any existing policy.
Can return NOT_FOUND
, INVALID_ARGUMENT
, and PERMISSION_DENIED
errors.
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::Policy > google::cloud::bigquery_connection_v1::ConnectionServiceClient::SetIamPolicy | ( | std::string const & | resource, |
google::iam::v1::Policy const & | policy, | ||
Options | opts = {} |
||
) |
Sets the access control policy on the specified resource.
Replaces any existing policy.
Can return NOT_FOUND
, INVALID_ARGUMENT
, and PERMISSION_DENIED
errors.
resource | REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | REQUIRED: The complete policy to be applied to the resource . The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::iam::v1::TestIamPermissionsResponse > google::cloud::bigquery_connection_v1::ConnectionServiceClient::TestIamPermissions | ( | google::iam::v1::TestIamPermissionsRequest const & | request, |
Options | opts = {} |
||
) |
Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND
error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
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::iam::v1::TestIamPermissionsResponse > google::cloud::bigquery_connection_v1::ConnectionServiceClient::TestIamPermissions | ( | std::string const & | resource, |
std::vector< std::string > const & | permissions, | ||
Options | opts = {} |
||
) |
Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND
error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
resource | REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | The set of permissions to check for the resource . Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::cloud::bigquery::connection::v1::Connection > google::cloud::bigquery_connection_v1::ConnectionServiceClient::UpdateConnection | ( | google::cloud::bigquery::connection::v1::UpdateConnectionRequest const & | request, |
Options | opts = {} |
||
) |
Updates the specified connection.
For security reasons, also resets credential if connection properties are in the update field mask.
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.connection.v1.UpdateConnectionRequest. 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::connection::v1::Connection > google::cloud::bigquery_connection_v1::ConnectionServiceClient::UpdateConnection | ( | std::string const & | name, |
google::cloud::bigquery::connection::v1::Connection const & | connection, | ||
google::protobuf::FieldMask const & | update_mask, | ||
Options | opts = {} |
||
) |
Updates the specified connection.
For security reasons, also resets credential if connection properties are in the update field mask.
name | Required. Name of the connection to update, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id} |
connection | Required. Connection containing the updated fields. |
update_mask | Required. Update mask for the connection fields to be updated. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
|
friend |
|
friend |