aws_sdk_ecs/client/
create_capacity_provider.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 [`CreateCapacityProvider`](crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`name(impl Into<String>)`](crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder::set_name):<br>required: **true**<br><p>The name of the capacity provider. Up to 255 characters are allowed. They include letters (both upper and lowercase letters), numbers, underscores (_), and hyphens (-). The name can't be prefixed with "<code>aws</code>", "<code>ecs</code>", or "<code>fargate</code>".</p><br>
7    ///   - [`cluster(impl Into<String>)`](crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder::cluster) / [`set_cluster(Option<String>)`](crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder::set_cluster):<br>required: **false**<br><p>The name of the cluster to associate with the capacity provider. When you create a capacity provider with Amazon ECS Managed Instances, it becomes available only within the specified cluster.</p><br>
8    ///   - [`auto_scaling_group_provider(AutoScalingGroupProvider)`](crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder::auto_scaling_group_provider) / [`set_auto_scaling_group_provider(Option<AutoScalingGroupProvider>)`](crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder::set_auto_scaling_group_provider):<br>required: **false**<br><p>The details of the Auto Scaling group for the capacity provider.</p><br>
9    ///   - [`managed_instances_provider(CreateManagedInstancesProviderConfiguration)`](crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder::managed_instances_provider) / [`set_managed_instances_provider(Option<CreateManagedInstancesProviderConfiguration>)`](crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder::set_managed_instances_provider):<br>required: **false**<br><p>The configuration for the Amazon ECS Managed Instances provider. This configuration specifies how Amazon ECS manages Amazon EC2 instances on your behalf, including the infrastructure role, instance launch template, and tag propagation settings.</p><br>
10    ///   - [`tags(Tag)`](crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder::set_tags):<br>required: **false**<br><p>The metadata that you apply to the capacity provider to categorize and organize them more conveniently. Each tag consists of a key and an optional value. You define both of them.</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>
11    /// - On success, responds with [`CreateCapacityProviderOutput`](crate::operation::create_capacity_provider::CreateCapacityProviderOutput) with field(s):
12    ///   - [`capacity_provider(Option<CapacityProvider>)`](crate::operation::create_capacity_provider::CreateCapacityProviderOutput::capacity_provider): <p>The full description of the new capacity provider.</p>
13    /// - On failure, responds with [`SdkError<CreateCapacityProviderError>`](crate::operation::create_capacity_provider::CreateCapacityProviderError)
14    pub fn create_capacity_provider(&self) -> crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder {
15        crate::operation::create_capacity_provider::builders::CreateCapacityProviderFluentBuilder::new(self.handle.clone())
16    }
17}