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.
§Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_ecs::Client::new(&config);Occasionally, SDKs may have additional service-specific values that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Config struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_ecs::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the CreateCapacityProvider operation has
a Client::create_capacity_provider, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.create_capacity_provider()
.name("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
source§impl Client
impl Client
sourcepub fn create_capacity_provider(&self) -> CreateCapacityProviderFluentBuilder
pub fn create_capacity_provider(&self) -> CreateCapacityProviderFluentBuilder
Constructs a fluent builder for the CreateCapacityProvider operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the capacity provider. Up to 255 characters are allowed. They include letters (both upper and lowercase letters), numbers, underscores (_), and hyphens (-). The name can’t be prefixed with “
aws”, “ecs”, or “fargate”.auto_scaling_group_provider(AutoScalingGroupProvider)/set_auto_scaling_group_provider(Option<AutoScalingGroupProvider>):
required: trueThe details of the Auto Scaling group for the capacity provider.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseThe metadata that you apply to the capacity provider to categorize and organize them more conveniently. Each tag consists of a key and an optional value. You define both of them.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- On success, responds with
CreateCapacityProviderOutputwith field(s):capacity_provider(Option<CapacityProvider>):The full description of the new capacity provider.
- On failure, responds with
SdkError<CreateCapacityProviderError>
source§impl Client
impl Client
sourcepub fn create_cluster(&self) -> CreateClusterFluentBuilder
pub fn create_cluster(&self) -> CreateClusterFluentBuilder
Constructs a fluent builder for the CreateCluster operation.
- The fluent builder is configurable:
cluster_name(impl Into<String>)/set_cluster_name(Option<String>):
required: falseThe name of your cluster. If you don’t specify a name for your cluster, you create a cluster that’s named
default. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseThe metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
settings(ClusterSetting)/set_settings(Option<Vec::<ClusterSetting>>):
required: falseThe setting to use when creating a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster. If this value is specified, it overrides the
containerInsightsvalue set withPutAccountSettingorPutAccountSettingDefault.configuration(ClusterConfiguration)/set_configuration(Option<ClusterConfiguration>):
required: falseThe
executecommand configuration for the cluster.capacity_providers(impl Into<String>)/set_capacity_providers(Option<Vec::<String>>):
required: falseThe short name of one or more capacity providers to associate with the cluster. A capacity provider must be associated with a cluster before it can be included as part of the default capacity provider strategy of the cluster or used in a capacity provider strategy when calling the CreateService or RunTask actions.
If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must be created but not associated with another cluster. New Auto Scaling group capacity providers can be created with the CreateCapacityProvider API operation.
To use a Fargate capacity provider, specify either the
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 PutCapacityProvider API operation is used to update the list of available capacity providers for a cluster after the cluster is created.
default_capacity_provider_strategy(CapacityProviderStrategyItem)/set_default_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>):
required: falseThe capacity provider strategy to set as the default for the cluster. After a default capacity provider strategy is set for a cluster, when you call the CreateService or RunTask APIs with no capacity provider strategy or launch type specified, the default capacity provider strategy for the cluster is used.
If a default capacity provider strategy isn’t defined for a cluster when it was created, it can be defined later with the
PutClusterCapacityProvidersAPI operation.service_connect_defaults(ClusterServiceConnectDefaultsRequest)/set_service_connect_defaults(Option<ClusterServiceConnectDefaultsRequest>):
required: falseUse this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the
enabledparameter totruein theServiceConnectConfiguration. You can set the namespace of each service individually in theServiceConnectConfigurationto override this default parameter.Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
- On success, responds with
CreateClusterOutputwith field(s):cluster(Option<Cluster>):The full description of your new cluster.
- On failure, responds with
SdkError<CreateClusterError>
source§impl Client
impl Client
sourcepub fn create_service(&self) -> CreateServiceFluentBuilder
pub fn create_service(&self) -> CreateServiceFluentBuilder
Constructs a fluent builder for the CreateService operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that you run your service on. If you do not specify a cluster, the default cluster is assumed.
service_name(impl Into<String>)/set_service_name(Option<String>):
required: trueThe name of your service. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a Region or across multiple Regions.
task_definition(impl Into<String>)/set_task_definition(Option<String>):
required: falseThe
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.For more information about deployment types, see Amazon ECS deployment types.
load_balancers(LoadBalancer)/set_load_balancers(Option<Vec::<LoadBalancer>>):
required: falseA load balancer object representing the load balancers to use with your service. For more information, see Service load balancing in the Amazon Elastic Container Service Developer Guide.
If the service uses the rolling update (
ECS) deployment controller and using either an Application Load Balancer or Network Load Balancer, you must specify one or more target group ARNs to attach to the service. The service-linked role is required for services that use multiple target groups. For more information, see Using service-linked roles for Amazon ECS in the Amazon Elastic Container Service Developer Guide.If the service uses the
CODE_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.If you use the
CODE_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(ServiceRegistry)/set_service_registries(Option<Vec::<ServiceRegistry>>):
required: falseThe details of the service discovery registry to associate with this service. For more information, see Service discovery.
Each service may be associated with one service registry. Multiple service registries for each service isn’t supported.
desired_count(i32)/set_desired_count(Option<i32>):
required: falseThe number of instantiations of the specified task definition to place and keep running in your service.
This is required if
schedulingStrategyisREPLICAor isn’t specified. IfschedulingStrategyisDAEMONthen this isn’t required.client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseAn identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed.
launch_type(LaunchType)/set_launch_type(Option<LaunchType>):
required: falseThe infrastructure that you run your service on. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.
The
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 Developer Guide.
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(CapacityProviderStrategyItem)/set_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>):
required: falseThe 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>):
required: falseThe platform version that your tasks in the service are running on. A platform version is specified only for tasks using the Fargate launch type. If one isn’t specified, the
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>):
required: falseThe name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is only permitted if you are using a load balancer with your service and your task definition doesn’t use the
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>):
required: falseOptional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
placement_constraints(PlacementConstraint)/set_placement_constraints(Option<Vec::<PlacementConstraint>>):
required: falseAn array of placement constraint objects to use for tasks in your service. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
placement_strategy(PlacementStrategy)/set_placement_strategy(Option<Vec::<PlacementStrategy>>):
required: falseThe placement strategy objects to use for tasks in your service. You can specify a maximum of 5 strategy rules for each service.
network_configuration(NetworkConfiguration)/set_network_configuration(Option<NetworkConfiguration>):
required: falseThe network configuration for the service. This parameter is required for task definitions that use the
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>):
required: falseThe 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 you do not use an Elastic Load Balancing, we recommend that you use the
startPeriodin the task definition health check parameters. For more information, see Health check.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>):
required: falseThe scheduling strategy to use for the service. For more information, see Services.
There are two service scheduler strategies available:
-
REPLICA-The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. This scheduler strategy is required if the service uses theCODE_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>):
required: falseThe deployment controller to use for the service. If no deployment controller is specified, the default value of
ECSis used.tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseThe metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. When a service is deleted, the tags are deleted as well.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
enable_ecs_managed_tags(bool)/set_enable_ecs_managed_tags(Option<bool>):
required: falseSpecifies whether to turn on Amazon ECS managed tags for the tasks within the service. For more information, see Tagging your Amazon ECS resources in the Amazon Elastic Container Service Developer Guide.
When you use Amazon ECS managed tags, you need to set the
propagateTagsrequest parameter.propagate_tags(PropagateTags)/set_propagate_tags(Option<PropagateTags>):
required: falseSpecifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren’t propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.
You must set this to a value other than
NONEwhen you use Cost Explorer. For more information, see Amazon ECS usage reports in the Amazon Elastic Container Service Developer Guide.The default is
NONE.enable_execute_command(bool)/set_enable_execute_command(Option<bool>):
required: falseDetermines whether the execute command functionality is turned on for the service. If
true, this enables execute command functionality on all containers in the service tasks.service_connect_configuration(ServiceConnectConfiguration)/set_service_connect_configuration(Option<ServiceConnectConfiguration>):
required: falseThe configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
volume_configurations(ServiceVolumeConfiguration)/set_volume_configurations(Option<Vec::<ServiceVolumeConfiguration>>):
required: falseThe configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume.
- 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>
source§impl Client
impl Client
sourcepub fn create_task_set(&self) -> CreateTaskSetFluentBuilder
pub fn create_task_set(&self) -> CreateTaskSetFluentBuilder
Constructs a fluent builder for the CreateTaskSet operation.
- The fluent builder is configurable:
service(impl Into<String>)/set_service(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the service to create the task set in.
cluster(impl Into<String>)/set_cluster(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.
external_id(impl Into<String>)/set_external_id(Option<String>):
required: falseAn optional non-unique tag that identifies this task set in external systems. If the task set is associated with a service discovery registry, the tasks in this task set will have the
ECS_TASK_SET_EXTERNAL_IDCloud Map attribute set to the provided value.task_definition(impl Into<String>)/set_task_definition(Option<String>):
required: trueThe task definition for the tasks in the task set to use. If a revision isn’t specified, the latest
ACTIVErevision is used.network_configuration(NetworkConfiguration)/set_network_configuration(Option<NetworkConfiguration>):
required: falseAn object representing the network configuration for a task set.
load_balancers(LoadBalancer)/set_load_balancers(Option<Vec::<LoadBalancer>>):
required: falseA load balancer object representing the load balancer to use with the task set. The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.
service_registries(ServiceRegistry)/set_service_registries(Option<Vec::<ServiceRegistry>>):
required: falseThe details of the service discovery registries to assign to this task set. For more information, see Service discovery.
launch_type(LaunchType)/set_launch_type(Option<LaunchType>):
required: falseThe launch type that new tasks in the task set uses. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.
If a
launchTypeis specified, thecapacityProviderStrategyparameter must be omitted.capacity_provider_strategy(CapacityProviderStrategyItem)/set_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>):
required: falseThe capacity provider strategy to use for the task set.
A capacity provider strategy consists of one or more capacity providers along with the
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>):
required: falseThe platform version that the tasks in the task set uses. A platform version is specified only for tasks using the Fargate launch type. If one isn’t specified, the
LATESTplatform version is used.scale(Scale)/set_scale(Option<Scale>):
required: falseA floating-point percentage of the desired number of tasks to place and keep running in the task set.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseAn identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseThe metadata that you apply to the task set to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. When a service is deleted, the tags are deleted.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- On success, responds with
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>
source§impl Client
impl Client
sourcepub fn delete_account_setting(&self) -> DeleteAccountSettingFluentBuilder
pub fn delete_account_setting(&self) -> DeleteAccountSettingFluentBuilder
Constructs a fluent builder for the DeleteAccountSetting operation.
- The fluent builder is configurable:
name(SettingName)/set_name(Option<SettingName>):
required: trueThe resource name to disable the account setting for. If
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>):
required: falseThe Amazon Resource Name (ARN) of the principal. It can be an user, role, or the root user. If you specify the root user, it disables the account setting for all users, roles, and the root user of the account unless a user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.
- On success, responds with
DeleteAccountSettingOutputwith field(s):setting(Option<Setting>):The account setting for the specified principal ARN.
- On failure, responds with
SdkError<DeleteAccountSettingError>
source§impl Client
impl Client
sourcepub fn delete_attributes(&self) -> DeleteAttributesFluentBuilder
pub fn delete_attributes(&self) -> DeleteAttributesFluentBuilder
Constructs a fluent builder for the DeleteAttributes operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that contains the resource to delete attributes. If you do not specify a cluster, the default cluster is assumed.
attributes(Attribute)/set_attributes(Option<Vec::<Attribute>>):
required: trueThe attributes to delete from your resource. You can specify up to 10 attributes for each request. For custom attributes, specify the attribute name and target ID, but don’t specify the value. If you specify the target ID using the short form, you must also specify the target type.
- On success, responds with
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>
source§impl Client
impl Client
sourcepub fn delete_capacity_provider(&self) -> DeleteCapacityProviderFluentBuilder
pub fn delete_capacity_provider(&self) -> DeleteCapacityProviderFluentBuilder
Constructs a fluent builder for the DeleteCapacityProvider operation.
- The fluent builder is configurable:
capacity_provider(impl Into<String>)/set_capacity_provider(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the capacity provider to delete.
- On success, responds with
DeleteCapacityProviderOutputwith field(s):capacity_provider(Option<CapacityProvider>):The details of the capacity provider.
- On failure, responds with
SdkError<DeleteCapacityProviderError>
source§impl Client
impl Client
sourcepub fn delete_cluster(&self) -> DeleteClusterFluentBuilder
pub fn delete_cluster(&self) -> DeleteClusterFluentBuilder
Constructs a fluent builder for the DeleteCluster operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster to delete.
- On success, responds with
DeleteClusterOutputwith field(s):cluster(Option<Cluster>):The full description of the deleted cluster.
- On failure, responds with
SdkError<DeleteClusterError>
source§impl Client
impl Client
sourcepub fn delete_service(&self) -> DeleteServiceFluentBuilder
pub fn delete_service(&self) -> DeleteServiceFluentBuilder
Constructs a fluent builder for the DeleteService operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to delete. If you do not specify a cluster, the default cluster is assumed.
service(impl Into<String>)/set_service(Option<String>):
required: trueThe name of the service to delete.
force(bool)/set_force(Option<bool>):
required: falseIf
true, allows you to delete a service even if it wasn’t scaled down to zero tasks. It’s only necessary to use this if the service uses 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>
source§impl Client
impl Client
sourcepub fn delete_task_definitions(&self) -> DeleteTaskDefinitionsFluentBuilder
pub fn delete_task_definitions(&self) -> DeleteTaskDefinitionsFluentBuilder
Constructs a fluent builder for the DeleteTaskDefinitions operation.
- The fluent builder is configurable:
task_definitions(impl Into<String>)/set_task_definitions(Option<Vec::<String>>):
required: trueThe
familyandrevision(family:revision) or full Amazon Resource Name (ARN) of the task definition to delete. You must specify arevision.You can specify up to 10 task definitions as a comma separated list.
- On success, responds with
DeleteTaskDefinitionsOutputwith field(s):task_definitions(Option<Vec::<TaskDefinition>>):The list of deleted task definitions.
failures(Option<Vec::<Failure>>):Any failures associated with the call.
- On failure, responds with
SdkError<DeleteTaskDefinitionsError>
source§impl Client
impl Client
sourcepub fn delete_task_set(&self) -> DeleteTaskSetFluentBuilder
pub fn delete_task_set(&self) -> DeleteTaskSetFluentBuilder
Constructs a fluent builder for the DeleteTaskSet operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set found in to delete.
service(impl Into<String>)/set_service(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.
task_set(impl Into<String>)/set_task_set(Option<String>):
required: trueThe task set ID or full Amazon Resource Name (ARN) of the task set to delete.
force(bool)/set_force(Option<bool>):
required: falseIf
true, you can delete a task set even if it hasn’t been scaled down to zero.
- On success, responds with
DeleteTaskSetOutputwith field(s):task_set(Option<TaskSet>):Details about the task set.
- On failure, responds with
SdkError<DeleteTaskSetError>
source§impl Client
impl Client
sourcepub fn deregister_container_instance(
&self
) -> DeregisterContainerInstanceFluentBuilder
pub fn deregister_container_instance( &self ) -> DeregisterContainerInstanceFluentBuilder
Constructs a fluent builder for the DeregisterContainerInstance operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister. If you do not specify a cluster, the default cluster is assumed.
container_instance(impl Into<String>)/set_container_instance(Option<String>):
required: trueThe container instance ID or full ARN of the container instance to deregister. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.
force(bool)/set_force(Option<bool>):
required: falseForces the container instance to be deregistered. If you have tasks running on the container instance when you deregister it with the
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>
source§impl Client
impl Client
sourcepub fn deregister_task_definition(
&self
) -> DeregisterTaskDefinitionFluentBuilder
pub fn deregister_task_definition( &self ) -> DeregisterTaskDefinitionFluentBuilder
Constructs a fluent builder for the DeregisterTaskDefinition operation.
- The fluent builder is configurable:
task_definition(impl Into<String>)/set_task_definition(Option<String>):
required: trueThe
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>
source§impl Client
impl Client
sourcepub fn describe_capacity_providers(
&self
) -> DescribeCapacityProvidersFluentBuilder
pub fn describe_capacity_providers( &self ) -> DescribeCapacityProvidersFluentBuilder
Constructs a fluent builder for the DescribeCapacityProviders operation.
- The fluent builder is configurable:
capacity_providers(impl Into<String>)/set_capacity_providers(Option<Vec::<String>>):
required: falseThe short name or full Amazon Resource Name (ARN) of one or more capacity providers. Up to
100capacity providers can be described in an action.include(CapacityProviderField)/set_include(Option<Vec::<CapacityProviderField>>):
required: falseSpecifies whether or not you want to see the resource tags for the capacity provider. If
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>):
required: falseThe 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>):
required: falseThe
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>
source§impl Client
impl Client
sourcepub fn describe_clusters(&self) -> DescribeClustersFluentBuilder
pub fn describe_clusters(&self) -> DescribeClustersFluentBuilder
Constructs a fluent builder for the DescribeClusters operation.
- The fluent builder is configurable:
clusters(impl Into<String>)/set_clusters(Option<Vec::<String>>):
required: falseA list of up to 100 cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.
include(ClusterField)/set_include(Option<Vec::<ClusterField>>):
required: falseDetermines whether to include additional information about the clusters in the response. If this field is omitted, this information isn’t included.
If
ATTACHMENTSis specified, the attachments for the container instances or tasks within the cluster are included, for example the capacity providers.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>
source§impl Client
impl Client
sourcepub fn describe_container_instances(
&self
) -> DescribeContainerInstancesFluentBuilder
pub fn describe_container_instances( &self ) -> DescribeContainerInstancesFluentBuilder
Constructs a fluent builder for the DescribeContainerInstances operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the container instance or container instances you are describing were launched in any cluster other than the default cluster.
container_instances(impl Into<String>)/set_container_instances(Option<Vec::<String>>):
required: trueA list of up to 100 container instance IDs or full Amazon Resource Name (ARN) entries.
include(ContainerInstanceField)/set_include(Option<Vec::<ContainerInstanceField>>):
required: falseSpecifies whether you want to see the resource tags for the container instance. If
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>
source§impl Client
impl Client
sourcepub fn describe_services(&self) -> DescribeServicesFluentBuilder
pub fn describe_services(&self) -> DescribeServicesFluentBuilder
Constructs a fluent builder for the DescribeServices operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN)the cluster that hosts the service to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the service or services you are describing were launched in any cluster other than the default cluster.
services(impl Into<String>)/set_services(Option<Vec::<String>>):
required: trueA list of services to describe. You may specify up to 10 services to describe in a single operation.
include(ServiceField)/set_include(Option<Vec::<ServiceField>>):
required: falseDetermines whether you want to see the resource tags for the service. If
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>
source§impl Client
impl Client
sourcepub fn describe_task_definition(&self) -> DescribeTaskDefinitionFluentBuilder
pub fn describe_task_definition(&self) -> DescribeTaskDefinitionFluentBuilder
Constructs a fluent builder for the DescribeTaskDefinition operation.
- The fluent builder is configurable:
task_definition(impl Into<String>)/set_task_definition(Option<String>):
required: trueThe
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(TaskDefinitionField)/set_include(Option<Vec::<TaskDefinitionField>>):
required: falseDetermines 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>
source§impl Client
impl Client
sourcepub fn describe_task_sets(&self) -> DescribeTaskSetsFluentBuilder
pub fn describe_task_sets(&self) -> DescribeTaskSetsFluentBuilder
Constructs a fluent builder for the DescribeTaskSets operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.
service(impl Into<String>)/set_service(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the service that the task sets exist in.
task_sets(impl Into<String>)/set_task_sets(Option<Vec::<String>>):
required: falseThe ID or full Amazon Resource Name (ARN) of task sets to describe.
include(TaskSetField)/set_include(Option<Vec::<TaskSetField>>):
required: falseSpecifies whether to see the resource tags for the task set. If
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>
source§impl Client
impl Client
sourcepub fn describe_tasks(&self) -> DescribeTasksFluentBuilder
pub fn describe_tasks(&self) -> DescribeTasksFluentBuilder
Constructs a fluent builder for the DescribeTasks operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the task or tasks to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the task or tasks you are describing were launched in any cluster other than the default cluster.
tasks(impl Into<String>)/set_tasks(Option<Vec::<String>>):
required: trueA list of up to 100 task IDs or full ARN entries.
include(TaskField)/set_include(Option<Vec::<TaskField>>):
required: falseSpecifies whether you want to see the resource tags for the task. If
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>
source§impl Client
impl Client
sourcepub fn discover_poll_endpoint(&self) -> DiscoverPollEndpointFluentBuilder
pub fn discover_poll_endpoint(&self) -> DiscoverPollEndpointFluentBuilder
Constructs a fluent builder for the DiscoverPollEndpoint operation.
- The fluent builder is configurable:
container_instance(impl Into<String>)/set_container_instance(Option<String>):
required: falseThe container instance ID or full ARN of the container instance. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that the container instance belongs to.
- On success, responds with
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.
service_connect_endpoint(Option<String>):The endpoint for the Amazon ECS agent to poll for Service Connect configuration. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
- On failure, responds with
SdkError<DiscoverPollEndpointError>
source§impl Client
impl Client
sourcepub fn execute_command(&self) -> ExecuteCommandFluentBuilder
pub fn execute_command(&self) -> ExecuteCommandFluentBuilder
Constructs a fluent builder for the ExecuteCommand operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe Amazon Resource Name (ARN) or short name of the cluster the task is running in. If you do not specify a cluster, the default cluster is assumed.
container(impl Into<String>)/set_container(Option<String>):
required: falseThe name of the container to execute the command on. A container name only needs to be specified for tasks containing multiple containers.
command(impl Into<String>)/set_command(Option<String>):
required: trueThe command to run on the container.
interactive(bool)/set_interactive(Option<bool>):
required: trueUse this flag to run your command in interactive mode.
task(impl Into<String>)/set_task(Option<String>):
required: trueThe Amazon Resource Name (ARN) or ID of the task the container is part of.
- On success, responds with
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>
source§impl Client
impl Client
sourcepub fn get_task_protection(&self) -> GetTaskProtectionFluentBuilder
pub fn get_task_protection(&self) -> GetTaskProtectionFluentBuilder
Constructs a fluent builder for the GetTaskProtection operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.
tasks(impl Into<String>)/set_tasks(Option<Vec::<String>>):
required: falseA list of up to 100 task IDs or full ARN entries.
- On success, responds with
GetTaskProtectionOutputwith field(s):protected_tasks(Option<Vec::<ProtectedTask>>):A list of tasks with the following information.
-
taskArn: The task ARN. -
protectionEnabled: The protection status of the task. If scale-in protection is turned on for a task, the value istrue. Otherwise, it isfalse. -
expirationDate: The epoch time when protection for the task will expire.
-
failures(Option<Vec::<Failure>>):Any failures associated with the call.
- On failure, responds with
SdkError<GetTaskProtectionError>
source§impl Client
impl Client
sourcepub fn list_account_settings(&self) -> ListAccountSettingsFluentBuilder
pub fn list_account_settings(&self) -> ListAccountSettingsFluentBuilder
Constructs a fluent builder for the ListAccountSettings operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
name(SettingName)/set_name(Option<SettingName>):
required: falseThe name of the account setting you want to list the settings for.
value(impl Into<String>)/set_value(Option<String>):
required: falseThe value of the account settings to filter results with. You must also specify an account setting name to use this parameter.
principal_arn(impl Into<String>)/set_principal_arn(Option<String>):
required: falseThe ARN of the principal, which can be a user, role, or the root user. If this field is omitted, the account settings are listed only for the authenticated user.
Federated users assume the account setting of the root user and can’t have explicit account settings set for them.
effective_settings(bool)/set_effective_settings(Option<bool>):
required: falseDetermines whether to return the effective settings. If
true, the account settings for the root user or the default setting for 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>):
required: falseThe
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(Option<i32>):
required: falseThe 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>
source§impl Client
impl Client
sourcepub fn list_attributes(&self) -> ListAttributesFluentBuilder
pub fn list_attributes(&self) -> ListAttributesFluentBuilder
Constructs a fluent builder for the ListAttributes operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster to list attributes. If you do not specify a cluster, the default cluster is assumed.
target_type(TargetType)/set_target_type(Option<TargetType>):
required: trueThe type of the target to list attributes with.
attribute_name(impl Into<String>)/set_attribute_name(Option<String>):
required: falseThe name of the attribute to filter the results with.
attribute_value(impl Into<String>)/set_attribute_value(Option<String>):
required: falseThe value of the attribute to filter results with. You must also specify an attribute name to use this parameter.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe
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>):
required: falseThe 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>
source§impl Client
impl Client
sourcepub fn list_clusters(&self) -> ListClustersFluentBuilder
pub fn list_clusters(&self) -> ListClustersFluentBuilder
Constructs a fluent builder for the ListClusters operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe
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>):
required: falseThe 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>
source§impl Client
impl Client
sourcepub fn list_container_instances(&self) -> ListContainerInstancesFluentBuilder
pub fn list_container_instances(&self) -> ListContainerInstancesFluentBuilder
Constructs a fluent builder for the ListContainerInstances operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to list. If you do not specify a cluster, the default cluster is assumed.
filter(impl Into<String>)/set_filter(Option<String>):
required: falseYou can filter the results of a
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>):
required: falseThe
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>):
required: falseThe 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>):
required: falseFilters 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>
source§impl Client
impl Client
sourcepub fn list_services(&self) -> ListServicesFluentBuilder
pub fn list_services(&self) -> ListServicesFluentBuilder
Constructs a fluent builder for the ListServices operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster to use when filtering the
ListServicesresults. If you do not specify a cluster, the default cluster is assumed.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe
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>):
required: falseThe 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>):
required: falseThe launch type to use when filtering the
ListServicesresults.scheduling_strategy(SchedulingStrategy)/set_scheduling_strategy(Option<SchedulingStrategy>):
required: falseThe 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>
source§impl Client
impl Client
sourcepub fn list_services_by_namespace(&self) -> ListServicesByNamespaceFluentBuilder
pub fn list_services_by_namespace(&self) -> ListServicesByNamespaceFluentBuilder
Constructs a fluent builder for the ListServicesByNamespace operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
namespace(impl Into<String>)/set_namespace(Option<String>):
required: trueThe namespace name or full Amazon Resource Name (ARN) of the Cloud Map namespace to list the services in.
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe
nextTokenvalue that’s returned from aListServicesByNamespacerequest. It indicates that more results are available to fulfill the request and further calls are needed. IfmaxResultsis returned, it is possible the number of results is less thanmaxResults.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of service results that
ListServicesByNamespacereturns in paginated output. When this parameter is used,ListServicesByNamespaceonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListServicesByNamespacerequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter isn’t used, thenListServicesByNamespacereturns up to 10 results and anextTokenvalue if applicable.
- On success, responds with
ListServicesByNamespaceOutputwith field(s):service_arns(Option<Vec::<String>>):The list of full ARN entries for each service that’s associated with the specified namespace.
next_token(Option<String>):The
nextTokenvalue to include in a futureListServicesByNamespacerequest. When the results of aListServicesByNamespacerequest exceedmaxResults, this value can be used to retrieve the next page of results. When there are no more results to return, this value isnull.
- On failure, responds with
SdkError<ListServicesByNamespaceError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) that identifies the resource to list the tags for. Currently, the supported resources are Amazon ECS tasks, services, task definitions, clusters, and container instances.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<Vec::<Tag>>):The tags for the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn list_task_definition_families(
&self
) -> ListTaskDefinitionFamiliesFluentBuilder
pub fn list_task_definition_families( &self ) -> ListTaskDefinitionFamiliesFluentBuilder
Constructs a fluent builder for the ListTaskDefinitionFamilies operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
family_prefix(impl Into<String>)/set_family_prefix(Option<String>):
required: falseThe
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>):
required: falseThe 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>):
required: falseThe
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>):
required: falseThe 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>
source§impl Client
impl Client
sourcepub fn list_task_definitions(&self) -> ListTaskDefinitionsFluentBuilder
pub fn list_task_definitions(&self) -> ListTaskDefinitionsFluentBuilder
Constructs a fluent builder for the ListTaskDefinitions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
family_prefix(impl Into<String>)/set_family_prefix(Option<String>):
required: falseThe full family name to filter the
ListTaskDefinitionsresults with. Specifying afamilyPrefixlimits the listed task definitions to task definition revisions that belong to that family.status(TaskDefinitionStatus)/set_status(Option<TaskDefinitionStatus>):
required: falseThe task definition status to filter the
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>):
required: falseThe 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>):
required: falseThe
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>):
required: falseThe 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>
source§impl Client
impl Client
sourcepub fn list_tasks(&self) -> ListTasksFluentBuilder
pub fn list_tasks(&self) -> ListTasksFluentBuilder
Constructs a fluent builder for the ListTasks operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster to use when filtering the
ListTasksresults. If you do not specify a cluster, the default cluster is assumed.container_instance(impl Into<String>)/set_container_instance(Option<String>):
required: falseThe container instance ID or full ARN of the container instance to use when filtering the
ListTasksresults. Specifying acontainerInstancelimits the results to tasks that belong to that container instance.family(impl Into<String>)/set_family(Option<String>):
required: falseThe name of the task definition family to use when filtering the
ListTasksresults. Specifying afamilylimits the results to tasks that belong to that family.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe
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>):
required: falseThe 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>):
required: falseThe
startedByvalue to filter the task results with. Specifying astartedByvalue limits the results to tasks that were started with that value.When you specify
startedByas the filter, it must be the only filter that you use.service_name(impl Into<String>)/set_service_name(Option<String>):
required: falseThe name of the service to use when filtering the
ListTasksresults. Specifying aserviceNamelimits the results to tasks that belong to that service.desired_status(DesiredStatus)/set_desired_status(Option<DesiredStatus>):
required: falseThe task desired status to use when filtering the
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>):
required: falseThe 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>
source§impl Client
impl Client
sourcepub fn put_account_setting(&self) -> PutAccountSettingFluentBuilder
pub fn put_account_setting(&self) -> PutAccountSettingFluentBuilder
Constructs a fluent builder for the PutAccountSetting operation.
- The fluent builder is configurable:
name(SettingName)/set_name(Option<SettingName>):
required: trueThe Amazon ECS account setting name to modify.
The following are the valid values for the account setting name.
-
serviceLongArnFormat- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
taskLongArnFormat- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
containerInstanceLongArnFormat- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
awsvpcTrunking- When modified, the elastic network interface (ENI) limit for any new container instances that support the feature is changed. IfawsvpcTrunkingis turned on, any new container instances that support the feature are launched have the increased ENI limits available to them. For more information, see Elastic Network Interface Trunking in the Amazon Elastic Container Service Developer Guide. -
containerInsights- When modified, the default setting indicating whether Amazon Web Services CloudWatch Container Insights is turned on for your clusters is changed. IfcontainerInsightsis turned on, any new clusters that are created will have Container Insights turned on unless you disable it during cluster creation. For more information, see CloudWatch Container Insights in the Amazon Elastic Container Service Developer Guide. -
dualStackIPv6- When turned on, when using a VPC in dual stack mode, your tasks using theawsvpcnetwork mode can have an IPv6 address assigned. For more information on using IPv6 with tasks launched on Amazon EC2 instances, see Using a VPC in dual-stack mode. For more information on using IPv6 with tasks launched on Fargate, see Using a VPC in dual-stack mode. -
fargateFIPSMode- If you specifyfargateFIPSMode, Fargate FIPS 140 compliance is affected. -
fargateTaskRetirementWaitPeriod- When Amazon Web Services determines that a security or infrastructure update is needed for an Amazon ECS task hosted on Fargate, the tasks need to be stopped and new tasks launched to replace them. UsefargateTaskRetirementWaitPeriodto configure the wait time to retire a Fargate task. For information about the Fargate tasks maintenance, see Amazon Web Services Fargate task maintenance in the Amazon ECS Developer Guide. -
tagResourceAuthorization- Amazon ECS is introducing tagging authorization for resource creation. Users must have permissions for actions that create the resource, such asecsCreateCluster. If tags are specified when you create a resource, Amazon Web Services performs additional authorization to verify if users or roles have permissions to create tags. Therefore, you must grant explicit permissions to use theecs:TagResourceaction. For more information, see Grant permission to tag resources on creation in the Amazon ECS Developer Guide. -
guardDutyActivate- TheguardDutyActivateparameter is read-only in Amazon ECS and indicates whether Amazon ECS Runtime Monitoring is enabled or disabled by your security administrator in your Amazon ECS account. Amazon GuardDuty controls this account setting on your behalf. For more information, see Protecting Amazon ECS workloads with Amazon ECS Runtime Monitoring.
-
value(impl Into<String>)/set_value(Option<String>):
required: trueThe account setting value for the specified principal ARN. Accepted values are
enabled,disabled,on, andoff.When you specify
fargateTaskRetirementWaitPeriodfor thename, the following are the valid values:-
0- Amazon Web Services sends the notification, and immediately retires the affected tasks. -
7- Amazon Web Services sends the notification, and waits 7 calendar days to retire the tasks. -
14- Amazon Web Services sends the notification, and waits 14 calendar days to retire the tasks.
-
principal_arn(impl Into<String>)/set_principal_arn(Option<String>):
required: falseThe ARN of the principal, which can be a user, role, or the root user. If you specify the root user, it modifies the account setting for all users, roles, and the root user of the account unless a user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.
You must use the root user when you set the Fargate wait time (
fargateTaskRetirementWaitPeriod).Federated users assume the account setting of the root user and can’t have explicit account settings set for them.
- On success, responds with
PutAccountSettingOutputwith field(s):setting(Option<Setting>):The current account setting for a resource.
- On failure, responds with
SdkError<PutAccountSettingError>
source§impl Client
impl Client
sourcepub fn put_account_setting_default(
&self
) -> PutAccountSettingDefaultFluentBuilder
pub fn put_account_setting_default( &self ) -> PutAccountSettingDefaultFluentBuilder
Constructs a fluent builder for the PutAccountSettingDefault operation.
- The fluent builder is configurable:
name(SettingName)/set_name(Option<SettingName>):
required: trueThe resource name for which to modify the account setting.
The following are the valid values for the account setting name.
-
serviceLongArnFormat- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
taskLongArnFormat- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
containerInstanceLongArnFormat- When modified, the Amazon Resource Name (ARN) and resource ID format of the resource type for a specified user, role, or the root user for an account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource is defined by the opt-in status of the user or role that created the resource. You must turn on this setting to use Amazon ECS features such as resource tagging. -
awsvpcTrunking- When modified, the elastic network interface (ENI) limit for any new container instances that support the feature is changed. IfawsvpcTrunkingis turned on, any new container instances that support the feature are launched have the increased ENI limits available to them. For more information, see Elastic Network Interface Trunking in the Amazon Elastic Container Service Developer Guide. -
containerInsights- When modified, the default setting indicating whether Amazon Web Services CloudWatch Container Insights is turned on for your clusters is changed. IfcontainerInsightsis turned on, any new clusters that are created will have Container Insights turned on unless you disable it during cluster creation. For more information, see CloudWatch Container Insights in the Amazon Elastic Container Service Developer Guide. -
dualStackIPv6- When turned on, when using a VPC in dual stack mode, your tasks using theawsvpcnetwork mode can have an IPv6 address assigned. For more information on using IPv6 with tasks launched on Amazon EC2 instances, see Using a VPC in dual-stack mode. For more information on using IPv6 with tasks launched on Fargate, see Using a VPC in dual-stack mode. -
fargateFIPSMode- If you specifyfargateFIPSMode, Fargate FIPS 140 compliance is affected. -
fargateTaskRetirementWaitPeriod- When Amazon Web Services determines that a security or infrastructure update is needed for an Amazon ECS task hosted on Fargate, the tasks need to be stopped and new tasks launched to replace them. UsefargateTaskRetirementWaitPeriodto configure the wait time to retire a Fargate task. For information about the Fargate tasks maintenance, see Amazon Web Services Fargate task maintenance in the Amazon ECS Developer Guide. -
tagResourceAuthorization- Amazon ECS is introducing tagging authorization for resource creation. Users must have permissions for actions that create the resource, such asecsCreateCluster. If tags are specified when you create a resource, Amazon Web Services performs additional authorization to verify if users or roles have permissions to create tags. Therefore, you must grant explicit permissions to use theecs:TagResourceaction. For more information, see Grant permission to tag resources on creation in the Amazon ECS Developer Guide. -
guardDutyActivate- TheguardDutyActivateparameter is read-only in Amazon ECS and indicates whether Amazon ECS Runtime Monitoring is enabled or disabled by your security administrator in your Amazon ECS account. Amazon GuardDuty controls this account setting on your behalf. For more information, see Protecting Amazon ECS workloads with Amazon ECS Runtime Monitoring.
-
value(impl Into<String>)/set_value(Option<String>):
required: trueThe account setting value for the specified principal ARN. Accepted values are
enabled,disabled,on, andoff.When you specify
fargateTaskRetirementWaitPeriodfor thename, the following are the valid values:-
0- Amazon Web Services sends the notification, and immediately retires the affected tasks. -
7- Amazon Web Services sends the notification, and waits 7 calendar days to retire the tasks. -
14- Amazon Web Services sends the notification, and waits 14 calendar days to retire the tasks.
-
- On success, responds with
PutAccountSettingDefaultOutputwith field(s):setting(Option<Setting>):The current setting for a resource.
- On failure, responds with
SdkError<PutAccountSettingDefaultError>
source§impl Client
impl Client
sourcepub fn put_attributes(&self) -> PutAttributesFluentBuilder
pub fn put_attributes(&self) -> PutAttributesFluentBuilder
Constructs a fluent builder for the PutAttributes operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that contains the resource to apply attributes. If you do not specify a cluster, the default cluster is assumed.
attributes(Attribute)/set_attributes(Option<Vec::<Attribute>>):
required: trueThe attributes to apply to your resource. You can specify up to 10 custom attributes for each resource. You can specify up to 10 attributes in a single call.
- On success, responds with
PutAttributesOutputwith field(s):attributes(Option<Vec::<Attribute>>):The attributes applied to your resource.
- On failure, responds with
SdkError<PutAttributesError>
source§impl Client
impl Client
sourcepub fn put_cluster_capacity_providers(
&self
) -> PutClusterCapacityProvidersFluentBuilder
pub fn put_cluster_capacity_providers( &self ) -> PutClusterCapacityProvidersFluentBuilder
Constructs a fluent builder for the PutClusterCapacityProviders operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster to modify the capacity provider settings for. If you don’t specify a cluster, the default cluster is assumed.
capacity_providers(impl Into<String>)/set_capacity_providers(Option<Vec::<String>>):
required: trueThe name of one or more capacity providers to associate with the cluster.
If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the
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(CapacityProviderStrategyItem)/set_default_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>):
required: trueThe capacity provider strategy to use by default for the cluster.
When creating a service or running a task on a cluster, if no capacity provider or launch type is specified then the default capacity provider strategy for the cluster is used.
A capacity provider strategy consists of one or more capacity providers along with the
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>
source§impl Client
impl Client
sourcepub fn register_container_instance(
&self
) -> RegisterContainerInstanceFluentBuilder
pub fn register_container_instance( &self ) -> RegisterContainerInstanceFluentBuilder
Constructs a fluent builder for the RegisterContainerInstance operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster to register your container instance with. If you do not specify a cluster, the default cluster is assumed.
instance_identity_document(impl Into<String>)/set_instance_identity_document(Option<String>):
required: falseThe instance identity document for the EC2 instance to register. This document can be found by running the following command from the instance:
curl http://169.254.169.254/latest/dynamic/instance-identity/document/instance_identity_document_signature(impl Into<String>)/set_instance_identity_document_signature(Option<String>):
required: falseThe instance identity document signature for the EC2 instance to register. This signature can be found by running the following command from the instance:
curl http://169.254.169.254/latest/dynamic/instance-identity/signature/total_resources(Resource)/set_total_resources(Option<Vec::<Resource>>):
required: falseThe resources available on the instance.
version_info(VersionInfo)/set_version_info(Option<VersionInfo>):
required: falseThe version information for the Amazon ECS container agent and Docker daemon that runs on the container instance.
container_instance_arn(impl Into<String>)/set_container_instance_arn(Option<String>):
required: falseThe ARN of the container instance (if it was previously registered).
attributes(Attribute)/set_attributes(Option<Vec::<Attribute>>):
required: falseThe container instance attributes that this container instance supports.
platform_devices(PlatformDevice)/set_platform_devices(Option<Vec::<PlatformDevice>>):
required: falseThe devices that are available on the container instance. The only supported device type is a GPU.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseThe metadata that you apply to the container instance to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- On success, responds with
RegisterContainerInstanceOutputwith field(s):container_instance(Option<ContainerInstance>):The container instance that was registered.
- On failure, responds with
SdkError<RegisterContainerInstanceError>
source§impl Client
impl Client
sourcepub fn register_task_definition(&self) -> RegisterTaskDefinitionFluentBuilder
pub fn register_task_definition(&self) -> RegisterTaskDefinitionFluentBuilder
Constructs a fluent builder for the RegisterTaskDefinition operation.
- The fluent builder is configurable:
family(impl Into<String>)/set_family(Option<String>):
required: trueYou must specify a
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>):
required: falseThe short name or full Amazon Resource Name (ARN) of the IAM role that containers in this task can assume. All containers in this task are granted the permissions that are specified in this role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide.
execution_role_arn(impl Into<String>)/set_execution_role_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf. 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>):
required: falseThe Docker networking mode to use for the containers in the task. The valid values are
none,bridge,awsvpc, andhost. If no network mode is specified, the default isbridge.For Amazon ECS tasks on Fargate, the
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(ContainerDefinition)/set_container_definitions(Option<Vec::<ContainerDefinition>>):
required: trueA list of container definitions in JSON format that describe the different containers that make up your task.
volumes(Volume)/set_volumes(Option<Vec::<Volume>>):
required: falseA list of volume definitions in JSON format that containers in your task might use.
placement_constraints(TaskDefinitionPlacementConstraint)/set_placement_constraints(Option<Vec::<TaskDefinitionPlacementConstraint>>):
required: falseAn array of placement constraint objects to use for the task. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
requires_compatibilities(Compatibility)/set_requires_compatibilities(Option<Vec::<Compatibility>>):
required: falseThe task launch type that Amazon ECS validates the task definition against. A client exception is returned if the task definition doesn’t validate against the compatibilities specified. If no value is specified, the parameter is omitted from the response.
cpu(impl Into<String>)/set_cpu(Option<String>):
required: falseThe number of CPU units used by the task. It can be expressed as an integer using CPU units (for example,
1024) or as a string using vCPUs (for example,1 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 do not specify a value, the parameter is ignored.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: 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) -
4096 (4 vCPU) - Available
memoryvalues: 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) -
8192 (8 vCPU) - Available
memoryvalues: 16 GB and 60 GB in 4 GB incrementsThis option requires Linux platform
1.4.0or later. -
16384 (16vCPU) - Available
memoryvalues: 32GB and 120 GB in 8 GB incrementsThis option requires Linux platform
1.4.0or later.
-
memory(impl Into<String>)/set_memory(Option<String>):
required: falseThe amount of memory (in MiB) used by the task. It can be expressed as an integer using MiB (for example ,
1024) or as a string using GB (for example,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) -
Between 16 GB and 60 GB in 4 GB increments - Available
cpuvalues: 8192 (8 vCPU)This option requires Linux platform
1.4.0or later. -
Between 32GB and 120 GB in 8 GB increments - Available
cpuvalues: 16384 (16 vCPU)This option requires Linux platform
1.4.0or later.
-
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseThe metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
pid_mode(PidMode)/set_pid_mode(Option<PidMode>):
required: falseThe process namespace to use for the containers in the task. The valid values are
hostortask. On Fargate for Linux containers, the only valid value istask. For example, monitoring sidecars might needpidModeto access information about other containers running in the same task.If
hostis specified, 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.If
taskis specified, all containers within the specified task share the same process namespace.If no value is specified, the default is a private namespace for each container. For more information, see PID settings in the Docker run reference.
If the
hostPID mode is used, there’s a heightened risk of undesired process namespace exposure. For more information, see Docker security.This parameter is not supported for Windows containers.
This parameter is only supported for tasks that are hosted on Fargate if the tasks are using platform version
1.4.0or later (Linux). This isn’t supported for Windows containers on Fargate.ipc_mode(IpcMode)/set_ipc_mode(Option<IpcMode>):
required: falseThe IPC resource namespace to use for the containers in the task. The valid values are
host,task, ornone. 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>):
required: falseThe configuration details for the App Mesh proxy.
For tasks hosted on Amazon EC2 instances, the container instances require at least version
1.26.0of the container agent and at least version1.26.0-1of theecs-initpackage to use 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(InferenceAccelerator)/set_inference_accelerators(Option<Vec::<InferenceAccelerator>>):
required: falseThe Elastic Inference accelerators to use for the containers in the task.
ephemeral_storage(EphemeralStorage)/set_ephemeral_storage(Option<EphemeralStorage>):
required: falseThe amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. For more information, see Using data volumes in tasks in the Amazon ECS Developer Guide.
For tasks using the Fargate launch type, the task requires the following platforms:
-
Linux platform version
1.4.0or later. -
Windows platform version
1.0.0or later.
-
runtime_platform(RuntimePlatform)/set_runtime_platform(Option<RuntimePlatform>):
required: falseThe operating system that your tasks definitions run on. A platform family is specified only for tasks using the Fargate launch type.
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>
source§impl Client
impl Client
sourcepub fn run_task(&self) -> RunTaskFluentBuilder
pub fn run_task(&self) -> RunTaskFluentBuilder
Constructs a fluent builder for the RunTask operation.
- The fluent builder is configurable:
capacity_provider_strategy(CapacityProviderStrategyItem)/set_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>):
required: falseThe capacity provider strategy to use for the task.
If a
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>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a cluster, the default cluster is assumed.
count(i32)/set_count(Option<i32>):
required: falseThe number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
enable_ecs_managed_tags(bool)/set_enable_ecs_managed_tags(Option<bool>):
required: falseSpecifies whether to use Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
enable_execute_command(bool)/set_enable_execute_command(Option<bool>):
required: falseDetermines whether to use the execute command functionality for the containers in this task. If
true, this enables execute command functionality on all containers in the task.If
true, then the task definition must have a task role, or you must provide one as an override.group(impl Into<String>)/set_group(Option<String>):
required: falseThe name of the task group to associate with the task. The default value is the family name of the task definition (for example,
family:my-family-name).launch_type(LaunchType)/set_launch_type(Option<LaunchType>):
required: falseThe infrastructure to run your standalone task on. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.
The
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 Developer Guide.
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>):
required: falseThe 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>):
required: falseA list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it should receive. You can override the default command for a container (that’s specified in the task definition or Docker image) with a
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(PlacementConstraint)/set_placement_constraints(Option<Vec::<PlacementConstraint>>):
required: falseAn array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task (including constraints in the task definition and those specified at runtime).
placement_strategy(PlacementStrategy)/set_placement_strategy(Option<Vec::<PlacementStrategy>>):
required: falseThe placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task.
platform_version(impl Into<String>)/set_platform_version(Option<String>):
required: falseThe platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn’t specified, the
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>):
required: falseSpecifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren’t propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the
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>):
required: falseThe 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>):
required: falseAn optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the
startedByparameter. You can then identify which tasks belong to that job by filtering the results of aListTaskscall with thestartedByvalue. Up to 128 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(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseThe metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
task_definition(impl Into<String>)/set_task_definition(Option<String>):
required: trueThe
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 principal’s permissions policy.When you specify a task definition, you must either specify a specific revision, or all revisions in the ARN.
To specify a specific revision, include the revision number in the ARN. For example, to specify revision 2, use
arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:2.To specify all revisions, use the wildcard () in the ARN. For example, to specify all revisions, use
arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:.For more information, see Policy Resources for Amazon ECS in the Amazon Elastic Container Service Developer Guide.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseAn identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see Ensuring idempotency.
volume_configurations(TaskVolumeConfiguration)/set_volume_configurations(Option<Vec::<TaskVolumeConfiguration>>):
required: falseThe details of the volume that was
configuredAtLaunch. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in in TaskManagedEBSVolumeConfiguration. Thenameof the volume must match thenamefrom the task definition.
- 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.
For information about how to address failures, see Service event messages and API failure reasons in the Amazon Elastic Container Service Developer Guide.
- On failure, responds with
SdkError<RunTaskError>
source§impl Client
impl Client
sourcepub fn start_task(&self) -> StartTaskFluentBuilder
pub fn start_task(&self) -> StartTaskFluentBuilder
Constructs a fluent builder for the StartTask operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not specify a cluster, the default cluster is assumed.
container_instances(impl Into<String>)/set_container_instances(Option<Vec::<String>>):
required: trueThe container instance IDs or full ARN entries for the container instances where you would like to place your task. You can specify up to 10 container instances.
enable_ecs_managed_tags(bool)/set_enable_ecs_managed_tags(Option<bool>):
required: falseSpecifies whether to use Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
enable_execute_command(bool)/set_enable_execute_command(Option<bool>):
required: falseWhether or not the execute command functionality is turned on for the task. If
true, this turns on the execute command functionality on all containers in the task.group(impl Into<String>)/set_group(Option<String>):
required: falseThe name of the task group to associate with the task. The default value is the family name of the task definition (for example, family:my-family-name).
network_configuration(NetworkConfiguration)/set_network_configuration(Option<NetworkConfiguration>):
required: falseThe VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the
awsvpcnetworking mode.overrides(TaskOverride)/set_overrides(Option<TaskOverride>):
required: falseA list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it receives. You can override the default command for a container (that’s specified in the task definition or Docker image) with a
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>):
required: falseSpecifies whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren’t propagated.
reference_id(impl Into<String>)/set_reference_id(Option<String>):
required: falseThe reference ID to use for the task.
started_by(impl Into<String>)/set_started_by(Option<String>):
required: falseAn optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the
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(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseThe metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
task_definition(impl Into<String>)/set_task_definition(Option<String>):
required: trueThe
familyandrevision(family:revision) or full ARN of the task definition to start. If arevisionisn’t specified, the latestACTIVErevision is used.volume_configurations(TaskVolumeConfiguration)/set_volume_configurations(Option<Vec::<TaskVolumeConfiguration>>):
required: falseThe details of the volume that was
configuredAtLaunch. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. Thenameof the volume must match thenamefrom the task definition.
- 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>
source§impl Client
impl Client
sourcepub fn stop_task(&self) -> StopTaskFluentBuilder
pub fn stop_task(&self) -> StopTaskFluentBuilder
Constructs a fluent builder for the StopTask operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the task to stop. If you do not specify a cluster, the default cluster is assumed.
task(impl Into<String>)/set_task(Option<String>):
required: trueThe task ID of the task to stop.
reason(impl Into<String>)/set_reason(Option<String>):
required: falseAn optional message specified when a task is stopped. For example, if you’re using a custom scheduler, you can use this parameter to specify the reason for stopping the task here, and the message appears in subsequent
DescribeTasksAPI operations on this task.
- On success, responds with
StopTaskOutputwith field(s):task(Option<Task>):The task that was stopped.
- On failure, responds with
SdkError<StopTaskError>
source§impl Client
impl Client
sourcepub fn submit_attachment_state_changes(
&self
) -> SubmitAttachmentStateChangesFluentBuilder
pub fn submit_attachment_state_changes( &self ) -> SubmitAttachmentStateChangesFluentBuilder
Constructs a fluent builder for the SubmitAttachmentStateChanges operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full ARN of the cluster that hosts the container instance the attachment belongs to.
attachments(AttachmentStateChange)/set_attachments(Option<Vec::<AttachmentStateChange>>):
required: trueAny attachments associated with the state change request.
- On success, responds with
SubmitAttachmentStateChangesOutputwith field(s):acknowledgment(Option<String>):Acknowledgement of the state change.
- On failure, responds with
SdkError<SubmitAttachmentStateChangesError>
source§impl Client
impl Client
sourcepub fn submit_container_state_change(
&self
) -> SubmitContainerStateChangeFluentBuilder
pub fn submit_container_state_change( &self ) -> SubmitContainerStateChangeFluentBuilder
Constructs a fluent builder for the SubmitContainerStateChange operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full ARN of the cluster that hosts the container.
task(impl Into<String>)/set_task(Option<String>):
required: falseThe task ID or full Amazon Resource Name (ARN) of the task that hosts the container.
container_name(impl Into<String>)/set_container_name(Option<String>):
required: falseThe name of the container.
runtime_id(impl Into<String>)/set_runtime_id(Option<String>):
required: falseThe ID of the Docker container.
status(impl Into<String>)/set_status(Option<String>):
required: falseThe status of the state change request.
exit_code(i32)/set_exit_code(Option<i32>):
required: falseThe exit code that’s returned for the state change request.
reason(impl Into<String>)/set_reason(Option<String>):
required: falseThe reason for the state change request.
network_bindings(NetworkBinding)/set_network_bindings(Option<Vec::<NetworkBinding>>):
required: falseThe network bindings of the container.
- On success, responds with
SubmitContainerStateChangeOutputwith field(s):acknowledgment(Option<String>):Acknowledgement of the state change.
- On failure, responds with
SdkError<SubmitContainerStateChangeError>
source§impl Client
impl Client
sourcepub fn submit_task_state_change(&self) -> SubmitTaskStateChangeFluentBuilder
pub fn submit_task_state_change(&self) -> SubmitTaskStateChangeFluentBuilder
Constructs a fluent builder for the SubmitTaskStateChange operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the task.
task(impl Into<String>)/set_task(Option<String>):
required: falseThe task ID or full ARN of the task in the state change request.
status(impl Into<String>)/set_status(Option<String>):
required: falseThe status of the state change request.
reason(impl Into<String>)/set_reason(Option<String>):
required: falseThe reason for the state change request.
containers(ContainerStateChange)/set_containers(Option<Vec::<ContainerStateChange>>):
required: falseAny containers that’s associated with the state change request.
attachments(AttachmentStateChange)/set_attachments(Option<Vec::<AttachmentStateChange>>):
required: falseAny attachments associated with the state change request.
managed_agents(ManagedAgentStateChange)/set_managed_agents(Option<Vec::<ManagedAgentStateChange>>):
required: falseThe details for the managed agent that’s associated with the task.
pull_started_at(DateTime)/set_pull_started_at(Option<DateTime>):
required: falseThe Unix timestamp for the time when the container image pull started.
pull_stopped_at(DateTime)/set_pull_stopped_at(Option<DateTime>):
required: falseThe Unix timestamp for the time when the container image pull completed.
execution_stopped_at(DateTime)/set_execution_stopped_at(Option<DateTime>):
required: falseThe Unix timestamp for the time when the task execution stopped.
- On success, responds with
SubmitTaskStateChangeOutputwith field(s):acknowledgment(Option<String>):Acknowledgement of the state change.
- On failure, responds with
SdkError<SubmitTaskStateChangeError>
source§impl Client
impl Client
sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource to add tags to. Currently, the supported resources are Amazon ECS capacity providers, tasks, services, task definitions, clusters, and container instances.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: trueThe tags to add to the resource. A tag is an array of key-value pairs.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource to delete tags from. Currently, the supported resources are Amazon ECS capacity providers, tasks, services, task definitions, clusters, and container instances.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueThe keys of the tags to be removed.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_capacity_provider(&self) -> UpdateCapacityProviderFluentBuilder
pub fn update_capacity_provider(&self) -> UpdateCapacityProviderFluentBuilder
Constructs a fluent builder for the UpdateCapacityProvider operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the capacity provider to update.
auto_scaling_group_provider(AutoScalingGroupProviderUpdate)/set_auto_scaling_group_provider(Option<AutoScalingGroupProviderUpdate>):
required: trueAn object that represent the parameters to update for the Auto Scaling group capacity provider.
- On success, responds with
UpdateCapacityProviderOutputwith field(s):capacity_provider(Option<CapacityProvider>):Details about the capacity provider.
- On failure, responds with
SdkError<UpdateCapacityProviderError>
source§impl Client
impl Client
sourcepub fn update_cluster(&self) -> UpdateClusterFluentBuilder
pub fn update_cluster(&self) -> UpdateClusterFluentBuilder
Constructs a fluent builder for the UpdateCluster operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: trueThe name of the cluster to modify the settings for.
settings(ClusterSetting)/set_settings(Option<Vec::<ClusterSetting>>):
required: falseThe cluster settings for your cluster.
configuration(ClusterConfiguration)/set_configuration(Option<ClusterConfiguration>):
required: falseThe execute command configuration for the cluster.
service_connect_defaults(ClusterServiceConnectDefaultsRequest)/set_service_connect_defaults(Option<ClusterServiceConnectDefaultsRequest>):
required: falseUse this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the
enabledparameter totruein theServiceConnectConfiguration. You can set the namespace of each service individually in theServiceConnectConfigurationto override this default parameter.Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
- On success, responds with
UpdateClusterOutputwith field(s):cluster(Option<Cluster>):Details about the cluster.
- On failure, responds with
SdkError<UpdateClusterError>
source§impl Client
impl Client
sourcepub fn update_cluster_settings(&self) -> UpdateClusterSettingsFluentBuilder
pub fn update_cluster_settings(&self) -> UpdateClusterSettingsFluentBuilder
Constructs a fluent builder for the UpdateClusterSettings operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: trueThe name of the cluster to modify the settings for.
settings(ClusterSetting)/set_settings(Option<Vec::<ClusterSetting>>):
required: trueThe setting to use by default for a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster. If this value is specified, it overrides the
containerInsightsvalue set withPutAccountSettingorPutAccountSettingDefault.Currently, if you delete an existing cluster that does not have Container Insights turned on, and then create a new cluster with the same name with Container Insights tuned on, Container Insights will not actually be turned on. If you want to preserve the same name for your existing cluster and turn on Container Insights, you must wait 7 days before you can re-create it.
- On success, responds with
UpdateClusterSettingsOutputwith field(s):cluster(Option<Cluster>):Details about the cluster
- On failure, responds with
SdkError<UpdateClusterSettingsError>
source§impl Client
impl Client
sourcepub fn update_container_agent(&self) -> UpdateContainerAgentFluentBuilder
pub fn update_container_agent(&self) -> UpdateContainerAgentFluentBuilder
Constructs a fluent builder for the UpdateContainerAgent operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that your container instance is running on. If you do not specify a cluster, the default cluster is assumed.
container_instance(impl Into<String>)/set_container_instance(Option<String>):
required: trueThe container instance ID or full ARN entries for the container instance where you would like to update the Amazon ECS container agent.
- On success, responds with
UpdateContainerAgentOutputwith field(s):container_instance(Option<ContainerInstance>):The container instance that the container agent was updated for.
- On failure, responds with
SdkError<UpdateContainerAgentError>
source§impl Client
impl Client
sourcepub fn update_container_instances_state(
&self
) -> UpdateContainerInstancesStateFluentBuilder
pub fn update_container_instances_state( &self ) -> UpdateContainerInstancesStateFluentBuilder
Constructs a fluent builder for the UpdateContainerInstancesState operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to update. If you do not specify a cluster, the default cluster is assumed.
container_instances(impl Into<String>)/set_container_instances(Option<Vec::<String>>):
required: trueA list of up to 10 container instance IDs or full ARN entries.
status(ContainerInstanceStatus)/set_status(Option<ContainerInstanceStatus>):
required: trueThe container instance state to update the container instance with. The only valid values for this action are
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>
source§impl Client
impl Client
sourcepub fn update_service(&self) -> UpdateServiceFluentBuilder
pub fn update_service(&self) -> UpdateServiceFluentBuilder
Constructs a fluent builder for the UpdateService operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: falseThe short name or full Amazon Resource Name (ARN) of the cluster that your service runs on. If you do not specify a cluster, the default cluster is assumed.
service(impl Into<String>)/set_service(Option<String>):
required: trueThe name of the service to update.
desired_count(i32)/set_desired_count(Option<i32>):
required: falseThe number of instantiations of the task to place and keep running in your service.
task_definition(impl Into<String>)/set_task_definition(Option<String>):
required: falseThe
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(CapacityProviderStrategyItem)/set_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>):
required: falseThe capacity provider strategy to update the service to use.
if the service uses the default capacity provider strategy for the cluster, the service can be updated to use one or more capacity providers as opposed to the default capacity provider strategy. However, when a service is using a capacity provider strategy that’s not the default capacity provider strategy, the service can’t be updated to use the cluster’s default capacity provider strategy.
A capacity provider strategy consists of one or more capacity providers along with the
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>):
required: falseOptional 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>):
required: falseAn object representing the network configuration for the service.
placement_constraints(PlacementConstraint)/set_placement_constraints(Option<Vec::<PlacementConstraint>>):
required: falseAn array of task placement constraint objects to update the service to use. If no value is specified, the existing placement constraints for the service will remain unchanged. If this value is specified, it will override any existing placement constraints defined for the service. To remove all existing placement constraints, specify an empty array.
You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
placement_strategy(PlacementStrategy)/set_placement_strategy(Option<Vec::<PlacementStrategy>>):
required: falseThe task placement strategy objects to update the service to use. If no value is specified, the existing placement strategy for the service will remain unchanged. If this value is specified, it will override the existing placement strategy defined for the service. To remove an existing placement strategy, specify an empty object.
You can specify a maximum of five strategy rules for each service.
platform_version(impl Into<String>)/set_platform_version(Option<String>):
required: falseThe platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If a platform version is not specified, the
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(Option<bool>):
required: falseDetermines whether to force a new deployment of the service. By default, deployments aren’t forced. You can use this option to start a new deployment with no service definition changes. For example, you can update a service’s tasks to use a newer Docker image with the same image/tag combination (
my_image:latest) or to roll Fargate tasks onto a newer platform version.health_check_grace_period_seconds(i32)/set_health_check_grace_period_seconds(Option<i32>):
required: falseThe period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing 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>):
required: falseIf
true, this enables execute command functionality on all task containers.If you do not want to override the value that was set when the service was created, you can set this to
nullwhen performing this action.enable_ecs_managed_tags(bool)/set_enable_ecs_managed_tags(Option<bool>):
required: falseDetermines whether to turn on Amazon ECS managed tags for the tasks in the service. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
Only tasks launched after the update will reflect the update. To update the tags on all tasks, set
forceNewDeploymenttotrue, so that Amazon ECS starts new tasks with the updated tags.load_balancers(LoadBalancer)/set_load_balancers(Option<Vec::<LoadBalancer>>):
required: falseA list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.
When you add, update, or remove a load balancer configuration, Amazon ECS starts new tasks with the updated Elastic Load Balancing configuration, and then stops the old tasks when the new tasks are running.
For services that use rolling updates, you can add, update, or remove Elastic Load Balancing target groups. You can update from a single target group to multiple target groups and from multiple target groups to a single target group.
For services that use blue/green deployments, you can update Elastic Load Balancing target groups by using
CreateDeploymentthrough CodeDeploy. Note that multiple target groups are not supported for blue/green deployments. For more information see Register multiple target groups with a service in the Amazon Elastic Container Service Developer Guide.For services that use the external deployment controller, you can add, update, or remove load balancers by using CreateTaskSet. Note that multiple target groups are not supported for external deployments. For more information see Register multiple target groups with a service in the Amazon Elastic Container Service Developer Guide.
You can remove existing
loadBalancersby passing an empty list.propagate_tags(PropagateTags)/set_propagate_tags(Option<PropagateTags>):
required: falseDetermines whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren’t propagated.
Only tasks launched after the update will reflect the update. To update the tags on all tasks, set
forceNewDeploymenttotrue, so that Amazon ECS starts new tasks with the updated tags.service_registries(ServiceRegistry)/set_service_registries(Option<Vec::<ServiceRegistry>>):
required: falseThe details for the service discovery registries to assign to this service. For more information, see Service Discovery.
When you add, update, or remove the service registries configuration, Amazon ECS starts new tasks with the updated service registries configuration, and then stops the old tasks when the new tasks are running.
You can remove existing
serviceRegistriesby passing an empty list.service_connect_configuration(ServiceConnectConfiguration)/set_service_connect_configuration(Option<ServiceConnectConfiguration>):
required: falseThe configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
volume_configurations(ServiceVolumeConfiguration)/set_volume_configurations(Option<Vec::<ServiceVolumeConfiguration>>):
required: falseThe details of the volume that was
configuredAtLaunch. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in ServiceManagedEBSVolumeConfiguration. Thenameof the volume must match thenamefrom the task definition. If set to null, no new deployment is triggered. Otherwise, if this configuration differs from the existing one, it triggers a new deployment.
- 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>
source§impl Client
impl Client
sourcepub fn update_service_primary_task_set(
&self
) -> UpdateServicePrimaryTaskSetFluentBuilder
pub fn update_service_primary_task_set( &self ) -> UpdateServicePrimaryTaskSetFluentBuilder
Constructs a fluent builder for the UpdateServicePrimaryTaskSet operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set exists in.
service(impl Into<String>)/set_service(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the service that the task set exists in.
primary_task_set(impl Into<String>)/set_primary_task_set(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the task set to set as the primary task set in the deployment.
- On success, responds with
UpdateServicePrimaryTaskSetOutputwith field(s):task_set(Option<TaskSet>):The details about the task set.
- On failure, responds with
SdkError<UpdateServicePrimaryTaskSetError>
source§impl Client
impl Client
sourcepub fn update_task_protection(&self) -> UpdateTaskProtectionFluentBuilder
pub fn update_task_protection(&self) -> UpdateTaskProtectionFluentBuilder
Constructs a fluent builder for the UpdateTaskProtection operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.
tasks(impl Into<String>)/set_tasks(Option<Vec::<String>>):
required: trueA list of up to 10 task IDs or full ARN entries.
protection_enabled(bool)/set_protection_enabled(Option<bool>):
required: trueSpecify
trueto mark a task for protection andfalseto unset protection, making it eligible for termination.expires_in_minutes(i32)/set_expires_in_minutes(Option<i32>):
required: falseIf you set
protectionEnabledtotrue, you can specify the duration for task protection in minutes. You can specify a value from 1 minute to up to 2,880 minutes (48 hours). During this time, your task will not be terminated by scale-in events from Service Auto Scaling or deployments. After this time period lapses,protectionEnabledwill be reset tofalse.If you don’t specify the time, then the task is automatically protected for 120 minutes (2 hours).
- On success, responds with
UpdateTaskProtectionOutputwith field(s):protected_tasks(Option<Vec::<ProtectedTask>>):A list of tasks with the following information.
-
taskArn: The task ARN. -
protectionEnabled: The protection status of the task. If scale-in protection is turned on for a task, the value istrue. Otherwise, it isfalse. -
expirationDate: The epoch time when protection for the task will expire.
-
failures(Option<Vec::<Failure>>):Any failures associated with the call.
- On failure, responds with
SdkError<UpdateTaskProtectionError>
source§impl Client
impl Client
sourcepub fn update_task_set(&self) -> UpdateTaskSetFluentBuilder
pub fn update_task_set(&self) -> UpdateTaskSetFluentBuilder
Constructs a fluent builder for the UpdateTaskSet operation.
- The fluent builder is configurable:
cluster(impl Into<String>)/set_cluster(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set is found in.
service(impl Into<String>)/set_service(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the service that the task set is found in.
task_set(impl Into<String>)/set_task_set(Option<String>):
required: trueThe short name or full Amazon Resource Name (ARN) of the task set to update.
scale(Scale)/set_scale(Option<Scale>):
required: trueA floating-point percentage of the desired number of tasks to place and keep running in the task set.
- On success, responds with
UpdateTaskSetOutputwith field(s):task_set(Option<TaskSet>):Details about the task set.
- On failure, responds with
SdkError<UpdateTaskSetError>
source§impl Client
impl Client
sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.