aws_sdk_ecs/client/
create_task_set.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateTaskSet`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`service(impl Into<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::service) / [`set_service(Option<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_service):<br>required: **true**<br><p>The short name or full Amazon Resource Name (ARN) of the service to create the task set in.</p><br>
7    ///   - [`cluster(impl Into<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::cluster) / [`set_cluster(Option<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_cluster):<br>required: **true**<br><p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.</p><br>
8    ///   - [`external_id(impl Into<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::external_id) / [`set_external_id(Option<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_external_id):<br>required: **false**<br><p>An optional non-unique tag that identifies this task set in external systems. If the task set is associated with a service discovery registry, the tasks in this task set will have the <code>ECS_TASK_SET_EXTERNAL_ID</code> Cloud Map attribute set to the provided value.</p><br>
9    ///   - [`task_definition(impl Into<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::task_definition) / [`set_task_definition(Option<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_task_definition):<br>required: **true**<br><p>The task definition for the tasks in the task set to use. If a revision isn't specified, the latest <code>ACTIVE</code> revision is used.</p><br>
10    ///   - [`network_configuration(NetworkConfiguration)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::network_configuration) / [`set_network_configuration(Option<NetworkConfiguration>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_network_configuration):<br>required: **false**<br><p>An object representing the network configuration for a task set.</p><br>
11    ///   - [`load_balancers(LoadBalancer)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::load_balancers) / [`set_load_balancers(Option<Vec::<LoadBalancer>>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_load_balancers):<br>required: **false**<br><p>A load balancer object representing the load balancer to use with the task set. The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.</p><br>
12    ///   - [`service_registries(ServiceRegistry)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::service_registries) / [`set_service_registries(Option<Vec::<ServiceRegistry>>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_service_registries):<br>required: **false**<br><p>The details of the service discovery registries to assign to this task set. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service discovery</a>.</p><br>
13    ///   - [`launch_type(LaunchType)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::launch_type) / [`set_launch_type(Option<LaunchType>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_launch_type):<br>required: **false**<br><p>The launch type that new tasks in the task set uses. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS launch types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>If a <code>launchType</code> is specified, the <code>capacityProviderStrategy</code> parameter must be omitted.</p><br>
14    ///   - [`capacity_provider_strategy(CapacityProviderStrategyItem)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::capacity_provider_strategy) / [`set_capacity_provider_strategy(Option<Vec::<CapacityProviderStrategyItem>>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_capacity_provider_strategy):<br>required: **false**<br><p>The capacity provider strategy to use for the task set.</p> <p>A capacity provider strategy consists of one or more capacity providers along with the <code>base</code> and <code>weight</code> to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a> API is used to associate a capacity provider with a cluster. Only capacity providers with an <code>ACTIVE</code> or <code>UPDATING</code> status can be used.</p> <p>If a <code>capacityProviderStrategy</code> is specified, the <code>launchType</code> parameter must be omitted. If no <code>capacityProviderStrategy</code> or <code>launchType</code> is specified, the <code>defaultCapacityProviderStrategy</code> for the cluster is used.</p> <p>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 <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateCapacityProviderProvider.html">CreateCapacityProviderProvider</a>API operation.</p> <p>To use a Fargate capacity provider, specify either the <code>FARGATE</code> or <code>FARGATE_SPOT</code> capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.</p> <p>The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a> API operation is used to update the list of available capacity providers for a cluster after the cluster is created.</p><br>
15    ///   - [`platform_version(impl Into<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::platform_version) / [`set_platform_version(Option<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_platform_version):<br>required: **false**<br><p>The platform version that the tasks in the task set uses. A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the <code>LATEST</code> platform version is used.</p><br>
16    ///   - [`scale(Scale)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::scale) / [`set_scale(Option<Scale>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_scale):<br>required: **false**<br><p>A floating-point percentage of the desired number of tasks to place and keep running in the task set.</p><br>
17    ///   - [`client_token(impl Into<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_client_token):<br>required: **false**<br><p>An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed.</p><br>
18    ///   - [`tags(Tag)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::set_tags):<br>required: **false**<br><p>The metadata that you apply to the task set to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. When a service is deleted, the tags are deleted.</p> <p>The following basic restrictions apply to tags:</p> <ul>  <li>   <p>Maximum number of tags per resource - 50</p></li>  <li>   <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>  <li>   <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>  <li>   <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>  <li>   <p>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: + - = . _ : / @.</p></li>  <li>   <p>Tag keys and values are case-sensitive.</p></li>  <li>   <p>Do not use <code>aws:</code>, <code>AWS:</code>, 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.</p></li> </ul><br>
19    /// - On success, responds with [`CreateTaskSetOutput`](crate::operation::create_task_set::CreateTaskSetOutput) with field(s):
20    ///   - [`task_set(Option<TaskSet>)`](crate::operation::create_task_set::CreateTaskSetOutput::task_set): <p>Information about a set of Amazon ECS tasks in either an CodeDeploy or an <code>EXTERNAL</code> deployment. A task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic.</p>
21    /// - On failure, responds with [`SdkError<CreateTaskSetError>`](crate::operation::create_task_set::CreateTaskSetError)
22    pub fn create_task_set(&self) -> crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder {
23        crate::operation::create_task_set::builders::CreateTaskSetFluentBuilder::new(self.handle.clone())
24    }
25}