pub struct Client { /* private fields */ }Expand description
Client for AmazonMWAAServerless
Client for invoking operations on AmazonMWAAServerless. Each operation on AmazonMWAAServerless is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_mwaaserverless::Client::new(&config);Occasionally, SDKs may have additional service-specific values that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Builder struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_mwaaserverless::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the CreateWorkflow operation has
a Client::create_workflow, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.create_workflow()
.name("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn create_workflow(&self) -> CreateWorkflowFluentBuilder
pub fn create_workflow(&self) -> CreateWorkflowFluentBuilder
Constructs a fluent builder for the CreateWorkflow operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the workflow. You must use unique workflow names within your Amazon Web Services account. The service generates a unique identifier that is appended to ensure temporal uniqueness across the account lifecycle.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token prevents duplicate workflow creation requests.
definition_s3_location(DefinitionS3Location)/set_definition_s3_location(Option<DefinitionS3Location>):
required: trueThe Amazon S3 location where the workflow definition file is stored. This must point to a valid YAML file that defines the workflow structure using supported Amazon Web Services operators and tasks. Amazon Managed Workflows for Apache Airflow Serverless takes a snapshot of the definition at creation time, so subsequent changes to the Amazon S3 object will not affect the workflow unless you create a new version. In your YAML definition, include task dependencies, scheduling information, and operator configurations that are compatible with the Amazon Managed Workflows for Apache Airflow Serverless execution environment.
role_arn(impl Into<String>)/set_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that Amazon Managed Workflows for Apache Airflow Serverless assumes when executing the workflow. This role must have the necessary permissions to access the required Amazon Web Services services and resources that your workflow tasks will interact with. The role is used for task execution in the isolated, multi-tenant environment and should follow the principle of least privilege. Amazon Managed Workflows for Apache Airflow Serverless validates role access during workflow creation but runtime permission checks are performed by the target services.
description(impl Into<String>)/set_description(Option<String>):
required: falseAn optional description of the workflow that you can use to provide additional context about the workflow’s purpose and functionality.
encryption_configuration(EncryptionConfiguration)/set_encryption_configuration(Option<EncryptionConfiguration>):
required: falseThe configuration for encrypting workflow data at rest and in transit. Specifies the encryption type and optional KMS key for customer-managed encryption.
logging_configuration(LoggingConfiguration)/set_logging_configuration(Option<LoggingConfiguration>):
required: falseThe configuration for workflow logging. Specifies the CloudWatch log group where workflow execution logs are stored. Amazon Managed Workflows for Apache Airflow Serverless automatically exports worker logs and task-level information to the specified log group in your account using remote logging functionality. This provides comprehensive observability for debugging and monitoring workflow execution across the distributed, serverless environment.
engine_version(i32)/set_engine_version(Option<i32>):
required: falseThe version of the Amazon Managed Workflows for Apache Airflow Serverless engine that you want to use for this workflow. This determines the feature set, supported operators, and execution environment capabilities available to your workflow. Amazon Managed Workflows for Apache Airflow Serverless maintains backward compatibility across versions while introducing new features and improvements. Currently supports version 1 with plans for additional versions as the service evolves.
network_configuration(NetworkConfiguration)/set_network_configuration(Option<NetworkConfiguration>):
required: falseNetwork configuration for the workflow execution environment, including VPC security groups and subnets for secure network access. When specified, Amazon Managed Workflows for Apache Airflow Serverless deploys ECS worker tasks in your customer VPC to provide secure connectivity to your resources. If not specified, tasks run in the service’s default worker VPC with network isolation from other customers. This configuration enables secure access to VPC-only resources like RDS databases or private endpoints.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA map of tags to assign to the workflow resource. Tags are key-value pairs that are used for resource organization and cost allocation.
trigger_mode(impl Into<String>)/set_trigger_mode(Option<String>):
required: falseThe trigger mode for the workflow execution.
- On success, responds with
CreateWorkflowOutputwith field(s):workflow_arn(String):The Amazon Resource Name (ARN) of the newly created workflow. This ARN uniquely identifies the workflow resource.
created_at(Option<DateTime>):The timestamp when the workflow was created, in ISO 8601 date-time format.
revision_id(Option<String>):A unique identifier for this revision of the workflow configuration. This ID changes when the workflow is updated and you can use it for optimistic concurrency control in update operations. The revision ID helps prevent conflicting updates and ensures that updates are applied to the expected version of the workflow configuration.
workflow_status(Option<WorkflowStatus>):The current status of the workflow. Possible values are
READY(workflow is ready to run) andDELETING(workflow is being deleted).workflow_version(Option<String>):The version identifier of the workflow. This is a service-generated alphanumeric string that uniquely identifies this version of the workflow. Amazon Managed Workflows for Apache Airflow Serverless uses a version-first approach where each workflow can have multiple immutable versions, which allows you to maintain different configurations and roll back to previous versions as needed. The version identifier is used in ARNs and API operations to reference specific workflow versions.
is_latest_version(Option<bool>):A Boolean flag that indicates whether this workflow version is the latest version of the workflow.
warnings(Option<Vec::<String>>):Warning messages generated during workflow creation.
- On failure, responds with
SdkError<CreateWorkflowError>
Source§impl Client
impl Client
Sourcepub fn delete_workflow(&self) -> DeleteWorkflowFluentBuilder
pub fn delete_workflow(&self) -> DeleteWorkflowFluentBuilder
Constructs a fluent builder for the DeleteWorkflow operation.
- The fluent builder is configurable:
workflow_arn(impl Into<String>)/set_workflow_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the workflow you want to delete.
workflow_version(impl Into<String>)/set_workflow_version(Option<String>):
required: falseOptional. The specific version of the workflow to delete. If not specified, all versions of the workflow are deleted.
- On success, responds with
DeleteWorkflowOutputwith field(s):workflow_arn(String):The Amazon Resource Name (ARN) of the deleted workflow.
workflow_version(Option<String>):The version of the workflow that was deleted.
- On failure, responds with
SdkError<DeleteWorkflowError>
Source§impl Client
impl Client
Sourcepub fn get_task_instance(&self) -> GetTaskInstanceFluentBuilder
pub fn get_task_instance(&self) -> GetTaskInstanceFluentBuilder
Constructs a fluent builder for the GetTaskInstance operation.
- The fluent builder is configurable:
workflow_arn(impl Into<String>)/set_workflow_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the workflow that contains the task instance.
task_instance_id(impl Into<String>)/set_task_instance_id(Option<String>):
required: trueThe unique identifier of the task instance to retrieve.
run_id(impl Into<String>)/set_run_id(Option<String>):
required: trueThe unique identifier of the workflow run that contains the task instance.
- On success, responds with
GetTaskInstanceOutputwith field(s):workflow_arn(String):The Amazon Resource Name (ARN) of the workflow that contains this task instance.
run_id(String):The unique identifier of the workflow run that contains this task instance.
task_instance_id(String):The unique identifier of this task instance.
workflow_version(Option<String>):The version of the workflow that contains this task instance.
status(Option<TaskInstanceStatus>):The current status of the task instance.
duration_in_seconds(Option<i32>):The duration of the task instance execution in seconds. This value is null if the task is not complete.
operator_name(Option<String>):The name of the Apache Airflow operator used for this task instance.
modified_at(Option<DateTime>):The timestamp when the task instance was last modified, in ISO 8601 date-time format.
ended_at(Option<DateTime>):The timestamp when the task instance completed execution, in ISO 8601 date-time format. This value is null if the task is not complete.
started_at(Option<DateTime>):The timestamp when the task instance started execution, in ISO 8601 date-time format. This value is null if the task has not started.
attempt_number(Option<i32>):The attempt number for this task instance.
error_message(Option<String>):The error message if the task instance failed. This value is null if the task completed successfully.
task_id(Option<String>):The unique identifier of the task definition within the workflow.
log_stream(Option<String>):The CloudWatch log stream name for this task instance execution.
xcom(Option<HashMap::<String, String>>):Cross-communication data exchanged between tasks in the workflow execution.
- On failure, responds with
SdkError<GetTaskInstanceError>
Source§impl Client
impl Client
Sourcepub fn get_workflow(&self) -> GetWorkflowFluentBuilder
pub fn get_workflow(&self) -> GetWorkflowFluentBuilder
Constructs a fluent builder for the GetWorkflow operation.
- The fluent builder is configurable:
workflow_arn(impl Into<String>)/set_workflow_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the workflow you want to retrieve.
workflow_version(impl Into<String>)/set_workflow_version(Option<String>):
required: falseOptional. The specific version of the workflow to retrieve. If not specified, the latest version is returned.
- On success, responds with
GetWorkflowOutputwith field(s):workflow_arn(String):The Amazon Resource Name (ARN) of the workflow.
workflow_version(Option<String>):The version identifier of the workflow.
name(Option<String>):The name of the workflow.
description(Option<String>):The description of the workflow.
created_at(Option<DateTime>):The timestamp when the workflow was created, in ISO 8601 date-time format.
modified_at(Option<DateTime>):The timestamp when the workflow was last modified, in ISO 8601 date-time format.
encryption_configuration(Option<EncryptionConfiguration>):The encryption configuration for the workflow.
logging_configuration(Option<LoggingConfiguration>):The logging configuration for the workflow.
engine_version(Option<i32>):The version of the Amazon Managed Workflows for Apache Airflow Serverless engine that this workflow uses.
workflow_status(Option<WorkflowStatus>):The current status of the workflow.
definition_s3_location(Option<DefinitionS3Location>):The Amazon S3 location of the workflow definition file.
schedule_configuration(Option<ScheduleConfiguration>):The schedule configuration for the workflow, including cron expressions for automated execution. Amazon Managed Workflows for Apache Airflow Serverless uses EventBridge Scheduler for cost-effective, timezone-aware scheduling. When a workflow includes schedule information in its YAML definition, the service automatically configures the appropriate triggers for automated execution. Only one version of a workflow can have an active schedule at any given time.
role_arn(Option<String>):The Amazon Resource Name (ARN) of the IAM role used for workflow execution.
network_configuration(Option<NetworkConfiguration>):The network configuration for the workflow execution environment.
trigger_mode(Option<String>):The trigger mode for the workflow execution.
workflow_definition(Option<String>):The workflow definition content.
- On failure, responds with
SdkError<GetWorkflowError>
Source§impl Client
impl Client
Sourcepub fn get_workflow_run(&self) -> GetWorkflowRunFluentBuilder
pub fn get_workflow_run(&self) -> GetWorkflowRunFluentBuilder
Constructs a fluent builder for the GetWorkflowRun operation.
- The fluent builder is configurable:
workflow_arn(impl Into<String>)/set_workflow_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the workflow that contains the run.
run_id(impl Into<String>)/set_run_id(Option<String>):
required: trueThe unique identifier of the workflow run to retrieve.
- On success, responds with
GetWorkflowRunOutputwith field(s):workflow_arn(Option<String>):The Amazon Resource Name (ARN) of the workflow that contains this run.
workflow_version(Option<String>):The version of the workflow that is used for this run.
run_id(Option<String>):The unique identifier of this workflow run.
run_type(Option<RunType>):The type of workflow run. Values are
ON_DEMAND(manually triggered) orSCHEDULED(automatically triggered by schedule).override_parameters(Option<HashMap::<String, Document>>):Parameters that were overridden for this specific workflow run.
run_detail(Option<WorkflowRunDetail>):Detailed information about the workflow run execution, including timing, status, and task instances.
- On failure, responds with
SdkError<GetWorkflowRunError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource for which to list tags.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap::<String, String>>):A map of tags that are associated with the resource, where each tag consists of a key-value pair.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn list_task_instances(&self) -> ListTaskInstancesFluentBuilder
pub fn list_task_instances(&self) -> ListTaskInstancesFluentBuilder
Constructs a fluent builder for the ListTaskInstances operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
workflow_arn(impl Into<String>)/set_workflow_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the workflow that contains the run.
run_id(impl Into<String>)/set_run_id(Option<String>):
required: trueThe unique identifier of the workflow run for which you want a list of task instances.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of task instances to return in a single response.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token you need to use to retrieve the next set of results. This value is returned from a previous call to
ListTaskInstances.
- On success, responds with
ListTaskInstancesOutputwith field(s):task_instances(Option<Vec::<TaskInstanceSummary>>):A list of task instance summaries for the specified workflow run.
next_token(Option<String>):The pagination token you need to use to retrieve the next set of results. This value is null if there are no more results.
- On failure, responds with
SdkError<ListTaskInstancesError>
Source§impl Client
impl Client
Sourcepub fn list_workflow_runs(&self) -> ListWorkflowRunsFluentBuilder
pub fn list_workflow_runs(&self) -> ListWorkflowRunsFluentBuilder
Constructs a fluent builder for the ListWorkflowRuns operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of workflow runs to return in a single response.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token you need to use to retrieve the next set of results. This value is returned from a previous call to
ListWorkflowRuns.workflow_arn(impl Into<String>)/set_workflow_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the workflow for which you want a list of runs.
workflow_version(impl Into<String>)/set_workflow_version(Option<String>):
required: falseOptional. The specific version of the workflow for which you want a list of runs. If not specified, runs for all versions are returned.
- On success, responds with
ListWorkflowRunsOutputwith field(s):workflow_runs(Option<Vec::<WorkflowRunSummary>>):A list of workflow run summaries for the specified workflow.
next_token(Option<String>):The pagination token you need to use to retrieve the next set of results. This value is null if there are no more results.
- On failure, responds with
SdkError<ListWorkflowRunsError>
Source§impl Client
impl Client
Sourcepub fn list_workflow_versions(&self) -> ListWorkflowVersionsFluentBuilder
pub fn list_workflow_versions(&self) -> ListWorkflowVersionsFluentBuilder
Constructs a fluent builder for the ListWorkflowVersions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of workflow versions to return in a single response.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token you need to use to retrieve the next set of results. This value is returned from a previous call to
ListWorkflowVersions.workflow_arn(impl Into<String>)/set_workflow_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the workflow for which you want to list versions.
- On success, responds with
ListWorkflowVersionsOutputwith field(s):workflow_versions(Option<Vec::<WorkflowVersionSummary>>):A list of workflow version summaries for the specified workflow.
next_token(Option<String>):The pagination token you need to use to retrieve the next set of results. This value is null if there are no more results.
- On failure, responds with
SdkError<ListWorkflowVersionsError>
Source§impl Client
impl Client
Sourcepub fn list_workflows(&self) -> ListWorkflowsFluentBuilder
pub fn list_workflows(&self) -> ListWorkflowsFluentBuilder
Constructs a fluent builder for the ListWorkflows operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of workflows you want to return in a single response.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token you need to use to retrieve the next set of results. This value is returned from a previous call to
ListWorkflows.
- On success, responds with
ListWorkflowsOutputwith field(s):workflows(Vec::<WorkflowSummary>):A list of workflow summaries for all workflows in your account.
next_token(Option<String>):The pagination token you need to use to retrieve the next set of results. This value is null if there are no more results.
- On failure, responds with
SdkError<ListWorkflowsError>
Source§impl Client
impl Client
Sourcepub fn start_workflow_run(&self) -> StartWorkflowRunFluentBuilder
pub fn start_workflow_run(&self) -> StartWorkflowRunFluentBuilder
Constructs a fluent builder for the StartWorkflowRun operation.
- The fluent builder is configurable:
workflow_arn(impl Into<String>)/set_workflow_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the workflow you want to run.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token prevents duplicate workflow run requests.
override_parameters(impl Into<String>, Document)/set_override_parameters(Option<HashMap::<String, Document>>):
required: falseOptional parameters to override default workflow parameters for this specific run. These parameters are passed to the workflow during execution and can be used to customize behavior without modifying the workflow definition. Parameters are made available as environment variables to tasks and you can reference them within the YAML workflow definition using standard parameter substitution syntax.
workflow_version(impl Into<String>)/set_workflow_version(Option<String>):
required: falseOptional. The specific version of the workflow to execute. If not specified, the latest version is used.
- On success, responds with
StartWorkflowRunOutputwith field(s):run_id(Option<String>):The unique identifier of the newly started workflow run.
status(Option<WorkflowRunStatus>):The initial status of the workflow run. This is typically
STARTINGwhen you first create the run.started_at(Option<DateTime>):The timestamp when the workflow run was started, in ISO 8601 date-time format.
- On failure, responds with
SdkError<StartWorkflowRunError>
Source§impl Client
impl Client
Sourcepub fn stop_workflow_run(&self) -> StopWorkflowRunFluentBuilder
pub fn stop_workflow_run(&self) -> StopWorkflowRunFluentBuilder
Constructs a fluent builder for the StopWorkflowRun operation.
- The fluent builder is configurable:
workflow_arn(impl Into<String>)/set_workflow_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the workflow that contains the run you want to stop.
run_id(impl Into<String>)/set_run_id(Option<String>):
required: trueThe unique identifier of the workflow run to stop.
- On success, responds with
StopWorkflowRunOutputwith field(s):workflow_arn(Option<String>):The Amazon Resource Name (ARN) of the workflow that contains the stopped run.
workflow_version(Option<String>):The version of the workflow that was stopped.
run_id(Option<String>):The unique identifier of the stopped workflow run.
status(Option<WorkflowRunStatus>):The status of the workflow run after the stop operation. This is typically
STOPPINGorSTOPPED.
- On failure, responds with
SdkError<StopWorkflowRunError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource to which to add tags.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: trueA map of tags to add to the resource. Each tag consists of a key-value pair.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource from which to remove tags.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueA list of tag keys to remove from the resource. Only the keys are required; the values are ignored.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_workflow(&self) -> UpdateWorkflowFluentBuilder
pub fn update_workflow(&self) -> UpdateWorkflowFluentBuilder
Constructs a fluent builder for the UpdateWorkflow operation.
- The fluent builder is configurable:
workflow_arn(impl Into<String>)/set_workflow_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the workflow you want to update.
definition_s3_location(DefinitionS3Location)/set_definition_s3_location(Option<DefinitionS3Location>):
required: trueThe Amazon S3 location where the updated workflow definition file is stored.
role_arn(impl Into<String>)/set_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that Amazon Managed Workflows for Apache Airflow Serverless assumes when it executes the updated workflow.
description(impl Into<String>)/set_description(Option<String>):
required: falseAn updated description for the workflow.
logging_configuration(LoggingConfiguration)/set_logging_configuration(Option<LoggingConfiguration>):
required: falseUpdated logging configuration for the workflow.
engine_version(i32)/set_engine_version(Option<i32>):
required: falseThe version of the Amazon Managed Workflows for Apache Airflow Serverless engine that you want to use for the updated workflow.
network_configuration(NetworkConfiguration)/set_network_configuration(Option<NetworkConfiguration>):
required: falseUpdated network configuration for the workflow execution environment.
trigger_mode(impl Into<String>)/set_trigger_mode(Option<String>):
required: falseThe trigger mode for the workflow execution.
- On success, responds with
UpdateWorkflowOutputwith field(s):workflow_arn(String):The Amazon Resource Name (ARN) of the updated workflow.
modified_at(Option<DateTime>):The timestamp when the workflow was last modified, in ISO 8601 date-time format.
workflow_version(Option<String>):The version identifier of the updated workflow.
warnings(Option<Vec::<String>>):Warning messages generated during workflow update.
- On failure, responds with
SdkError<UpdateWorkflowError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);