Google Cloud Spanner C++ Client  1.32.1
A C++ Client Library for Google Cloud Spanner
Classes | Public Member Functions | List of all members
google::cloud::spanner::v1::InstanceAdminConnection Class Referenceabstract

A connection to the Cloud Spanner instance administration service. More...

#include <google/cloud/spanner/instance_admin_connection.h>

Classes

struct  CreateInstanceParams
 Wrap the arguments for CreateInstance(). More...
 
struct  DeleteInstanceParams
 Wrap the arguments for DeleteInstance(). More...
 
struct  GetIamPolicyParams
 Wrap the arguments for GetIamPolicy(). More...
 
struct  GetInstanceConfigParams
 Wrap the arguments for GetInstanceConfig(). More...
 
struct  GetInstanceParams
 Wrap the arguments for GetInstance(). More...
 
struct  ListInstanceConfigsParams
 Wrap the arguments for ListInstanceConfigs(). More...
 
struct  ListInstancesParams
 Wrap the arguments for ListInstances(). More...
 
struct  SetIamPolicyParams
 Wrap the arguments for SetIamPolicy(). More...
 
struct  TestIamPermissionsParams
 Wrap the arguments for TestIamPermissions(). More...
 
struct  UpdateInstanceParams
 Wrap the arguments for UpdateInstance(). More...
 

Public Member Functions

virtual ~InstanceAdminConnection ()=0
 
Define the arguments for each member function.

Applications may define classes derived from InstanceAdminConnection, for example, because they want to mock the class.

To avoid breaking all such derived classes when we change the number or type of the arguments to the member functions we define light weight structures to pass the arguments.

virtual StatusOr< google::spanner::admin::instance::v1::Instance > GetInstance (GetInstanceParams)=0
 Return the metadata for the given instance. More...
 
virtual future< StatusOr< google::spanner::admin::instance::v1::Instance > > CreateInstance (CreateInstanceParams p)=0
 Return the metadata for the given instance. More...
 
virtual future< StatusOr< google::spanner::admin::instance::v1::Instance > > UpdateInstance (UpdateInstanceParams p)=0
 Return the metadata for the given instance. More...
 
virtual Status DeleteInstance (DeleteInstanceParams p)=0
 Return the metadata for the given instance. More...
 
virtual StatusOr< google::spanner::admin::instance::v1::InstanceConfig > GetInstanceConfig (GetInstanceConfigParams)=0
 Return the InstanceConfig with the given name. More...
 
virtual ListInstanceConfigsRange ListInstanceConfigs (ListInstanceConfigsParams)=0
 Returns a one-pass input range with all the instance configs. More...
 
virtual ListInstancesRange ListInstances (ListInstancesParams params)=0
 Returns a one-pass input range with all the instances meeting the requirements in params. More...
 
virtual StatusOr< google::iam::v1::Policy > GetIamPolicy (GetIamPolicyParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.GetIamPolicy RPC. More...
 
virtual StatusOr< google::iam::v1::Policy > SetIamPolicy (SetIamPolicyParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.SetIamPolicy RPC. More...
 
virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions (TestIamPermissionsParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.TestIamPermissions RPC. More...
 

Detailed Description

A connection to the Cloud Spanner instance administration service.

This interface defines pure-virtual methods for each of the user-facing overload sets in InstanceAdminClient. This allows users to inject custom behavior (e.g., with a Google Mock object) in a InstanceAdminClient object for use in their own tests.

To create a concrete instance that connects you to a real Cloud Spanner instance administration service, see MakeInstanceAdminConnection().

Definition at line 70 of file instance_admin_connection.h.

Constructor & Destructor Documentation

◆ ~InstanceAdminConnection()

google::cloud::spanner::v1::InstanceAdminConnection::~InstanceAdminConnection ( )
pure virtualdefault

Member Function Documentation

◆ CreateInstance()

virtual future<StatusOr<google::spanner::admin::instance::v1::Instance> > google::cloud::spanner::v1::InstanceAdminConnection::CreateInstance ( CreateInstanceParams  p)
pure virtual

Return the metadata for the given instance.

◆ DeleteInstance()

virtual Status google::cloud::spanner::v1::InstanceAdminConnection::DeleteInstance ( DeleteInstanceParams  p)
pure virtual

Return the metadata for the given instance.

◆ GetIamPolicy()

virtual StatusOr<google::iam::v1::Policy> google::cloud::spanner::v1::InstanceAdminConnection::GetIamPolicy ( GetIamPolicyParams  )
pure virtual

Define the interface for a google.spanner.v1.DatabaseAdmin.GetIamPolicy RPC.

◆ GetInstance()

virtual StatusOr<google::spanner::admin::instance::v1::Instance> google::cloud::spanner::v1::InstanceAdminConnection::GetInstance ( GetInstanceParams  )
pure virtual

Return the metadata for the given instance.

◆ GetInstanceConfig()

virtual StatusOr<google::spanner::admin::instance::v1::InstanceConfig> google::cloud::spanner::v1::InstanceAdminConnection::GetInstanceConfig ( GetInstanceConfigParams  )
pure virtual

Return the InstanceConfig with the given name.

◆ ListInstanceConfigs()

virtual ListInstanceConfigsRange google::cloud::spanner::v1::InstanceAdminConnection::ListInstanceConfigs ( ListInstanceConfigsParams  )
pure virtual

Returns a one-pass input range with all the instance configs.

◆ ListInstances()

virtual ListInstancesRange google::cloud::spanner::v1::InstanceAdminConnection::ListInstances ( ListInstancesParams  params)
pure virtual

Returns a one-pass input range with all the instances meeting the requirements in params.

◆ SetIamPolicy()

virtual StatusOr<google::iam::v1::Policy> google::cloud::spanner::v1::InstanceAdminConnection::SetIamPolicy ( SetIamPolicyParams  )
pure virtual

Define the interface for a google.spanner.v1.DatabaseAdmin.SetIamPolicy RPC.

◆ TestIamPermissions()

virtual StatusOr<google::iam::v1::TestIamPermissionsResponse> google::cloud::spanner::v1::InstanceAdminConnection::TestIamPermissions ( TestIamPermissionsParams  )
pure virtual

Define the interface for a google.spanner.v1.DatabaseAdmin.TestIamPermissions RPC.

◆ UpdateInstance()

virtual future<StatusOr<google::spanner::admin::instance::v1::Instance> > google::cloud::spanner::v1::InstanceAdminConnection::UpdateInstance ( UpdateInstanceParams  p)
pure virtual

Return the metadata for the given instance.