Struct Client

Source
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

Source

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: true

      The 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: true

      The details of the Auto Scaling group for the capacity provider.


    • tags(Tag) / set_tags(Option<Vec::<Tag>>):
      required: false

      The 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):
  • On failure, responds with SdkError<CreateCapacityProviderError>
Source§

impl Client

Source

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: false

      The 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: false

      The 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: false

      The 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: false

      The execute command configuration for the cluster.


    • capacity_providers(impl Into<String>) / set_capacity_providers(Option<Vec::<String>>):
      required: false

      The 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 or FARGATE_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: false

      The 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: false

      Use 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 to true in the ServiceConnectConfiguration. You can set the namespace of each service individually in the ServiceConnectConfiguration 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):
  • On failure, responds with SdkError<CreateClusterError>
Source§

impl Client

Source

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: false

      The 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: true

      The 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: false

      The family and revision (family:revision) or full ARN of the task definition to run in your service. If a revision isn’t specified, the latest ACTIVE revision is used.

      A task definition must be specified if the service uses either the ECS or CODE_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: false

      Indicates 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: false

      A 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 a targetGroupPair). During a deployment, CodeDeploy determines which task set in your service has the status PRIMARY, 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 choose ip as the target type, not instance. This is because tasks that use the awsvpc network mode are associated with an elastic network interface, not an Amazon EC2 instance.


    • service_registries(ServiceRegistry) / set_service_registries(Option<Vec::<ServiceRegistry>>):
      required: false

      The 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: false

      The number of instantiations of the specified task definition to place and keep running in your service.

      This is required if schedulingStrategy is REPLICA or isn’t specified. If schedulingStrategy is DAEMON then this isn’t required.


    • client_token(impl Into<String>) / set_client_token(Option<String>):
      required: false

      An 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: false

      The 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, the capacityProviderStrategy parameter must be omitted.


    • capacity_provider_strategy(CapacityProviderStrategyItem) / set_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>):
      required: false

      The capacity provider strategy to use for the service.

      If a capacityProviderStrategy is specified, the launchType parameter must be omitted. If no capacityProviderStrategy or launchType is specified, the defaultCapacityProviderStrategy 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: false

      The 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: false

      The 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 the role parameter, you must also specify a load balancer object with the loadBalancers 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 name bar 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: false

      Optional 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: false

      An 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: false

      The 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: false

      The 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: false

      The 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, then healthCheckGracePeriodSeconds 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: false

      The 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 the CODE_DEPLOY or EXTERNAL 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 or EXTERNAL deployment controller types don’t support the DAEMON scheduling strategy.


    • deployment_controller(DeploymentController) / set_deployment_controller(Option<DeploymentController>):
      required: false

      The 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: false

      The 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: false

      Specifies 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: false

      Specifies 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: false

      Determines 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: false

      The 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: false

      The 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: false

      The 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 or launchType parameter, but not both, depending where one was specified when it was created.

      If a service is using the ECS deployment controller, the deploymentController and taskSets parameters will not be returned.

      if the service uses the CODE_DEPLOY deployment controller, the deploymentController, taskSets and deployments parameters will be returned, however the deployments parameter will be an empty list.

  • On failure, responds with SdkError<CreateServiceError>
Source§

impl Client

Source

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: true

      The 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: true

      The 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: false

      An 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: true

      The 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: false

      An object representing the network configuration for a task set.


    • load_balancers(LoadBalancer) / set_load_balancers(Option<Vec::<LoadBalancer>>):
      required: false

      A 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: false

      The 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: false

      The 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, the capacityProviderStrategy parameter must be omitted.


    • capacity_provider_strategy(CapacityProviderStrategyItem) / set_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>):
      required: false

      The capacity provider strategy to use for the task set.

      A capacity provider strategy consists of one or more capacity providers along with the base and weight 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 an ACTIVE or UPDATING status can be used.

      If a capacityProviderStrategy is specified, the launchType parameter must be omitted. If no capacityProviderStrategy or launchType is specified, the defaultCapacityProviderStrategy 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 or FARGATE_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: false

      The 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: false

      A 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: false

      An 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: false

      The 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

Source

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: true

      The resource name to disable the account setting for. If serviceLongArnFormat is specified, the ARN for your Amazon ECS services is affected. If taskLongArnFormat is specified, the ARN and resource ID for your Amazon ECS tasks is affected. If containerInstanceLongArnFormat is specified, the ARN and resource ID for your Amazon ECS container instances is affected. If awsvpcTrunking is specified, the ENI limit for your Amazon ECS container instances is affected.


    • principal_arn(impl Into<String>) / set_principal_arn(Option<String>):
      required: false

      The 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):
  • On failure, responds with SdkError<DeleteAccountSettingError>
Source§

impl Client

Source

pub fn delete_attributes(&self) -> DeleteAttributesFluentBuilder

Constructs a fluent builder for the DeleteAttributes operation.

Source§

impl Client

Source

pub fn delete_capacity_provider(&self) -> DeleteCapacityProviderFluentBuilder

Constructs a fluent builder for the DeleteCapacityProvider operation.

Source§

impl Client

Source

pub fn delete_cluster(&self) -> DeleteClusterFluentBuilder

Constructs a fluent builder for the DeleteCluster operation.

Source§

impl Client

Source

pub fn delete_service(&self) -> DeleteServiceFluentBuilder

Constructs a fluent builder for the DeleteService operation.

Source§

impl Client

Source

pub fn delete_task_definitions(&self) -> DeleteTaskDefinitionsFluentBuilder

Constructs a fluent builder for the DeleteTaskDefinitions operation.

Source§

impl Client

Source

pub fn delete_task_set(&self) -> DeleteTaskSetFluentBuilder

Constructs a fluent builder for the DeleteTaskSet operation.

Source§

impl Client

Source

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: false

      The 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: true

      The 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: false

      Forces 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):
  • On failure, responds with SdkError<DeregisterContainerInstanceError>
Source§

impl Client

Source

pub fn deregister_task_definition( &self, ) -> DeregisterTaskDefinitionFluentBuilder

Constructs a fluent builder for the DeregisterTaskDefinition operation.

Source§

impl Client

Source

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: false

      The 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: false

      Specifies 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: false

      The maximum number of account setting results returned by DescribeCapacityProviders in paginated output. When this parameter is used, DescribeCapacityProviders only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeCapacityProviders request with the returned nextToken value. This value can be between 1 and 10. If this parameter is not used, then DescribeCapacityProviders returns up to 10 results and a nextToken value if applicable.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      The nextToken value returned from a previous paginated DescribeCapacityProviders request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken 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):
  • On failure, responds with SdkError<DescribeCapacityProvidersError>
Source§

impl Client

Source

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: false

      A 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: false

      Determines 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):
  • On failure, responds with SdkError<DescribeClustersError>
Source§

impl Client

Source

pub fn describe_container_instances( &self, ) -> DescribeContainerInstancesFluentBuilder

Constructs a fluent builder for the DescribeContainerInstances operation.

Source§

impl Client

Source

pub fn describe_service_deployments( &self, ) -> DescribeServiceDeploymentsFluentBuilder

Constructs a fluent builder for the DescribeServiceDeployments operation.

Source§

impl Client

Source

pub fn describe_service_revisions( &self, ) -> DescribeServiceRevisionsFluentBuilder

Constructs a fluent builder for the DescribeServiceRevisions operation.

Source§

impl Client

Source

pub fn describe_services(&self) -> DescribeServicesFluentBuilder

Constructs a fluent builder for the DescribeServices operation.

Source§

impl Client

Source

pub fn describe_task_definition(&self) -> DescribeTaskDefinitionFluentBuilder

Constructs a fluent builder for the DescribeTaskDefinition operation.

  • The fluent builder is configurable:
  • 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

Source

pub fn describe_task_sets(&self) -> DescribeTaskSetsFluentBuilder

Constructs a fluent builder for the DescribeTaskSets operation.

Source§

impl Client

Source

pub fn describe_tasks(&self) -> DescribeTasksFluentBuilder

Constructs a fluent builder for the DescribeTasks operation.

Source§

impl Client

Source

pub fn discover_poll_endpoint(&self) -> DiscoverPollEndpointFluentBuilder

Constructs a fluent builder for the DiscoverPollEndpoint operation.

Source§

impl Client

Source

pub fn execute_command(&self) -> ExecuteCommandFluentBuilder

Constructs a fluent builder for the ExecuteCommand operation.

Source§

impl Client

Source

pub fn get_task_protection(&self) -> GetTaskProtectionFluentBuilder

Constructs a fluent builder for the GetTaskProtection operation.

Source§

impl Client

Source

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: false

      The name of the account setting you want to list the settings for.


    • value(impl Into<String>) / set_value(Option<String>):
      required: false

      The 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: false

      The 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: false

      Determines whether to return the effective settings. If true, the account settings for the root user or the default setting for the principalArn are returned. If false, the account settings for the principalArn are returned if they’re set. Otherwise, no account settings are returned.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      The nextToken value returned from a ListAccountSettings request indicating that more results are available to fulfill the request and further calls will be needed. If maxResults was provided, it’s possible the number of results to be fewer than maxResults.

      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: false

      The maximum number of account setting results returned by ListAccountSettings in paginated output. When this parameter is used, ListAccountSettings only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListAccountSettings request with the returned nextToken value. This value can be between 1 and 10. If this parameter isn’t used, then ListAccountSettings returns up to 10 results and a nextToken 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 future ListAccountSettings request. When the results of a ListAccountSettings request exceed maxResults, 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<ListAccountSettingsError>
Source§

impl Client

Source

pub fn list_attributes(&self) -> ListAttributesFluentBuilder

Constructs a fluent builder for the ListAttributes operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

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: false

      The nextToken value returned from a ListClusters request indicating that more results are available to fulfill the request and further calls are needed. If maxResults was provided, it’s possible the number of results to be fewer than maxResults.

      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: false

      The maximum number of cluster results that ListClusters returned in paginated output. When this parameter is used, ListClusters only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListClusters request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn’t used, then ListClusters returns up to 100 results and a nextToken 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 future ListClusters request. When the results of a ListClusters request exceed maxResults, 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<ListClustersError>
Source§

impl Client

Source

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: false

      The 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: false

      You 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: false

      The nextToken value returned from a ListContainerInstances request indicating that more results are available to fulfill the request and further calls are needed. If maxResults was provided, it’s possible the number of results to be fewer than maxResults.

      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: false

      The maximum number of container instance results that ListContainerInstances returned in paginated output. When this parameter is used, ListContainerInstances only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListContainerInstances request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn’t used, then ListContainerInstances returns up to 100 results and a nextToken value if applicable.


    • status(ContainerInstanceStatus) / set_status(Option<ContainerInstanceStatus>):
      required: false

      Filters the container instances by status. For example, if you specify the DRAINING status, the results include only container instances that have been set to DRAINING using UpdateContainerInstancesState. If you don’t specify this parameter, the default is to include container instances set to all states other than INACTIVE.


  • 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 future ListContainerInstances request. When the results of a ListContainerInstances request exceed maxResults, 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<ListContainerInstancesError>
Source§

impl Client

Source

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: true

      The ARN or name of the service


    • cluster(impl Into<String>) / set_cluster(Option<String>):
      required: false

      The 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: false

      An 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: false

      An 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: false

      The nextToken value returned from a ListServiceDeployments request indicating that more results are available to fulfill the request and further calls are needed. If you provided maxResults, it’s possible the number of results is fewer than maxResults.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of service deployment results that ListServiceDeployments returned in paginated output. When this parameter is used, ListServiceDeployments only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListServiceDeployments request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn’t used, then ListServiceDeployments returns up to 20 results and a nextToken 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 future ListServiceDeployments request. When the results of a ListServiceDeployments request exceed maxResults, 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

Source

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: false

      The 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: false

      The nextToken value returned from a ListServices request indicating that more results are available to fulfill the request and further calls will be needed. If maxResults was provided, it is possible the number of results to be fewer than maxResults.

      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: false

      The maximum number of service results that ListServices returned in paginated output. When this parameter is used, ListServices only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListServices request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn’t used, then ListServices returns up to 10 results and a nextToken value if applicable.


    • launch_type(LaunchType) / set_launch_type(Option<LaunchType>):
      required: false

      The launch type to use when filtering the ListServices results.


    • scheduling_strategy(SchedulingStrategy) / set_scheduling_strategy(Option<SchedulingStrategy>):
      required: false

      The 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 future ListServices request. When the results of a ListServices request exceed maxResults, 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<ListServicesError>
Source§

impl Client

Source

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: true

      The 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: false

      The nextToken value that’s returned from a ListServicesByNamespace request. It indicates that more results are available to fulfill the request and further calls are needed. If maxResults is returned, it is possible the number of results is less than maxResults.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of service results that ListServicesByNamespace returns in paginated output. When this parameter is used, ListServicesByNamespace only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListServicesByNamespace request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn’t used, then ListServicesByNamespace returns up to 10 results and a nextToken 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 future ListServicesByNamespace request. When the results of a ListServicesByNamespace request exceed maxResults, this value can be used to retrieve the next page of results. When there are no more results to return, this value is null.

  • On failure, responds with SdkError<ListServicesByNamespaceError>
Source§

impl Client

Source

pub fn list_tags_for_resource(&self) -> ListTagsForResourceFluentBuilder

Constructs a fluent builder for the ListTagsForResource operation.

Source§

impl Client

Source

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: false

      The familyPrefix is a string that’s used to filter the results of ListTaskDefinitionFamilies. If you specify a familyPrefix, only task definition family names that begin with the familyPrefix string are returned.


    • status(TaskDefinitionFamilyStatus) / set_status(Option<TaskDefinitionFamilyStatus>):
      required: false

      The task definition family status to filter the ListTaskDefinitionFamilies results with. By default, both ACTIVE and INACTIVE task definition families are listed. If this parameter is set to ACTIVE, only task definition families that have an ACTIVE task definition revision are returned. If this parameter is set to INACTIVE, only task definition families that do not have any ACTIVE task definition revisions are returned. If you paginate the resulting output, be sure to keep the status value constant in each subsequent request.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      The nextToken value returned from a ListTaskDefinitionFamilies request indicating that more results are available to fulfill the request and further calls will be needed. If maxResults was provided, it is possible the number of results to be fewer than maxResults.

      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: false

      The maximum number of task definition family results that ListTaskDefinitionFamilies returned in paginated output. When this parameter is used, ListTaskDefinitions only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListTaskDefinitionFamilies request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn’t used, then ListTaskDefinitionFamilies returns up to 100 results and a nextToken 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 future ListTaskDefinitionFamilies request. When the results of a ListTaskDefinitionFamilies request exceed maxResults, 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<ListTaskDefinitionFamiliesError>
Source§

impl Client

Source

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: false

      The full family name to filter the ListTaskDefinitions results with. Specifying a familyPrefix limits the listed task definitions to task definition revisions that belong to that family.


    • status(TaskDefinitionStatus) / set_status(Option<TaskDefinitionStatus>):
      required: false

      The task definition status to filter the ListTaskDefinitions results with. By default, only ACTIVE task definitions are listed. By setting this parameter to INACTIVE, you can view task definitions that are INACTIVE as long as an active task or service still references them. If you paginate the resulting output, be sure to keep the status value constant in each subsequent request.


    • sort(SortOrder) / set_sort(Option<SortOrder>):
      required: false

      The order to sort the results in. Valid values are ASC and DESC. 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 to DESC 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: false

      The nextToken value returned from a ListTaskDefinitions request indicating that more results are available to fulfill the request and further calls will be needed. If maxResults was provided, it is possible the number of results to be fewer than maxResults.

      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: false

      The maximum number of task definition results that ListTaskDefinitions returned in paginated output. When this parameter is used, ListTaskDefinitions only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListTaskDefinitions request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn’t used, then ListTaskDefinitions returns up to 100 results and a nextToken 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 future ListTaskDefinitions request. When the results of a ListTaskDefinitions request exceed maxResults, 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<ListTaskDefinitionsError>
Source§

impl Client

Source

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: false

      The 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: false

      The container instance ID or full ARN of the container instance to use when filtering the ListTasks results. Specifying a containerInstance limits the results to tasks that belong to that container instance.


    • family(impl Into<String>) / set_family(Option<String>):
      required: false

      The name of the task definition family to use when filtering the ListTasks results. Specifying a family limits the results to tasks that belong to that family.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      The nextToken value returned from a ListTasks request indicating that more results are available to fulfill the request and further calls will be needed. If maxResults was provided, it’s possible the number of results to be fewer than maxResults.

      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: false

      The maximum number of task results that ListTasks returned in paginated output. When this parameter is used, ListTasks only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListTasks request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn’t used, then ListTasks returns up to 100 results and a nextToken value if applicable.


    • started_by(impl Into<String>) / set_started_by(Option<String>):
      required: false

      The startedBy value to filter the task results with. Specifying a startedBy 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: false

      The name of the service to use when filtering the ListTasks results. Specifying a serviceName limits the results to tasks that belong to that service.


    • desired_status(DesiredStatus) / set_desired_status(Option<DesiredStatus>):
      required: false

      The task desired status to use when filtering the ListTasks results. Specifying a desiredStatus of STOPPED limits the results to tasks that Amazon ECS has set the desired status to STOPPED. This can be useful for debugging tasks that aren’t starting properly or have died or finished. The default status filter is RUNNING, which shows tasks that Amazon ECS has set the desired status to RUNNING.

      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’s lastStatus may have a value of PENDING).


    • launch_type(LaunchType) / set_launch_type(Option<LaunchType>):
      required: false

      The 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 future ListTasks request. When the results of a ListTasks request exceed maxResults, 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<ListTasksError>
Source§

impl Client

Source

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: true

      The 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. If awsvpcTrunking 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 to enhanced.

        To use Container Insights, set the containerInsights account setting to enabled.

        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 the awsvpc 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. Use fargateTaskRetirementWaitPeriod 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 as ecsCreateCluster. 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 the ecs: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 the logDriver that you specify in the container’s logConfiguration. The delivery mode affects application stability when the flow of logs from the container to the log driver is interrupted. The defaultLogDriverMode setting supports two values: blocking and non-blocking. If you don’t specify a delivery mode in your container definition’s logConfiguration, 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 to non-blocking to prioritize task availability over logging. To continue using the blocking mode after this change, do one of the following:

        • Set the mode option in your container definition’s logConfiguration as blocking.

        • Set the defaultLogDriverMode account setting to blocking.

      • guardDutyActivate - The guardDutyActivate 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: true

      The account setting value for the specified principal ARN. Accepted values are enabled, disabled, enhanced, on, and off.

      When you specify fargateTaskRetirementWaitPeriod for the name, 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: false

      The 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):
  • On failure, responds with SdkError<PutAccountSettingError>
Source§

impl Client

Source

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: true

      The 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. If awsvpcTrunking 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 to enhanced.

        To use Container Insights, set the containerInsights account setting to enabled.

        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 the awsvpc 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 specify fargateFIPSMode, 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. Use fargateTaskRetirementWaitPeriod 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 as ecsCreateCluster. 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 the ecs: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 the logDriver that you specify in the container’s logConfiguration. The delivery mode affects application stability when the flow of logs from the container to the log driver is interrupted. The defaultLogDriverMode setting supports two values: blocking and non-blocking. If you don’t specify a delivery mode in your container definition’s logConfiguration, 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 to non-blocking to prioritize task availability over logging. To continue using the blocking mode after this change, do one of the following:

        • Set the mode option in your container definition’s logConfiguration as blocking.

        • Set the defaultLogDriverMode account setting to blocking.

      • guardDutyActivate - The guardDutyActivate 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: true

      The account setting value for the specified principal ARN. Accepted values are enabled, disabled, on, enhanced, and off.

      When you specify fargateTaskRetirementWaitPeriod for the name, 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):
  • On failure, responds with SdkError<PutAccountSettingDefaultError>
Source§

impl Client

Source

pub fn put_attributes(&self) -> PutAttributesFluentBuilder

Constructs a fluent builder for the PutAttributes operation.

Source§

impl Client

Source

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: true

      The 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: true

      The 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 or FARGATE_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: true

      The 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 and weight 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 an ACTIVE or UPDATING 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 or FARGATE_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):
  • On failure, responds with SdkError<PutClusterCapacityProvidersError>
Source§

impl Client

Source

pub fn register_container_instance( &self, ) -> RegisterContainerInstanceFluentBuilder

Constructs a fluent builder for the RegisterContainerInstance operation.

Source§

impl Client

Source

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: true

      You must specify a family for a task definition. You can use it track multiple versions of the same task definition. The family 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: false

      The 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: false

      The 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: false

      The Docker networking mode to use for the containers in the task. The valid values are none, bridge, awsvpc, and host. If no network mode is specified, the default is bridge.

      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, or awsvpc can be used. If the network mode is set to none, you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The host and awsvpc network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the bridge mode.

      With the host and awsvpc network modes, exposed container ports are mapped directly to the corresponding host port (for the host network mode) or the attached elastic network interface port (for the awsvpc 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: true

      A 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: false

      A list of volume definitions in JSON format that containers in your task might use.


    • placement_constraints(TaskDefinitionPlacementConstraint) / set_placement_constraints(Option<Vec::<TaskDefinitionPlacementConstraint>>):
      required: false

      An 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: false

      The 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: false

      The 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 or 1 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) and 196608 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: false

      The 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 or 1 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: false

      The 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: false

      The process namespace to use for the containers in the task. The valid values are host or task. On Fargate for Linux containers, the only valid value is task. For example, monitoring sidecars might need pidMode to access information about other containers running in the same task.

      If host is specified, all containers within the tasks that specified the host 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: false

      The IPC resource namespace to use for the containers in the task. The valid values are host, task, or none. If host is specified, then all containers within the tasks that specified the host IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If task is specified, all containers within the specified task share the same IPC resources. If none 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 related systemControls are not supported.

      • For tasks that use the task IPC mode, IPC namespace related systemControls 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: false

      The 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 version 1.26.0-1 of the ecs-init package to use a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version 20190301 or later, then they contain the required versions of the container agent and ecs-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: false

      The Elastic Inference accelerators to use for the containers in the task.


    • ephemeral_storage(EphemeralStorage) / set_ephemeral_storage(Option<EphemeralStorage>):
      required: false

      The 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: false

      The 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: false

      Enables 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):
  • On failure, responds with SdkError<RegisterTaskDefinitionError>
Source§

impl Client

Source

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: false

      The capacity provider strategy to use for the task.

      If a capacityProviderStrategy is specified, the launchType parameter must be omitted. If no capacityProviderStrategy or launchType is specified, the defaultCapacityProviderStrategy for the cluster is used.

      When you use cluster auto scaling, you must specify capacityProviderStrategy and not launchType.

      A capacity provider strategy can contain a maximum of 20 capacity providers.


    • cluster(impl Into<String>) / set_cluster(Option<String>):
      required: false

      The 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: false

      The 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: false

      Specifies 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: false

      Determines 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: false

      The 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: false

      The 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, the capacityProviderStrategy parameter must be omitted.

      When you use cluster auto scaling, you must specify capacityProviderStrategy and not launchType.


    • network_configuration(NetworkConfiguration) / set_network_configuration(Option<NetworkConfiguration>):
      required: false

      The 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: false

      A 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 an environment 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: false

      An 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: false

      The 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: false

      The 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: false

      Specifies 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: false

      This 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: false

      An 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 the startedBy 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: false

      The 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: true

      The family and revision (family:revision) or full ARN of the task definition to run. If a revision isn’t specified, the latest ACTIVE 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: false

      An 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: false

      The details of the volume that was configuredAtLaunch. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in in TaskManagedEBSVolumeConfiguration. The name of the volume must match the name from the task definition.


  • On success, responds with RunTaskOutput with field(s):
  • On failure, responds with SdkError<RunTaskError>
Source§

impl Client

Source

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: false

      The 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: true

      The 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: false

      Specifies 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: false

      Whether 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: false

      The 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: false

      The 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: false

      A 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 an environment 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: false

      Specifies 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: false

      This 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: false

      An 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 the startedBy 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: false

      The 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: true

      The family and revision (family:revision) or full ARN of the task definition to start. If a revision isn’t specified, the latest ACTIVE revision is used.


    • volume_configurations(TaskVolumeConfiguration) / set_volume_configurations(Option<Vec::<TaskVolumeConfiguration>>):
      required: false

      The details of the volume that was configuredAtLaunch. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. The name of the volume must match the name from the task definition.


  • On success, responds with StartTaskOutput with field(s):
  • On failure, responds with SdkError<StartTaskError>
Source§

impl Client

Source

pub fn stop_service_deployment(&self) -> StopServiceDeploymentFluentBuilder

Constructs a fluent builder for the StopServiceDeployment operation.

Source§

impl Client

Source

pub fn stop_task(&self) -> StopTaskFluentBuilder

Constructs a fluent builder for the StopTask operation.

Source§

impl Client

Source

pub fn submit_attachment_state_changes( &self, ) -> SubmitAttachmentStateChangesFluentBuilder

Constructs a fluent builder for the SubmitAttachmentStateChanges operation.

Source§

impl Client

Source

pub fn submit_container_state_change( &self, ) -> SubmitContainerStateChangeFluentBuilder

Constructs a fluent builder for the SubmitContainerStateChange operation.

Source§

impl Client

Source

pub fn submit_task_state_change(&self) -> SubmitTaskStateChangeFluentBuilder

Constructs a fluent builder for the SubmitTaskStateChange operation.

Source§

impl Client

Source

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: true

      The 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: true

      The 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

Source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

Source§

impl Client

Source

pub fn update_capacity_provider(&self) -> UpdateCapacityProviderFluentBuilder

Constructs a fluent builder for the UpdateCapacityProvider operation.

Source§

impl Client

Source

pub fn update_cluster(&self) -> UpdateClusterFluentBuilder

Constructs a fluent builder for the UpdateCluster operation.

Source§

impl Client

Source

pub fn update_cluster_settings(&self) -> UpdateClusterSettingsFluentBuilder

Constructs a fluent builder for the UpdateClusterSettings operation.

Source§

impl Client

Source

pub fn update_container_agent(&self) -> UpdateContainerAgentFluentBuilder

Constructs a fluent builder for the UpdateContainerAgent operation.

Source§

impl Client

Source

pub fn update_container_instances_state( &self, ) -> UpdateContainerInstancesStateFluentBuilder

Constructs a fluent builder for the UpdateContainerInstancesState operation.

Source§

impl Client

Source

pub fn update_service(&self) -> UpdateServiceFluentBuilder

Constructs a fluent builder for the UpdateService operation.

Source§

impl Client

Source

pub fn update_service_primary_task_set( &self, ) -> UpdateServicePrimaryTaskSetFluentBuilder

Constructs a fluent builder for the UpdateServicePrimaryTaskSet operation.

Source§

impl Client

Source

pub fn update_task_protection(&self) -> UpdateTaskProtectionFluentBuilder

Constructs a fluent builder for the UpdateTaskProtection operation.

Source§

impl Client

Source

pub fn update_task_set(&self) -> UpdateTaskSetFluentBuilder

Constructs a fluent builder for the UpdateTaskSet operation.

Source§

impl Client

Source

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 and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

Source

pub fn config(&self) -> &Config

Returns the client’s configuration.

Source§

impl Client

Source

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 the sleep_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 the http_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, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Client

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Waiters for Client

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

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

Source§

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 primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

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>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

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 bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

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 mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
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.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

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);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

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

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

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

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,