Skip to main content

Client

Struct Client 

Source
pub struct Client { /* private fields */ }
Expand description

Client for Alien API

Version: 1.0.0

Implementations§

Source§

impl Client

Source

pub fn new(baseurl: &str) -> Self

Create a new client.

baseurl is the base URL provided to the internal reqwest::Client, and should include a scheme and hostname, as well as port and a path stem if applicable.

Source

pub fn new_with_client(baseurl: &str, client: Client) -> Self

Construct a new client with an existing reqwest::Client, allowing more control over its configuration.

baseurl is the base URL provided to the internal reqwest::Client, and should include a scheme and hostname, as well as port and a path stem if applicable.

Source§

impl Client

Source

pub fn list_memberships(&self) -> ListMemberships<'_>

List all workspaces the current user has access to.

Sends a GET request to /v1/user/memberships

let response = client.list_memberships()
    .send()
    .await;
Source

pub fn get_user_profile(&self) -> GetUserProfile<'_>

Get the current user’s profile and user-scoped onboarding state.

Sends a GET request to /v1/user/profile

let response = client.get_user_profile()
    .send()
    .await;
Source

pub fn update_user_profile(&self) -> UpdateUserProfile<'_>

Update the current user’s profile (display name).

Sends a PATCH request to /v1/user/profile

let response = client.update_user_profile()
    .body(body)
    .send()
    .await;
Source

pub fn complete_user_profile_setup(&self) -> CompleteUserProfileSetup<'_>

Complete the required beta intake and profile setup dialog.

Sends a POST request to /v1/user/profile/setup

let response = client.complete_user_profile_setup()
    .body(body)
    .send()
    .await;
Source

pub fn create_workspace(&self) -> CreateWorkspace<'_>

Create a new workspace. The current user will be automatically added as an admin.

Sends a POST request to /v1/user/workspaces

let response = client.create_workspace()
    .body(body)
    .send()
    .await;
Source

pub fn list_git_namespaces(&self) -> ListGitNamespaces<'_>

List all git namespaces (GitHub installations) the current user has access to.

Sends a GET request to /v1/user/git-namespaces

let response = client.list_git_namespaces()
    .provider(provider)
    .send()
    .await;
Source

pub fn sync_git_namespaces(&self) -> SyncGitNamespaces<'_>

Sync git namespaces from the provider. For GitHub, this fetches all app installations accessible to the user.

Sends a POST request to /v1/user/git-namespaces/sync

let response = client.sync_git_namespaces()
    .body(body)
    .send()
    .await;
Source

pub fn list_git_namespace_repositories( &self, ) -> ListGitNamespaceRepositories<'_>

List repositories accessible through a git namespace (GitHub installation).

Sends a GET request to /v1/user/git-namespaces/{id}/repositories

Arguments:

  • id
  • search: Search query to filter repositories by name
let response = client.list_git_namespace_repositories()
    .id(id)
    .search(search)
    .send()
    .await;
Source

pub fn whoami(&self) -> Whoami<'_>

Get the current authenticated principal (user or service account). Works with both session cookies and API keys.

Sends a GET request to /v1/whoami

Arguments:

  • workspace: Workspace to resolve the principal in. Required for user credentials because a user’s role is per-workspace. Service accounts carry their workspace in the credential and may omit it.
let response = client.whoami()
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_workspaces(&self) -> ListWorkspaces<'_>

Retrieve all workspaces.

Sends a GET request to /v1/workspaces

Arguments:

  • cursor: Cursor for pagination - omit for first page
  • limit: Maximum number of items to return per page
  • search: Search workspaces by name
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_workspaces()
    .cursor(cursor)
    .limit(limit)
    .search(search)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_workspace(&self) -> GetWorkspace<'_>

Retrieve a workspace by ID.

Sends a GET request to /v1/workspaces/{id}

Arguments:

  • id: Unique identifier for the workspace.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_workspace()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn delete_workspace(&self) -> DeleteWorkspace<'_>

Delete a workspace. The workspace must have no projects.

Sends a DELETE request to /v1/workspaces/{id}

Arguments:

  • id: Unique identifier for the workspace.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.delete_workspace()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn update_workspace(&self) -> UpdateWorkspace<'_>

Update a workspace.

Sends a PATCH request to /v1/workspaces/{id}

Arguments:

  • id: Unique identifier for the workspace.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.update_workspace()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn list_workspace_members(&self) -> ListWorkspaceMembers<'_>

List all members of a workspace.

Sends a GET request to /v1/workspaces/{id}/members

Arguments:

  • id: Unique identifier for the workspace.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_workspace_members()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn add_workspace_member(&self) -> AddWorkspaceMember<'_>

Add a member to a workspace by email. The user must already have an account.

Sends a POST request to /v1/workspaces/{id}/members

Arguments:

  • id: Unique identifier for the workspace.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.add_workspace_member()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn remove_workspace_member(&self) -> RemoveWorkspaceMember<'_>

Remove a member from a workspace.

Sends a DELETE request to /v1/workspaces/{id}/members/{userId}

Arguments:

  • id: Unique identifier for the workspace.
  • user_id
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.remove_workspace_member()
    .id(id)
    .user_id(user_id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn update_workspace_member(&self) -> UpdateWorkspaceMember<'_>

Update a workspace member’s role.

Sends a PATCH request to /v1/workspaces/{id}/members/{userId}

Arguments:

  • id: Unique identifier for the workspace.
  • user_id
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.update_workspace_member()
    .id(id)
    .user_id(user_id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn dismiss_workspace_onboarding(&self) -> DismissWorkspaceOnboarding<'_>

Mark the Getting Started walkthrough as dismissed for a workspace. The dashboard stops auto-promoting onboarding once this is set; users can still re-enter the walkthrough via the help menu.

Sends a POST request to /v1/workspaces/{id}/dismiss-onboarding

Arguments:

  • id: Unique identifier for the workspace.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.dismiss_workspace_onboarding()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_projects(&self) -> ListProjects<'_>

Retrieve all projects.

Sends a GET request to /v1/projects

Arguments:

  • cursor: Cursor for pagination - omit for first page
  • include: Optional fields to include: deploymentCount, latestRelease
  • limit: Maximum number of items to return per page
  • search: Search projects by name
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_projects()
    .cursor(cursor)
    .include(include)
    .limit(limit)
    .search(search)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn create_project(&self) -> CreateProject<'_>

Create a new project.

Sends a POST request to /v1/projects

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_project()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_project(&self) -> GetProject<'_>

Retrieve a project by ID or name.

Sends a GET request to /v1/projects/{idOrName}

Arguments:

  • id_or_name: Project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_project()
    .id_or_name(id_or_name)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn delete_project(&self) -> DeleteProject<'_>

Delete a project. The project must have no deployments.

Sends a DELETE request to /v1/projects/{idOrName}

Arguments:

  • id_or_name: Project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.delete_project()
    .id_or_name(id_or_name)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn update_project(&self) -> UpdateProject<'_>

Update a project.

Sends a PATCH request to /v1/projects/{idOrName}

Arguments:

  • id_or_name: Project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.update_project()
    .id_or_name(id_or_name)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_project_gcp_o_auth_provider(&self) -> GetProjectGcpOAuthProvider<'_>

Retrieve redacted project-level Google Cloud OAuth provider settings.

Sends a GET request to /v1/projects/{idOrName}/gcp-oauth-provider

Arguments:

  • id_or_name: Project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_project_gcp_o_auth_provider()
    .id_or_name(id_or_name)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn update_project_gcp_o_auth_provider( &self, ) -> UpdateProjectGcpOAuthProvider<'_>

Update project-level Google Cloud OAuth provider settings.

Sends a PUT request to /v1/projects/{idOrName}/gcp-oauth-provider

Arguments:

  • id_or_name: Project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.update_project_gcp_o_auth_provider()
    .id_or_name(id_or_name)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_project_deployment_portal_domain( &self, ) -> GetProjectDeploymentPortalDomain<'_>

Get the deployment portal domain binding for a project.

Sends a GET request to /v1/projects/{idOrName}/deployment-portal-domain

Arguments:

  • id_or_name: Project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_project_deployment_portal_domain()
    .id_or_name(id_or_name)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn create_project_from_template(&self) -> CreateProjectFromTemplate<'_>

Create a project by forking alienplatform/alien into your namespace, then configuring GitHub Actions.

Sends a POST request to /v1/projects/import-template

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_project_from_template()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_project_template_urls(&self) -> GetProjectTemplateUrls<'_>

Get template URLs for deploying setup stacks in this project.

Sends a GET request to /v1/projects/{idOrName}/template-urls

Arguments:

  • id_or_name: Project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_project_template_urls()
    .id_or_name(id_or_name)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_project_active_release(&self) -> GetProjectActiveRelease<'_>

Get the active release for this project. Returns the latest release, or the pinned release if deploymentId is provided and that deployment has a pinned release.

Sends a GET request to /v1/projects/{idOrName}/active-release

Arguments:

  • id_or_name: Project ID or name.
  • deployment_id: Optional deployment ID to check for pinned release
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_project_active_release()
    .id_or_name(id_or_name)
    .deployment_id(deployment_id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_deployment_groups(&self) -> ListDeploymentGroups<'_>

List deployment groups

Sends a GET request to /v1/deployment-groups

Arguments:

  • cursor: Cursor for pagination - omit for first page
  • include: Optional fields to include: project
  • limit: Maximum number of items to return per page
  • project: Filter by project ID or name.
  • search: Search deployment groups by name
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_deployment_groups()
    .cursor(cursor)
    .include(include)
    .limit(limit)
    .project(project)
    .search(search)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn create_deployment_group(&self) -> CreateDeploymentGroup<'_>

Create a new deployment group

Sends a POST request to /v1/deployment-groups

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_deployment_group()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_deployment_group(&self) -> GetDeploymentGroup<'_>

Get deployment group details

Sends a GET request to /v1/deployment-groups/{id}

Arguments:

  • id: Unique identifier for the deployment group.
  • include: Optional fields to include: project
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_deployment_group()
    .id(id)
    .include(include)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn delete_deployment_group(&self) -> DeleteDeploymentGroup<'_>

Delete deployment group

Sends a DELETE request to /v1/deployment-groups/{id}

Arguments:

  • id: Unique identifier for the deployment group.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.delete_deployment_group()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn update_deployment_group(&self) -> UpdateDeploymentGroup<'_>

Update deployment group

Sends a PATCH request to /v1/deployment-groups/{id}

Arguments:

  • id: Unique identifier for the deployment group.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.update_deployment_group()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn create_deployment_group_token(&self) -> CreateDeploymentGroupToken<'_>

Create deployment group token

Creates a deployment-group scoped API key and returns both the token and formatted deployment link

Sends a POST request to /v1/deployment-groups/{id}/tokens

Arguments:

  • id: Unique identifier for the deployment group.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_deployment_group_token()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn list_packages(&self) -> ListPackages<'_>

List packages with optional filters. Returns packages ordered by creation date (newest first).

Sends a GET request to /v1/packages

Arguments:

  • cursor: Cursor for pagination - omit for first page
  • limit: Maximum number of items to return per page
  • project: Filter by project ID or name.
  • search: Search packages by type or version
  • status: Filter by package status
  • type_: Filter by package type
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_packages()
    .cursor(cursor)
    .limit(limit)
    .project(project)
    .search(search)
    .status(status)
    .type_(type_)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_package(&self) -> GetPackage<'_>

Get details of a specific package.

Sends a GET request to /v1/packages/{id}

Arguments:

  • id: Unique identifier for the package.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_package()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn rebuild_packages(&self) -> RebuildPackages<'_>

Rebuild packages for a project. This will cancel any pending packages and create new ones with auto-incremented versions.

Sends a POST request to /v1/packages/rebuild

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.rebuild_packages()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn cancel_package(&self) -> CancelPackage<'_>

Cancel a pending or building package.

Sends a POST request to /v1/packages/{id}/cancel

Arguments:

  • id: Unique identifier for the package.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.cancel_package()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_releases(&self) -> ListReleases<'_>

Retrieve all releases.

Sends a GET request to /v1/releases

Arguments:

  • author: Filter by commit author login or name
  • branch: Filter by git branch (commitRef)
  • created_after: Filter releases created after this date (ISO 8601)
  • created_before: Filter releases created before this date (ISO 8601)
  • cursor: Cursor for pagination - omit for first page
  • include: Optional fields to include: project
  • limit: Maximum number of items to return per page
  • project: Filter by project ID or name.
  • search: Search releases by commit message, branch, SHA, or release ID
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_releases()
    .author(author)
    .branch(branch)
    .created_after(created_after)
    .created_before(created_before)
    .cursor(cursor)
    .include(include)
    .limit(limit)
    .project(project)
    .search(search)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn create_release(&self) -> CreateRelease<'_>

Create a new release.

Sends a POST request to /v1/releases

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_release()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn list_release_branches(&self) -> ListReleaseBranches<'_>

List distinct git branches across releases. Used for filter dropdowns.

Sends a GET request to /v1/releases/branches

Arguments:

  • limit: Maximum number of branches to return
  • project: Filter by project ID or name.
  • search: Search branches by name (case-insensitive contains)
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_release_branches()
    .limit(limit)
    .project(project)
    .search(search)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_release_authors(&self) -> ListReleaseAuthors<'_>

List distinct commit authors across releases. Used for filter dropdowns.

Sends a GET request to /v1/releases/authors

Arguments:

  • limit: Maximum number of authors to return
  • project: Filter by project ID or name.
  • search: Search authors by login or name (case-insensitive contains)
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_release_authors()
    .limit(limit)
    .project(project)
    .search(search)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_release(&self) -> GetRelease<'_>

Retrieve a release by ID.

Sends a GET request to /v1/releases/{id}

Arguments:

  • id: Unique identifier for the release.
  • include: Optional fields to include: project
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_release()
    .id(id)
    .include(include)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_deployments(&self) -> ListDeployments<'_>

Retrieve all deployments.

Sends a GET request to /v1/deployments

Arguments:

  • cursor: Cursor for pagination - omit for first page
  • deployment_group: Filter by deployment group ID or name
  • environment: Filter deployments by effective environment
  • include: Optional fields to include: release, deploymentGroup, project
  • limit: Maximum number of items to return per page
  • manager_id: Filter by manager ID
  • name: Filter by exact deployment name. Must be used with deploymentGroup.
  • project: Filter by project ID or name.
  • search: Search deployments by name, public subdomain, or deployment group name
  • status: Filter deployments by status
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_deployments()
    .cursor(cursor)
    .deployment_group(deployment_group)
    .environment(environment)
    .include(include)
    .limit(limit)
    .manager_id(manager_id)
    .name(name)
    .project(project)
    .search(search)
    .status(status)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn create_deployment(&self) -> CreateDeployment<'_>

Create a new deployment. Deployment group tokens automatically use their group. Workspace/project tokens must provide deploymentGroupId.

Sends a POST request to /v1/deployments

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_deployment()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_deployment_stats(&self) -> GetDeploymentStats<'_>

Get aggregated deployment statistics. Returns total count and breakdown by status.

Sends a GET request to /v1/deployments/stats

Arguments:

  • deployment_group: Filter by deployment group ID or name
  • environment: Filter deployments by effective environment
  • manager_id: Filter by manager ID
  • project: Filter by project ID or name.
  • search: Search deployments by name or deployment group name
  • status: Filter deployments by status
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_deployment_stats()
    .deployment_group(deployment_group)
    .environment(environment)
    .manager_id(manager_id)
    .project(project)
    .search(search)
    .status(status)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_deployment_filter_environments( &self, ) -> ListDeploymentFilterEnvironments<'_>

List distinct effective environments used by deployments. Used for filter dropdowns.

Sends a GET request to /v1/deployments/filter-environments

Arguments:

  • project: Filter by project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_deployment_filter_environments()
    .project(project)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_deployment_filter_deployment_groups( &self, ) -> ListDeploymentFilterDeploymentGroups<'_>

List deployment groups with deployment counts. Used for filter dropdowns.

Sends a GET request to /v1/deployments/filter-deployment-groups

Arguments:

  • limit: Maximum number of items to return
  • project: Filter by project ID or name.
  • search: Search deployment groups by name
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_deployment_filter_deployment_groups()
    .limit(limit)
    .project(project)
    .search(search)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_deployment(&self) -> GetDeployment<'_>

Retrieve a deployment by ID.

Sends a GET request to /v1/deployments/{id}

Arguments:

  • id: Unique identifier for the deployment.
  • include: Optional fields to include: release, deploymentGroup, project
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_deployment()
    .id(id)
    .include(include)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_deployment_connection_info(&self) -> GetDeploymentConnectionInfo<'_>

Get deployment connection information including command endpoint and resource URLs.

Sends a GET request to /v1/deployments/{id}/info

Arguments:

  • id: Unique identifier for the deployment.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_deployment_connection_info()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn import_deployment(&self) -> ImportDeployment<'_>

Import a deployment from resolved setup infrastructure such as CloudFormation, Terraform, or Helm.

Sends a POST request to /v1/deployments/import

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.import_deployment()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn create_setup_registration_operation( &self, ) -> CreateSetupRegistrationOperation<'_>

Start a durable setup registration operation for CloudFormation, Terraform, or Helm.

Sends a POST request to /v1/deployments/setup-registration-operations

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_setup_registration_operation()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_setup_registration_operation( &self, ) -> GetSetupRegistrationOperation<'_>

Get setup registration operation status.

Sends a GET request to /v1/deployments/setup-registration-operations/{id}

Arguments:

  • id: Unique identifier for the setup registration operation.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_setup_registration_operation()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn delete_deployment(&self) -> DeleteDeployment<'_>

Delete, detach, or forget a deployment by ID.

Sends a POST request to /v1/deployments/{id}/delete

Arguments:

  • id: Unique identifier for the deployment.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.delete_deployment()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn redeploy_deployment(&self) -> RedeployDeployment<'_>

Redeploy a running deployment with the same release and fresh environment variables. Sets status to update-pending.

Sends a POST request to /v1/deployments/{id}/redeploy

Arguments:

  • id: Unique identifier for the deployment.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.redeploy_deployment()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn pin_deployment_release(&self) -> PinDeploymentRelease<'_>

Pin or unpin deployment to a specific release. Only works for running deployments. Controller will automatically trigger update to target release.

Sends a POST request to /v1/deployments/{id}/pin-release

Arguments:

  • id: Unique identifier for the deployment.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.pin_deployment_release()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn retry_deployment(&self) -> RetryDeployment<'_>

Retry a failed deployment operation. Uses alien-infra’s retry mechanisms to resume from exact failure point.

Sends a POST request to /v1/deployments/{id}/retry

Arguments:

  • id: Unique identifier for the deployment.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.retry_deployment()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn update_deployment_environment_variables( &self, ) -> UpdateDeploymentEnvironmentVariables<'_>

Update a deployment’s environment variables. If the deployment is running and not locked, the status will be changed to update-pending to trigger a deployment.

Sends a PATCH request to /v1/deployments/{id}/environment-variables

Arguments:

  • id: Unique identifier for the deployment.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.update_deployment_environment_variables()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn create_deployment_token(&self) -> CreateDeploymentToken<'_>

Create a deployment token (deployment-scoped API key). The deployment must exist before creating a token.

Sends a POST request to /v1/deployments/{id}/token

Arguments:

  • id: Unique identifier for the deployment.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_deployment_token()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn list_managers(&self) -> ListManagers<'_>

Retrieve all managers.

Sends a GET request to /v1/managers

Arguments:

  • limit: Maximum number of managers to return
  • search: Search managers by name
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_managers()
    .limit(limit)
    .search(search)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn create_manager(&self) -> CreateManager<'_>

Create a new manager.

Sends a POST request to /v1/managers

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_manager()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn retry_manager_setup(&self) -> RetryManagerSetup<'_>

Revoke previous private-manager setup tokens and issue a fresh setup token/config.

Sends a POST request to /v1/managers/{id}/setup-token

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.retry_manager_setup()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn retry_manager(&self) -> RetryManager<'_>

Retry private-manager setup. Returns a fresh setup action before the internal deployment exists, or requests retry for the internal deployment after it exists.

Sends a POST request to /v1/managers/{id}/retry

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.retry_manager()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn cancel_manager_setup(&self) -> CancelManagerSetup<'_>

Cancel pending private-manager setup, revoke setup/runtime tokens, and remove the undeployed manager record.

Sends a POST request to /v1/managers/{id}/cancel-setup

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.cancel_manager_setup()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_manager(&self) -> GetManager<'_>

Retrieve a manager by ID.

Sends a GET request to /v1/managers/{id}

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_manager()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn delete_manager(&self) -> DeleteManager<'_>

Delete a manager by ID.

Sends a DELETE request to /v1/managers/{id}

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.delete_manager()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_manager_domain_binding(&self) -> GetManagerDomainBinding<'_>

Get the custom domain binding for a private manager.

Sends a GET request to /v1/managers/{id}/domain-binding

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_manager_domain_binding()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn update_manager_domain_binding(&self) -> UpdateManagerDomainBinding<'_>

Create, update, or remove the custom domain binding for a private manager.

Sends a PUT request to /v1/managers/{id}/domain-binding

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.update_manager_domain_binding()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_manager_management_config(&self) -> GetManagerManagementConfig<'_>

Get the management configuration for a manager.

Sends a GET request to /v1/managers/{id}/management-config

Arguments:

  • id: Unique identifier for a manager.
  • platform: Represents the target cloud platform.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_manager_management_config()
    .id(id)
    .platform(platform)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn provision_manager(&self) -> ProvisionManager<'_>

Enqueue provisioning for a manager by ID.

Sends a POST request to /v1/managers/{id}/provision

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.provision_manager()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn update_manager(&self) -> UpdateManager<'_>

Update a manager to a specific release ID or active release.

Sends a POST request to /v1/managers/{id}/update

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.update_manager()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn list_manager_events(&self) -> ListManagerEvents<'_>

Retrieve all events of a manager.

Sends a GET request to /v1/managers/{id}/events

Arguments:

  • id
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_manager_events()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn generate_manager_token(&self) -> GenerateManagerToken<'_>

Generate a short-lived JWT for direct browser → manager communication. Used for fetching command payloads and querying logs without routing sensitive data through the platform API.

Sends a POST request to /v1/managers/{id}/token

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.generate_manager_token()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn resolve_manager_gcp_o_auth_provider( &self, ) -> ResolveManagerGcpOAuthProvider<'_>

Resolve decrypted project-level Google Cloud OAuth provider settings for a manager-side deployment bootstrap.

Sends a POST request to /v1/managers/{id}/gcp-oauth-provider/resolve

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.resolve_manager_gcp_o_auth_provider()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn report_manager_heartbeat(&self) -> ReportManagerHeartbeat<'_>

Report Manager health status and metrics.

Sends a POST request to /v1/managers/{id}/heartbeat

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.report_manager_heartbeat()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_manager_deployment(&self) -> GetManagerDeployment<'_>

Get deployment details for a private manager (internal deployment platform, status, resources).

Sends a GET request to /v1/managers/{id}/deployment

Arguments:

  • id: Unique identifier for a manager.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_manager_deployment()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_api_keys(&self) -> ListApiKeys<'_>

Retrieve all API keys for the current workspace.

Sends a GET request to /v1/api-keys

Arguments:

  • cursor: Cursor for pagination - omit for first page
  • limit: Maximum number of items to return per page
  • project: Filter by project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_api_keys()
    .cursor(cursor)
    .limit(limit)
    .project(project)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn create_api_key(&self) -> CreateApiKey<'_>

Create a new API key.

Sends a POST request to /v1/api-keys

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_api_key()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_api_key(&self) -> GetApiKey<'_>

Retrieve a specific API key.

Sends a GET request to /v1/api-keys/{id}

Arguments:

  • id: Unique identifier for the api key.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_api_key()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn revoke_api_key(&self) -> RevokeApiKey<'_>

Revoke (soft delete) an API key.

Sends a DELETE request to /v1/api-keys/{id}

Arguments:

  • id: Unique identifier for the api key.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.revoke_api_key()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn update_api_key(&self) -> UpdateApiKey<'_>

Update an API key (enable/disable, change description).

Sends a PATCH request to /v1/api-keys/{id}

Arguments:

  • id: Unique identifier for the api key.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.update_api_key()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn delete_api_keys(&self) -> DeleteApiKeys<'_>

Permanently delete multiple API keys.

Sends a POST request to /v1/api-keys/batch-delete

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.delete_api_keys()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn list_domains(&self) -> ListDomains<'_>

List system domains and workspace domains.

Sends a GET request to /v1/domains

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_domains()
    .workspace(workspace)
    .send()
    .await;
Source

pub fn create_domain(&self) -> CreateDomain<'_>

Create a workspace domain and optional initial endpoints.

Sends a POST request to /v1/domains

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_domain()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn create_domain_endpoint(&self) -> CreateDomainEndpoint<'_>

Create an endpoint under a workspace domain.

Sends a POST request to /v1/domains/{id}/endpoints

Arguments:

  • id: Unique identifier for the domain.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_domain_endpoint()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_domain(&self) -> GetDomain<'_>

Get domain by ID.

Sends a GET request to /v1/domains/{id}

Arguments:

  • id: Unique identifier for the domain.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_domain()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn delete_domain(&self) -> DeleteDomain<'_>

Delete a workspace domain.

Sends a DELETE request to /v1/domains/{id}

Arguments:

  • id: Unique identifier for the domain.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.delete_domain()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn refresh_domain(&self) -> RefreshDomain<'_>

Refresh workspace domain verification.

Sends a POST request to /v1/domains/{id}/refresh

Arguments:

  • id: Unique identifier for the domain.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.refresh_domain()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_events(&self) -> ListEvents<'_>

Retrieve all events.

Sends a GET request to /v1/events

Arguments:

  • cursor: Cursor for pagination - omit for first page
  • deployment_id: Filter events to a single deployment.
  • limit: Maximum number of items to return per page
  • project: Filter by project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_events()
    .cursor(cursor)
    .deployment_id(deployment_id)
    .limit(limit)
    .project(project)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_event(&self) -> GetEvent<'_>

Retrieve an event by ID.

Sends a GET request to /v1/events/{id}

Arguments:

  • id: Unique identifier for the event.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_event()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_commands(&self) -> ListCommands<'_>

Retrieve commands. Use for dashboard analytics and command history.

Sends a GET request to /v1/commands

Arguments:

  • created_after: Filter commands created after this date (ISO 8601)
  • created_before: Filter commands created before this date (ISO 8601)
  • cursor: Cursor for pagination - omit for first page
  • deployment_id: Filter by deployment ID
  • include: Optional fields to include: deployment, project
  • limit: Maximum number of items to return per page
  • name: Filter by command name
  • project: Filter by project ID or name.
  • search: Search commands by name
  • state: Filter by command state
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_commands()
    .created_after(created_after)
    .created_before(created_before)
    .cursor(cursor)
    .deployment_id(deployment_id)
    .include(include)
    .limit(limit)
    .name(name)
    .project(project)
    .search(search)
    .state(state)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn create_command(&self) -> CreateCommand<'_>

Create command metadata. Called by manager when processing commands. Returns project info for routing decisions.

Sends a POST request to /v1/commands

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_command()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn list_command_names(&self) -> ListCommandNames<'_>

List distinct command names. Use for filter dropdowns in the dashboard.

Sends a GET request to /v1/commands/names

Arguments:

  • project: Filter by project ID or name.
  • search: Search command names (prefix match)
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_command_names()
    .project(project)
    .search(search)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_command_deployments(&self) -> ListCommandDeployments<'_>

List distinct deployments that have commands, including deployment group info. Use for filter dropdowns in the dashboard.

Sends a GET request to /v1/commands/deployments

Arguments:

  • project: Filter by project ID or name.
  • search: Search deployment or deployment group names
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_command_deployments()
    .project(project)
    .search(search)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_command(&self) -> GetCommand<'_>

Retrieve a command by ID.

Sends a GET request to /v1/commands/{id}

Arguments:

  • id: Unique identifier for the command.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_command()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn update_command(&self) -> UpdateCommand<'_>

Update command state. Called by manager when command is dispatched or completes.

Sends a PATCH request to /v1/commands/{id}

Arguments:

  • id: Unique identifier for the command.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.update_command()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn list_debug_sessions(&self) -> ListDebugSessions<'_>

Retrieve debug sessions for dashboard audit. Filters: project, deployment, state, mode.

Sends a GET request to /v1/debug-sessions

Arguments:

  • cursor: Cursor for pagination - omit for first page
  • deployment_id: Filter by deployment ID
  • limit: Maximum number of items to return per page
  • mode: Filter by deployment model (push/pull). Joins against the parent deployment.
  • project: Filter by project ID or name.
  • provider: Filter by cloud provider. Joins against the parent deployment.
  • state: Filter by session state
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_debug_sessions()
    .cursor(cursor)
    .deployment_id(deployment_id)
    .limit(limit)
    .mode(mode)
    .project(project)
    .provider(provider)
    .state(state)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn create_debug_session(&self) -> CreateDebugSession<'_>

Create a debug-session audit row. Called by the manager when a pull or push debug tunnel is opened. Workspace + project derived from deployment.

Sends a POST request to /v1/debug-sessions

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.create_debug_session()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_debug_session(&self) -> GetDebugSession<'_>

Retrieve a debug session by ID.

Sends a GET request to /v1/debug-sessions/{id}

Arguments:

  • id: Unique identifier for the debug session.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_debug_session()
    .id(id)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn update_debug_session(&self) -> UpdateDebugSession<'_>

Update debug-session state. Called by manager on tunnel attach, close, or deadline expiry.

Sends a PATCH request to /v1/debug-sessions/{id}

Arguments:

  • id: Unique identifier for the debug session.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.update_debug_session()
    .id(id)
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn get_deployment_info(&self) -> GetDeploymentInfo<'_>

Get deployment information for the deployment portal. Accepts both deployment-scoped and deployment-group-scoped API keys. Returns project information, package status/outputs, and either deployment or deployment group details depending on the token type. Poll this endpoint to check if packages are ready.

Sends a GET request to /v1/deployment-info

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_deployment_info()
    .workspace(workspace)
    .send()
    .await;
Source

pub fn plan_deployment_compute(&self) -> PlanDeploymentCompute<'_>

Plan deployment compute for the active release before stack preparation. The response contains recommended machine and scale choices for cloud compute pools.

Sends a POST request to /v1/deployment-info/compute-plan

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.plan_deployment_compute()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn prepare_deployment_stack(&self) -> PrepareDeploymentStack<'_>

Prepare the active release stack for a deployment portal setup session. The response contains the generated stack shape plus setup compatibility metadata.

Sends a POST request to /v1/deployment-info/prepare-stack

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.prepare_deployment_stack()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn sync_list(&self) -> SyncList<'_>

List full deployment records for manager operational loops. This endpoint is intentionally separate from the public deployments list, which returns lightweight UI rows.

Sends a POST request to /v1/sync/list

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.sync_list()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn sync_acquire(&self) -> SyncAcquire<'_>

Acquire a batch of deployments for processing. Used by Manager to atomically lock deployments matching filters. Each deployment in the batch must be released after processing.

Sends a POST request to /v1/sync/acquire

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.sync_acquire()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn sync_reconcile(&self) -> SyncReconcile<'_>

Reconcile deployment state. Push model requests that include a session verify lock ownership. Pull model state reports are accepted as authz-gated agent progress even when they carry an agent-sync session. Accepts full DeploymentState after step() execution.

Sends a POST request to /v1/sync/reconcile

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.sync_reconcile()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn sync_release(&self) -> SyncRelease<'_>

Release a deployment lock. Must be called after processing an acquired deployment, even if processing failed. This is critical to avoid deadlocks.

Sends a POST request to /v1/sync/release

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
  • body
let response = client.sync_release()
    .workspace(workspace)
    .body(body)
    .send()
    .await;
Source

pub fn list_resource_overview(&self) -> ListResourceOverview<'_>

Sends a GET request to /v1/resources/{area}

Arguments:

  • area
  • deployment_group_id
  • deployment_id
  • project: Filter by project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_resource_overview()
    .area(area)
    .deployment_group_id(deployment_group_id)
    .deployment_id(deployment_id)
    .project(project)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_resource_deployments(&self) -> ListResourceDeployments<'_>

Sends a GET request to /v1/resources/{area}/{resourceId}/deployments

Arguments:

  • area
  • resource_id
  • deployment_group_id
  • deployment_id
  • project: Filter by project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_resource_deployments()
    .area(area)
    .resource_id(resource_id)
    .deployment_group_id(deployment_group_id)
    .deployment_id(deployment_id)
    .project(project)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_resource_deployment_detail(&self) -> GetResourceDeploymentDetail<'_>

Sends a GET request to /v1/resources/{area}/deployments/{deploymentId}/{resourceId}

Arguments:

  • area
  • deployment_id
  • resource_id
  • project: Filter by project ID or name.
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_resource_deployment_detail()
    .area(area)
    .deployment_id(deployment_id)
    .resource_id(resource_id)
    .project(project)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn resolve(&self) -> Resolve<'_>

Resolve manager for a project and platform

Returns the manager URL for a given project and platform. The project can be provided as a query parameter, or derived from the token’s scope (project-scoped, deployment-group-scoped, or deployment-scoped tokens carry an implicit project). This is the single entry point for all CLI tools to discover which manager to talk to.

Sends a GET request to /v1/resolve

Arguments:

  • platform: Target platform to resolve the manager for
  • project: Project ID or name. Required for user and workspace-scoped tokens. Optional for project/deployment-group/deployment-scoped tokens (derived from token scope).
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.resolve()
    .platform(platform)
    .project(project)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_cloud_regions(&self) -> GetCloudRegions<'_>

Get cloud regions supported by this Alien environment.

Sends a GET request to /v1/cloud-regions

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_cloud_regions()
    .workspace(workspace)
    .send()
    .await;
Source

pub fn list_billing_audit_log(&self) -> ListBillingAuditLog<'_>

List billing activity entries for the current workspace.

Sends a GET request to /v1/billing/audit-log

Arguments:

  • before: Cursor: id from the previous page.
  • limit
  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.list_billing_audit_log()
    .before(before)
    .limit(limit)
    .workspace(workspace)
    .send()
    .await;
Source

pub fn get_workspace_billing_entitlements( &self, ) -> GetWorkspaceBillingEntitlements<'_>

Get the workspace billing entitlements used for product feature gates. Autumn is the source of truth; the response is served through the workspace billing read model with stale-cache fallback.

Sends a GET request to /v1/billing/entitlements

Arguments:

  • workspace: Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key’s workspace.
let response = client.get_workspace_billing_entitlements()
    .workspace(workspace)
    .send()
    .await;

Trait Implementations§

Source§

impl ClientHooks for &Client

Source§

async fn pre<E>( &self, request: &mut Request, info: &OperationInfo, ) -> Result<(), Error<E>>

Runs prior to the execution of the request. This may be used to modify the request before it is transmitted.
Source§

async fn post<E>( &self, result: &Result<Response, Error>, info: &OperationInfo, ) -> Result<(), Error<E>>

Runs after completion of the request.
Source§

async fn exec( &self, request: Request, info: &OperationInfo, ) -> Result<Response, Error>

Execute the request. Note that for almost any reasonable implementation this will include code equivalent to this: Read more
Source§

impl ClientInfo<()> for Client

Source§

fn api_version() -> &'static str

Get the version of this API. Read more
Source§

fn baseurl(&self) -> &str

Get the base URL to which requests are made.
Source§

fn client(&self) -> &Client

Get the internal reqwest::Client used to make requests.
Source§

fn inner(&self) -> &()

Get the inner value of type T if one is specified.
Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more