pub struct OrkesMetadataClient { /* private fields */ }Expand description
Extended metadata client with Orkes-specific features (tagging APIs).
This client provides all the functionality of MetadataClient plus
tagging capabilities for workflows and tasks. Use Deref to access
base methods transparently.
§Example
let orkes_metadata = client.orkes_metadata_client();
// Access base methods via Deref
orkes_metadata.register_workflow_def(&workflow).await?;
// Use Orkes-specific tagging methods
let tag = MetadataTag::with_value("env", "production");
orkes_metadata.add_workflow_tag("my-workflow", &tag).await?;Implementations§
Source§impl OrkesMetadataClient
impl OrkesMetadataClient
Sourcepub async fn add_workflow_tag(
&self,
workflow_name: &str,
tag: &MetadataTag,
) -> Result<()>
pub async fn add_workflow_tag( &self, workflow_name: &str, tag: &MetadataTag, ) -> Result<()>
Add a tag to a workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Get all tags for a workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Set tags for a workflow definition (replaces existing tags).
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn delete_workflow_tag(
&self,
workflow_name: &str,
tag: &MetadataTag,
) -> Result<()>
pub async fn delete_workflow_tag( &self, workflow_name: &str, tag: &MetadataTag, ) -> Result<()>
Delete a tag from a workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn add_task_tag(
&self,
task_name: &str,
tag: &MetadataTag,
) -> Result<()>
pub async fn add_task_tag( &self, task_name: &str, tag: &MetadataTag, ) -> Result<()>
Add a tag to a task definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Get all tags for a task definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Set tags for a task definition (replaces existing tags).
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn delete_task_tag(
&self,
task_name: &str,
tag: &MetadataTag,
) -> Result<()>
pub async fn delete_task_tag( &self, task_name: &str, tag: &MetadataTag, ) -> Result<()>
Delete a tag from a task definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Methods from Deref<Target = MetadataClient>§
Sourcepub async fn register_workflow_def(&self, workflow: &WorkflowDef) -> Result<()>
pub async fn register_workflow_def(&self, workflow: &WorkflowDef) -> Result<()>
Register a new workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn update_workflow_def(&self, workflow: &WorkflowDef) -> Result<()>
pub async fn update_workflow_def(&self, workflow: &WorkflowDef) -> Result<()>
Update an existing workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn register_or_update_workflow_def(
&self,
workflow: &WorkflowDef,
overwrite: bool,
) -> Result<()>
pub async fn register_or_update_workflow_def( &self, workflow: &WorkflowDef, overwrite: bool, ) -> Result<()>
Register or update a workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_workflow_def(
&self,
name: &str,
version: Option<i32>,
) -> Result<WorkflowDef>
pub async fn get_workflow_def( &self, name: &str, version: Option<i32>, ) -> Result<WorkflowDef>
Get a workflow definition by name and version.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_all_workflow_def_versions(
&self,
name: &str,
) -> Result<Vec<WorkflowDef>>
pub async fn get_all_workflow_def_versions( &self, name: &str, ) -> Result<Vec<WorkflowDef>>
Get all versions of a workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_all_workflow_defs(&self) -> Result<Vec<WorkflowDef>>
pub async fn get_all_workflow_defs(&self) -> Result<Vec<WorkflowDef>>
Get all workflow definitions.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_all_workflow_defs_latest_versions(
&self,
) -> Result<Vec<WorkflowDef>>
pub async fn get_all_workflow_defs_latest_versions( &self, ) -> Result<Vec<WorkflowDef>>
Get all workflow definitions with latest versions (alias for get_all_workflow_defs).
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn delete_workflow_def(&self, name: &str, version: i32) -> Result<()>
pub async fn delete_workflow_def(&self, name: &str, version: i32) -> Result<()>
Delete a workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn register_task_def(&self, task: &TaskDef) -> Result<()>
pub async fn register_task_def(&self, task: &TaskDef) -> Result<()>
Register a new task definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn register_task_defs(&self, tasks: &[TaskDef]) -> Result<()>
pub async fn register_task_defs(&self, tasks: &[TaskDef]) -> Result<()>
Register multiple task definitions.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn update_task_def(&self, task: &TaskDef) -> Result<()>
pub async fn update_task_def(&self, task: &TaskDef) -> Result<()>
Update a task definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_task_def(&self, name: &str) -> Result<TaskDef>
pub async fn get_task_def(&self, name: &str) -> Result<TaskDef>
Get a task definition by name.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_all_task_defs(&self) -> Result<Vec<TaskDef>>
pub async fn get_all_task_defs(&self) -> Result<Vec<TaskDef>>
Get all task definitions.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn delete_task_def(&self, name: &str) -> Result<()>
pub async fn delete_task_def(&self, name: &str) -> Result<()>
Delete a task definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn task_def_exists(&self, name: &str) -> Result<bool>
pub async fn task_def_exists(&self, name: &str) -> Result<bool>
Check if a task definition exists.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn workflow_def_exists(
&self,
name: &str,
version: Option<i32>,
) -> Result<bool>
pub async fn workflow_def_exists( &self, name: &str, version: Option<i32>, ) -> Result<bool>
Check if a workflow definition exists.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.