pub struct AgentDeploymentResource<'a> { /* private fields */ }Expand description
Cloud agent deployments. Reached via AgentsResource::deployment.
Implementations§
Source§impl<'a> AgentDeploymentResource<'a>
impl<'a> AgentDeploymentResource<'a>
Sourcepub async fn list(
&self,
params: ListDeploymentsParams,
) -> Result<Page<AgentDeployment>>
pub async fn list( &self, params: ListDeploymentsParams, ) -> Result<Page<AgentDeployment>>
Lists cloud agent deployments, one page at a time.
Sourcepub fn list_stream(
&self,
params: ListDeploymentsParams,
) -> impl Stream<Item = Result<AgentDeployment>> + Send
pub fn list_stream( &self, params: ListDeploymentsParams, ) -> impl Stream<Item = Result<AgentDeployment>> + Send
Lists deployments, transparently fetching every page.
Sourcepub async fn get(&self, deployment_id: &str) -> Result<AgentDeployment>
pub async fn get(&self, deployment_id: &str) -> Result<AgentDeployment>
Fetches a single deployment by id.
There is no get-by-id route, so this filters the list.
Sourcepub async fn get_latest_version(
&self,
deployment_id: &str,
) -> Result<AgentDeploymentVersion>
pub async fn get_latest_version( &self, deployment_id: &str, ) -> Result<AgentDeploymentVersion>
Fetches the latest version of a deployment.
Sourcepub async fn logs(
&self,
deployment_id: &str,
params: ListDeploymentLogsParams,
) -> Result<Page<AgentLogEntry>>
pub async fn logs( &self, deployment_id: &str, params: ListDeploymentLogsParams, ) -> Result<Page<AgentLogEntry>>
Lists a deployment’s console logs, one page at a time.
This is a historical query — the last 24 hours by default — not a live stream.
Sourcepub fn logs_stream(
&self,
deployment_id: &str,
params: ListDeploymentLogsParams,
) -> impl Stream<Item = Result<AgentLogEntry>> + Send
pub fn logs_stream( &self, deployment_id: &str, params: ListDeploymentLogsParams, ) -> impl Stream<Item = Result<AgentLogEntry>> + Send
Lists a deployment’s console logs, transparently fetching every page.
Sourcepub async fn delete(
&self,
deployment_id: &str,
force: bool,
) -> Result<MessageResponse>
pub async fn delete( &self, deployment_id: &str, force: bool, ) -> Result<MessageResponse>
Soft-deletes a deployment.
Sourcepub async fn create(&self, params: DeployAgentParams) -> Result<DeployedAgent>
pub async fn create(&self, params: DeployAgentParams) -> Result<DeployedAgent>
Deploys a pre-built agent image.
This makes three calls: a secret holding env (only when env is
non-empty), the deployment, then its auto-activated version.
It is not transactional. If a later call fails, the earlier artifacts
already exist — clean up with delete.
Sourcepub async fn set_version_active(
&self,
version_id: &str,
activate: bool,
force: bool,
) -> Result<MessageResponse>
pub async fn set_version_active( &self, version_id: &str, activate: bool, force: bool, ) -> Result<MessageResponse>
Re-points a deployment at a version, or stops it.
activate: true rolls onto version_id; activate: false stops the
running version. Not needed after
create, which already activates.
Trait Implementations§
Source§impl<'a> Clone for AgentDeploymentResource<'a>
impl<'a> Clone for AgentDeploymentResource<'a>
Source§fn clone(&self) -> AgentDeploymentResource<'a>
fn clone(&self) -> AgentDeploymentResource<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more