Struct aws_sdk_ecs::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.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_ecs::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_ecs::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_ecs::Client::from_conf(config);Implementations
sourceimpl Client
impl Client
sourcepub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
pub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
Creates a client with the given service configuration.
sourceimpl Client
impl Client
sourcepub fn create_capacity_provider(&self) -> CreateCapacityProvider
pub fn create_capacity_provider(&self) -> CreateCapacityProvider
Constructs a fluent builder for the CreateCapacityProvider operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):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>):The details of the Auto Scaling group for the capacity provider.
tags(Vec<Tag>)/set_tags(Option<Vec<Tag>>):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
CreateCapacityProviderOutputwith field(s):capacity_provider(Option<CapacityProvider>):The full description of the new capacity provider.
- On failure, responds with
SdkError<CreateCapacityProviderError>
sourcepub fn create_cluster(&self) -> CreateCluster
pub fn create_cluster(&self) -> CreateCluster
Constructs a fluent builder for the CreateCluster operation.
- The fluent builder is configurable:
cluster_name(impl Into<String>)/set_cluster_name(Option<String>):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(Vec<Tag>)/set_tags(Option<Vec<Tag>>):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(Vec<ClusterSetting>)/set_settings(Option<Vec<ClusterSetting>>):The setting to use when creating a cluster. This parameter is used to enable CloudWatch Container Insights for a cluster. If this value is specified, it overrides the
containerInsightsvalue set withPutAccountSettingorPutAccountSettingDefault.configuration(ClusterConfiguration)/set_configuration(Option<ClusterConfiguration>):The execute command configuration for the cluster.
capacity_providers(Vec<String>)/set_capacity_providers(Option<Vec<String>>):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
CreateServiceorRunTaskactions.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
CreateCapacityProviderAPI operation.To use a Fargate capacity provider, specify either the
FARGATEorFARGATE_SPOTcapacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.The
PutClusterCapacityProvidersAPI operation is used to update the list of available capacity providers for a cluster after the cluster is created.default_capacity_provider_strategy(Vec<CapacityProviderStrategyItem>)/set_default_capacity_provider_strategy(Option<Vec<CapacityProviderStrategyItem>>):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
RunTaskorCreateServiceAPIs 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
PutClusterCapacityProvidersAPI operation.
- On success, responds with
CreateClusterOutputwith field(s):cluster(Option<Cluster>):The full description of your new cluster.
- On failure, responds with
SdkError<CreateClusterError>
sourcepub fn create_service(&self) -> CreateService
pub fn create_service(&self) -> CreateService
Constructs a fluent builder for the CreateService operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):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>):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>):The
familyandrevision(family:revision) or full ARN of the task definition to run in your service. If arevisionisn’t specified, the latestACTIVErevision is used.A task definition must be specified if the service uses either the
ECSorCODE_DEPLOYdeployment controllers.load_balancers(Vec<LoadBalancer>)/set_load_balancers(Option<Vec<LoadBalancer>>):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_DEPLOYdeployment controller, the service is required to use either an Application Load Balancer or Network Load Balancer. When creating an CodeDeploy deployment group, you specify two target groups (referred to as atargetGroupPair). During a deployment, CodeDeploy determines which task set in your service has the statusPRIMARY, and it associates one target group with it. Then, it also associates the other target group with the replacement task set. The load balancer can also have up to two listeners: a required listener for production traffic and an optional listener that you can use to perform validation tests with Lambda functions before routing production traffic to it.After you create a service using the
ECSdeployment controller, the load balancer name or target group ARN, container name, and container port that’s specified in the service definition are immutable. If you use theCODE_DEPLOYdeployment 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
awsvpcnetwork 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 chooseipas the target type, notinstance. This is because tasks that use theawsvpcnetwork mode are associated with an elastic network interface, not an Amazon EC2 instance.service_registries(Vec<ServiceRegistry>)/set_service_registries(Option<Vec<ServiceRegistry>>):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>):The number of instantiations of the specified task definition to place and keep running on your cluster.
This is required if
schedulingStrategyisREPLICAor isn’t specified. IfschedulingStrategyisDAEMONthen this isn’t required.client_token(impl Into<String>)/set_client_token(Option<String>):An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 32 ASCII characters are allowed.
launch_type(LaunchType)/set_launch_type(Option<LaunchType>):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
FARGATElaunch 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 User Guide for Fargate.
The
EC2launch type runs your tasks on Amazon EC2 instances registered to your cluster.The
EXTERNALlaunch 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
launchTypeis specified, thecapacityProviderStrategyparameter must be omitted.capacity_provider_strategy(Vec<CapacityProviderStrategyItem>)/set_capacity_provider_strategy(Option<Vec<CapacityProviderStrategyItem>>):The capacity provider strategy to use for the service.
If a
capacityProviderStrategyis specified, thelaunchTypeparameter must be omitted. If nocapacityProviderStrategyorlaunchTypeis specified, thedefaultCapacityProviderStrategyfor the cluster is used.A capacity provider strategy may contain a maximum of 6 capacity providers.
platform_version(impl Into<String>)/set_platform_version(Option<String>):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
LATESTplatform 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>):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
awsvpcnetwork mode. If you specify theroleparameter, you must also specify a load balancer object with theloadBalancersparameter.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
awsvpcnetwork 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 namebarhas a path of/foo/then you would specify/foo/baras the role name. For more information, see Friendly names and paths in the IAM User Guide.deployment_configuration(DeploymentConfiguration)/set_deployment_configuration(Option<DeploymentConfiguration>):Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
placement_constraints(Vec<PlacementConstraint>)/set_placement_constraints(Option<Vec<PlacementConstraint>>):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(Vec<PlacementStrategy>)/set_placement_strategy(Option<Vec<PlacementStrategy>>):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>):The network configuration for the service. This parameter is required for task definitions that use the
awsvpcnetwork 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>):The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. This is only used when your service is configured to use a load balancer. If your service has a load balancer defined and you don’t specify a health check grace period value, the default value of
0is used.If your service’s tasks take a while to start and respond to Elastic Load Balancing 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>):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 theCODE_DEPLOYorEXTERNALdeployment 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_DEPLOYorEXTERNALdeployment controller types don’t support theDAEMONscheduling strategy.
-
deployment_controller(DeploymentController)/set_deployment_controller(Option<DeploymentController>):The deployment controller to use for the service. If no deployment controller is specified, the default value of
ECSis used.tags(Vec<Tag>)/set_tags(Option<Vec<Tag>>):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(bool):Specifies whether to enable 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.
propagate_tags(PropagateTags)/set_propagate_tags(Option<PropagateTags>):Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. If no value is specified, the tags aren’t propagated. Tags can only be propagated to the tasks within the service during service creation. To add tags to a task after service creation or task creation, use the
TagResourceAPI action.enable_execute_command(bool)/set_enable_execute_command(bool):Determines whether the execute command functionality is enabled for the service. If
true, this enables execute command functionality on all containers in the service tasks.
- On success, responds with
CreateServiceOutputwith field(s):service(Option<Service>):The full description of your service following the create call.
A service will return either a
capacityProviderStrategyorlaunchTypeparameter, but not both, depending where one was specified when it was created.If a service is using the
ECSdeployment controller, thedeploymentControllerandtaskSetsparameters will not be returned.if the service uses the
CODE_DEPLOYdeployment controller, thedeploymentController,taskSetsanddeploymentsparameters will be returned, however thedeploymentsparameter will be an empty list.
- On failure, responds with
SdkError<CreateServiceError>
sourcepub fn create_task_set(&self) -> CreateTaskSet
pub fn create_task_set(&self) -> CreateTaskSet
Constructs a fluent builder for the CreateTaskSet operation.
- The fluent builder is configurable:
service(impl Into<String>)/set_service(Option<String>):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>):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>):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_IDCloud Map attribute set to the provided value.task_definition(impl Into<String>)/set_task_definition(Option<String>):The task definition for the tasks in the task set to use.
network_configuration(NetworkConfiguration)/set_network_configuration(Option<NetworkConfiguration>):An object representing the network configuration for a task set.
load_balancers(Vec<LoadBalancer>)/set_load_balancers(Option<Vec<LoadBalancer>>):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(Vec<ServiceRegistry>)/set_service_registries(Option<Vec<ServiceRegistry>>):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>):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
launchTypeis specified, thecapacityProviderStrategyparameter must be omitted.capacity_provider_strategy(Vec<CapacityProviderStrategyItem>)/set_capacity_provider_strategy(Option<Vec<CapacityProviderStrategyItem>>):The capacity provider strategy to use for the task set.
A capacity provider strategy consists of one or more capacity providers along with the
baseandweightto assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. ThePutClusterCapacityProvidersAPI is used to associate a capacity provider with a cluster. Only capacity providers with anACTIVEorUPDATINGstatus can be used.If a
capacityProviderStrategyis specified, thelaunchTypeparameter must be omitted. If nocapacityProviderStrategyorlaunchTypeis specified, thedefaultCapacityProviderStrategyfor 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
CreateCapacityProviderAPI operation.To use a Fargate capacity provider, specify either the
FARGATEorFARGATE_SPOTcapacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.The
PutClusterCapacityProvidersAPI operation is used to update the list of available capacity providers for a cluster after the cluster is created.platform_version(impl Into<String>)/set_platform_version(Option<String>):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
LATESTplatform version is used.scale(Scale)/set_scale(Option<Scale>):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>):The identifier that you provide to ensure the idempotency of the request. It’s case sensitive and must be unique. It can be up to 32 ASCII characters are allowed.
tags(Vec<Tag>)/set_tags(Option<Vec<Tag>>):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
CreateTaskSetOutputwith field(s):task_set(Option<TaskSet>):Information about a set of Amazon ECS tasks in either an CodeDeploy or an
EXTERNALdeployment. 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>
sourcepub fn delete_account_setting(&self) -> DeleteAccountSetting
pub fn delete_account_setting(&self) -> DeleteAccountSetting
Constructs a fluent builder for the DeleteAccountSetting operation.
- The fluent builder is configurable:
name(SettingName)/set_name(Option<SettingName>):The resource name to disable the account setting for. If
serviceLongArnFormatis specified, the ARN for your Amazon ECS services is affected. IftaskLongArnFormatis specified, the ARN and resource ID for your Amazon ECS tasks is affected. IfcontainerInstanceLongArnFormatis specified, the ARN and resource ID for your Amazon ECS container instances is affected. IfawsvpcTrunkingis specified, the ENI limit for your Amazon ECS container instances is affected.principal_arn(impl Into<String>)/set_principal_arn(Option<String>):The Amazon Resource Name (ARN) of the principal. It can be an IAM user, IAM role, or the root user. If you specify the root user, it disables the account setting for all IAM users, IAM roles, and the root user of the account unless an IAM user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.
- On success, responds with
DeleteAccountSettingOutputwith field(s):setting(Option<Setting>):The account setting for the specified principal ARN.
- On failure, responds with
SdkError<DeleteAccountSettingError>
sourcepub fn delete_attributes(&self) -> DeleteAttributes
pub fn delete_attributes(&self) -> DeleteAttributes
Constructs a fluent builder for the DeleteAttributes operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that contains the resource to delete attributes. If you do not specify a cluster, the default cluster is assumed.
attributes(Vec<Attribute>)/set_attributes(Option<Vec<Attribute>>):The attributes to delete from your resource. You can specify up to 10 attributes for each request. For custom attributes, specify the attribute name and target ID, but don’t specify the value. If you specify the target ID using the short form, you must also specify the target type.
- On success, responds with
DeleteAttributesOutputwith field(s):attributes(Option<Vec<Attribute>>):A list of attribute objects that were successfully deleted from your resource.
- On failure, responds with
SdkError<DeleteAttributesError>
sourcepub fn delete_capacity_provider(&self) -> DeleteCapacityProvider
pub fn delete_capacity_provider(&self) -> DeleteCapacityProvider
Constructs a fluent builder for the DeleteCapacityProvider operation.
- The fluent builder is configurable:
capacity_provider(impl Into<String>)/set_capacity_provider(Option<String>):The short name or full Amazon Resource Name (ARN) of the capacity provider to delete.
- On success, responds with
DeleteCapacityProviderOutputwith field(s):capacity_provider(Option<CapacityProvider>):The details of the capacity provider.
- On failure, responds with
SdkError<DeleteCapacityProviderError>
sourcepub fn delete_cluster(&self) -> DeleteCluster
pub fn delete_cluster(&self) -> DeleteCluster
Constructs a fluent builder for the DeleteCluster operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster to delete.
- On success, responds with
DeleteClusterOutputwith field(s):cluster(Option<Cluster>):The full description of the deleted cluster.
- On failure, responds with
SdkError<DeleteClusterError>
sourcepub fn delete_service(&self) -> DeleteService
pub fn delete_service(&self) -> DeleteService
Constructs a fluent builder for the DeleteService operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to delete. If you do not specify a cluster, the default cluster is assumed.
service(impl Into<String>)/set_service(Option<String>):The name of the service to delete.
force(bool)/set_force(Option<bool>):If
true, allows you to delete a service even if it wasn’t scaled down to zero tasks. It’s only necessary to use this if the service uses theREPLICAscheduling strategy.
- On success, responds with
DeleteServiceOutputwith field(s):service(Option<Service>):The full description of the deleted service.
- On failure, responds with
SdkError<DeleteServiceError>
sourcepub fn delete_task_set(&self) -> DeleteTaskSet
pub fn delete_task_set(&self) -> DeleteTaskSet
Constructs a fluent builder for the DeleteTaskSet operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set found in to delete.
service(impl Into<String>)/set_service(Option<String>):The short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.
task_set(impl Into<String>)/set_task_set(Option<String>):The task set ID or full Amazon Resource Name (ARN) of the task set to delete.
force(bool)/set_force(Option<bool>):If
true, you can delete a task set even if it hasn’t been scaled down to zero.
- On success, responds with
DeleteTaskSetOutputwith field(s):task_set(Option<TaskSet>):Details about the task set.
- On failure, responds with
SdkError<DeleteTaskSetError>
sourcepub fn deregister_container_instance(&self) -> DeregisterContainerInstance
pub fn deregister_container_instance(&self) -> DeregisterContainerInstance
Constructs a fluent builder for the DeregisterContainerInstance operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):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>):The container instance ID or full ARN of the container instance to deregister. The ARN contains the
arn:aws:ecsnamespace, followed by the Region of the container instance, the Amazon Web Services account ID of the container instance owner, thecontainer-instancenamespace, and then the container instance ID. For example,arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.force(bool)/set_force(Option<bool>):Forces the container instance to be deregistered. If you have tasks running on the container instance when you deregister it with the
forceoption, 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
DeregisterContainerInstanceOutputwith field(s):container_instance(Option<ContainerInstance>):The container instance that was deregistered.
- On failure, responds with
SdkError<DeregisterContainerInstanceError>
sourcepub fn deregister_task_definition(&self) -> DeregisterTaskDefinition
pub fn deregister_task_definition(&self) -> DeregisterTaskDefinition
Constructs a fluent builder for the DeregisterTaskDefinition operation.
- The fluent builder is configurable:
task_definition(impl Into<String>)/set_task_definition(Option<String>):The
familyandrevision(family:revision) or full Amazon Resource Name (ARN) of the task definition to deregister. You must specify arevision.
- On success, responds with
DeregisterTaskDefinitionOutputwith field(s):task_definition(Option<TaskDefinition>):The full description of the deregistered task.
- On failure, responds with
SdkError<DeregisterTaskDefinitionError>
sourcepub fn describe_capacity_providers(&self) -> DescribeCapacityProviders
pub fn describe_capacity_providers(&self) -> DescribeCapacityProviders
Constructs a fluent builder for the DescribeCapacityProviders operation.
- The fluent builder is configurable:
capacity_providers(Vec<String>)/set_capacity_providers(Option<Vec<String>>):The short name or full Amazon Resource Name (ARN) of one or more capacity providers. Up to
100capacity providers can be described in an action.include(Vec<CapacityProviderField>)/set_include(Option<Vec<CapacityProviderField>>):Specifies whether or not you want to see the resource tags for the capacity provider. If
TAGSis 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>):The maximum number of account setting results returned by
DescribeCapacityProvidersin paginated output. When this parameter is used,DescribeCapacityProvidersonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherDescribeCapacityProvidersrequest with the returnednextTokenvalue. This value can be between 1 and 10. If this parameter is not used, thenDescribeCapacityProvidersreturns up to 10 results and anextTokenvalue if applicable.next_token(impl Into<String>)/set_next_token(Option<String>):The
nextTokenvalue returned from a previous paginatedDescribeCapacityProvidersrequest wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue.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
DescribeCapacityProvidersOutputwith field(s):capacity_providers(Option<Vec<CapacityProvider>>):The list of capacity providers.
failures(Option<Vec<Failure>>):Any failures associated with the call.
next_token(Option<String>):The
nextTokenvalue to include in a futureDescribeCapacityProvidersrequest. When the results of aDescribeCapacityProvidersrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<DescribeCapacityProvidersError>
sourcepub fn describe_clusters(&self) -> DescribeClusters
pub fn describe_clusters(&self) -> DescribeClusters
Constructs a fluent builder for the DescribeClusters operation.
- The fluent builder is configurable:
clusters(Vec<String>)/set_clusters(Option<Vec<String>>):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(Vec<ClusterField>)/set_include(Option<Vec<ClusterField>>):Determines whether to include additional information about the clusters in the response. If this field is omitted, this information isn’t included.
If
ATTACHMENTSis specified, the attachments for the container instances or tasks within the cluster are included.If
SETTINGSis specified, the settings for the cluster are included.If
CONFIGURATIONSis specified, the configuration for the cluster is included.If
STATISTICSis specified, the task and service count is included, separated by launch type.If
TAGSis specified, the metadata tags associated with the cluster are included.
- On success, responds with
DescribeClustersOutputwith field(s):clusters(Option<Vec<Cluster>>):The list of clusters.
failures(Option<Vec<Failure>>):Any failures associated with the call.
- On failure, responds with
SdkError<DescribeClustersError>
sourcepub fn describe_container_instances(&self) -> DescribeContainerInstances
pub fn describe_container_instances(&self) -> DescribeContainerInstances
Constructs a fluent builder for the DescribeContainerInstances operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the container instance or container instances you are describing were launched in any cluster other than the default cluster.
container_instances(Vec<String>)/set_container_instances(Option<Vec<String>>):A list of up to 100 container instance IDs or full Amazon Resource Name (ARN) entries.
include(Vec<ContainerInstanceField>)/set_include(Option<Vec<ContainerInstanceField>>):Specifies whether you want to see the resource tags for the container instance. If
TAGSis specified, the tags are included in the response. IfCONTAINER_INSTANCE_HEALTHis specified, the container instance health is included in the response. If this field is omitted, tags and container instance health status aren’t included in the response.
- On success, responds with
DescribeContainerInstancesOutputwith field(s):container_instances(Option<Vec<ContainerInstance>>):The list of container instances.
failures(Option<Vec<Failure>>):Any failures associated with the call.
- On failure, responds with
SdkError<DescribeContainerInstancesError>
sourcepub fn describe_services(&self) -> DescribeServices
pub fn describe_services(&self) -> DescribeServices
Constructs a fluent builder for the DescribeServices operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN)the cluster that hosts the service to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the service or services you are describing were launched in any cluster other than the default cluster.
services(Vec<String>)/set_services(Option<Vec<String>>):A list of services to describe. You may specify up to 10 services to describe in a single operation.
include(Vec<ServiceField>)/set_include(Option<Vec<ServiceField>>):Determines whether you want to see the resource tags for the service. If
TAGSis specified, the tags are included in the response. If this field is omitted, tags aren’t included in the response.
- On success, responds with
DescribeServicesOutputwith field(s):services(Option<Vec<Service>>):The list of services described.
failures(Option<Vec<Failure>>):Any failures associated with the call.
- On failure, responds with
SdkError<DescribeServicesError>
sourcepub fn describe_task_definition(&self) -> DescribeTaskDefinition
pub fn describe_task_definition(&self) -> DescribeTaskDefinition
Constructs a fluent builder for the DescribeTaskDefinition operation.
- The fluent builder is configurable:
task_definition(impl Into<String>)/set_task_definition(Option<String>):The
familyfor the latestACTIVErevision,familyandrevision(family:revision) for a specific revision in the family, or full Amazon Resource Name (ARN) of the task definition to describe.include(Vec<TaskDefinitionField>)/set_include(Option<Vec<TaskDefinitionField>>):Determines whether to see the resource tags for the task definition. If
TAGSis specified, the tags are included in the response. If this field is omitted, tags aren’t included in the response.
- On success, responds with
DescribeTaskDefinitionOutputwith 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>
sourcepub fn describe_tasks(&self) -> DescribeTasks
pub fn describe_tasks(&self) -> DescribeTasks
Constructs a fluent builder for the DescribeTasks operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that hosts the task or tasks to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the task or tasks you are describing were launched in any cluster other than the default cluster.
tasks(Vec<String>)/set_tasks(Option<Vec<String>>):A list of up to 100 task IDs or full ARN entries.
include(Vec<TaskField>)/set_include(Option<Vec<TaskField>>):Specifies whether you want to see the resource tags for the task. If
TAGSis specified, the tags are included in the response. If this field is omitted, tags aren’t included in the response.
- On success, responds with
DescribeTasksOutputwith field(s):tasks(Option<Vec<Task>>):The list of tasks.
failures(Option<Vec<Failure>>):Any failures associated with the call.
- On failure, responds with
SdkError<DescribeTasksError>
sourcepub fn describe_task_sets(&self) -> DescribeTaskSets
pub fn describe_task_sets(&self) -> DescribeTaskSets
Constructs a fluent builder for the DescribeTaskSets operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.
service(impl Into<String>)/set_service(Option<String>):The short name or full Amazon Resource Name (ARN) of the service that the task sets exist in.
task_sets(Vec<String>)/set_task_sets(Option<Vec<String>>):The ID or full Amazon Resource Name (ARN) of task sets to describe.
include(Vec<TaskSetField>)/set_include(Option<Vec<TaskSetField>>):Specifies whether to see the resource tags for the task set. If
TAGSis specified, the tags are included in the response. If this field is omitted, tags aren’t included in the response.
- On success, responds with
DescribeTaskSetsOutputwith field(s):task_sets(Option<Vec<TaskSet>>):The list of task sets described.
failures(Option<Vec<Failure>>):Any failures associated with the call.
- On failure, responds with
SdkError<DescribeTaskSetsError>
sourcepub fn discover_poll_endpoint(&self) -> DiscoverPollEndpoint
pub fn discover_poll_endpoint(&self) -> DiscoverPollEndpoint
Constructs a fluent builder for the DiscoverPollEndpoint operation.
- The fluent builder is configurable:
container_instance(impl Into<String>)/set_container_instance(Option<String>):The container instance ID or full ARN of the container instance. The ARN contains the
arn:aws:ecsnamespace, followed by the Region of the container instance, the Amazon Web Services account ID of the container instance owner, thecontainer-instancenamespace, and then the container instance ID. For example,arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that the container instance belongs to.
- On success, responds with
DiscoverPollEndpointOutputwith field(s):endpoint(Option<String>):The endpoint for the Amazon ECS agent to poll.
telemetry_endpoint(Option<String>):The telemetry endpoint for the Amazon ECS agent.
- On failure, responds with
SdkError<DiscoverPollEndpointError>
sourcepub fn execute_command(&self) -> ExecuteCommand
pub fn execute_command(&self) -> ExecuteCommand
Constructs a fluent builder for the ExecuteCommand operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The Amazon Resource Name (ARN) or short name of the cluster the task is running in. If you do not specify a cluster, the default cluster is assumed.
container(impl Into<String>)/set_container(Option<String>):The name of the container to execute the command on. A container name only needs to be specified for tasks containing multiple containers.
command(impl Into<String>)/set_command(Option<String>):The command to run on the container.
interactive(bool)/set_interactive(bool):Use this flag to run your command in interactive mode.
task(impl Into<String>)/set_task(Option<String>):The Amazon Resource Name (ARN) or ID of the task the container is part of.
- On success, responds with
ExecuteCommandOutputwith field(s):cluster_arn(Option<String>):The Amazon Resource Name (ARN) of the cluster.
container_arn(Option<String>):The Amazon Resource Name (ARN) of the container.
container_name(Option<String>):The name of the container.
interactive(bool):Determines whether the execute command session is running in interactive mode. Amazon ECS only supports initiating interactive sessions, so you must specify
truefor this value.session(Option<Session>):The details of the SSM session that was created for this instance of execute-command.
task_arn(Option<String>):The Amazon Resource Name (ARN) of the task.
- On failure, responds with
SdkError<ExecuteCommandError>
sourcepub fn list_account_settings(&self) -> ListAccountSettings
pub fn list_account_settings(&self) -> ListAccountSettings
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>):The name of the account setting you want to list the settings for.
value(impl Into<String>)/set_value(Option<String>):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>):The ARN of the principal, which can be an IAM user, IAM role, or the root user. If this field is omitted, the account settings are listed only for the authenticated user.
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(bool):Determines whether to return the effective settings. If
true, the account settings for the root user or the default setting for theprincipalArnare returned. Iffalse, the account settings for theprincipalArnare returned if they’re set. Otherwise, no account settings are returned.next_token(impl Into<String>)/set_next_token(Option<String>):The
nextTokenvalue returned from aListAccountSettingsrequest indicating that more results are available to fulfill the request and further calls will be needed. IfmaxResultswas provided, it’s possible the number of results to be fewer thanmaxResults.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)/set_max_results(i32):The maximum number of account setting results returned by
ListAccountSettingsin paginated output. When this parameter is used,ListAccountSettingsonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListAccountSettingsrequest with the returnednextTokenvalue. This value can be between 1 and 10. If this parameter isn’t used, thenListAccountSettingsreturns up to 10 results and anextTokenvalue if applicable.
- On success, responds with
ListAccountSettingsOutputwith field(s):settings(Option<Vec<Setting>>):The account settings for the resource.
next_token(Option<String>):The
nextTokenvalue to include in a futureListAccountSettingsrequest. When the results of aListAccountSettingsrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<ListAccountSettingsError>
sourcepub fn list_attributes(&self) -> ListAttributes
pub fn list_attributes(&self) -> ListAttributes
Constructs a fluent builder for the ListAttributes operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster to list attributes. If you do not specify a cluster, the default cluster is assumed.
target_type(TargetType)/set_target_type(Option<TargetType>):The type of the target to list attributes with.
attribute_name(impl Into<String>)/set_attribute_name(Option<String>):The name of the attribute to filter the results with.
attribute_value(impl Into<String>)/set_attribute_value(Option<String>):The value of the attribute to filter results with. You must also specify an attribute name to use this parameter.
next_token(impl Into<String>)/set_next_token(Option<String>):The
nextTokenvalue returned from aListAttributesrequest indicating that more results are available to fulfill the request and further calls are needed. IfmaxResultswas provided, it’s possible the number of results to be fewer thanmaxResults.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)/set_max_results(Option<i32>):The maximum number of cluster results that
ListAttributesreturned in paginated output. When this parameter is used,ListAttributesonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListAttributesrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter isn’t used, thenListAttributesreturns up to 100 results and anextTokenvalue if applicable.
- On success, responds with
ListAttributesOutputwith field(s):attributes(Option<Vec<Attribute>>):A list of attribute objects that meet the criteria of the request.
next_token(Option<String>):The
nextTokenvalue to include in a futureListAttributesrequest. When the results of aListAttributesrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<ListAttributesError>
sourcepub fn list_clusters(&self) -> ListClusters
pub fn list_clusters(&self) -> ListClusters
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>):The
nextTokenvalue returned from aListClustersrequest indicating that more results are available to fulfill the request and further calls are needed. IfmaxResultswas provided, it’s possible the number of results to be fewer thanmaxResults.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)/set_max_results(Option<i32>):The maximum number of cluster results that
ListClustersreturned in paginated output. When this parameter is used,ListClustersonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListClustersrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter isn’t used, thenListClustersreturns up to 100 results and anextTokenvalue if applicable.
- On success, responds with
ListClustersOutputwith 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
nextTokenvalue to include in a futureListClustersrequest. When the results of aListClustersrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<ListClustersError>
sourcepub fn list_container_instances(&self) -> ListContainerInstances
pub fn list_container_instances(&self) -> ListContainerInstances
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>):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>):You can filter the results of a
ListContainerInstancesoperation 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>):The
nextTokenvalue returned from aListContainerInstancesrequest indicating that more results are available to fulfill the request and further calls are needed. IfmaxResultswas provided, it’s possible the number of results to be fewer thanmaxResults.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)/set_max_results(Option<i32>):The maximum number of container instance results that
ListContainerInstancesreturned in paginated output. When this parameter is used,ListContainerInstancesonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListContainerInstancesrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter isn’t used, thenListContainerInstancesreturns up to 100 results and anextTokenvalue if applicable.status(ContainerInstanceStatus)/set_status(Option<ContainerInstanceStatus>):Filters the container instances by status. For example, if you specify the
DRAININGstatus, the results include only container instances that have been set toDRAININGusingUpdateContainerInstancesState. If you don’t specify this parameter, the default is to include container instances set to all states other thanINACTIVE.
- On success, responds with
ListContainerInstancesOutputwith 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
nextTokenvalue to include in a futureListContainerInstancesrequest. When the results of aListContainerInstancesrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<ListContainerInstancesError>
sourcepub fn list_services(&self) -> ListServices
pub fn list_services(&self) -> ListServices
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>):The short name or full Amazon Resource Name (ARN) of the cluster to use when filtering the
ListServicesresults. If you do not specify a cluster, the default cluster is assumed.next_token(impl Into<String>)/set_next_token(Option<String>):The
nextTokenvalue returned from aListServicesrequest indicating that more results are available to fulfill the request and further calls will be needed. IfmaxResultswas provided, it is possible the number of results to be fewer thanmaxResults.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)/set_max_results(Option<i32>):The maximum number of service results that
ListServicesreturned in paginated output. When this parameter is used,ListServicesonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListServicesrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter isn’t used, thenListServicesreturns up to 10 results and anextTokenvalue if applicable.launch_type(LaunchType)/set_launch_type(Option<LaunchType>):The launch type to use when filtering the
ListServicesresults.scheduling_strategy(SchedulingStrategy)/set_scheduling_strategy(Option<SchedulingStrategy>):The scheduling strategy to use when filtering the
ListServicesresults.
- On success, responds with
ListServicesOutputwith 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
nextTokenvalue to include in a futureListServicesrequest. When the results of aListServicesrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<ListServicesError>
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The Amazon Resource Name (ARN) that identifies the resource to list the tags for. Currently, the supported resources are Amazon ECS tasks, services, task definitions, clusters, and container instances.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<Vec<Tag>>):The tags for the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
sourcepub fn list_task_definition_families(&self) -> ListTaskDefinitionFamilies
pub fn list_task_definition_families(&self) -> ListTaskDefinitionFamilies
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>):The
familyPrefixis a string that’s used to filter the results ofListTaskDefinitionFamilies. If you specify afamilyPrefix, only task definition family names that begin with thefamilyPrefixstring are returned.status(TaskDefinitionFamilyStatus)/set_status(Option<TaskDefinitionFamilyStatus>):The task definition family status to filter the
ListTaskDefinitionFamiliesresults with. By default, bothACTIVEandINACTIVEtask definition families are listed. If this parameter is set toACTIVE, only task definition families that have anACTIVEtask definition revision are returned. If this parameter is set toINACTIVE, only task definition families that do not have anyACTIVEtask definition revisions are returned. If you paginate the resulting output, be sure to keep thestatusvalue constant in each subsequent request.next_token(impl Into<String>)/set_next_token(Option<String>):The
nextTokenvalue returned from aListTaskDefinitionFamiliesrequest indicating that more results are available to fulfill the request and further calls will be needed. IfmaxResultswas provided, it is possible the number of results to be fewer thanmaxResults.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)/set_max_results(Option<i32>):The maximum number of task definition family results that
ListTaskDefinitionFamiliesreturned in paginated output. When this parameter is used,ListTaskDefinitionsonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListTaskDefinitionFamiliesrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter isn’t used, thenListTaskDefinitionFamiliesreturns up to 100 results and anextTokenvalue if applicable.
- On success, responds with
ListTaskDefinitionFamiliesOutputwith field(s):families(Option<Vec<String>>):The list of task definition family names that match the
ListTaskDefinitionFamiliesrequest.next_token(Option<String>):The
nextTokenvalue to include in a futureListTaskDefinitionFamiliesrequest. When the results of aListTaskDefinitionFamiliesrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<ListTaskDefinitionFamiliesError>
sourcepub fn list_task_definitions(&self) -> ListTaskDefinitions
pub fn list_task_definitions(&self) -> ListTaskDefinitions
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>):The full family name to filter the
ListTaskDefinitionsresults with. Specifying afamilyPrefixlimits the listed task definitions to task definition revisions that belong to that family.status(TaskDefinitionStatus)/set_status(Option<TaskDefinitionStatus>):The task definition status to filter the
ListTaskDefinitionsresults with. By default, onlyACTIVEtask definitions are listed. By setting this parameter toINACTIVE, you can view task definitions that areINACTIVEas long as an active task or service still references them. If you paginate the resulting output, be sure to keep thestatusvalue constant in each subsequent request.sort(SortOrder)/set_sort(Option<SortOrder>):The order to sort the results in. Valid values are
ASCandDESC. 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 toDESCreverses 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>):The
nextTokenvalue returned from aListTaskDefinitionsrequest indicating that more results are available to fulfill the request and further calls will be needed. IfmaxResultswas provided, it is possible the number of results to be fewer thanmaxResults.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)/set_max_results(Option<i32>):The maximum number of task definition results that
ListTaskDefinitionsreturned in paginated output. When this parameter is used,ListTaskDefinitionsonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListTaskDefinitionsrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter isn’t used, thenListTaskDefinitionsreturns up to 100 results and anextTokenvalue if applicable.
- On success, responds with
ListTaskDefinitionsOutputwith field(s):task_definition_arns(Option<Vec<String>>):The list of task definition Amazon Resource Name (ARN) entries for the
ListTaskDefinitionsrequest.next_token(Option<String>):The
nextTokenvalue to include in a futureListTaskDefinitionsrequest. When the results of aListTaskDefinitionsrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<ListTaskDefinitionsError>
sourcepub fn list_tasks(&self) -> ListTasks
pub fn list_tasks(&self) -> ListTasks
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>):The short name or full Amazon Resource Name (ARN) of the cluster to use when filtering the
ListTasksresults. If you do not specify a cluster, the default cluster is assumed.container_instance(impl Into<String>)/set_container_instance(Option<String>):The container instance ID or full ARN of the container instance to use when filtering the
ListTasksresults. Specifying acontainerInstancelimits the results to tasks that belong to that container instance.family(impl Into<String>)/set_family(Option<String>):The name of the task definition family to use when filtering the
ListTasksresults. Specifying afamilylimits the results to tasks that belong to that family.next_token(impl Into<String>)/set_next_token(Option<String>):The
nextTokenvalue returned from aListTasksrequest indicating that more results are available to fulfill the request and further calls will be needed. IfmaxResultswas provided, it’s possible the number of results to be fewer thanmaxResults.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)/set_max_results(Option<i32>):The maximum number of task results that
ListTasksreturned in paginated output. When this parameter is used,ListTasksonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListTasksrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter isn’t used, thenListTasksreturns up to 100 results and anextTokenvalue if applicable.started_by(impl Into<String>)/set_started_by(Option<String>):The
startedByvalue to filter the task results with. Specifying astartedByvalue limits the results to tasks that were started with that value.service_name(impl Into<String>)/set_service_name(Option<String>):The name of the service to use when filtering the
ListTasksresults. Specifying aserviceNamelimits the results to tasks that belong to that service.desired_status(DesiredStatus)/set_desired_status(Option<DesiredStatus>):The task desired status to use when filtering the
ListTasksresults. Specifying adesiredStatusofSTOPPEDlimits the results to tasks that Amazon ECS has set the desired status toSTOPPED. This can be useful for debugging tasks that aren’t starting properly or have died or finished. The default status filter isRUNNING, which shows tasks that Amazon ECS has set the desired status toRUNNING.Although you can filter results based on a desired status of
PENDING, this doesn’t return any results. Amazon ECS never sets the desired status of a task to that value (only a task’slastStatusmay have a value ofPENDING).launch_type(LaunchType)/set_launch_type(Option<LaunchType>):The launch type to use when filtering the
ListTasksresults.
- On success, responds with
ListTasksOutputwith field(s):task_arns(Option<Vec<String>>):The list of task ARN entries for the
ListTasksrequest.next_token(Option<String>):The
nextTokenvalue to include in a futureListTasksrequest. When the results of aListTasksrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<ListTasksError>
sourcepub fn put_account_setting(&self) -> PutAccountSetting
pub fn put_account_setting(&self) -> PutAccountSetting
Constructs a fluent builder for the PutAccountSetting operation.
- The fluent builder is configurable:
name(SettingName)/set_name(Option<SettingName>):The Amazon ECS resource name for which to modify the account setting. If
serviceLongArnFormatis specified, the ARN for your Amazon ECS services is affected. IftaskLongArnFormatis specified, the ARN and resource ID for your Amazon ECS tasks is affected. IfcontainerInstanceLongArnFormatis specified, the ARN and resource ID for your Amazon ECS container instances is affected. IfawsvpcTrunkingis specified, the elastic network interface (ENI) limit for your Amazon ECS container instances is affected. IfcontainerInsightsis specified, the default setting for CloudWatch Container Insights for your clusters is affected.value(impl Into<String>)/set_value(Option<String>):The account setting value for the specified principal ARN. Accepted values are
enabledanddisabled.principal_arn(impl Into<String>)/set_principal_arn(Option<String>):The ARN of the principal, which can be an IAM user, IAM role, or the root user. If you specify the root user, it modifies the account setting for all IAM users, IAM roles, and the root user of the account unless an IAM user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.
Federated users assume the account setting of the root user and can’t have explicit account settings set for them.
- On success, responds with
PutAccountSettingOutputwith field(s):setting(Option<Setting>):The current account setting for a resource.
- On failure, responds with
SdkError<PutAccountSettingError>
sourcepub fn put_account_setting_default(&self) -> PutAccountSettingDefault
pub fn put_account_setting_default(&self) -> PutAccountSettingDefault
Constructs a fluent builder for the PutAccountSettingDefault operation.
- The fluent builder is configurable:
name(SettingName)/set_name(Option<SettingName>):The resource name for which to modify the account setting. If
serviceLongArnFormatis specified, the ARN for your Amazon ECS services is affected. IftaskLongArnFormatis specified, the ARN and resource ID for your Amazon ECS tasks is affected. IfcontainerInstanceLongArnFormatis specified, the ARN and resource ID for your Amazon ECS container instances is affected. IfawsvpcTrunkingis specified, the ENI limit for your Amazon ECS container instances is affected. IfcontainerInsightsis specified, the default setting for CloudWatch Container Insights for your clusters is affected.value(impl Into<String>)/set_value(Option<String>):The account setting value for the specified principal ARN. Accepted values are
enabledanddisabled.
- On success, responds with
PutAccountSettingDefaultOutputwith field(s):setting(Option<Setting>):The current setting for a resource.
- On failure, responds with
SdkError<PutAccountSettingDefaultError>
sourcepub fn put_attributes(&self) -> PutAttributes
pub fn put_attributes(&self) -> PutAttributes
Constructs a fluent builder for the PutAttributes operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that contains the resource to apply attributes. If you do not specify a cluster, the default cluster is assumed.
attributes(Vec<Attribute>)/set_attributes(Option<Vec<Attribute>>):The attributes to apply to your resource. You can specify up to 10 custom attributes for each resource. You can specify up to 10 attributes in a single call.
- On success, responds with
PutAttributesOutputwith field(s):attributes(Option<Vec<Attribute>>):The attributes applied to your resource.
- On failure, responds with
SdkError<PutAttributesError>
sourcepub fn put_cluster_capacity_providers(&self) -> PutClusterCapacityProviders
pub fn put_cluster_capacity_providers(&self) -> PutClusterCapacityProviders
Constructs a fluent builder for the PutClusterCapacityProviders operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):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(Vec<String>)/set_capacity_providers(Option<Vec<String>>):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
CreateCapacityProviderAPI operation.To use a Fargate capacity provider, specify either the
FARGATEorFARGATE_SPOTcapacity 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(Vec<CapacityProviderStrategyItem>)/set_default_capacity_provider_strategy(Option<Vec<CapacityProviderStrategyItem>>):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
baseandweightto assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. ThePutClusterCapacityProvidersAPI is used to associate a capacity provider with a cluster. Only capacity providers with anACTIVEorUPDATINGstatus 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
CreateCapacityProviderAPI operation.To use a Fargate capacity provider, specify either the
FARGATEorFARGATE_SPOTcapacity 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
PutClusterCapacityProvidersOutputwith field(s):cluster(Option<Cluster>):Details about the cluster.
- On failure, responds with
SdkError<PutClusterCapacityProvidersError>
sourcepub fn register_container_instance(&self) -> RegisterContainerInstance
pub fn register_container_instance(&self) -> RegisterContainerInstance
Constructs a fluent builder for the RegisterContainerInstance operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster to register your container instance with. If you do not specify a cluster, the default cluster is assumed.
instance_identity_document(impl Into<String>)/set_instance_identity_document(Option<String>):The instance identity document for the EC2 instance to register. This document can be found by running the following command from the instance:
curl http://169.254.169.254/latest/dynamic/instance-identity/document/instance_identity_document_signature(impl Into<String>)/set_instance_identity_document_signature(Option<String>):The instance identity document signature for the EC2 instance to register. This signature can be found by running the following command from the instance:
curl http://169.254.169.254/latest/dynamic/instance-identity/signature/total_resources(Vec<Resource>)/set_total_resources(Option<Vec<Resource>>):The resources available on the instance.
version_info(VersionInfo)/set_version_info(Option<VersionInfo>):The version information for the Amazon ECS container agent and Docker daemon that runs on the container instance.
container_instance_arn(impl Into<String>)/set_container_instance_arn(Option<String>):The ARN of the container instance (if it was previously registered).
attributes(Vec<Attribute>)/set_attributes(Option<Vec<Attribute>>):The container instance attributes that this container instance supports.
platform_devices(Vec<PlatformDevice>)/set_platform_devices(Option<Vec<PlatformDevice>>):The devices that are available on the container instance. The only supported device type is a GPU.
tags(Vec<Tag>)/set_tags(Option<Vec<Tag>>):The metadata that you apply to the container instance to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- On success, responds with
RegisterContainerInstanceOutputwith field(s):container_instance(Option<ContainerInstance>):The container instance that was registered.
- On failure, responds with
SdkError<RegisterContainerInstanceError>
sourcepub fn register_task_definition(&self) -> RegisterTaskDefinition
pub fn register_task_definition(&self) -> RegisterTaskDefinition
Constructs a fluent builder for the RegisterTaskDefinition operation.
- The fluent builder is configurable:
family(impl Into<String>)/set_family(Option<String>):You must specify a
familyfor a task definition. You can use it track multiple versions of the same task definition. Thefamilyis 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>):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>):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. The task execution IAM role is required depending on the requirements of your task. For more information, see Amazon ECS task execution IAM role in the Amazon Elastic Container Service Developer Guide.
network_mode(NetworkMode)/set_network_mode(Option<NetworkMode>):The Docker networking mode to use for the containers in the task. The valid values are
none,bridge,awsvpc, andhost. If no network mode is specified, the default isbridge.For Amazon ECS tasks on Fargate, the
awsvpcnetwork 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,orawsvpccan be used. If the network mode is set tonone, you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. Thehostandawsvpcnetwork modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by thebridgemode.With the
hostandawsvpcnetwork modes, exposed container ports are mapped directly to the corresponding host port (for thehostnetwork mode) or the attached elastic network interface port (for theawsvpcnetwork mode), so you cannot take advantage of dynamic host port mappings.When using the
hostnetwork 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 aNetworkConfigurationvalue 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.For more information, see Network settings in the Docker run reference.
container_definitions(Vec<ContainerDefinition>)/set_container_definitions(Option<Vec<ContainerDefinition>>):A list of container definitions in JSON format that describe the different containers that make up your task.
volumes(Vec<Volume>)/set_volumes(Option<Vec<Volume>>):A list of volume definitions in JSON format that containers in your task might use.
placement_constraints(Vec<TaskDefinitionPlacementConstraint>)/set_placement_constraints(Option<Vec<TaskDefinitionPlacementConstraint>>):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(Vec<Compatibility>)/set_requires_compatibilities(Option<Vec<Compatibility>>):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>):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 vCPUor1 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, this field is optional. Supported values are between
128CPU units (0.125vCPUs) and10240CPU units (10vCPUs).If you’re using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of supported values for the
memoryparameter:The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
-
256 (.25 vCPU) - Available
memoryvalues: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) -
512 (.5 vCPU) - Available
memoryvalues: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) -
1024 (1 vCPU) - Available
memoryvalues: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) -
2048 (2 vCPU) - Available
memoryvalues: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) -
4096 (4 vCPU) - Available
memoryvalues: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)
-
memory(impl Into<String>)/set_memory(Option<String>):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,1GBor1 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
cpuparameter.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
cpuvalues: 256 (.25 vCPU) -
1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available
cpuvalues: 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
cpuvalues: 1024 (1 vCPU) -
Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available
cpuvalues: 2048 (2 vCPU) -
Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available
cpuvalues: 4096 (4 vCPU)
-
tags(Vec<Tag>)/set_tags(Option<Vec<Tag>>):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>):The process namespace to use for the containers in the task. The valid values are
hostortask. Ifhostis specified, then all containers within the tasks that specified thehostPID mode on the same container instance share the same process namespace with the host Amazon EC2 instance. Iftaskis specified, all containers within the specified task share the same process namespace. If no value is specified, the default is a private namespace. For more information, see PID settings in the Docker run reference.If the
hostPID mode is used, be aware that there is a heightened risk of undesired process namespace expose. For more information, see Docker security.This parameter is not supported for Windows containers or tasks run on Fargate.
ipc_mode(IpcMode)/set_ipc_mode(Option<IpcMode>):The IPC resource namespace to use for the containers in the task. The valid values are
host,task, ornone. Ifhostis specified, then all containers within the tasks that specified thehostIPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. Iftaskis specified, all containers within the specified task share the same IPC resources. Ifnoneis 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. For more information, see IPC settings in the Docker run reference.If the
hostIPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose. For more information, see Docker security.If you are setting namespaced kernel parameters using
systemControlsfor 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
hostIPC mode, IPC namespace relatedsystemControlsare not supported. -
For tasks that use the
taskIPC mode, IPC namespace relatedsystemControlswill 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>):The configuration details for the App Mesh proxy.
For tasks hosted on Amazon EC2 instances, the container instances require at least version
1.26.0of the container agent and at least version1.26.0-1of theecs-initpackage to enable a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version20190301or later, then they contain the required versions of the container agent andecs-init. For more information, see Amazon ECS-optimized AMI versions in the Amazon Elastic Container Service Developer Guide.inference_accelerators(Vec<InferenceAccelerator>)/set_inference_accelerators(Option<Vec<InferenceAccelerator>>):The Elastic Inference accelerators to use for the containers in the task.
ephemeral_storage(EphemeralStorage)/set_ephemeral_storage(Option<EphemeralStorage>):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 Fargate task storage in the Amazon ECS User Guide for Fargate.
This parameter is only supported for tasks hosted on Fargate using the following platform versions:
-
Linux platform version
1.4.0or later. -
Windows platform version
1.0.0or later.
-
runtime_platform(RuntimePlatform)/set_runtime_platform(Option<RuntimePlatform>):The operating system that your tasks definitions run on. A platform family is specified only for tasks using the Fargate launch type.
When you specify a task definition in a service, this value must match the
runtimePlatformvalue of the service.
- On success, responds with
RegisterTaskDefinitionOutputwith field(s):task_definition(Option<TaskDefinition>):The full description of the registered task definition.
tags(Option<Vec<Tag>>):The list of tags associated with the task definition.
- On failure, responds with
SdkError<RegisterTaskDefinitionError>
sourcepub fn run_task(&self) -> RunTask
pub fn run_task(&self) -> RunTask
Constructs a fluent builder for the RunTask operation.
- The fluent builder is configurable:
capacity_provider_strategy(Vec<CapacityProviderStrategyItem>)/set_capacity_provider_strategy(Option<Vec<CapacityProviderStrategyItem>>):The capacity provider strategy to use for the task.
If a
capacityProviderStrategyis specified, thelaunchTypeparameter must be omitted. If nocapacityProviderStrategyorlaunchTypeis specified, thedefaultCapacityProviderStrategyfor the cluster is used.When you use cluster auto scaling, you must specify
capacityProviderStrategyand notlaunchType.A capacity provider strategy may contain a maximum of 6 capacity providers.
cluster(impl Into<String>)/set_cluster(Option<String>):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.
count(i32)/set_count(Option<i32>):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(bool):Specifies whether to enable 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(bool):Determines whether to enable the execute command functionality for the containers in this task. If
true, this enables execute command functionality on all containers in the task.group(impl Into<String>)/set_group(Option<String>):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>):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
FARGATElaunch 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 User Guide for Fargate.
The
EC2launch type runs your tasks on Amazon EC2 instances registered to your cluster.The
EXTERNALlaunch 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
launchTypeis specified, thecapacityProviderStrategyparameter must be omitted.When you use cluster auto scaling, you must specify
capacityProviderStrategyand notlaunchType.network_configuration(NetworkConfiguration)/set_network_configuration(Option<NetworkConfiguration>):The network configuration for the task. This parameter is required for task definitions that use the
awsvpcnetwork 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>):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
commandoverride. 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 anenvironmentoverride.A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.
placement_constraints(Vec<PlacementConstraint>)/set_placement_constraints(Option<Vec<PlacementConstraint>>):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(Vec<PlacementStrategy>)/set_placement_strategy(Option<Vec<PlacementStrategy>>):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>):The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn’t specified, the
LATESTplatform 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>):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
TagResourceAPI action.An error will be received if you specify the
SERVICEoption when running a task.reference_id(impl Into<String>)/set_reference_id(Option<String>):The reference ID to use for the task. The reference ID can have a maximum length of 1024 characters.
started_by(impl Into<String>)/set_started_by(Option<String>):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
startedByparameter. You can then identify which tasks belong to that job by filtering the results of aListTaskscall with thestartedByvalue. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), and underscores (_) are allowed.If a task is started by an Amazon ECS service, then the
startedByparameter contains the deployment ID of the service that starts it.tags(Vec<Tag>)/set_tags(Option<Vec<Tag>>):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>):The
familyandrevision(family:revision) or full ARN of the task definition to run. If arevisionisn’t specified, the latestACTIVErevision is used.The full ARN value must match the value that you specified as the
Resourceof the IAM principal’s permissions policy. For example, if theResourceis arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*, thetaskDefinitionARN value must bearn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName.
- On success, responds with
RunTaskOutputwith field(s):tasks(Option<Vec<Task>>):A full description of the tasks that were run. The tasks that were successfully placed on your cluster are described here.
failures(Option<Vec<Failure>>):Any failures associated with the call.
- On failure, responds with
SdkError<RunTaskError>
sourcepub fn start_task(&self) -> StartTask
pub fn start_task(&self) -> StartTask
Constructs a fluent builder for the StartTask operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):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(Vec<String>)/set_container_instances(Option<Vec<String>>):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(bool):Specifies whether to enable 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(bool):Whether or not the execute command functionality is enabled for the task. If
true, this enables execute command functionality on all containers in the task.group(impl Into<String>)/set_group(Option<String>):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>):The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the
awsvpcnetworking mode.overrides(TaskOverride)/set_overrides(Option<TaskOverride>):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
commandoverride. 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 anenvironmentoverride.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>):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>):The reference ID to use for the task.
started_by(impl Into<String>)/set_started_by(Option<String>):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
startedByparameter. You can then identify which tasks belong to that job by filtering the results of aListTaskscall with thestartedByvalue. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), and underscores (_) are allowed.If a task is started by an Amazon ECS service, the
startedByparameter contains the deployment ID of the service that starts it.tags(Vec<Tag>)/set_tags(Option<Vec<Tag>>):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>):The
familyandrevision(family:revision) or full ARN of the task definition to start. If arevisionisn’t specified, the latestACTIVErevision is used.
- On success, responds with
StartTaskOutputwith field(s):tasks(Option<Vec<Task>>):A full description of the tasks that were started. Each task that was successfully placed on your container instances is described.
failures(Option<Vec<Failure>>):Any failures associated with the call.
- On failure, responds with
SdkError<StartTaskError>
sourcepub fn stop_task(&self) -> StopTask
pub fn stop_task(&self) -> StopTask
Constructs a fluent builder for the StopTask operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that hosts the task to stop. If you do not specify a cluster, the default cluster is assumed.
task(impl Into<String>)/set_task(Option<String>):The task ID or full Amazon Resource Name (ARN) of the task to stop.
reason(impl Into<String>)/set_reason(Option<String>):An optional message specified when a task is stopped. For example, if you’re using a custom scheduler, you can use this parameter to specify the reason for stopping the task here, and the message appears in subsequent
DescribeTasksAPI operations on this task. Up to 255 characters are allowed in this message.
- On success, responds with
StopTaskOutputwith field(s):task(Option<Task>):The task that was stopped.
- On failure, responds with
SdkError<StopTaskError>
sourcepub fn submit_attachment_state_changes(&self) -> SubmitAttachmentStateChanges
pub fn submit_attachment_state_changes(&self) -> SubmitAttachmentStateChanges
Constructs a fluent builder for the SubmitAttachmentStateChanges operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full ARN of the cluster that hosts the container instance the attachment belongs to.
attachments(Vec<AttachmentStateChange>)/set_attachments(Option<Vec<AttachmentStateChange>>):Any attachments associated with the state change request.
- On success, responds with
SubmitAttachmentStateChangesOutputwith field(s):acknowledgment(Option<String>):Acknowledgement of the state change.
- On failure, responds with
SdkError<SubmitAttachmentStateChangesError>
sourcepub fn submit_container_state_change(&self) -> SubmitContainerStateChange
pub fn submit_container_state_change(&self) -> SubmitContainerStateChange
Constructs a fluent builder for the SubmitContainerStateChange operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full ARN of the cluster that hosts the container.
task(impl Into<String>)/set_task(Option<String>):The task ID or full Amazon Resource Name (ARN) of the task that hosts the container.
container_name(impl Into<String>)/set_container_name(Option<String>):The name of the container.
runtime_id(impl Into<String>)/set_runtime_id(Option<String>):The ID of the Docker container.
status(impl Into<String>)/set_status(Option<String>):The status of the state change request.
exit_code(i32)/set_exit_code(Option<i32>):The exit code that’s returned for the state change request.
reason(impl Into<String>)/set_reason(Option<String>):The reason for the state change request.
network_bindings(Vec<NetworkBinding>)/set_network_bindings(Option<Vec<NetworkBinding>>):The network bindings of the container.
- On success, responds with
SubmitContainerStateChangeOutputwith field(s):acknowledgment(Option<String>):Acknowledgement of the state change.
- On failure, responds with
SdkError<SubmitContainerStateChangeError>
sourcepub fn submit_task_state_change(&self) -> SubmitTaskStateChange
pub fn submit_task_state_change(&self) -> SubmitTaskStateChange
Constructs a fluent builder for the SubmitTaskStateChange operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that hosts the task.
task(impl Into<String>)/set_task(Option<String>):The task ID or full ARN of the task in the state change request.
status(impl Into<String>)/set_status(Option<String>):The status of the state change request.
reason(impl Into<String>)/set_reason(Option<String>):The reason for the state change request.
containers(Vec<ContainerStateChange>)/set_containers(Option<Vec<ContainerStateChange>>):Any containers that’s associated with the state change request.
attachments(Vec<AttachmentStateChange>)/set_attachments(Option<Vec<AttachmentStateChange>>):Any attachments associated with the state change request.
managed_agents(Vec<ManagedAgentStateChange>)/set_managed_agents(Option<Vec<ManagedAgentStateChange>>):The details for the managed agent that’s associated with the task.
pull_started_at(DateTime)/set_pull_started_at(Option<DateTime>):The Unix timestamp for the time when the container image pull started.
pull_stopped_at(DateTime)/set_pull_stopped_at(Option<DateTime>):The Unix timestamp for the time when the container image pull completed.
execution_stopped_at(DateTime)/set_execution_stopped_at(Option<DateTime>):The Unix timestamp for the time when the task execution stopped.
- On success, responds with
SubmitTaskStateChangeOutputwith field(s):acknowledgment(Option<String>):Acknowledgement of the state change.
- On failure, responds with
SdkError<SubmitTaskStateChangeError>
sourcepub fn tag_resource(&self) -> TagResource
pub fn tag_resource(&self) -> TagResource
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):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.
tags(Vec<Tag>)/set_tags(Option<Vec<Tag>>):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>
sourcepub fn untag_resource(&self) -> UntagResource
pub fn untag_resource(&self) -> UntagResource
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The Amazon Resource Name (ARN) of the resource to delete tags from. Currently, the supported resources are Amazon ECS capacity providers, tasks, services, task definitions, clusters, and container instances.
tag_keys(Vec<String>)/set_tag_keys(Option<Vec<String>>):The keys of the tags to be removed.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
sourcepub fn update_capacity_provider(&self) -> UpdateCapacityProvider
pub fn update_capacity_provider(&self) -> UpdateCapacityProvider
Constructs a fluent builder for the UpdateCapacityProvider operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):The name of the capacity provider to update.
auto_scaling_group_provider(AutoScalingGroupProviderUpdate)/set_auto_scaling_group_provider(Option<AutoScalingGroupProviderUpdate>):An object that represent the parameters to update for the Auto Scaling group capacity provider.
- On success, responds with
UpdateCapacityProviderOutputwith field(s):capacity_provider(Option<CapacityProvider>):Details about the capacity provider.
- On failure, responds with
SdkError<UpdateCapacityProviderError>
sourcepub fn update_cluster(&self) -> UpdateCluster
pub fn update_cluster(&self) -> UpdateCluster
Constructs a fluent builder for the UpdateCluster operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The name of the cluster to modify the settings for.
settings(Vec<ClusterSetting>)/set_settings(Option<Vec<ClusterSetting>>):The cluster settings for your cluster.
configuration(ClusterConfiguration)/set_configuration(Option<ClusterConfiguration>):The execute command configuration for the cluster.
- On success, responds with
UpdateClusterOutputwith field(s):cluster(Option<Cluster>):Details about the cluster.
- On failure, responds with
SdkError<UpdateClusterError>
sourcepub fn update_cluster_settings(&self) -> UpdateClusterSettings
pub fn update_cluster_settings(&self) -> UpdateClusterSettings
Constructs a fluent builder for the UpdateClusterSettings operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The name of the cluster to modify the settings for.
settings(Vec<ClusterSetting>)/set_settings(Option<Vec<ClusterSetting>>):The setting to use by default for a cluster. This parameter is used to enable CloudWatch Container Insights for a cluster. If this value is specified, it overrides the
containerInsightsvalue set withPutAccountSettingorPutAccountSettingDefault.
- On success, responds with
UpdateClusterSettingsOutputwith field(s):cluster(Option<Cluster>):Details about the cluster
- On failure, responds with
SdkError<UpdateClusterSettingsError>
sourcepub fn update_container_agent(&self) -> UpdateContainerAgent
pub fn update_container_agent(&self) -> UpdateContainerAgent
Constructs a fluent builder for the UpdateContainerAgent operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that your container instance is running on. If you do not specify a cluster, the default cluster is assumed.
container_instance(impl Into<String>)/set_container_instance(Option<String>):The container instance ID or full ARN entries for the container instance where you would like to update the Amazon ECS container agent.
- On success, responds with
UpdateContainerAgentOutputwith field(s):container_instance(Option<ContainerInstance>):The container instance that the container agent was updated for.
- On failure, responds with
SdkError<UpdateContainerAgentError>
sourcepub fn update_container_instances_state(&self) -> UpdateContainerInstancesState
pub fn update_container_instances_state(&self) -> UpdateContainerInstancesState
Constructs a fluent builder for the UpdateContainerInstancesState operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to update. If you do not specify a cluster, the default cluster is assumed.
container_instances(Vec<String>)/set_container_instances(Option<Vec<String>>):A list of up to 10 container instance IDs or full ARN entries.
status(ContainerInstanceStatus)/set_status(Option<ContainerInstanceStatus>):The container instance state to update the container instance with. The only valid values for this action are
ACTIVEandDRAINING. A container instance can only be updated toDRAININGstatus once it has reached anACTIVEstate. If a container instance is inREGISTERING,DEREGISTERING, orREGISTRATION_FAILEDstate you can describe the container instance but can’t update the container instance state.
- On success, responds with
UpdateContainerInstancesStateOutputwith field(s):container_instances(Option<Vec<ContainerInstance>>):The list of container instances.
failures(Option<Vec<Failure>>):Any failures associated with the call.
- On failure, responds with
SdkError<UpdateContainerInstancesStateError>
sourcepub fn update_service(&self) -> UpdateService
pub fn update_service(&self) -> UpdateService
Constructs a fluent builder for the UpdateService operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that your service runs on. If you do not specify a cluster, the default cluster is assumed.
service(impl Into<String>)/set_service(Option<String>):The name of the service to update.
desired_count(i32)/set_desired_count(Option<i32>):The number of instantiations of the task to place and keep running in your service.
task_definition(impl Into<String>)/set_task_definition(Option<String>):The
familyandrevision(family:revision) or full ARN of the task definition to run in your service. If arevisionis not specified, the latestACTIVErevision is used. If you modify the task definition withUpdateService, Amazon ECS spawns a task with the new version of the task definition and then stops an old task after the new version is running.capacity_provider_strategy(Vec<CapacityProviderStrategyItem>)/set_capacity_provider_strategy(Option<Vec<CapacityProviderStrategyItem>>):The capacity provider strategy to update the service to use.
if the service uses the default capacity provider strategy for the cluster, the service can be updated to use one or more capacity providers as opposed to the default capacity provider strategy. However, when a service is using a capacity provider strategy that’s not the default capacity provider strategy, the service can’t be updated to use the cluster’s default capacity provider strategy.
A capacity provider strategy consists of one or more capacity providers along with the
baseandweightto assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. ThePutClusterCapacityProvidersAPI is used to associate a capacity provider with a cluster. Only capacity providers with anACTIVEorUPDATINGstatus 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
CreateCapacityProviderAPI operation.To use a Fargate capacity provider, specify either the
FARGATEorFARGATE_SPOTcapacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.The
PutClusterCapacityProvidersAPI operation is used to update the list of available capacity providers for a cluster after the cluster is created.deployment_configuration(DeploymentConfiguration)/set_deployment_configuration(Option<DeploymentConfiguration>):Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
network_configuration(NetworkConfiguration)/set_network_configuration(Option<NetworkConfiguration>):An object representing the network configuration for the service.
placement_constraints(Vec<PlacementConstraint>)/set_placement_constraints(Option<Vec<PlacementConstraint>>):An array of task placement constraint objects to update the service to use. If no value is specified, the existing placement constraints for the service will remain unchanged. If this value is specified, it will override any existing placement constraints defined for the service. To remove all existing placement constraints, specify an empty array.
You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
placement_strategy(Vec<PlacementStrategy>)/set_placement_strategy(Option<Vec<PlacementStrategy>>):The task placement strategy objects to update the service to use. If no value is specified, the existing placement strategy for the service will remain unchanged. If this value is specified, it will override the existing placement strategy defined for the service. To remove an existing placement strategy, specify an empty object.
You can specify a maximum of five strategy rules for each service.
platform_version(impl Into<String>)/set_platform_version(Option<String>):The platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If a platform version is not specified, the
LATESTplatform version is used. For more information, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.force_new_deployment(bool)/set_force_new_deployment(bool):Determines whether to force a new deployment of the service. By default, deployments aren’t forced. You can use this option to start a new deployment with no service definition changes. For example, you can update a service’s tasks to use a newer Docker image with the same image/tag combination (
my_image:latest) or to roll Fargate tasks onto a newer platform version.health_check_grace_period_seconds(i32)/set_health_check_grace_period_seconds(Option<i32>):The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. This is only valid if your service is configured to use a load balancer. If your service’s tasks take a while to start and respond to Elastic Load Balancing health checks, you can specify a health check grace period of up to 2,147,483,647 seconds. During that time, the Amazon ECS service scheduler ignores the Elastic Load Balancing health check status. This grace period can prevent the ECS service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.
enable_execute_command(bool)/set_enable_execute_command(Option<bool>):If
true, this enables execute command functionality on all task containers.If you do not want to override the value that was set when the service was created, you can set this to
nullwhen performing this action.
- On success, responds with
UpdateServiceOutputwith field(s):service(Option<Service>):The full description of your service following the update call.
- On failure, responds with
SdkError<UpdateServiceError>
sourcepub fn update_service_primary_task_set(&self) -> UpdateServicePrimaryTaskSet
pub fn update_service_primary_task_set(&self) -> UpdateServicePrimaryTaskSet
Constructs a fluent builder for the UpdateServicePrimaryTaskSet operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set exists in.
service(impl Into<String>)/set_service(Option<String>):The short name or full Amazon Resource Name (ARN) of the service that the task set exists in.
primary_task_set(impl Into<String>)/set_primary_task_set(Option<String>):The short name or full Amazon Resource Name (ARN) of the task set to set as the primary task set in the deployment.
- On success, responds with
UpdateServicePrimaryTaskSetOutputwith field(s):task_set(Option<TaskSet>):Details about the task set.
- On failure, responds with
SdkError<UpdateServicePrimaryTaskSetError>
sourcepub fn update_task_set(&self) -> UpdateTaskSet
pub fn update_task_set(&self) -> UpdateTaskSet
Constructs a fluent builder for the UpdateTaskSet operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set is found in.
service(impl Into<String>)/set_service(Option<String>):The short name or full Amazon Resource Name (ARN) of the service that the task set is found in.
task_set(impl Into<String>)/set_task_set(Option<String>):The short name or full Amazon Resource Name (ARN) of the task set to update.
scale(Scale)/set_scale(Option<Scale>):A floating-point percentage of the desired number of tasks to place and keep running in the task set.
- On success, responds with
UpdateTaskSetOutputwith field(s):task_set(Option<TaskSet>):Details about the task set.
- On failure, responds with
SdkError<UpdateTaskSetError>
sourceimpl Client
impl Client
sourcepub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
pub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
Creates a client with the given service config and connector override.
Trait Implementations
sourceimpl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
impl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
sourcefn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
fn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more