pub struct Client { /* private fields */ }
Expand description
Client for Amazon EC2 Container Service
Client for invoking operations on Amazon EC2 Container Service. Each operation on Amazon EC2 Container Service 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_ecs::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_ecs::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 CreateCapacityProvider
operation has
a Client::create_capacity_provider
, 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_capacity_provider()
.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.
§Waiters
This client provides wait_until
methods behind the Waiters
trait.
To use them, simply import the trait, and then call one of the wait_until
methods. This will
return a waiter fluent builder that takes various parameters, which are documented on the builder
type. Once parameters have been provided, the wait
method can be called to initiate waiting.
For example, if there was a wait_until_thing
method, it could look like:
let result = client.wait_until_thing()
.thing_id("someId")
.wait(Duration::from_secs(120))
.await;
Implementations§
Source§impl Client
impl Client
Sourcepub fn create_capacity_provider(&self) -> CreateCapacityProviderFluentBuilder
pub fn create_capacity_provider(&self) -> CreateCapacityProviderFluentBuilder
Constructs a fluent builder for the CreateCapacityProvider
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the capacity provider. Up to 255 characters are allowed. They include letters (both upper and lowercase letters), numbers, underscores (_), and hyphens (-). The name can’t be prefixed with “
aws
”, “ecs
”, or “fargate
”.auto_scaling_group_provider(AutoScalingGroupProvider)
/set_auto_scaling_group_provider(Option<AutoScalingGroupProvider>)
:
required: trueThe details of the Auto Scaling group for the capacity provider.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe metadata that you apply to the capacity provider to categorize and organize them more conveniently. Each tag consists of a key and an optional value. You define both of them.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- On success, responds with
CreateCapacityProviderOutput
with field(s):capacity_provider(Option<CapacityProvider>)
:The full description of the new capacity provider.
- On failure, responds with
SdkError<CreateCapacityProviderError>
Source§impl Client
impl Client
Sourcepub fn create_cluster(&self) -> CreateClusterFluentBuilder
pub fn create_cluster(&self) -> CreateClusterFluentBuilder
Constructs a fluent builder for the CreateCluster
operation.
- The fluent builder is configurable:
cluster_name(impl Into<String>)
/set_cluster_name(Option<String>)
:
required: falseThe name of your cluster. If you don’t specify a name for your cluster, you create a cluster that’s named
default
. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
settings(ClusterSetting)
/set_settings(Option<Vec::<ClusterSetting>>)
:
required: falseThe setting to use when creating a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster. If this value is specified, it overrides the
containerInsights
value set with PutAccountSetting or PutAccountSettingDefault.configuration(ClusterConfiguration)
/set_configuration(Option<ClusterConfiguration>)
:
required: falseThe
execute
command configuration for the cluster.capacity_providers(impl Into<String>)
/set_capacity_providers(Option<Vec::<String>>)
:
required: falseThe short name of one or more capacity providers to associate with the cluster. A capacity provider must be associated with a cluster before it can be included as part of the default capacity provider strategy of the cluster or used in a capacity provider strategy when calling the CreateService or RunTask actions.
If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must be created but not associated with another cluster. New Auto Scaling group capacity providers can be created with the CreateCapacityProvider API operation.
To use a Fargate capacity provider, specify either the
FARGATE
orFARGATE_SPOT
capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.The PutCapacityProvider API operation is used to update the list of available capacity providers for a cluster after the cluster is created.
default_capacity_provider_strategy(CapacityProviderStrategyItem)
/set_default_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>)
:
required: falseThe capacity provider strategy to set as the default for the cluster. After a default capacity provider strategy is set for a cluster, when you call the CreateService or RunTask APIs with no capacity provider strategy or launch type specified, the default capacity provider strategy for the cluster is used.
If a default capacity provider strategy isn’t defined for a cluster when it was created, it can be defined later with the PutClusterCapacityProviders API operation.
service_connect_defaults(ClusterServiceConnectDefaultsRequest)
/set_service_connect_defaults(Option<ClusterServiceConnectDefaultsRequest>)
:
required: falseUse this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the
enabled
parameter totrue
in theServiceConnectConfiguration
. You can set the namespace of each service individually in theServiceConnectConfiguration
to override this default parameter.Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
- On success, responds with
CreateClusterOutput
with field(s):cluster(Option<Cluster>)
:The full description of your new cluster.
- On failure, responds with
SdkError<CreateClusterError>
Source§impl Client
impl Client
Sourcepub fn create_service(&self) -> CreateServiceFluentBuilder
pub fn create_service(&self) -> CreateServiceFluentBuilder
Constructs a fluent builder for the CreateService
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that you run your service on. If you do not specify a cluster, the default cluster is assumed.
service_name(impl Into<String>)
/set_service_name(Option<String>)
:
required: trueThe name of your service. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a Region or across multiple Regions.
task_definition(impl Into<String>)
/set_task_definition(Option<String>)
:
required: falseThe
family
andrevision
(family:revision
) or full ARN of the task definition to run in your service. If arevision
isn’t specified, the latestACTIVE
revision is used.A task definition must be specified if the service uses either the
ECS
orCODE_DEPLOY
deployment controllers.For more information about deployment types, see Amazon ECS deployment types.
availability_zone_rebalancing(AvailabilityZoneRebalancing)
/set_availability_zone_rebalancing(Option<AvailabilityZoneRebalancing>)
:
required: falseIndicates whether to use Availability Zone rebalancing for the service.
For more information, see Balancing an Amazon ECS service across Availability Zones in the Amazon Elastic Container Service Developer Guide .
load_balancers(LoadBalancer)
/set_load_balancers(Option<Vec::<LoadBalancer>>)
:
required: falseA load balancer object representing the load balancers to use with your service. For more information, see Service load balancing in the Amazon Elastic Container Service Developer Guide.
If the service uses the rolling update (
ECS
) deployment controller and using either an Application Load Balancer or Network Load Balancer, you must specify one or more target group ARNs to attach to the service. The service-linked role is required for services that use multiple target groups. For more information, see Using service-linked roles for Amazon ECS in the Amazon Elastic Container Service Developer Guide.If the service uses the
CODE_DEPLOY
deployment controller, the service is required to use either an Application Load Balancer or Network Load Balancer. When creating an CodeDeploy deployment group, you specify two target groups (referred to as atargetGroupPair
). During a deployment, CodeDeploy determines which task set in your service has the statusPRIMARY
, and it associates one target group with it. Then, it also associates the other target group with the replacement task set. The load balancer can also have up to two listeners: a required listener for production traffic and an optional listener that you can use to perform validation tests with Lambda functions before routing production traffic to it.If you use the
CODE_DEPLOY
deployment controller, these values can be changed when updating the service.For Application Load Balancers and Network Load Balancers, this object must contain the load balancer target group ARN, the container name, and the container port to access from the load balancer. The container name must be as it appears in a container definition. The load balancer name parameter must be omitted. When a task from this service is placed on a container instance, the container instance and port combination is registered as a target in the target group that’s specified here.
For Classic Load Balancers, this object must contain the load balancer name, the container name , and the container port to access from the load balancer. The container name must be as it appears in a container definition. The target group ARN parameter must be omitted. When a task from this service is placed on a container instance, the container instance is registered with the load balancer that’s specified here.
Services with tasks that use the
awsvpc
network mode (for example, those with the Fargate launch type) only support Application Load Balancers and Network Load Balancers. Classic Load Balancers aren’t supported. Also, when you create any target groups for these services, you must chooseip
as the target type, notinstance
. This is because tasks that use theawsvpc
network mode are associated with an elastic network interface, not an Amazon EC2 instance.service_registries(ServiceRegistry)
/set_service_registries(Option<Vec::<ServiceRegistry>>)
:
required: falseThe details of the service discovery registry to associate with this service. For more information, see Service discovery.
Each service may be associated with one service registry. Multiple service registries for each service isn’t supported.
desired_count(i32)
/set_desired_count(Option<i32>)
:
required: falseThe number of instantiations of the specified task definition to place and keep running in your service.
This is required if
schedulingStrategy
isREPLICA
or isn’t specified. IfschedulingStrategy
isDAEMON
then this isn’t required.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseAn identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed.
launch_type(LaunchType)
/set_launch_type(Option<LaunchType>)
:
required: falseThe infrastructure that you run your service on. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.
The
FARGATE
launch type runs your tasks on Fargate On-Demand infrastructure.Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more information, see Fargate capacity providers in the Amazon ECS Developer Guide.
The
EC2
launch type runs your tasks on Amazon EC2 instances registered to your cluster.The
EXTERNAL
launch type runs your tasks on your on-premises server or virtual machine (VM) capacity registered to your cluster.A service can use either a launch type or a capacity provider strategy. If a
launchType
is specified, thecapacityProviderStrategy
parameter must be omitted.capacity_provider_strategy(CapacityProviderStrategyItem)
/set_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>)
:
required: falseThe capacity provider strategy to use for the service.
If a
capacityProviderStrategy
is specified, thelaunchType
parameter must be omitted. If nocapacityProviderStrategy
orlaunchType
is specified, thedefaultCapacityProviderStrategy
for the cluster is used.A capacity provider strategy can contain a maximum of 20 capacity providers.
platform_version(impl Into<String>)
/set_platform_version(Option<String>)
:
required: falseThe platform version that your tasks in the service are running on. A platform version is specified only for tasks using the Fargate launch type. If one isn’t specified, the
LATEST
platform version is used. For more information, see Fargate platform versions in the Amazon Elastic Container Service Developer Guide.role(impl Into<String>)
/set_role(Option<String>)
:
required: falseThe name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is only permitted if you are using a load balancer with your service and your task definition doesn’t use the
awsvpc
network mode. If you specify therole
parameter, you must also specify a load balancer object with theloadBalancers
parameter.If your account has already created the Amazon ECS service-linked role, that role is used for your service unless you specify a role here. The service-linked role is required if your task definition uses the
awsvpc
network mode or if the service is configured to use service discovery, an external deployment controller, multiple target groups, or Elastic Inference accelerators in which case you don’t specify a role here. For more information, see Using service-linked roles for Amazon ECS in the Amazon Elastic Container Service Developer Guide.If your specified role has a path other than
/
, then you must either specify the full role ARN (this is recommended) or prefix the role name with the path. For example, if a role with the namebar
has a path of/foo/
then you would specify/foo/bar
as the role name. For more information, see Friendly names and paths in the IAM User Guide.deployment_configuration(DeploymentConfiguration)
/set_deployment_configuration(Option<DeploymentConfiguration>)
:
required: falseOptional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
placement_constraints(PlacementConstraint)
/set_placement_constraints(Option<Vec::<PlacementConstraint>>)
:
required: falseAn array of placement constraint objects to use for tasks in your service. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
placement_strategy(PlacementStrategy)
/set_placement_strategy(Option<Vec::<PlacementStrategy>>)
:
required: falseThe placement strategy objects to use for tasks in your service. You can specify a maximum of 5 strategy rules for each service.
network_configuration(NetworkConfiguration)
/set_network_configuration(Option<NetworkConfiguration>)
:
required: falseThe network configuration for the service. This parameter is required for task definitions that use the
awsvpc
network mode to receive their own elastic network interface, and it isn’t supported for other network modes. For more information, see Task networking in the Amazon Elastic Container Service Developer Guide.health_check_grace_period_seconds(i32)
/set_health_check_grace_period_seconds(Option<i32>)
:
required: falseThe period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks after a task has first started. If you don’t specify a health check grace period value, the default value of
0
is used. If you don’t use any of the health checks, thenhealthCheckGracePeriodSeconds
is unused.If your service’s tasks take a while to start and respond to health checks, you can specify a health check grace period of up to 2,147,483,647 seconds (about 69 years). During that time, the Amazon ECS service scheduler ignores health check status. This grace period can prevent the service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.
scheduling_strategy(SchedulingStrategy)
/set_scheduling_strategy(Option<SchedulingStrategy>)
:
required: falseThe scheduling strategy to use for the service. For more information, see Services.
There are two service scheduler strategies available:
-
REPLICA
-The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. This scheduler strategy is required if the service uses theCODE_DEPLOY
orEXTERNAL
deployment controller types. -
DAEMON
-The daemon scheduling strategy deploys exactly one task on each active container instance that meets all of the task placement constraints that you specify in your cluster. The service scheduler also evaluates the task placement constraints for running tasks and will stop tasks that don’t meet the placement constraints. When you’re using this strategy, you don’t need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies.Tasks using the Fargate launch type or the
CODE_DEPLOY
orEXTERNAL
deployment controller types don’t support theDAEMON
scheduling strategy.
-
deployment_controller(DeploymentController)
/set_deployment_controller(Option<DeploymentController>)
:
required: falseThe deployment controller to use for the service. If no deployment controller is specified, the default value of
ECS
is used.tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. When a service is deleted, the tags are deleted as well.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
enable_ecs_managed_tags(bool)
/set_enable_ecs_managed_tags(Option<bool>)
:
required: falseSpecifies whether to turn on Amazon ECS managed tags for the tasks within the service. For more information, see Tagging your Amazon ECS resources in the Amazon Elastic Container Service Developer Guide.
When you use Amazon ECS managed tags, you need to set the
propagateTags
request parameter.propagate_tags(PropagateTags)
/set_propagate_tags(Option<PropagateTags>)
:
required: falseSpecifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren’t propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.
You must set this to a value other than
NONE
when you use Cost Explorer. For more information, see Amazon ECS usage reports in the Amazon Elastic Container Service Developer Guide.The default is
NONE
.enable_execute_command(bool)
/set_enable_execute_command(Option<bool>)
:
required: falseDetermines whether the execute command functionality is turned on for the service. If
true
, this enables execute command functionality on all containers in the service tasks.service_connect_configuration(ServiceConnectConfiguration)
/set_service_connect_configuration(Option<ServiceConnectConfiguration>)
:
required: falseThe configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
volume_configurations(ServiceVolumeConfiguration)
/set_volume_configurations(Option<Vec::<ServiceVolumeConfiguration>>)
:
required: falseThe configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume.
vpc_lattice_configurations(VpcLatticeConfiguration)
/set_vpc_lattice_configurations(Option<Vec::<VpcLatticeConfiguration>>)
:
required: falseThe VPC Lattice configuration for the service being created.
- On success, responds with
CreateServiceOutput
with field(s):service(Option<Service>)
:The full description of your service following the create call.
A service will return either a
capacityProviderStrategy
orlaunchType
parameter, but not both, depending where one was specified when it was created.If a service is using the
ECS
deployment controller, thedeploymentController
andtaskSets
parameters will not be returned.if the service uses the
CODE_DEPLOY
deployment controller, thedeploymentController
,taskSets
anddeployments
parameters will be returned, however thedeployments
parameter will be an empty list.
- On failure, responds with
SdkError<CreateServiceError>
Source§impl Client
impl Client
Sourcepub fn create_task_set(&self) -> CreateTaskSetFluentBuilder
pub fn create_task_set(&self) -> CreateTaskSetFluentBuilder
Constructs a fluent builder for the CreateTaskSet
operation.
- The fluent builder is configurable:
service(impl Into<String>)
/set_service(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the service to create the task set in.
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.
external_id(impl Into<String>)
/set_external_id(Option<String>)
:
required: falseAn optional non-unique tag that identifies this task set in external systems. If the task set is associated with a service discovery registry, the tasks in this task set will have the
ECS_TASK_SET_EXTERNAL_ID
Cloud Map attribute set to the provided value.task_definition(impl Into<String>)
/set_task_definition(Option<String>)
:
required: trueThe task definition for the tasks in the task set to use. If a revision isn’t specified, the latest
ACTIVE
revision is used.network_configuration(NetworkConfiguration)
/set_network_configuration(Option<NetworkConfiguration>)
:
required: falseAn object representing the network configuration for a task set.
load_balancers(LoadBalancer)
/set_load_balancers(Option<Vec::<LoadBalancer>>)
:
required: falseA load balancer object representing the load balancer to use with the task set. The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.
service_registries(ServiceRegistry)
/set_service_registries(Option<Vec::<ServiceRegistry>>)
:
required: falseThe details of the service discovery registries to assign to this task set. For more information, see Service discovery.
launch_type(LaunchType)
/set_launch_type(Option<LaunchType>)
:
required: falseThe launch type that new tasks in the task set uses. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.
If a
launchType
is specified, thecapacityProviderStrategy
parameter must be omitted.capacity_provider_strategy(CapacityProviderStrategyItem)
/set_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>)
:
required: falseThe capacity provider strategy to use for the task set.
A capacity provider strategy consists of one or more capacity providers along with the
base
andweight
to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The PutClusterCapacityProviders API is used to associate a capacity provider with a cluster. Only capacity providers with anACTIVE
orUPDATING
status can be used.If a
capacityProviderStrategy
is specified, thelaunchType
parameter must be omitted. If nocapacityProviderStrategy
orlaunchType
is specified, thedefaultCapacityProviderStrategy
for the cluster is used.If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the CreateCapacityProviderProviderAPI operation.
To use a Fargate capacity provider, specify either the
FARGATE
orFARGATE_SPOT
capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.The PutClusterCapacityProviders API operation is used to update the list of available capacity providers for a cluster after the cluster is created.
platform_version(impl Into<String>)
/set_platform_version(Option<String>)
:
required: falseThe platform version that the tasks in the task set uses. A platform version is specified only for tasks using the Fargate launch type. If one isn’t specified, the
LATEST
platform version is used.scale(Scale)
/set_scale(Option<Scale>)
:
required: falseA floating-point percentage of the desired number of tasks to place and keep running in the task set.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseAn identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe metadata that you apply to the task set to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. When a service is deleted, the tags are deleted.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- On success, responds with
CreateTaskSetOutput
with field(s):task_set(Option<TaskSet>)
:Information about a set of Amazon ECS tasks in either an CodeDeploy or an
EXTERNAL
deployment. A task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic.
- On failure, responds with
SdkError<CreateTaskSetError>
Source§impl Client
impl Client
Sourcepub fn delete_account_setting(&self) -> DeleteAccountSettingFluentBuilder
pub fn delete_account_setting(&self) -> DeleteAccountSettingFluentBuilder
Constructs a fluent builder for the DeleteAccountSetting
operation.
- The fluent builder is configurable:
name(SettingName)
/set_name(Option<SettingName>)
:
required: trueThe resource name to disable the account setting for. If
serviceLongArnFormat
is specified, the ARN for your Amazon ECS services is affected. IftaskLongArnFormat
is specified, the ARN and resource ID for your Amazon ECS tasks is affected. IfcontainerInstanceLongArnFormat
is specified, the ARN and resource ID for your Amazon ECS container instances is affected. IfawsvpcTrunking
is specified, the ENI limit for your Amazon ECS container instances is affected.principal_arn(impl Into<String>)
/set_principal_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the principal. It can be a user, role, or the root user. If you specify the root user, it disables the account setting for all users, roles, and the root user of the account unless a user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.
In order to use this parameter, you must be the root user, or the principal.
- On success, responds with
DeleteAccountSettingOutput
with field(s):setting(Option<Setting>)
:The account setting for the specified principal ARN.
- On failure, responds with
SdkError<DeleteAccountSettingError>
Source§impl Client
impl Client
Sourcepub fn delete_attributes(&self) -> DeleteAttributesFluentBuilder
pub fn delete_attributes(&self) -> DeleteAttributesFluentBuilder
Constructs a fluent builder for the DeleteAttributes
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that contains the resource to delete attributes. If you do not specify a cluster, the default cluster is assumed.
attributes(Attribute)
/set_attributes(Option<Vec::<Attribute>>)
:
required: trueThe attributes to delete from your resource. You can specify up to 10 attributes for each request. For custom attributes, specify the attribute name and target ID, but don’t specify the value. If you specify the target ID using the short form, you must also specify the target type.
- On success, responds with
DeleteAttributesOutput
with field(s):attributes(Option<Vec::<Attribute>>)
:A list of attribute objects that were successfully deleted from your resource.
- On failure, responds with
SdkError<DeleteAttributesError>
Source§impl Client
impl Client
Sourcepub fn delete_capacity_provider(&self) -> DeleteCapacityProviderFluentBuilder
pub fn delete_capacity_provider(&self) -> DeleteCapacityProviderFluentBuilder
Constructs a fluent builder for the DeleteCapacityProvider
operation.
- The fluent builder is configurable:
capacity_provider(impl Into<String>)
/set_capacity_provider(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the capacity provider to delete.
- On success, responds with
DeleteCapacityProviderOutput
with field(s):capacity_provider(Option<CapacityProvider>)
:The details of the capacity provider.
- On failure, responds with
SdkError<DeleteCapacityProviderError>
Source§impl Client
impl Client
Sourcepub fn delete_cluster(&self) -> DeleteClusterFluentBuilder
pub fn delete_cluster(&self) -> DeleteClusterFluentBuilder
Constructs a fluent builder for the DeleteCluster
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster to delete.
- On success, responds with
DeleteClusterOutput
with field(s):cluster(Option<Cluster>)
:The full description of the deleted cluster.
- On failure, responds with
SdkError<DeleteClusterError>
Source§impl Client
impl Client
Sourcepub fn delete_service(&self) -> DeleteServiceFluentBuilder
pub fn delete_service(&self) -> DeleteServiceFluentBuilder
Constructs a fluent builder for the DeleteService
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to delete. If you do not specify a cluster, the default cluster is assumed.
service(impl Into<String>)
/set_service(Option<String>)
:
required: trueThe name of the service to delete.
force(bool)
/set_force(Option<bool>)
:
required: falseIf
true
, allows you to delete a service even if it wasn’t scaled down to zero tasks. It’s only necessary to use this if the service uses theREPLICA
scheduling strategy.
- On success, responds with
DeleteServiceOutput
with field(s):service(Option<Service>)
:The full description of the deleted service.
- On failure, responds with
SdkError<DeleteServiceError>
Source§impl Client
impl Client
Sourcepub fn delete_task_definitions(&self) -> DeleteTaskDefinitionsFluentBuilder
pub fn delete_task_definitions(&self) -> DeleteTaskDefinitionsFluentBuilder
Constructs a fluent builder for the DeleteTaskDefinitions
operation.
- The fluent builder is configurable:
task_definitions(impl Into<String>)
/set_task_definitions(Option<Vec::<String>>)
:
required: trueThe
family
andrevision
(family:revision
) or full Amazon Resource Name (ARN) of the task definition to delete. You must specify arevision
.You can specify up to 10 task definitions as a comma separated list.
- On success, responds with
DeleteTaskDefinitionsOutput
with field(s):task_definitions(Option<Vec::<TaskDefinition>>)
:The list of deleted task definitions.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<DeleteTaskDefinitionsError>
Source§impl Client
impl Client
Sourcepub fn delete_task_set(&self) -> DeleteTaskSetFluentBuilder
pub fn delete_task_set(&self) -> DeleteTaskSetFluentBuilder
Constructs a fluent builder for the DeleteTaskSet
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set found in to delete.
service(impl Into<String>)
/set_service(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.
task_set(impl Into<String>)
/set_task_set(Option<String>)
:
required: trueThe task set ID or full Amazon Resource Name (ARN) of the task set to delete.
force(bool)
/set_force(Option<bool>)
:
required: falseIf
true
, you can delete a task set even if it hasn’t been scaled down to zero.
- On success, responds with
DeleteTaskSetOutput
with field(s):task_set(Option<TaskSet>)
:Details about the task set.
- On failure, responds with
SdkError<DeleteTaskSetError>
Source§impl Client
impl Client
Sourcepub fn deregister_container_instance(
&self,
) -> DeregisterContainerInstanceFluentBuilder
pub fn deregister_container_instance( &self, ) -> DeregisterContainerInstanceFluentBuilder
Constructs a fluent builder for the DeregisterContainerInstance
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister. If you do not specify a cluster, the default cluster is assumed.
container_instance(impl Into<String>)
/set_container_instance(Option<String>)
:
required: trueThe container instance ID or full ARN of the container instance to deregister. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.
force(bool)
/set_force(Option<bool>)
:
required: falseForces the container instance to be deregistered. If you have tasks running on the container instance when you deregister it with the
force
option, these tasks remain running until you terminate the instance or the tasks stop through some other means, but they’re orphaned (no longer monitored or accounted for by Amazon ECS). If an orphaned task on your container instance is part of an Amazon ECS service, then the service scheduler starts another copy of that task, on a different container instance if possible.Any containers in orphaned service tasks that are registered with a Classic Load Balancer or an Application Load Balancer target group are deregistered. They begin connection draining according to the settings on the load balancer or target group.
- On success, responds with
DeregisterContainerInstanceOutput
with field(s):container_instance(Option<ContainerInstance>)
:The container instance that was deregistered.
- On failure, responds with
SdkError<DeregisterContainerInstanceError>
Source§impl Client
impl Client
Sourcepub fn deregister_task_definition(
&self,
) -> DeregisterTaskDefinitionFluentBuilder
pub fn deregister_task_definition( &self, ) -> DeregisterTaskDefinitionFluentBuilder
Constructs a fluent builder for the DeregisterTaskDefinition
operation.
- The fluent builder is configurable:
task_definition(impl Into<String>)
/set_task_definition(Option<String>)
:
required: trueThe
family
andrevision
(family:revision
) or full Amazon Resource Name (ARN) of the task definition to deregister. You must specify arevision
.
- On success, responds with
DeregisterTaskDefinitionOutput
with field(s):task_definition(Option<TaskDefinition>)
:The full description of the deregistered task.
- On failure, responds with
SdkError<DeregisterTaskDefinitionError>
Source§impl Client
impl Client
Sourcepub fn describe_capacity_providers(
&self,
) -> DescribeCapacityProvidersFluentBuilder
pub fn describe_capacity_providers( &self, ) -> DescribeCapacityProvidersFluentBuilder
Constructs a fluent builder for the DescribeCapacityProviders
operation.
- The fluent builder is configurable:
capacity_providers(impl Into<String>)
/set_capacity_providers(Option<Vec::<String>>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of one or more capacity providers. Up to
100
capacity providers can be described in an action.include(CapacityProviderField)
/set_include(Option<Vec::<CapacityProviderField>>)
:
required: falseSpecifies whether or not you want to see the resource tags for the capacity provider. If
TAGS
is specified, the tags are included in the response. If this field is omitted, tags aren’t included in the response.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of account setting results returned by
DescribeCapacityProviders
in paginated output. When this parameter is used,DescribeCapacityProviders
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribeCapacityProviders
request with the returnednextToken
value. This value can be between 1 and 10. If this parameter is not used, thenDescribeCapacityProviders
returns up to 10 results and anextToken
value if applicable.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from a previous paginatedDescribeCapacityProviders
request wheremaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextToken
value.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
- On success, responds with
DescribeCapacityProvidersOutput
with field(s):capacity_providers(Option<Vec::<CapacityProvider>>)
:The list of capacity providers.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
next_token(Option<String>)
:The
nextToken
value to include in a futureDescribeCapacityProviders
request. When the results of aDescribeCapacityProviders
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<DescribeCapacityProvidersError>
Source§impl Client
impl Client
Sourcepub fn describe_clusters(&self) -> DescribeClustersFluentBuilder
pub fn describe_clusters(&self) -> DescribeClustersFluentBuilder
Constructs a fluent builder for the DescribeClusters
operation.
- The fluent builder is configurable:
clusters(impl Into<String>)
/set_clusters(Option<Vec::<String>>)
:
required: falseA list of up to 100 cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.
include(ClusterField)
/set_include(Option<Vec::<ClusterField>>)
:
required: falseDetermines whether to include additional information about the clusters in the response. If this field is omitted, this information isn’t included.
If
ATTACHMENTS
is specified, the attachments for the container instances or tasks within the cluster are included, for example the capacity providers.If
SETTINGS
is specified, the settings for the cluster are included.If
CONFIGURATIONS
is specified, the configuration for the cluster is included.If
STATISTICS
is specified, the task and service count is included, separated by launch type.If
TAGS
is specified, the metadata tags associated with the cluster are included.
- On success, responds with
DescribeClustersOutput
with field(s):clusters(Option<Vec::<Cluster>>)
:The list of clusters.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<DescribeClustersError>
Source§impl Client
impl Client
Sourcepub fn describe_container_instances(
&self,
) -> DescribeContainerInstancesFluentBuilder
pub fn describe_container_instances( &self, ) -> DescribeContainerInstancesFluentBuilder
Constructs a fluent builder for the DescribeContainerInstances
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the container instance or container instances you are describing were launched in any cluster other than the default cluster.
container_instances(impl Into<String>)
/set_container_instances(Option<Vec::<String>>)
:
required: trueA list of up to 100 container instance IDs or full Amazon Resource Name (ARN) entries.
include(ContainerInstanceField)
/set_include(Option<Vec::<ContainerInstanceField>>)
:
required: falseSpecifies whether you want to see the resource tags for the container instance. If
TAGS
is specified, the tags are included in the response. IfCONTAINER_INSTANCE_HEALTH
is specified, the container instance health is included in the response. If this field is omitted, tags and container instance health status aren’t included in the response.
- On success, responds with
DescribeContainerInstancesOutput
with field(s):container_instances(Option<Vec::<ContainerInstance>>)
:The list of container instances.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<DescribeContainerInstancesError>
Source§impl Client
impl Client
Sourcepub fn describe_service_deployments(
&self,
) -> DescribeServiceDeploymentsFluentBuilder
pub fn describe_service_deployments( &self, ) -> DescribeServiceDeploymentsFluentBuilder
Constructs a fluent builder for the DescribeServiceDeployments
operation.
- The fluent builder is configurable:
service_deployment_arns(impl Into<String>)
/set_service_deployment_arns(Option<Vec::<String>>)
:
required: trueThe ARN of the service deployment.
You can specify a maximum of 20 ARNs.
- On success, responds with
DescribeServiceDeploymentsOutput
with field(s):service_deployments(Option<Vec::<ServiceDeployment>>)
:The list of service deployments described.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
If you decsribe a deployment with a service revision created before October 25, 2024, the call fails. The failure includes the service revision ARN and the reason set to
MISSING
.
- On failure, responds with
SdkError<DescribeServiceDeploymentsError>
Source§impl Client
impl Client
Sourcepub fn describe_service_revisions(
&self,
) -> DescribeServiceRevisionsFluentBuilder
pub fn describe_service_revisions( &self, ) -> DescribeServiceRevisionsFluentBuilder
Constructs a fluent builder for the DescribeServiceRevisions
operation.
- The fluent builder is configurable:
service_revision_arns(impl Into<String>)
/set_service_revision_arns(Option<Vec::<String>>)
:
required: trueThe ARN of the service revision.
You can specify a maximum of 20 ARNs.
You can call ListServiceDeployments to get the ARNs.
- On success, responds with
DescribeServiceRevisionsOutput
with field(s):service_revisions(Option<Vec::<ServiceRevision>>)
:The list of service revisions described.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<DescribeServiceRevisionsError>
Source§impl Client
impl Client
Sourcepub fn describe_services(&self) -> DescribeServicesFluentBuilder
pub fn describe_services(&self) -> DescribeServicesFluentBuilder
Constructs a fluent builder for the DescribeServices
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN)the cluster that hosts the service to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the service or services you are describing were launched in any cluster other than the default cluster.
services(impl Into<String>)
/set_services(Option<Vec::<String>>)
:
required: trueA list of services to describe. You may specify up to 10 services to describe in a single operation.
include(ServiceField)
/set_include(Option<Vec::<ServiceField>>)
:
required: falseDetermines whether you want to see the resource tags for the service. If
TAGS
is specified, the tags are included in the response. If this field is omitted, tags aren’t included in the response.
- On success, responds with
DescribeServicesOutput
with field(s):services(Option<Vec::<Service>>)
:The list of services described.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<DescribeServicesError>
Source§impl Client
impl Client
Sourcepub fn describe_task_definition(&self) -> DescribeTaskDefinitionFluentBuilder
pub fn describe_task_definition(&self) -> DescribeTaskDefinitionFluentBuilder
Constructs a fluent builder for the DescribeTaskDefinition
operation.
- The fluent builder is configurable:
task_definition(impl Into<String>)
/set_task_definition(Option<String>)
:
required: trueThe
family
for the latestACTIVE
revision,family
andrevision
(family:revision
) for a specific revision in the family, or full Amazon Resource Name (ARN) of the task definition to describe.include(TaskDefinitionField)
/set_include(Option<Vec::<TaskDefinitionField>>)
:
required: falseDetermines whether to see the resource tags for the task definition. If
TAGS
is specified, the tags are included in the response. If this field is omitted, tags aren’t included in the response.
- On success, responds with
DescribeTaskDefinitionOutput
with field(s):task_definition(Option<TaskDefinition>)
:The full task definition description.
tags(Option<Vec::<Tag>>)
:The metadata that’s applied to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- On failure, responds with
SdkError<DescribeTaskDefinitionError>
Source§impl Client
impl Client
Sourcepub fn describe_task_sets(&self) -> DescribeTaskSetsFluentBuilder
pub fn describe_task_sets(&self) -> DescribeTaskSetsFluentBuilder
Constructs a fluent builder for the DescribeTaskSets
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.
service(impl Into<String>)
/set_service(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the service that the task sets exist in.
task_sets(impl Into<String>)
/set_task_sets(Option<Vec::<String>>)
:
required: falseThe ID or full Amazon Resource Name (ARN) of task sets to describe.
include(TaskSetField)
/set_include(Option<Vec::<TaskSetField>>)
:
required: falseSpecifies whether to see the resource tags for the task set. If
TAGS
is specified, the tags are included in the response. If this field is omitted, tags aren’t included in the response.
- On success, responds with
DescribeTaskSetsOutput
with field(s):task_sets(Option<Vec::<TaskSet>>)
:The list of task sets described.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<DescribeTaskSetsError>
Source§impl Client
impl Client
Sourcepub fn describe_tasks(&self) -> DescribeTasksFluentBuilder
pub fn describe_tasks(&self) -> DescribeTasksFluentBuilder
Constructs a fluent builder for the DescribeTasks
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the task or tasks to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required. If you do not specify a value, the
default
cluster is used.tasks(impl Into<String>)
/set_tasks(Option<Vec::<String>>)
:
required: trueA list of up to 100 task IDs or full ARN entries.
include(TaskField)
/set_include(Option<Vec::<TaskField>>)
:
required: falseSpecifies whether you want to see the resource tags for the task. If
TAGS
is specified, the tags are included in the response. If this field is omitted, tags aren’t included in the response.
- On success, responds with
DescribeTasksOutput
with field(s):tasks(Option<Vec::<Task>>)
:The list of tasks.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<DescribeTasksError>
Source§impl Client
impl Client
Sourcepub fn discover_poll_endpoint(&self) -> DiscoverPollEndpointFluentBuilder
pub fn discover_poll_endpoint(&self) -> DiscoverPollEndpointFluentBuilder
Constructs a fluent builder for the DiscoverPollEndpoint
operation.
- The fluent builder is configurable:
container_instance(impl Into<String>)
/set_container_instance(Option<String>)
:
required: falseThe container instance ID or full ARN of the container instance. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that the container instance belongs to.
- On success, responds with
DiscoverPollEndpointOutput
with field(s):endpoint(Option<String>)
:The endpoint for the Amazon ECS agent to poll.
telemetry_endpoint(Option<String>)
:The telemetry endpoint for the Amazon ECS agent.
service_connect_endpoint(Option<String>)
:The endpoint for the Amazon ECS agent to poll for Service Connect configuration. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
- On failure, responds with
SdkError<DiscoverPollEndpointError>
Source§impl Client
impl Client
Sourcepub fn execute_command(&self) -> ExecuteCommandFluentBuilder
pub fn execute_command(&self) -> ExecuteCommandFluentBuilder
Constructs a fluent builder for the ExecuteCommand
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) or short name of the cluster the task is running in. If you do not specify a cluster, the default cluster is assumed.
container(impl Into<String>)
/set_container(Option<String>)
:
required: falseThe name of the container to execute the command on. A container name only needs to be specified for tasks containing multiple containers.
command(impl Into<String>)
/set_command(Option<String>)
:
required: trueThe command to run on the container.
interactive(bool)
/set_interactive(Option<bool>)
:
required: trueUse this flag to run your command in interactive mode.
task(impl Into<String>)
/set_task(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) or ID of the task the container is part of.
- On success, responds with
ExecuteCommandOutput
with field(s):cluster_arn(Option<String>)
:The Amazon Resource Name (ARN) of the cluster.
container_arn(Option<String>)
:The Amazon Resource Name (ARN) of the container.
container_name(Option<String>)
:The name of the container.
interactive(bool)
:Determines whether the execute command session is running in interactive mode. Amazon ECS only supports initiating interactive sessions, so you must specify
true
for this value.session(Option<Session>)
:The details of the SSM session that was created for this instance of execute-command.
task_arn(Option<String>)
:The Amazon Resource Name (ARN) of the task.
- On failure, responds with
SdkError<ExecuteCommandError>
Source§impl Client
impl Client
Sourcepub fn get_task_protection(&self) -> GetTaskProtectionFluentBuilder
pub fn get_task_protection(&self) -> GetTaskProtectionFluentBuilder
Constructs a fluent builder for the GetTaskProtection
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.
tasks(impl Into<String>)
/set_tasks(Option<Vec::<String>>)
:
required: falseA list of up to 100 task IDs or full ARN entries.
- On success, responds with
GetTaskProtectionOutput
with field(s):protected_tasks(Option<Vec::<ProtectedTask>>)
:A list of tasks with the following information.
-
taskArn
: The task ARN. -
protectionEnabled
: The protection status of the task. If scale-in protection is turned on for a task, the value istrue
. Otherwise, it isfalse
. -
expirationDate
: The epoch time when protection for the task will expire.
-
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<GetTaskProtectionError>
Source§impl Client
impl Client
Sourcepub fn list_account_settings(&self) -> ListAccountSettingsFluentBuilder
pub fn list_account_settings(&self) -> ListAccountSettingsFluentBuilder
Constructs a fluent builder for the ListAccountSettings
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
name(SettingName)
/set_name(Option<SettingName>)
:
required: falseThe name of the account setting you want to list the settings for.
value(impl Into<String>)
/set_value(Option<String>)
:
required: falseThe value of the account settings to filter results with. You must also specify an account setting name to use this parameter.
principal_arn(impl Into<String>)
/set_principal_arn(Option<String>)
:
required: falseThe ARN of the principal, which can be a user, role, or the root user. If this field is omitted, the account settings are listed only for the authenticated user.
In order to use this parameter, you must be the root user, or the principal.
Federated users assume the account setting of the root user and can’t have explicit account settings set for them.
effective_settings(bool)
/set_effective_settings(Option<bool>)
:
required: falseDetermines whether to return the effective settings. If
true
, the account settings for the root user or the default setting for theprincipalArn
are returned. Iffalse
, the account settings for theprincipalArn
are returned if they’re set. Otherwise, no account settings are returned.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from aListAccountSettings
request indicating that more results are available to fulfill the request and further calls will be needed. IfmaxResults
was provided, it’s possible the number of results to be fewer thanmaxResults
.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of account setting results returned by
ListAccountSettings
in paginated output. When this parameter is used,ListAccountSettings
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListAccountSettings
request with the returnednextToken
value. This value can be between 1 and 10. If this parameter isn’t used, thenListAccountSettings
returns up to 10 results and anextToken
value if applicable.
- On success, responds with
ListAccountSettingsOutput
with field(s):settings(Option<Vec::<Setting>>)
:The account settings for the resource.
next_token(Option<String>)
:The
nextToken
value to include in a futureListAccountSettings
request. When the results of aListAccountSettings
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<ListAccountSettingsError>
Source§impl Client
impl Client
Sourcepub fn list_attributes(&self) -> ListAttributesFluentBuilder
pub fn list_attributes(&self) -> ListAttributesFluentBuilder
Constructs a fluent builder for the ListAttributes
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster to list attributes. If you do not specify a cluster, the default cluster is assumed.
target_type(TargetType)
/set_target_type(Option<TargetType>)
:
required: trueThe type of the target to list attributes with.
attribute_name(impl Into<String>)
/set_attribute_name(Option<String>)
:
required: falseThe name of the attribute to filter the results with.
attribute_value(impl Into<String>)
/set_attribute_value(Option<String>)
:
required: falseThe value of the attribute to filter results with. You must also specify an attribute name to use this parameter.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from aListAttributes
request indicating that more results are available to fulfill the request and further calls are needed. IfmaxResults
was provided, it’s possible the number of results to be fewer thanmaxResults
.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of cluster results that
ListAttributes
returned in paginated output. When this parameter is used,ListAttributes
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListAttributes
request with the returnednextToken
value. This value can be between 1 and 100. If this parameter isn’t used, thenListAttributes
returns up to 100 results and anextToken
value if applicable.
- On success, responds with
ListAttributesOutput
with field(s):attributes(Option<Vec::<Attribute>>)
:A list of attribute objects that meet the criteria of the request.
next_token(Option<String>)
:The
nextToken
value to include in a futureListAttributes
request. When the results of aListAttributes
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<ListAttributesError>
Source§impl Client
impl Client
Sourcepub fn list_clusters(&self) -> ListClustersFluentBuilder
pub fn list_clusters(&self) -> ListClustersFluentBuilder
Constructs a fluent builder for the ListClusters
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from aListClusters
request indicating that more results are available to fulfill the request and further calls are needed. IfmaxResults
was provided, it’s possible the number of results to be fewer thanmaxResults
.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of cluster results that
ListClusters
returned in paginated output. When this parameter is used,ListClusters
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListClusters
request with the returnednextToken
value. This value can be between 1 and 100. If this parameter isn’t used, thenListClusters
returns up to 100 results and anextToken
value if applicable.
- On success, responds with
ListClustersOutput
with field(s):cluster_arns(Option<Vec::<String>>)
:The list of full Amazon Resource Name (ARN) entries for each cluster that’s associated with your account.
next_token(Option<String>)
:The
nextToken
value to include in a futureListClusters
request. When the results of aListClusters
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<ListClustersError>
Source§impl Client
impl Client
Sourcepub fn list_container_instances(&self) -> ListContainerInstancesFluentBuilder
pub fn list_container_instances(&self) -> ListContainerInstancesFluentBuilder
Constructs a fluent builder for the ListContainerInstances
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to list. If you do not specify a cluster, the default cluster is assumed.
filter(impl Into<String>)
/set_filter(Option<String>)
:
required: falseYou can filter the results of a
ListContainerInstances
operation with cluster query language statements. For more information, see Cluster Query Language in the Amazon Elastic Container Service Developer Guide.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from aListContainerInstances
request indicating that more results are available to fulfill the request and further calls are needed. IfmaxResults
was provided, it’s possible the number of results to be fewer thanmaxResults
.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of container instance results that
ListContainerInstances
returned in paginated output. When this parameter is used,ListContainerInstances
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListContainerInstances
request with the returnednextToken
value. This value can be between 1 and 100. If this parameter isn’t used, thenListContainerInstances
returns up to 100 results and anextToken
value if applicable.status(ContainerInstanceStatus)
/set_status(Option<ContainerInstanceStatus>)
:
required: falseFilters the container instances by status. For example, if you specify the
DRAINING
status, the results include only container instances that have been set toDRAINING
using UpdateContainerInstancesState. If you don’t specify this parameter, the default is to include container instances set to all states other thanINACTIVE
.
- On success, responds with
ListContainerInstancesOutput
with field(s):container_instance_arns(Option<Vec::<String>>)
:The list of container instances with full ARN entries for each container instance associated with the specified cluster.
next_token(Option<String>)
:The
nextToken
value to include in a futureListContainerInstances
request. When the results of aListContainerInstances
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<ListContainerInstancesError>
Source§impl Client
impl Client
Sourcepub fn list_service_deployments(&self) -> ListServiceDeploymentsFluentBuilder
pub fn list_service_deployments(&self) -> ListServiceDeploymentsFluentBuilder
Constructs a fluent builder for the ListServiceDeployments
operation.
- The fluent builder is configurable:
service(impl Into<String>)
/set_service(Option<String>)
:
required: trueThe ARN or name of the service
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe cluster that hosts the service. This can either be the cluster name or ARN. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. If you don’t specify a cluster,
default
is used.status(ServiceDeploymentStatus)
/set_status(Option<Vec::<ServiceDeploymentStatus>>)
:
required: falseAn optional filter you can use to narrow the results. If you do not specify a status, then all status values are included in the result.
created_at(CreatedAt)
/set_created_at(Option<CreatedAt>)
:
required: falseAn optional filter you can use to narrow the results by the service creation date. If you do not specify a value, the result includes all services created before the current time. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from aListServiceDeployments
request indicating that more results are available to fulfill the request and further calls are needed. If you providedmaxResults
, it’s possible the number of results is fewer thanmaxResults
.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of service deployment results that
ListServiceDeployments
returned in paginated output. When this parameter is used,ListServiceDeployments
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListServiceDeployments
request with the returnednextToken
value. This value can be between 1 and 100. If this parameter isn’t used, thenListServiceDeployments
returns up to 20 results and anextToken
value if applicable.
- On success, responds with
ListServiceDeploymentsOutput
with field(s):service_deployments(Option<Vec::<ServiceDeploymentBrief>>)
:An overview of the service deployment, including the following properties:
-
The ARN of the service deployment.
-
The ARN of the service being deployed.
-
The ARN of the cluster that hosts the service in the service deployment.
-
The time that the service deployment started.
-
The time that the service deployment completed.
-
The service deployment status.
-
Information about why the service deployment is in the current state.
-
The ARN of the service revision that is being deployed.
-
next_token(Option<String>)
:The
nextToken
value to include in a futureListServiceDeployments
request. When the results of aListServiceDeployments
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
- On failure, responds with
SdkError<ListServiceDeploymentsError>
Source§impl Client
impl Client
Sourcepub fn list_services(&self) -> ListServicesFluentBuilder
pub fn list_services(&self) -> ListServicesFluentBuilder
Constructs a fluent builder for the ListServices
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster to use when filtering the
ListServices
results. If you do not specify a cluster, the default cluster is assumed.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from aListServices
request indicating that more results are available to fulfill the request and further calls will be needed. IfmaxResults
was provided, it is possible the number of results to be fewer thanmaxResults
.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of service results that
ListServices
returned in paginated output. When this parameter is used,ListServices
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListServices
request with the returnednextToken
value. This value can be between 1 and 100. If this parameter isn’t used, thenListServices
returns up to 10 results and anextToken
value if applicable.launch_type(LaunchType)
/set_launch_type(Option<LaunchType>)
:
required: falseThe launch type to use when filtering the
ListServices
results.scheduling_strategy(SchedulingStrategy)
/set_scheduling_strategy(Option<SchedulingStrategy>)
:
required: falseThe scheduling strategy to use when filtering the
ListServices
results.
- On success, responds with
ListServicesOutput
with field(s):service_arns(Option<Vec::<String>>)
:The list of full ARN entries for each service that’s associated with the specified cluster.
next_token(Option<String>)
:The
nextToken
value to include in a futureListServices
request. When the results of aListServices
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<ListServicesError>
Source§impl Client
impl Client
Sourcepub fn list_services_by_namespace(&self) -> ListServicesByNamespaceFluentBuilder
pub fn list_services_by_namespace(&self) -> ListServicesByNamespaceFluentBuilder
Constructs a fluent builder for the ListServicesByNamespace
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
namespace(impl Into<String>)
/set_namespace(Option<String>)
:
required: trueThe namespace name or full Amazon Resource Name (ARN) of the Cloud Map namespace to list the services in.
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value that’s returned from aListServicesByNamespace
request. It indicates that more results are available to fulfill the request and further calls are needed. IfmaxResults
is returned, it is possible the number of results is less thanmaxResults
.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of service results that
ListServicesByNamespace
returns in paginated output. When this parameter is used,ListServicesByNamespace
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListServicesByNamespace
request with the returnednextToken
value. This value can be between 1 and 100. If this parameter isn’t used, thenListServicesByNamespace
returns up to 10 results and anextToken
value if applicable.
- On success, responds with
ListServicesByNamespaceOutput
with field(s):service_arns(Option<Vec::<String>>)
:The list of full ARN entries for each service that’s associated with the specified namespace.
next_token(Option<String>)
:The
nextToken
value to include in a futureListServicesByNamespace
request. When the results of aListServicesByNamespace
request exceedmaxResults
, this value can be used to retrieve the next page of results. When there are no more results to return, this value isnull
.
- On failure, responds with
SdkError<ListServicesByNamespaceError>
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) that identifies the resource to list the tags for. Currently, the supported resources are Amazon ECS tasks, services, task definitions, clusters, and container instances.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec::<Tag>>)
:The tags for the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn list_task_definition_families(
&self,
) -> ListTaskDefinitionFamiliesFluentBuilder
pub fn list_task_definition_families( &self, ) -> ListTaskDefinitionFamiliesFluentBuilder
Constructs a fluent builder for the ListTaskDefinitionFamilies
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
family_prefix(impl Into<String>)
/set_family_prefix(Option<String>)
:
required: falseThe
familyPrefix
is a string that’s used to filter the results ofListTaskDefinitionFamilies
. If you specify afamilyPrefix
, only task definition family names that begin with thefamilyPrefix
string are returned.status(TaskDefinitionFamilyStatus)
/set_status(Option<TaskDefinitionFamilyStatus>)
:
required: falseThe task definition family status to filter the
ListTaskDefinitionFamilies
results with. By default, bothACTIVE
andINACTIVE
task definition families are listed. If this parameter is set toACTIVE
, only task definition families that have anACTIVE
task definition revision are returned. If this parameter is set toINACTIVE
, only task definition families that do not have anyACTIVE
task definition revisions are returned. If you paginate the resulting output, be sure to keep thestatus
value constant in each subsequent request.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from aListTaskDefinitionFamilies
request indicating that more results are available to fulfill the request and further calls will be needed. IfmaxResults
was provided, it is possible the number of results to be fewer thanmaxResults
.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of task definition family results that
ListTaskDefinitionFamilies
returned in paginated output. When this parameter is used,ListTaskDefinitions
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListTaskDefinitionFamilies
request with the returnednextToken
value. This value can be between 1 and 100. If this parameter isn’t used, thenListTaskDefinitionFamilies
returns up to 100 results and anextToken
value if applicable.
- On success, responds with
ListTaskDefinitionFamiliesOutput
with field(s):families(Option<Vec::<String>>)
:The list of task definition family names that match the
ListTaskDefinitionFamilies
request.next_token(Option<String>)
:The
nextToken
value to include in a futureListTaskDefinitionFamilies
request. When the results of aListTaskDefinitionFamilies
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<ListTaskDefinitionFamiliesError>
Source§impl Client
impl Client
Sourcepub fn list_task_definitions(&self) -> ListTaskDefinitionsFluentBuilder
pub fn list_task_definitions(&self) -> ListTaskDefinitionsFluentBuilder
Constructs a fluent builder for the ListTaskDefinitions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
family_prefix(impl Into<String>)
/set_family_prefix(Option<String>)
:
required: falseThe full family name to filter the
ListTaskDefinitions
results with. Specifying afamilyPrefix
limits the listed task definitions to task definition revisions that belong to that family.status(TaskDefinitionStatus)
/set_status(Option<TaskDefinitionStatus>)
:
required: falseThe task definition status to filter the
ListTaskDefinitions
results with. By default, onlyACTIVE
task definitions are listed. By setting this parameter toINACTIVE
, you can view task definitions that areINACTIVE
as long as an active task or service still references them. If you paginate the resulting output, be sure to keep thestatus
value constant in each subsequent request.sort(SortOrder)
/set_sort(Option<SortOrder>)
:
required: falseThe order to sort the results in. Valid values are
ASC
andDESC
. By default, (ASC
) task definitions are listed lexicographically by family name and in ascending numerical order by revision so that the newest task definitions in a family are listed last. Setting this parameter toDESC
reverses the sort order on family name and revision. This is so that the newest task definitions in a family are listed first.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from aListTaskDefinitions
request indicating that more results are available to fulfill the request and further calls will be needed. IfmaxResults
was provided, it is possible the number of results to be fewer thanmaxResults
.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of task definition results that
ListTaskDefinitions
returned in paginated output. When this parameter is used,ListTaskDefinitions
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListTaskDefinitions
request with the returnednextToken
value. This value can be between 1 and 100. If this parameter isn’t used, thenListTaskDefinitions
returns up to 100 results and anextToken
value if applicable.
- On success, responds with
ListTaskDefinitionsOutput
with field(s):task_definition_arns(Option<Vec::<String>>)
:The list of task definition Amazon Resource Name (ARN) entries for the
ListTaskDefinitions
request.next_token(Option<String>)
:The
nextToken
value to include in a futureListTaskDefinitions
request. When the results of aListTaskDefinitions
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<ListTaskDefinitionsError>
Source§impl Client
impl Client
Sourcepub fn list_tasks(&self) -> ListTasksFluentBuilder
pub fn list_tasks(&self) -> ListTasksFluentBuilder
Constructs a fluent builder for the ListTasks
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster to use when filtering the
ListTasks
results. If you do not specify a cluster, the default cluster is assumed.container_instance(impl Into<String>)
/set_container_instance(Option<String>)
:
required: falseThe container instance ID or full ARN of the container instance to use when filtering the
ListTasks
results. Specifying acontainerInstance
limits the results to tasks that belong to that container instance.family(impl Into<String>)
/set_family(Option<String>)
:
required: falseThe name of the task definition family to use when filtering the
ListTasks
results. Specifying afamily
limits the results to tasks that belong to that family.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from aListTasks
request indicating that more results are available to fulfill the request and further calls will be needed. IfmaxResults
was provided, it’s possible the number of results to be fewer thanmaxResults
.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of task results that
ListTasks
returned in paginated output. When this parameter is used,ListTasks
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListTasks
request with the returnednextToken
value. This value can be between 1 and 100. If this parameter isn’t used, thenListTasks
returns up to 100 results and anextToken
value if applicable.started_by(impl Into<String>)
/set_started_by(Option<String>)
:
required: falseThe
startedBy
value to filter the task results with. Specifying astartedBy
value limits the results to tasks that were started with that value.When you specify
startedBy
as the filter, it must be the only filter that you use.service_name(impl Into<String>)
/set_service_name(Option<String>)
:
required: falseThe name of the service to use when filtering the
ListTasks
results. Specifying aserviceName
limits the results to tasks that belong to that service.desired_status(DesiredStatus)
/set_desired_status(Option<DesiredStatus>)
:
required: falseThe task desired status to use when filtering the
ListTasks
results. Specifying adesiredStatus
ofSTOPPED
limits the results to tasks that Amazon ECS has set the desired status toSTOPPED
. This can be useful for debugging tasks that aren’t starting properly or have died or finished. The default status filter isRUNNING
, which shows tasks that Amazon ECS has set the desired status toRUNNING
.Although you can filter results based on a desired status of
PENDING
, this doesn’t return any results. Amazon ECS never sets the desired status of a task to that value (only a task’slastStatus
may have a value ofPENDING
).launch_type(LaunchType)
/set_launch_type(Option<LaunchType>)
:
required: falseThe launch type to use when filtering the
ListTasks
results.
- On success, responds with
ListTasksOutput
with field(s):task_arns(Option<Vec::<String>>)
:The list of task ARN entries for the
ListTasks
request.next_token(Option<String>)
:The
nextToken
value to include in a futureListTasks
request. When the results of aListTasks
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<ListTasksError>
Source§impl Client
impl Client
Sourcepub fn put_account_setting(&self) -> PutAccountSettingFluentBuilder
pub fn put_account_setting(&self) -> PutAccountSettingFluentBuilder
Constructs a fluent builder for the PutAccountSetting
operation.
- The fluent builder is configurable:
name(SettingName)
/set_name(Option<SettingName>)
:
required: trueThe Amazon ECS account setting name to modify.
The following are the valid values for the account setting name.
-
serviceLongArnFormat
- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
taskLongArnFormat
- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
containerInstanceLongArnFormat
- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
awsvpcTrunking
- When modified, the elastic network interface (ENI) limit for any new container instances that support the feature is changed. IfawsvpcTrunking
is turned on, any new container instances that support the feature are launched have the increased ENI limits available to them. For more information, see Elastic Network Interface Trunking in the Amazon Elastic Container Service Developer Guide. -
containerInsights
- Container Insights with enhanced observability provides all the Container Insights metrics, plus additional task and container metrics. This version supports enhanced observability for Amazon ECS clusters using the Amazon EC2 and Fargate launch types. After you configure Container Insights with enhanced observability on Amazon ECS, Container Insights auto-collects detailed infrastructure telemetry from the cluster level down to the container level in your environment and displays these critical performance data in curated dashboards removing the heavy lifting in observability set-up.To use Container Insights with enhanced observability, set the
containerInsights
account setting toenhanced
.To use Container Insights, set the
containerInsights
account setting toenabled
.For more information, see Monitor Amazon ECS containers using Container Insights with enhanced observability in the Amazon Elastic Container Service Developer Guide.
-
dualStackIPv6
- When turned on, when using a VPC in dual stack mode, your tasks using theawsvpc
network mode can have an IPv6 address assigned. For more information on using IPv6 with tasks launched on Amazon EC2 instances, see Using a VPC in dual-stack mode. For more information on using IPv6 with tasks launched on Fargate, see Using a VPC in dual-stack mode. -
fargateTaskRetirementWaitPeriod
- When Amazon Web Services determines that a security or infrastructure update is needed for an Amazon ECS task hosted on Fargate, the tasks need to be stopped and new tasks launched to replace them. UsefargateTaskRetirementWaitPeriod
to configure the wait time to retire a Fargate task. For information about the Fargate tasks maintenance, see Amazon Web Services Fargate task maintenance in the Amazon ECS Developer Guide. -
tagResourceAuthorization
- Amazon ECS is introducing tagging authorization for resource creation. Users must have permissions for actions that create the resource, such asecsCreateCluster
. If tags are specified when you create a resource, Amazon Web Services performs additional authorization to verify if users or roles have permissions to create tags. Therefore, you must grant explicit permissions to use theecs:TagResource
action. For more information, see Grant permission to tag resources on creation in the Amazon ECS Developer Guide. -
defaultLogDriverMode
- Amazon ECS supports setting a default delivery mode of log messages from a container to thelogDriver
that you specify in the container’slogConfiguration
. The delivery mode affects application stability when the flow of logs from the container to the log driver is interrupted. ThedefaultLogDriverMode
setting supports two values:blocking
andnon-blocking
. If you don’t specify a delivery mode in your container definition’slogConfiguration
, the mode you specify using this account setting will be used as the default. For more information about log delivery modes, see LogConfiguration.On June 25, 2025, Amazon ECS is changing the default log driver mode from
blocking
tonon-blocking
to prioritize task availability over logging. To continue using theblocking
mode after this change, do one of the following:-
Set the
mode
option in your container definition’slogConfiguration
asblocking
. -
Set the
defaultLogDriverMode
account setting toblocking
.
-
-
guardDutyActivate
- TheguardDutyActivate
parameter is read-only in Amazon ECS and indicates whether Amazon ECS Runtime Monitoring is enabled or disabled by your security administrator in your Amazon ECS account. Amazon GuardDuty controls this account setting on your behalf. For more information, see Protecting Amazon ECS workloads with Amazon ECS Runtime Monitoring.
-
value(impl Into<String>)
/set_value(Option<String>)
:
required: trueThe account setting value for the specified principal ARN. Accepted values are
enabled
,disabled
,enhanced
,on
, andoff
.When you specify
fargateTaskRetirementWaitPeriod
for thename
, the following are the valid values:-
0
- Amazon Web Services sends the notification, and immediately retires the affected tasks. -
7
- Amazon Web Services sends the notification, and waits 7 calendar days to retire the tasks. -
14
- Amazon Web Services sends the notification, and waits 14 calendar days to retire the tasks.
-
principal_arn(impl Into<String>)
/set_principal_arn(Option<String>)
:
required: falseThe ARN of the principal, which can be a user, role, or the root user. If you specify the root user, it modifies the account setting for all users, roles, and the root user of the account unless a user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.
In order to use this parameter, you must be the root user, or the principal.
You must use the root user when you set the Fargate wait time (
fargateTaskRetirementWaitPeriod
).Federated users assume the account setting of the root user and can’t have explicit account settings set for them.
- On success, responds with
PutAccountSettingOutput
with field(s):setting(Option<Setting>)
:The current account setting for a resource.
- On failure, responds with
SdkError<PutAccountSettingError>
Source§impl Client
impl Client
Sourcepub fn put_account_setting_default(
&self,
) -> PutAccountSettingDefaultFluentBuilder
pub fn put_account_setting_default( &self, ) -> PutAccountSettingDefaultFluentBuilder
Constructs a fluent builder for the PutAccountSettingDefault
operation.
- The fluent builder is configurable:
name(SettingName)
/set_name(Option<SettingName>)
:
required: trueThe resource name for which to modify the account setting.
The following are the valid values for the account setting name.
-
serviceLongArnFormat
- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
taskLongArnFormat
- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
containerInstanceLongArnFormat
- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
awsvpcTrunking
- When modified, the elastic network interface (ENI) limit for any new container instances that support the feature is changed. IfawsvpcTrunking
is turned on, any new container instances that support the feature are launched have the increased ENI limits available to them. For more information, see Elastic Network Interface Trunking in the Amazon Elastic Container Service Developer Guide. -
containerInsights
- Container Insights with enhanced observability provides all the Container Insights metrics, plus additional task and container metrics. This version supports enhanced observability for Amazon ECS clusters using the Amazon EC2 and Fargate launch types. After you configure Container Insights with enhanced observability on Amazon ECS, Container Insights auto-collects detailed infrastructure telemetry from the cluster level down to the container level in your environment and displays these critical performance data in curated dashboards removing the heavy lifting in observability set-up.To use Container Insights with enhanced observability, set the
containerInsights
account setting toenhanced
.To use Container Insights, set the
containerInsights
account setting toenabled
.For more information, see Monitor Amazon ECS containers using Container Insights with enhanced observability in the Amazon Elastic Container Service Developer Guide.
-
dualStackIPv6
- When turned on, when using a VPC in dual stack mode, your tasks using theawsvpc
network mode can have an IPv6 address assigned. For more information on using IPv6 with tasks launched on Amazon EC2 instances, see Using a VPC in dual-stack mode. For more information on using IPv6 with tasks launched on Fargate, see Using a VPC in dual-stack mode. -
fargateFIPSMode
- If you specifyfargateFIPSMode
, Fargate FIPS 140 compliance is affected. -
fargateTaskRetirementWaitPeriod
- When Amazon Web Services determines that a security or infrastructure update is needed for an Amazon ECS task hosted on Fargate, the tasks need to be stopped and new tasks launched to replace them. UsefargateTaskRetirementWaitPeriod
to configure the wait time to retire a Fargate task. For information about the Fargate tasks maintenance, see Amazon Web Services Fargate task maintenance in the Amazon ECS Developer Guide. -
tagResourceAuthorization
- Amazon ECS is introducing tagging authorization for resource creation. Users must have permissions for actions that create the resource, such asecsCreateCluster
. If tags are specified when you create a resource, Amazon Web Services performs additional authorization to verify if users or roles have permissions to create tags. Therefore, you must grant explicit permissions to use theecs:TagResource
action. For more information, see Grant permission to tag resources on creation in the Amazon ECS Developer Guide. -
defaultLogDriverMode
-Amazon ECS supports setting a default delivery mode of log messages from a container to thelogDriver
that you specify in the container’slogConfiguration
. The delivery mode affects application stability when the flow of logs from the container to the log driver is interrupted. ThedefaultLogDriverMode
setting supports two values:blocking
andnon-blocking
. If you don’t specify a delivery mode in your container definition’slogConfiguration
, the mode you specify using this account setting will be used as the default. For more information about log delivery modes, see LogConfiguration.On June 25, 2025, Amazon ECS is changing the default log driver mode from
blocking
tonon-blocking
to prioritize task availability over logging. To continue using theblocking
mode after this change, do one of the following:-
Set the
mode
option in your container definition’slogConfiguration
asblocking
. -
Set the
defaultLogDriverMode
account setting toblocking
.
-
-
guardDutyActivate
- TheguardDutyActivate
parameter is read-only in Amazon ECS and indicates whether Amazon ECS Runtime Monitoring is enabled or disabled by your security administrator in your Amazon ECS account. Amazon GuardDuty controls this account setting on your behalf. For more information, see Protecting Amazon ECS workloads with Amazon ECS Runtime Monitoring.
-
value(impl Into<String>)
/set_value(Option<String>)
:
required: trueThe account setting value for the specified principal ARN. Accepted values are
enabled
,disabled
,on
,enhanced
, andoff
.When you specify
fargateTaskRetirementWaitPeriod
for thename
, the following are the valid values:-
0
- Amazon Web Services sends the notification, and immediately retires the affected tasks. -
7
- Amazon Web Services sends the notification, and waits 7 calendar days to retire the tasks. -
14
- Amazon Web Services sends the notification, and waits 14 calendar days to retire the tasks.
-
- On success, responds with
PutAccountSettingDefaultOutput
with field(s):setting(Option<Setting>)
:The current setting for a resource.
- On failure, responds with
SdkError<PutAccountSettingDefaultError>
Source§impl Client
impl Client
Sourcepub fn put_attributes(&self) -> PutAttributesFluentBuilder
pub fn put_attributes(&self) -> PutAttributesFluentBuilder
Constructs a fluent builder for the PutAttributes
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that contains the resource to apply attributes. If you do not specify a cluster, the default cluster is assumed.
attributes(Attribute)
/set_attributes(Option<Vec::<Attribute>>)
:
required: trueThe attributes to apply to your resource. You can specify up to 10 custom attributes for each resource. You can specify up to 10 attributes in a single call.
- On success, responds with
PutAttributesOutput
with field(s):attributes(Option<Vec::<Attribute>>)
:The attributes applied to your resource.
- On failure, responds with
SdkError<PutAttributesError>
Source§impl Client
impl Client
Sourcepub fn put_cluster_capacity_providers(
&self,
) -> PutClusterCapacityProvidersFluentBuilder
pub fn put_cluster_capacity_providers( &self, ) -> PutClusterCapacityProvidersFluentBuilder
Constructs a fluent builder for the PutClusterCapacityProviders
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster to modify the capacity provider settings for. If you don’t specify a cluster, the default cluster is assumed.
capacity_providers(impl Into<String>)
/set_capacity_providers(Option<Vec::<String>>)
:
required: trueThe name of one or more capacity providers to associate with the cluster.
If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the CreateCapacityProvider API operation.
To use a Fargate capacity provider, specify either the
FARGATE
orFARGATE_SPOT
capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.default_capacity_provider_strategy(CapacityProviderStrategyItem)
/set_default_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>)
:
required: trueThe capacity provider strategy to use by default for the cluster.
When creating a service or running a task on a cluster, if no capacity provider or launch type is specified then the default capacity provider strategy for the cluster is used.
A capacity provider strategy consists of one or more capacity providers along with the
base
andweight
to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The PutClusterCapacityProviders API is used to associate a capacity provider with a cluster. Only capacity providers with anACTIVE
orUPDATING
status can be used.If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the CreateCapacityProvider API operation.
To use a Fargate capacity provider, specify either the
FARGATE
orFARGATE_SPOT
capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.
- On success, responds with
PutClusterCapacityProvidersOutput
with field(s):cluster(Option<Cluster>)
:Details about the cluster.
- On failure, responds with
SdkError<PutClusterCapacityProvidersError>
Source§impl Client
impl Client
Sourcepub fn register_container_instance(
&self,
) -> RegisterContainerInstanceFluentBuilder
pub fn register_container_instance( &self, ) -> RegisterContainerInstanceFluentBuilder
Constructs a fluent builder for the RegisterContainerInstance
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster to register your container instance with. If you do not specify a cluster, the default cluster is assumed.
instance_identity_document(impl Into<String>)
/set_instance_identity_document(Option<String>)
:
required: falseThe instance identity document for the EC2 instance to register. This document can be found by running the following command from the instance:
curl http://169.254.169.254/latest/dynamic/instance-identity/document/
instance_identity_document_signature(impl Into<String>)
/set_instance_identity_document_signature(Option<String>)
:
required: falseThe instance identity document signature for the EC2 instance to register. This signature can be found by running the following command from the instance:
curl http://169.254.169.254/latest/dynamic/instance-identity/signature/
total_resources(Resource)
/set_total_resources(Option<Vec::<Resource>>)
:
required: falseThe resources available on the instance.
version_info(VersionInfo)
/set_version_info(Option<VersionInfo>)
:
required: falseThe version information for the Amazon ECS container agent and Docker daemon that runs on the container instance.
container_instance_arn(impl Into<String>)
/set_container_instance_arn(Option<String>)
:
required: falseThe ARN of the container instance (if it was previously registered).
attributes(Attribute)
/set_attributes(Option<Vec::<Attribute>>)
:
required: falseThe container instance attributes that this container instance supports.
platform_devices(PlatformDevice)
/set_platform_devices(Option<Vec::<PlatformDevice>>)
:
required: falseThe devices that are available on the container instance. The only supported device type is a GPU.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe metadata that you apply to the container instance to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- On success, responds with
RegisterContainerInstanceOutput
with field(s):container_instance(Option<ContainerInstance>)
:The container instance that was registered.
- On failure, responds with
SdkError<RegisterContainerInstanceError>
Source§impl Client
impl Client
Sourcepub fn register_task_definition(&self) -> RegisterTaskDefinitionFluentBuilder
pub fn register_task_definition(&self) -> RegisterTaskDefinitionFluentBuilder
Constructs a fluent builder for the RegisterTaskDefinition
operation.
- The fluent builder is configurable:
family(impl Into<String>)
/set_family(Option<String>)
:
required: trueYou must specify a
family
for a task definition. You can use it track multiple versions of the same task definition. Thefamily
is used as a name for your task definition. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.task_role_arn(impl Into<String>)
/set_task_role_arn(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the IAM role that containers in this task can assume. All containers in this task are granted the permissions that are specified in this role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide.
execution_role_arn(impl Into<String>)
/set_execution_role_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf. For informationabout the required IAM roles for Amazon ECS, see IAM roles for Amazon ECS in the Amazon Elastic Container Service Developer Guide.
network_mode(NetworkMode)
/set_network_mode(Option<NetworkMode>)
:
required: falseThe Docker networking mode to use for the containers in the task. The valid values are
none
,bridge
,awsvpc
, andhost
. If no network mode is specified, the default isbridge
.For Amazon ECS tasks on Fargate, the
awsvpc
network mode is required. For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can be used. For Amazon ECS tasks on Amazon EC2 Windows instances,
orawsvpc
can be used. If the network mode is set tonone
, you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. Thehost
andawsvpc
network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by thebridge
mode.With the
host
andawsvpc
network modes, exposed container ports are mapped directly to the corresponding host port (for thehost
network mode) or the attached elastic network interface port (for theawsvpc
network mode), so you cannot take advantage of dynamic host port mappings.When using the
host
network mode, you should not run containers using the root user (UID 0). It is considered best practice to use a non-root user.If the network mode is
awsvpc
, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration value when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide.If the network mode is
host
, you cannot run multiple instantiations of the same task on a single container instance when port mappings are used.container_definitions(ContainerDefinition)
/set_container_definitions(Option<Vec::<ContainerDefinition>>)
:
required: trueA list of container definitions in JSON format that describe the different containers that make up your task.
volumes(Volume)
/set_volumes(Option<Vec::<Volume>>)
:
required: falseA list of volume definitions in JSON format that containers in your task might use.
placement_constraints(TaskDefinitionPlacementConstraint)
/set_placement_constraints(Option<Vec::<TaskDefinitionPlacementConstraint>>)
:
required: falseAn array of placement constraint objects to use for the task. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
requires_compatibilities(Compatibility)
/set_requires_compatibilities(Option<Vec::<Compatibility>>)
:
required: falseThe task launch type that Amazon ECS validates the task definition against. A client exception is returned if the task definition doesn’t validate against the compatibilities specified. If no value is specified, the parameter is omitted from the response.
cpu(impl Into<String>)
/set_cpu(Option<String>)
:
required: falseThe number of CPU units used by the task. It can be expressed as an integer using CPU units (for example,
1024
) or as a string using vCPUs (for example,1 vCPU
or1 vcpu
) in a task definition. String values are converted to an integer indicating the CPU units when the task definition is registered.Task-level CPU and memory parameters are ignored for Windows containers. We recommend specifying container-level resources for Windows containers.
If you’re using the EC2 launch type or external launch type, this field is optional. Supported values are between
128
CPU units (0.125
vCPUs) and196608
CPU units (192
vCPUs). If you do not specify a value, the parameter is ignored.This field is required for Fargate. For information about the valid values, see Task size in the Amazon Elastic Container Service Developer Guide.
memory(impl Into<String>)
/set_memory(Option<String>)
:
required: falseThe amount of memory (in MiB) used by the task. It can be expressed as an integer using MiB (for example ,
1024
) or as a string using GB (for example,1GB
or1 GB
) in a task definition. String values are converted to an integer indicating the MiB when the task definition is registered.Task-level CPU and memory parameters are ignored for Windows containers. We recommend specifying container-level resources for Windows containers.
If using the EC2 launch type, this field is optional.
If using the Fargate launch type, this field is required and you must use one of the following values. This determines your range of supported values for the
cpu
parameter.The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
-
512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available
cpu
values: 256 (.25 vCPU) -
1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available
cpu
values: 512 (.5 vCPU) -
2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available
cpu
values: 1024 (1 vCPU) -
Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available
cpu
values: 2048 (2 vCPU) -
Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available
cpu
values: 4096 (4 vCPU) -
Between 16 GB and 60 GB in 4 GB increments - Available
cpu
values: 8192 (8 vCPU)This option requires Linux platform
1.4.0
or later. -
Between 32GB and 120 GB in 8 GB increments - Available
cpu
values: 16384 (16 vCPU)This option requires Linux platform
1.4.0
or later.
-
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
pid_mode(PidMode)
/set_pid_mode(Option<PidMode>)
:
required: falseThe process namespace to use for the containers in the task. The valid values are
host
ortask
. On Fargate for Linux containers, the only valid value istask
. For example, monitoring sidecars might needpidMode
to access information about other containers running in the same task.If
host
is specified, all containers within the tasks that specified thehost
PID mode on the same container instance share the same process namespace with the host Amazon EC2 instance.If
task
is specified, all containers within the specified task share the same process namespace.If no value is specified, the default is a private namespace for each container.
If the
host
PID mode is used, there’s a heightened risk of undesired process namespace exposure.This parameter is not supported for Windows containers.
This parameter is only supported for tasks that are hosted on Fargate if the tasks are using platform version
1.4.0
or later (Linux). This isn’t supported for Windows containers on Fargate.ipc_mode(IpcMode)
/set_ipc_mode(Option<IpcMode>)
:
required: falseThe IPC resource namespace to use for the containers in the task. The valid values are
host
,task
, ornone
. Ifhost
is specified, then all containers within the tasks that specified thehost
IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. Iftask
is specified, all containers within the specified task share the same IPC resources. Ifnone
is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance.If the
host
IPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose.If you are setting namespaced kernel parameters using
systemControls
for the containers in the task, the following will apply to your IPC resource namespace. For more information, see System Controls in the Amazon Elastic Container Service Developer Guide.-
For tasks that use the
host
IPC mode, IPC namespace relatedsystemControls
are not supported. -
For tasks that use the
task
IPC mode, IPC namespace relatedsystemControls
will apply to all containers within a task.
This parameter is not supported for Windows containers or tasks run on Fargate.
-
proxy_configuration(ProxyConfiguration)
/set_proxy_configuration(Option<ProxyConfiguration>)
:
required: falseThe configuration details for the App Mesh proxy.
For tasks hosted on Amazon EC2 instances, the container instances require at least version
1.26.0
of the container agent and at least version1.26.0-1
of theecs-init
package to use a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version20190301
or later, then they contain the required versions of the container agent andecs-init
. For more information, see Amazon ECS-optimized AMI versions in the Amazon Elastic Container Service Developer Guide.inference_accelerators(InferenceAccelerator)
/set_inference_accelerators(Option<Vec::<InferenceAccelerator>>)
:
required: falseThe Elastic Inference accelerators to use for the containers in the task.
ephemeral_storage(EphemeralStorage)
/set_ephemeral_storage(Option<EphemeralStorage>)
:
required: falseThe amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. For more information, see Using data volumes in tasks in the Amazon ECS Developer Guide.
For tasks using the Fargate launch type, the task requires the following platforms:
-
Linux platform version
1.4.0
or later. -
Windows platform version
1.0.0
or later.
-
runtime_platform(RuntimePlatform)
/set_runtime_platform(Option<RuntimePlatform>)
:
required: falseThe operating system that your tasks definitions run on. A platform family is specified only for tasks using the Fargate launch type.
enable_fault_injection(bool)
/set_enable_fault_injection(Option<bool>)
:
required: falseEnables fault injection when you register your task definition and allows for fault injection requests to be accepted from the task’s containers. The default value is
false
.
- On success, responds with
RegisterTaskDefinitionOutput
with field(s):task_definition(Option<TaskDefinition>)
:The full description of the registered task definition.
tags(Option<Vec::<Tag>>)
:The list of tags associated with the task definition.
- On failure, responds with
SdkError<RegisterTaskDefinitionError>
Source§impl Client
impl Client
Sourcepub fn run_task(&self) -> RunTaskFluentBuilder
pub fn run_task(&self) -> RunTaskFluentBuilder
Constructs a fluent builder for the RunTask
operation.
- The fluent builder is configurable:
capacity_provider_strategy(CapacityProviderStrategyItem)
/set_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>)
:
required: falseThe capacity provider strategy to use for the task.
If a
capacityProviderStrategy
is specified, thelaunchType
parameter must be omitted. If nocapacityProviderStrategy
orlaunchType
is specified, thedefaultCapacityProviderStrategy
for the cluster is used.When you use cluster auto scaling, you must specify
capacityProviderStrategy
and notlaunchType
.A capacity provider strategy can contain a maximum of 20 capacity providers.
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a cluster, the default cluster is assumed.
Each account receives a default cluster the first time you use the service, but you may also create other clusters.
count(i32)
/set_count(Option<i32>)
:
required: falseThe number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
enable_ecs_managed_tags(bool)
/set_enable_ecs_managed_tags(Option<bool>)
:
required: falseSpecifies whether to use Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
enable_execute_command(bool)
/set_enable_execute_command(Option<bool>)
:
required: falseDetermines whether to use the execute command functionality for the containers in this task. If
true
, this enables execute command functionality on all containers in the task.If
true
, then the task definition must have a task role, or you must provide one as an override.group(impl Into<String>)
/set_group(Option<String>)
:
required: falseThe name of the task group to associate with the task. The default value is the family name of the task definition (for example,
family:my-family-name
).launch_type(LaunchType)
/set_launch_type(Option<LaunchType>)
:
required: falseThe infrastructure to run your standalone task on. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.
The
FARGATE
launch type runs your tasks on Fargate On-Demand infrastructure.Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more information, see Fargate capacity providers in the Amazon ECS Developer Guide.
The
EC2
launch type runs your tasks on Amazon EC2 instances registered to your cluster.The
EXTERNAL
launch type runs your tasks on your on-premises server or virtual machine (VM) capacity registered to your cluster.A task can use either a launch type or a capacity provider strategy. If a
launchType
is specified, thecapacityProviderStrategy
parameter must be omitted.When you use cluster auto scaling, you must specify
capacityProviderStrategy
and notlaunchType
.network_configuration(NetworkConfiguration)
/set_network_configuration(Option<NetworkConfiguration>)
:
required: falseThe network configuration for the task. This parameter is required for task definitions that use the
awsvpc
network mode to receive their own elastic network interface, and it isn’t supported for other network modes. For more information, see Task networking in the Amazon Elastic Container Service Developer Guide.overrides(TaskOverride)
/set_overrides(Option<TaskOverride>)
:
required: falseA list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it should receive. You can override the default command for a container (that’s specified in the task definition or Docker image) with a
command
override. You can also override existing environment variables (that are specified in the task definition or Docker image) on a container or add new environment variables to it with anenvironment
override.A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.
placement_constraints(PlacementConstraint)
/set_placement_constraints(Option<Vec::<PlacementConstraint>>)
:
required: falseAn array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task (including constraints in the task definition and those specified at runtime).
placement_strategy(PlacementStrategy)
/set_placement_strategy(Option<Vec::<PlacementStrategy>>)
:
required: falseThe placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task.
platform_version(impl Into<String>)
/set_platform_version(Option<String>)
:
required: falseThe platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn’t specified, the
LATEST
platform version is used. For more information, see Fargate platform versions in the Amazon Elastic Container Service Developer Guide.propagate_tags(PropagateTags)
/set_propagate_tags(Option<PropagateTags>)
:
required: falseSpecifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren’t propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use theTagResource API action.
An error will be received if you specify the
SERVICE
option when running a task.reference_id(impl Into<String>)
/set_reference_id(Option<String>)
:
required: falseThis parameter is only used by Amazon ECS. It is not intended for use by customers.
started_by(impl Into<String>)
/set_started_by(Option<String>)
:
required: falseAn optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the
startedBy
parameter. You can then identify which tasks belong to that job by filtering the results of a ListTasks call with thestartedBy
value. Up to 128 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.If a task is started by an Amazon ECS service, then the
startedBy
parameter contains the deployment ID of the service that starts it.tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
task_definition(impl Into<String>)
/set_task_definition(Option<String>)
:
required: trueThe
family
andrevision
(family:revision
) or full ARN of the task definition to run. If arevision
isn’t specified, the latestACTIVE
revision is used.The full ARN value must match the value that you specified as the
Resource
of the principal’s permissions policy.When you specify a task definition, you must either specify a specific revision, or all revisions in the ARN.
To specify a specific revision, include the revision number in the ARN. For example, to specify revision 2, use
arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:2
.To specify all revisions, use the wildcard () in the ARN. For example, to specify all revisions, use
arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:
.For more information, see Policy Resources for Amazon ECS in the Amazon Elastic Container Service Developer Guide.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseAn identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see Ensuring idempotency.
volume_configurations(TaskVolumeConfiguration)
/set_volume_configurations(Option<Vec::<TaskVolumeConfiguration>>)
:
required: falseThe details of the volume that was
configuredAtLaunch
. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in in TaskManagedEBSVolumeConfiguration. Thename
of the volume must match thename
from the task definition.
- On success, responds with
RunTaskOutput
with field(s):tasks(Option<Vec::<Task>>)
:A full description of the tasks that were run. The tasks that were successfully placed on your cluster are described here.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
For information about how to address failures, see Service event messages and API failure reasons in the Amazon Elastic Container Service Developer Guide.
- On failure, responds with
SdkError<RunTaskError>
Source§impl Client
impl Client
Sourcepub fn start_task(&self) -> StartTaskFluentBuilder
pub fn start_task(&self) -> StartTaskFluentBuilder
Constructs a fluent builder for the StartTask
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not specify a cluster, the default cluster is assumed.
container_instances(impl Into<String>)
/set_container_instances(Option<Vec::<String>>)
:
required: trueThe container instance IDs or full ARN entries for the container instances where you would like to place your task. You can specify up to 10 container instances.
enable_ecs_managed_tags(bool)
/set_enable_ecs_managed_tags(Option<bool>)
:
required: falseSpecifies whether to use Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
enable_execute_command(bool)
/set_enable_execute_command(Option<bool>)
:
required: falseWhether or not the execute command functionality is turned on for the task. If
true
, this turns on the execute command functionality on all containers in the task.group(impl Into<String>)
/set_group(Option<String>)
:
required: falseThe name of the task group to associate with the task. The default value is the family name of the task definition (for example, family:my-family-name).
network_configuration(NetworkConfiguration)
/set_network_configuration(Option<NetworkConfiguration>)
:
required: falseThe VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the
awsvpc
networking mode.overrides(TaskOverride)
/set_overrides(Option<TaskOverride>)
:
required: falseA list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it receives. You can override the default command for a container (that’s specified in the task definition or Docker image) with a
command
override. You can also override existing environment variables (that are specified in the task definition or Docker image) on a container or add new environment variables to it with anenvironment
override.A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.
propagate_tags(PropagateTags)
/set_propagate_tags(Option<PropagateTags>)
:
required: falseSpecifies whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren’t propagated.
reference_id(impl Into<String>)
/set_reference_id(Option<String>)
:
required: falseThis parameter is only used by Amazon ECS. It is not intended for use by customers.
started_by(impl Into<String>)
/set_started_by(Option<String>)
:
required: falseAn optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the
startedBy
parameter. You can then identify which tasks belong to that job by filtering the results of a ListTasks call with thestartedBy
value. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.If a task is started by an Amazon ECS service, the
startedBy
parameter contains the deployment ID of the service that starts it.tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
task_definition(impl Into<String>)
/set_task_definition(Option<String>)
:
required: trueThe
family
andrevision
(family:revision
) or full ARN of the task definition to start. If arevision
isn’t specified, the latestACTIVE
revision is used.volume_configurations(TaskVolumeConfiguration)
/set_volume_configurations(Option<Vec::<TaskVolumeConfiguration>>)
:
required: falseThe details of the volume that was
configuredAtLaunch
. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. Thename
of the volume must match thename
from the task definition.
- On success, responds with
StartTaskOutput
with field(s):tasks(Option<Vec::<Task>>)
:A full description of the tasks that were started. Each task that was successfully placed on your container instances is described.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<StartTaskError>
Source§impl Client
impl Client
Sourcepub fn stop_service_deployment(&self) -> StopServiceDeploymentFluentBuilder
pub fn stop_service_deployment(&self) -> StopServiceDeploymentFluentBuilder
Constructs a fluent builder for the StopServiceDeployment
operation.
- The fluent builder is configurable:
service_deployment_arn(impl Into<String>)
/set_service_deployment_arn(Option<String>)
:
required: trueThe ARN of the service deployment that you want to stop.
stop_type(StopServiceDeploymentStopType)
/set_stop_type(Option<StopServiceDeploymentStopType>)
:
required: falseHow you want Amazon ECS to stop the service.
The valid values are
ROLLBACK
.
- On success, responds with
StopServiceDeploymentOutput
with field(s):service_deployment_arn(Option<String>)
:The ARN of the stopped service deployment.
- On failure, responds with
SdkError<StopServiceDeploymentError>
Source§impl Client
impl Client
Sourcepub fn stop_task(&self) -> StopTaskFluentBuilder
pub fn stop_task(&self) -> StopTaskFluentBuilder
Constructs a fluent builder for the StopTask
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the task to stop. If you do not specify a cluster, the default cluster is assumed.
task(impl Into<String>)
/set_task(Option<String>)
:
required: trueThefull Amazon Resource Name (ARN) of the task.
reason(impl Into<String>)
/set_reason(Option<String>)
:
required: falseAn optional message specified when a task is stopped. For example, if you’re using a custom scheduler, you can use this parameter to specify the reason for stopping the task here, and the message appears in subsequent DescribeTasks> API operations on this task.
- On success, responds with
StopTaskOutput
with field(s):task(Option<Task>)
:The task that was stopped.
- On failure, responds with
SdkError<StopTaskError>
Source§impl Client
impl Client
Sourcepub fn submit_attachment_state_changes(
&self,
) -> SubmitAttachmentStateChangesFluentBuilder
pub fn submit_attachment_state_changes( &self, ) -> SubmitAttachmentStateChangesFluentBuilder
Constructs a fluent builder for the SubmitAttachmentStateChanges
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full ARN of the cluster that hosts the container instance the attachment belongs to.
attachments(AttachmentStateChange)
/set_attachments(Option<Vec::<AttachmentStateChange>>)
:
required: trueAny attachments associated with the state change request.
- On success, responds with
SubmitAttachmentStateChangesOutput
with field(s):acknowledgment(Option<String>)
:Acknowledgement of the state change.
- On failure, responds with
SdkError<SubmitAttachmentStateChangesError>
Source§impl Client
impl Client
Sourcepub fn submit_container_state_change(
&self,
) -> SubmitContainerStateChangeFluentBuilder
pub fn submit_container_state_change( &self, ) -> SubmitContainerStateChangeFluentBuilder
Constructs a fluent builder for the SubmitContainerStateChange
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full ARN of the cluster that hosts the container.
task(impl Into<String>)
/set_task(Option<String>)
:
required: falseThe task ID or full Amazon Resource Name (ARN) of the task that hosts the container.
container_name(impl Into<String>)
/set_container_name(Option<String>)
:
required: falseThe name of the container.
runtime_id(impl Into<String>)
/set_runtime_id(Option<String>)
:
required: falseThe ID of the Docker container.
status(impl Into<String>)
/set_status(Option<String>)
:
required: falseThe status of the state change request.
exit_code(i32)
/set_exit_code(Option<i32>)
:
required: falseThe exit code that’s returned for the state change request.
reason(impl Into<String>)
/set_reason(Option<String>)
:
required: falseThe reason for the state change request.
network_bindings(NetworkBinding)
/set_network_bindings(Option<Vec::<NetworkBinding>>)
:
required: falseThe network bindings of the container.
- On success, responds with
SubmitContainerStateChangeOutput
with field(s):acknowledgment(Option<String>)
:Acknowledgement of the state change.
- On failure, responds with
SdkError<SubmitContainerStateChangeError>
Source§impl Client
impl Client
Sourcepub fn submit_task_state_change(&self) -> SubmitTaskStateChangeFluentBuilder
pub fn submit_task_state_change(&self) -> SubmitTaskStateChangeFluentBuilder
Constructs a fluent builder for the SubmitTaskStateChange
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the task.
task(impl Into<String>)
/set_task(Option<String>)
:
required: falseThe task ID or full ARN of the task in the state change request.
status(impl Into<String>)
/set_status(Option<String>)
:
required: falseThe status of the state change request.
reason(impl Into<String>)
/set_reason(Option<String>)
:
required: falseThe reason for the state change request.
containers(ContainerStateChange)
/set_containers(Option<Vec::<ContainerStateChange>>)
:
required: falseAny containers that’s associated with the state change request.
attachments(AttachmentStateChange)
/set_attachments(Option<Vec::<AttachmentStateChange>>)
:
required: falseAny attachments associated with the state change request.
managed_agents(ManagedAgentStateChange)
/set_managed_agents(Option<Vec::<ManagedAgentStateChange>>)
:
required: falseThe details for the managed agent that’s associated with the task.
pull_started_at(DateTime)
/set_pull_started_at(Option<DateTime>)
:
required: falseThe Unix timestamp for the time when the container image pull started.
pull_stopped_at(DateTime)
/set_pull_stopped_at(Option<DateTime>)
:
required: falseThe Unix timestamp for the time when the container image pull completed.
execution_stopped_at(DateTime)
/set_execution_stopped_at(Option<DateTime>)
:
required: falseThe Unix timestamp for the time when the task execution stopped.
- On success, responds with
SubmitTaskStateChangeOutput
with field(s):acknowledgment(Option<String>)
:Acknowledgement of the state change.
- On failure, responds with
SdkError<SubmitTaskStateChangeError>
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 add tags to. Currently, the supported resources are Amazon ECS capacity providers, tasks, services, task definitions, clusters, and container instances.
In order to tag a service that has the following ARN format, you need to migrate the service to the long ARN. For more information, see Migrate an Amazon ECS short service ARN to a long ARN in the Amazon Elastic Container Service Developer Guide.
arn:aws:ecs:region:aws_account_id:service/service-name
After the migration is complete, the service has the long ARN format, as shown below. Use this ARN to tag the service.
arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name
If you try to tag a service with a short ARN, you receive an
InvalidParameterException
error.tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueThe tags to add to the resource. A tag is an array of key-value pairs.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- 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 to delete tags from. Currently, the supported resources are Amazon ECS capacity providers, tasks, services, task definitions, clusters, and container instances.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe keys of the tags to be removed.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_capacity_provider(&self) -> UpdateCapacityProviderFluentBuilder
pub fn update_capacity_provider(&self) -> UpdateCapacityProviderFluentBuilder
Constructs a fluent builder for the UpdateCapacityProvider
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the capacity provider to update.
auto_scaling_group_provider(AutoScalingGroupProviderUpdate)
/set_auto_scaling_group_provider(Option<AutoScalingGroupProviderUpdate>)
:
required: trueAn object that represent the parameters to update for the Auto Scaling group capacity provider.
- On success, responds with
UpdateCapacityProviderOutput
with field(s):capacity_provider(Option<CapacityProvider>)
:Details about the capacity provider.
- On failure, responds with
SdkError<UpdateCapacityProviderError>
Source§impl Client
impl Client
Sourcepub fn update_cluster(&self) -> UpdateClusterFluentBuilder
pub fn update_cluster(&self) -> UpdateClusterFluentBuilder
Constructs a fluent builder for the UpdateCluster
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: trueThe name of the cluster to modify the settings for.
settings(ClusterSetting)
/set_settings(Option<Vec::<ClusterSetting>>)
:
required: falseThe cluster settings for your cluster.
configuration(ClusterConfiguration)
/set_configuration(Option<ClusterConfiguration>)
:
required: falseThe execute command configuration for the cluster.
service_connect_defaults(ClusterServiceConnectDefaultsRequest)
/set_service_connect_defaults(Option<ClusterServiceConnectDefaultsRequest>)
:
required: falseUse this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the
enabled
parameter totrue
in theServiceConnectConfiguration
. You can set the namespace of each service individually in theServiceConnectConfiguration
to override this default parameter.Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
- On success, responds with
UpdateClusterOutput
with field(s):cluster(Option<Cluster>)
:Details about the cluster.
- On failure, responds with
SdkError<UpdateClusterError>
Source§impl Client
impl Client
Sourcepub fn update_cluster_settings(&self) -> UpdateClusterSettingsFluentBuilder
pub fn update_cluster_settings(&self) -> UpdateClusterSettingsFluentBuilder
Constructs a fluent builder for the UpdateClusterSettings
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: trueThe name of the cluster to modify the settings for.
settings(ClusterSetting)
/set_settings(Option<Vec::<ClusterSetting>>)
:
required: trueThe setting to use by default for a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster. If this value is specified, it overrides the
containerInsights
value set with PutAccountSetting or PutAccountSettingDefault.Currently, if you delete an existing cluster that does not have Container Insights turned on, and then create a new cluster with the same name with Container Insights tuned on, Container Insights will not actually be turned on. If you want to preserve the same name for your existing cluster and turn on Container Insights, you must wait 7 days before you can re-create it.
- On success, responds with
UpdateClusterSettingsOutput
with field(s):cluster(Option<Cluster>)
:Details about the cluster
- On failure, responds with
SdkError<UpdateClusterSettingsError>
Source§impl Client
impl Client
Sourcepub fn update_container_agent(&self) -> UpdateContainerAgentFluentBuilder
pub fn update_container_agent(&self) -> UpdateContainerAgentFluentBuilder
Constructs a fluent builder for the UpdateContainerAgent
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that your container instance is running on. If you do not specify a cluster, the default cluster is assumed.
container_instance(impl Into<String>)
/set_container_instance(Option<String>)
:
required: trueThe container instance ID or full ARN entries for the container instance where you would like to update the Amazon ECS container agent.
- On success, responds with
UpdateContainerAgentOutput
with field(s):container_instance(Option<ContainerInstance>)
:The container instance that the container agent was updated for.
- On failure, responds with
SdkError<UpdateContainerAgentError>
Source§impl Client
impl Client
Sourcepub fn update_container_instances_state(
&self,
) -> UpdateContainerInstancesStateFluentBuilder
pub fn update_container_instances_state( &self, ) -> UpdateContainerInstancesStateFluentBuilder
Constructs a fluent builder for the UpdateContainerInstancesState
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to update. If you do not specify a cluster, the default cluster is assumed.
container_instances(impl Into<String>)
/set_container_instances(Option<Vec::<String>>)
:
required: trueA list of up to 10 container instance IDs or full ARN entries.
status(ContainerInstanceStatus)
/set_status(Option<ContainerInstanceStatus>)
:
required: trueThe container instance state to update the container instance with. The only valid values for this action are
ACTIVE
andDRAINING
. A container instance can only be updated toDRAINING
status once it has reached anACTIVE
state. If a container instance is inREGISTERING
,DEREGISTERING
, orREGISTRATION_FAILED
state you can describe the container instance but can’t update the container instance state.
- On success, responds with
UpdateContainerInstancesStateOutput
with field(s):container_instances(Option<Vec::<ContainerInstance>>)
:The list of container instances.
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<UpdateContainerInstancesStateError>
Source§impl Client
impl Client
Sourcepub fn update_service(&self) -> UpdateServiceFluentBuilder
pub fn update_service(&self) -> UpdateServiceFluentBuilder
Constructs a fluent builder for the UpdateService
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that your service runs on. If you do not specify a cluster, the default cluster is assumed.
service(impl Into<String>)
/set_service(Option<String>)
:
required: trueThe name of the service to update.
desired_count(i32)
/set_desired_count(Option<i32>)
:
required: falseThe number of instantiations of the task to place and keep running in your service.
task_definition(impl Into<String>)
/set_task_definition(Option<String>)
:
required: falseThe
family
andrevision
(family:revision
) or full ARN of the task definition to run in your service. If arevision
is not specified, the latestACTIVE
revision is used. If you modify the task definition withUpdateService
, Amazon ECS spawns a task with the new version of the task definition and then stops an old task after the new version is running.capacity_provider_strategy(CapacityProviderStrategyItem)
/set_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>)
:
required: falseThe capacity provider strategy to update the service to use.
if the service uses the default capacity provider strategy for the cluster, the service can be updated to use one or more capacity providers as opposed to the default capacity provider strategy. However, when a service is using a capacity provider strategy that’s not the default capacity provider strategy, the service can’t be updated to use the cluster’s default capacity provider strategy.
A capacity provider strategy consists of one or more capacity providers along with the
base
andweight
to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The PutClusterCapacityProviders API is used to associate a capacity provider with a cluster. Only capacity providers with anACTIVE
orUPDATING
status can be used.If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the CreateClusterCapacityProvider API operation.
To use a Fargate capacity provider, specify either the
FARGATE
orFARGATE_SPOT
capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.The PutClusterCapacityProvidersAPI operation is used to update the list of available capacity providers for a cluster after the cluster is created.
deployment_configuration(DeploymentConfiguration)
/set_deployment_configuration(Option<DeploymentConfiguration>)
:
required: falseOptional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
availability_zone_rebalancing(AvailabilityZoneRebalancing)
/set_availability_zone_rebalancing(Option<AvailabilityZoneRebalancing>)
:
required: falseIndicates whether to use Availability Zone rebalancing for the service.
For more information, see Balancing an Amazon ECS service across Availability Zones in the Amazon Elastic Container Service Developer Guide .
network_configuration(NetworkConfiguration)
/set_network_configuration(Option<NetworkConfiguration>)
:
required: falseAn object representing the network configuration for the service.
placement_constraints(PlacementConstraint)
/set_placement_constraints(Option<Vec::<PlacementConstraint>>)
:
required: falseAn array of task placement constraint objects to update the service to use. If no value is specified, the existing placement constraints for the service will remain unchanged. If this value is specified, it will override any existing placement constraints defined for the service. To remove all existing placement constraints, specify an empty array.
You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
placement_strategy(PlacementStrategy)
/set_placement_strategy(Option<Vec::<PlacementStrategy>>)
:
required: falseThe task placement strategy objects to update the service to use. If no value is specified, the existing placement strategy for the service will remain unchanged. If this value is specified, it will override the existing placement strategy defined for the service. To remove an existing placement strategy, specify an empty object.
You can specify a maximum of five strategy rules for each service.
platform_version(impl Into<String>)
/set_platform_version(Option<String>)
:
required: falseThe platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If a platform version is not specified, the
LATEST
platform version is used. For more information, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.force_new_deployment(bool)
/set_force_new_deployment(Option<bool>)
:
required: falseDetermines whether to force a new deployment of the service. By default, deployments aren’t forced. You can use this option to start a new deployment with no service definition changes. For example, you can update a service’s tasks to use a newer Docker image with the same image/tag combination (
my_image:latest
) or to roll Fargate tasks onto a newer platform version.health_check_grace_period_seconds(i32)
/set_health_check_grace_period_seconds(Option<i32>)
:
required: falseThe period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks after a task has first started. If you don’t specify a health check grace period value, the default value of
0
is used. If you don’t use any of the health checks, thenhealthCheckGracePeriodSeconds
is unused.If your service’s tasks take a while to start and respond to health checks, you can specify a health check grace period of up to 2,147,483,647 seconds (about 69 years). During that time, the Amazon ECS service scheduler ignores health check status. This grace period can prevent the service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.
enable_execute_command(bool)
/set_enable_execute_command(Option<bool>)
:
required: falseIf
true
, this enables execute command functionality on all task containers.If you do not want to override the value that was set when the service was created, you can set this to
null
when performing this action.enable_ecs_managed_tags(bool)
/set_enable_ecs_managed_tags(Option<bool>)
:
required: falseDetermines whether to turn on Amazon ECS managed tags for the tasks in the service. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
Only tasks launched after the update will reflect the update. To update the tags on all tasks, set
forceNewDeployment
totrue
, so that Amazon ECS starts new tasks with the updated tags.load_balancers(LoadBalancer)
/set_load_balancers(Option<Vec::<LoadBalancer>>)
:
required: falseA list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.
When you add, update, or remove a load balancer configuration, Amazon ECS starts new tasks with the updated Elastic Load Balancing configuration, and then stops the old tasks when the new tasks are running.
For services that use rolling updates, you can add, update, or remove Elastic Load Balancing target groups. You can update from a single target group to multiple target groups and from multiple target groups to a single target group.
For services that use blue/green deployments, you can update Elastic Load Balancing target groups by using
CreateDeployment
through CodeDeploy. Note that multiple target groups are not supported for blue/green deployments. For more information see Register multiple target groups with a service in the Amazon Elastic Container Service Developer Guide.For services that use the external deployment controller, you can add, update, or remove load balancers by using CreateTaskSet. Note that multiple target groups are not supported for external deployments. For more information see Register multiple target groups with a service in the Amazon Elastic Container Service Developer Guide.
You can remove existing
loadBalancers
by passing an empty list.propagate_tags(PropagateTags)
/set_propagate_tags(Option<PropagateTags>)
:
required: falseDetermines whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren’t propagated.
Only tasks launched after the update will reflect the update. To update the tags on all tasks, set
forceNewDeployment
totrue
, so that Amazon ECS starts new tasks with the updated tags.service_registries(ServiceRegistry)
/set_service_registries(Option<Vec::<ServiceRegistry>>)
:
required: falseThe details for the service discovery registries to assign to this service. For more information, see Service Discovery.
When you add, update, or remove the service registries configuration, Amazon ECS starts new tasks with the updated service registries configuration, and then stops the old tasks when the new tasks are running.
You can remove existing
serviceRegistries
by passing an empty list.service_connect_configuration(ServiceConnectConfiguration)
/set_service_connect_configuration(Option<ServiceConnectConfiguration>)
:
required: falseThe configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
volume_configurations(ServiceVolumeConfiguration)
/set_volume_configurations(Option<Vec::<ServiceVolumeConfiguration>>)
:
required: falseThe details of the volume that was
configuredAtLaunch
. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in ServiceManagedEBSVolumeConfiguration. Thename
of the volume must match thename
from the task definition. If set to null, no new deployment is triggered. Otherwise, if this configuration differs from the existing one, it triggers a new deployment.vpc_lattice_configurations(VpcLatticeConfiguration)
/set_vpc_lattice_configurations(Option<Vec::<VpcLatticeConfiguration>>)
:
required: falseAn object representing the VPC Lattice configuration for the service being updated.
- On success, responds with
UpdateServiceOutput
with field(s):service(Option<Service>)
:The full description of your service following the update call.
- On failure, responds with
SdkError<UpdateServiceError>
Source§impl Client
impl Client
Sourcepub fn update_service_primary_task_set(
&self,
) -> UpdateServicePrimaryTaskSetFluentBuilder
pub fn update_service_primary_task_set( &self, ) -> UpdateServicePrimaryTaskSetFluentBuilder
Constructs a fluent builder for the UpdateServicePrimaryTaskSet
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set exists in.
service(impl Into<String>)
/set_service(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the service that the task set exists in.
primary_task_set(impl Into<String>)
/set_primary_task_set(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the task set to set as the primary task set in the deployment.
- On success, responds with
UpdateServicePrimaryTaskSetOutput
with field(s):task_set(Option<TaskSet>)
:The details about the task set.
- On failure, responds with
SdkError<UpdateServicePrimaryTaskSetError>
Source§impl Client
impl Client
Sourcepub fn update_task_protection(&self) -> UpdateTaskProtectionFluentBuilder
pub fn update_task_protection(&self) -> UpdateTaskProtectionFluentBuilder
Constructs a fluent builder for the UpdateTaskProtection
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.
tasks(impl Into<String>)
/set_tasks(Option<Vec::<String>>)
:
required: trueA list of up to 10 task IDs or full ARN entries.
protection_enabled(bool)
/set_protection_enabled(Option<bool>)
:
required: trueSpecify
true
to mark a task for protection andfalse
to unset protection, making it eligible for termination.expires_in_minutes(i32)
/set_expires_in_minutes(Option<i32>)
:
required: falseIf you set
protectionEnabled
totrue
, you can specify the duration for task protection in minutes. You can specify a value from 1 minute to up to 2,880 minutes (48 hours). During this time, your task will not be terminated by scale-in events from Service Auto Scaling or deployments. After this time period lapses,protectionEnabled
will be reset tofalse
.If you don’t specify the time, then the task is automatically protected for 120 minutes (2 hours).
- On success, responds with
UpdateTaskProtectionOutput
with field(s):protected_tasks(Option<Vec::<ProtectedTask>>)
:A list of tasks with the following information.
-
taskArn
: The task ARN. -
protectionEnabled
: The protection status of the task. If scale-in protection is turned on for a task, the value istrue
. Otherwise, it isfalse
. -
expirationDate
: The epoch time when protection for the task will expire.
-
failures(Option<Vec::<Failure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<UpdateTaskProtectionError>
Source§impl Client
impl Client
Sourcepub fn update_task_set(&self) -> UpdateTaskSetFluentBuilder
pub fn update_task_set(&self) -> UpdateTaskSetFluentBuilder
Constructs a fluent builder for the UpdateTaskSet
operation.
- The fluent builder is configurable:
cluster(impl Into<String>)
/set_cluster(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set is found in.
service(impl Into<String>)
/set_service(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the service that the task set is found in.
task_set(impl Into<String>)
/set_task_set(Option<String>)
:
required: trueThe short name or full Amazon Resource Name (ARN) of the task set to update.
scale(Scale)
/set_scale(Option<Scale>)
:
required: trueA floating-point percentage of the desired number of tasks to place and keep running in the task set.
- On success, responds with
UpdateTaskSetOutput
with field(s):task_set(Option<TaskSet>)
:Details about the task set.
- On failure, responds with
SdkError<UpdateTaskSetError>
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_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is 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_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Source§impl Waiters for Client
impl Waiters for Client
Source§fn wait_until_services_inactive(&self) -> ServicesInactiveFluentBuilder
fn wait_until_services_inactive(&self) -> ServicesInactiveFluentBuilder
services_inactive
Source§fn wait_until_services_stable(&self) -> ServicesStableFluentBuilder
fn wait_until_services_stable(&self) -> ServicesStableFluentBuilder
services_stable
Source§fn wait_until_tasks_running(&self) -> TasksRunningFluentBuilder
fn wait_until_tasks_running(&self) -> TasksRunningFluentBuilder
tasks_running
Source§fn wait_until_tasks_stopped(&self) -> TasksStoppedFluentBuilder
fn wait_until_tasks_stopped(&self) -> TasksStoppedFluentBuilder
tasks_stopped
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);