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_connection_v1::ConnectionServiceClient Class Reference

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
 
ConnectionServiceClientoperator= (ConnectionServiceClient const &)=default
 
 ConnectionServiceClient (ConnectionServiceClient &&)=default
 
ConnectionServiceClientoperator= (ConnectionServiceClient &&)=default
 

Friends

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

Detailed Description

Manages external data source connections and credentials.

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

◆ ConnectionServiceClient() [1/3]

google::cloud::bigquery_connection_v1::ConnectionServiceClient::ConnectionServiceClient ( std::shared_ptr< ConnectionServiceConnection connection,
Options  opts = {} 
)
explicit

◆ ~ConnectionServiceClient()

google::cloud::bigquery_connection_v1::ConnectionServiceClient::~ConnectionServiceClient ( )

◆ ConnectionServiceClient() [2/3]

google::cloud::bigquery_connection_v1::ConnectionServiceClient::ConnectionServiceClient ( ConnectionServiceClient const &  )
default

◆ ConnectionServiceClient() [3/3]

google::cloud::bigquery_connection_v1::ConnectionServiceClient::ConnectionServiceClient ( ConnectionServiceClient &&  )
default

Member Function Documentation

◆ CreateConnection() [1/2]

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.

Parameters
requestgoogle::cloud::bigquery::connection::v1::CreateConnectionRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::connection::v1::Connection

◆ CreateConnection() [2/2]

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.

Parameters
parentRequired. Parent resource name. Must be in the format projects/{project_id}/locations/{location_id}
connectionRequired. Connection to create.
connection_idOptional. Connection id that should be assigned to the created connection.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::connection::v1::Connection

◆ DeleteConnection() [1/2]

Status google::cloud::bigquery_connection_v1::ConnectionServiceClient::DeleteConnection ( google::cloud::bigquery::connection::v1::DeleteConnectionRequest const &  request,
Options  opts = {} 
)

Deletes connection and associated credential.

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

◆ DeleteConnection() [2/2]

Status google::cloud::bigquery_connection_v1::ConnectionServiceClient::DeleteConnection ( std::string const &  name,
Options  opts = {} 
)

Deletes connection and associated credential.

Parameters
nameRequired. Name of the deleted connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}
optsOptional. Override the class-level options, such as retry and backoff policies.

◆ GetConnection() [1/2]

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.

Parameters
requestgoogle::cloud::bigquery::connection::v1::GetConnectionRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::connection::v1::Connection

◆ GetConnection() [2/2]

StatusOr< google::cloud::bigquery::connection::v1::Connection > google::cloud::bigquery_connection_v1::ConnectionServiceClient::GetConnection ( std::string const &  name,
Options  opts = {} 
)

Returns specified connection.

Parameters
nameRequired. Name of the requested connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::connection::v1::Connection

◆ GetIamPolicy() [1/2]

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.

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

◆ GetIamPolicy() [2/2]

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.

Parameters
resourceREQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
optionsOPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::iam::v1::Policy

◆ ListConnections() [1/2]

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.

Parameters
requestgoogle::cloud::bigquery::connection::v1::ListConnectionsRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::connection::v1::Connection

◆ ListConnections() [2/2]

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.

Parameters
parentRequired. Parent resource name. Must be in the form: projects/{project_id}/locations/{location_id}
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::connection::v1::Connection

◆ operator=() [1/2]

ConnectionServiceClient & google::cloud::bigquery_connection_v1::ConnectionServiceClient::operator= ( ConnectionServiceClient &&  )
default

◆ operator=() [2/2]

ConnectionServiceClient & google::cloud::bigquery_connection_v1::ConnectionServiceClient::operator= ( ConnectionServiceClient const &  )
default

◆ SetIamPolicy() [1/2]

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.

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

◆ SetIamPolicy() [2/2]

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.

Parameters
resourceREQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
policyREQUIRED: 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.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::iam::v1::Policy

◆ TestIamPermissions() [1/2]

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.

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

◆ TestIamPermissions() [2/2]

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.

Parameters
resourceREQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
permissionsThe set of permissions to check for the resource. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::iam::v1::TestIamPermissionsResponse

◆ UpdateConnection() [1/2]

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.

Parameters
requestgoogle::cloud::bigquery::connection::v1::UpdateConnectionRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::connection::v1::Connection

◆ UpdateConnection() [2/2]

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.

Parameters
nameRequired. Name of the connection to update, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}
connectionRequired. Connection containing the updated fields.
update_maskRequired. Update mask for the connection fields to be updated.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::connection::v1::Connection

Friends And Related Function Documentation

◆ operator!=

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

◆ operator==

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