pub struct ConnectionServiceClient<T>(/* private fields */);
Expand description
A Connection contains the relevant metadata and information to be used as a data source for runs. The Connection Service is responsible for creating, updating, and retrieving database connections.
Implementations§
Source§impl<T> ConnectionServiceClient<T>where
T: Client,
impl<T> ConnectionServiceClient<T>where
T: Client,
Sourcepub fn create_connection(
&self,
auth_: &BearerToken,
create_connection: &CreateConnection,
) -> Result<Connection, Error>
pub fn create_connection( &self, auth_: &BearerToken, create_connection: &CreateConnection, ) -> Result<Connection, Error>
Creates a new connection.
Sourcepub fn update_connection(
&self,
auth_: &BearerToken,
rid: &ConnectionRid,
request: &UpdateConnectionRequest,
) -> Result<Connection, Error>
pub fn update_connection( &self, auth_: &BearerToken, rid: &ConnectionRid, request: &UpdateConnectionRequest, ) -> Result<Connection, Error>
Updates an existing connection.
Sourcepub fn update_connection_status(
&self,
auth_: &BearerToken,
rid: &ConnectionRid,
request: &ConnectionStatus,
) -> Result<(), Error>
pub fn update_connection_status( &self, auth_: &BearerToken, rid: &ConnectionRid, request: &ConnectionStatus, ) -> Result<(), Error>
Updates an existing connection status.
Adds available tag key/value pairs to the connection. If a tag name already exists, the values will be merged.
Sourcepub fn get_connection(
&self,
auth_: &BearerToken,
rid: &ConnectionRid,
) -> Result<Connection, Error>
pub fn get_connection( &self, auth_: &BearerToken, rid: &ConnectionRid, ) -> Result<Connection, Error>
Gets a connection by its RID.
Sourcepub fn get_connections(
&self,
auth_: &BearerToken,
rids: &BTreeSet<ConnectionRid>,
) -> Result<BTreeSet<Connection>, Error>
pub fn get_connections( &self, auth_: &BearerToken, rids: &BTreeSet<ConnectionRid>, ) -> Result<BTreeSet<Connection>, Error>
Gets a set of connections by their RIDs.
Sourcepub fn list_connections(
&self,
auth_: &BearerToken,
include_archived: Option<bool>,
workspaces: &BTreeSet<WorkspaceRid>,
) -> Result<BTreeSet<Connection>, Error>
pub fn list_connections( &self, auth_: &BearerToken, include_archived: Option<bool>, workspaces: &BTreeSet<WorkspaceRid>, ) -> Result<BTreeSet<Connection>, Error>
Lists all connections.
Sourcepub fn archive_connection(
&self,
auth_: &BearerToken,
rid: &ConnectionRid,
) -> Result<(), Error>
pub fn archive_connection( &self, auth_: &BearerToken, rid: &ConnectionRid, ) -> Result<(), Error>
Archives a connection, which simply tags the connection for a client to filter.
Sourcepub fn unarchive_connection(
&self,
auth_: &BearerToken,
rid: &ConnectionRid,
) -> Result<(), Error>
pub fn unarchive_connection( &self, auth_: &BearerToken, rid: &ConnectionRid, ) -> Result<(), Error>
Undoes the archiving of a connection.
Trait Implementations§
Source§impl<T: Clone> Clone for ConnectionServiceClient<T>
impl<T: Clone> Clone for ConnectionServiceClient<T>
Source§fn clone(&self) -> ConnectionServiceClient<T>
fn clone(&self) -> ConnectionServiceClient<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for ConnectionServiceClient<T>
impl<T: Debug> Debug for ConnectionServiceClient<T>
Auto Trait Implementations§
impl<T> Freeze for ConnectionServiceClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for ConnectionServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for ConnectionServiceClient<T>where
T: Send,
impl<T> Sync for ConnectionServiceClient<T>where
T: Sync,
impl<T> Unpin for ConnectionServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for ConnectionServiceClient<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more