Skip to main content

aws_sdk_ecs/types/
_capacity_provider.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The details for a capacity provider.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CapacityProvider {
7    /// <p>The Amazon Resource Name (ARN) that identifies the capacity provider.</p>
8    pub capacity_provider_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the capacity provider.</p>
10    pub name: ::std::option::Option<::std::string::String>,
11    /// <p>The cluster that this capacity provider is associated with. Managed instances capacity providers are cluster-scoped, meaning they can only be used within their associated cluster.</p>
12    /// <p>This is required for Managed instances.</p>
13    pub cluster: ::std::option::Option<::std::string::String>,
14    /// <p>The current status of the capacity provider. Only capacity providers in an <code>ACTIVE</code> state can be used in a cluster. When a capacity provider is successfully deleted, it has an <code>INACTIVE</code> status.</p>
15    pub status: ::std::option::Option<crate::types::CapacityProviderStatus>,
16    /// <p>The Auto Scaling group settings for the capacity provider.</p>
17    pub auto_scaling_group_provider: ::std::option::Option<crate::types::AutoScalingGroupProvider>,
18    /// <p>The configuration for the Amazon ECS Managed Instances provider. This includes the infrastructure role, the launch template configuration, and tag propagation settings.</p>
19    pub managed_instances_provider: ::std::option::Option<crate::types::ManagedInstancesProvider>,
20    /// <p>The update status of the capacity provider. The following are the possible states that is returned.</p>
21    /// <dl>
22    /// <dt>
23    /// DELETE_IN_PROGRESS
24    /// </dt>
25    /// <dd>
26    /// <p>The capacity provider is in the process of being deleted.</p>
27    /// </dd>
28    /// <dt>
29    /// DELETE_COMPLETE
30    /// </dt>
31    /// <dd>
32    /// <p>The capacity provider was successfully deleted and has an <code>INACTIVE</code> status.</p>
33    /// </dd>
34    /// <dt>
35    /// DELETE_FAILED
36    /// </dt>
37    /// <dd>
38    /// <p>The capacity provider can't be deleted. The update status reason provides further details about why the delete failed.</p>
39    /// </dd>
40    /// </dl>
41    pub update_status: ::std::option::Option<crate::types::CapacityProviderUpdateStatus>,
42    /// <p>The update status reason. This provides further details about the update status for the capacity provider.</p>
43    pub update_status_reason: ::std::option::Option<::std::string::String>,
44    /// <p>The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.</p>
45    /// <p>The following basic restrictions apply to tags:</p>
46    /// <ul>
47    /// <li>
48    /// <p>Maximum number of tags per resource - 50</p></li>
49    /// <li>
50    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
51    /// <li>
52    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
53    /// <li>
54    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
55    /// <li>
56    /// <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>
57    /// <li>
58    /// <p>Tag keys and values are case-sensitive.</p></li>
59    /// <li>
60    /// <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>
61    /// </ul>
62    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
63    /// <p>The type of capacity provider. For Amazon ECS Managed Instances, this value is <code>MANAGED_INSTANCES</code>, indicating that Amazon ECS manages the underlying Amazon EC2 instances on your behalf.</p>
64    pub r#type: ::std::option::Option<crate::types::CapacityProviderType>,
65}
66impl CapacityProvider {
67    /// <p>The Amazon Resource Name (ARN) that identifies the capacity provider.</p>
68    pub fn capacity_provider_arn(&self) -> ::std::option::Option<&str> {
69        self.capacity_provider_arn.as_deref()
70    }
71    /// <p>The name of the capacity provider.</p>
72    pub fn name(&self) -> ::std::option::Option<&str> {
73        self.name.as_deref()
74    }
75    /// <p>The cluster that this capacity provider is associated with. Managed instances capacity providers are cluster-scoped, meaning they can only be used within their associated cluster.</p>
76    /// <p>This is required for Managed instances.</p>
77    pub fn cluster(&self) -> ::std::option::Option<&str> {
78        self.cluster.as_deref()
79    }
80    /// <p>The current status of the capacity provider. Only capacity providers in an <code>ACTIVE</code> state can be used in a cluster. When a capacity provider is successfully deleted, it has an <code>INACTIVE</code> status.</p>
81    pub fn status(&self) -> ::std::option::Option<&crate::types::CapacityProviderStatus> {
82        self.status.as_ref()
83    }
84    /// <p>The Auto Scaling group settings for the capacity provider.</p>
85    pub fn auto_scaling_group_provider(&self) -> ::std::option::Option<&crate::types::AutoScalingGroupProvider> {
86        self.auto_scaling_group_provider.as_ref()
87    }
88    /// <p>The configuration for the Amazon ECS Managed Instances provider. This includes the infrastructure role, the launch template configuration, and tag propagation settings.</p>
89    pub fn managed_instances_provider(&self) -> ::std::option::Option<&crate::types::ManagedInstancesProvider> {
90        self.managed_instances_provider.as_ref()
91    }
92    /// <p>The update status of the capacity provider. The following are the possible states that is returned.</p>
93    /// <dl>
94    /// <dt>
95    /// DELETE_IN_PROGRESS
96    /// </dt>
97    /// <dd>
98    /// <p>The capacity provider is in the process of being deleted.</p>
99    /// </dd>
100    /// <dt>
101    /// DELETE_COMPLETE
102    /// </dt>
103    /// <dd>
104    /// <p>The capacity provider was successfully deleted and has an <code>INACTIVE</code> status.</p>
105    /// </dd>
106    /// <dt>
107    /// DELETE_FAILED
108    /// </dt>
109    /// <dd>
110    /// <p>The capacity provider can't be deleted. The update status reason provides further details about why the delete failed.</p>
111    /// </dd>
112    /// </dl>
113    pub fn update_status(&self) -> ::std::option::Option<&crate::types::CapacityProviderUpdateStatus> {
114        self.update_status.as_ref()
115    }
116    /// <p>The update status reason. This provides further details about the update status for the capacity provider.</p>
117    pub fn update_status_reason(&self) -> ::std::option::Option<&str> {
118        self.update_status_reason.as_deref()
119    }
120    /// <p>The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.</p>
121    /// <p>The following basic restrictions apply to tags:</p>
122    /// <ul>
123    /// <li>
124    /// <p>Maximum number of tags per resource - 50</p></li>
125    /// <li>
126    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
127    /// <li>
128    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
129    /// <li>
130    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
131    /// <li>
132    /// <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>
133    /// <li>
134    /// <p>Tag keys and values are case-sensitive.</p></li>
135    /// <li>
136    /// <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>
137    /// </ul>
138    ///
139    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
140    pub fn tags(&self) -> &[crate::types::Tag] {
141        self.tags.as_deref().unwrap_or_default()
142    }
143    /// <p>The type of capacity provider. For Amazon ECS Managed Instances, this value is <code>MANAGED_INSTANCES</code>, indicating that Amazon ECS manages the underlying Amazon EC2 instances on your behalf.</p>
144    pub fn r#type(&self) -> ::std::option::Option<&crate::types::CapacityProviderType> {
145        self.r#type.as_ref()
146    }
147}
148impl CapacityProvider {
149    /// Creates a new builder-style object to manufacture [`CapacityProvider`](crate::types::CapacityProvider).
150    pub fn builder() -> crate::types::builders::CapacityProviderBuilder {
151        crate::types::builders::CapacityProviderBuilder::default()
152    }
153}
154
155/// A builder for [`CapacityProvider`](crate::types::CapacityProvider).
156#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
157#[non_exhaustive]
158pub struct CapacityProviderBuilder {
159    pub(crate) capacity_provider_arn: ::std::option::Option<::std::string::String>,
160    pub(crate) name: ::std::option::Option<::std::string::String>,
161    pub(crate) cluster: ::std::option::Option<::std::string::String>,
162    pub(crate) status: ::std::option::Option<crate::types::CapacityProviderStatus>,
163    pub(crate) auto_scaling_group_provider: ::std::option::Option<crate::types::AutoScalingGroupProvider>,
164    pub(crate) managed_instances_provider: ::std::option::Option<crate::types::ManagedInstancesProvider>,
165    pub(crate) update_status: ::std::option::Option<crate::types::CapacityProviderUpdateStatus>,
166    pub(crate) update_status_reason: ::std::option::Option<::std::string::String>,
167    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
168    pub(crate) r#type: ::std::option::Option<crate::types::CapacityProviderType>,
169}
170impl CapacityProviderBuilder {
171    /// <p>The Amazon Resource Name (ARN) that identifies the capacity provider.</p>
172    pub fn capacity_provider_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173        self.capacity_provider_arn = ::std::option::Option::Some(input.into());
174        self
175    }
176    /// <p>The Amazon Resource Name (ARN) that identifies the capacity provider.</p>
177    pub fn set_capacity_provider_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178        self.capacity_provider_arn = input;
179        self
180    }
181    /// <p>The Amazon Resource Name (ARN) that identifies the capacity provider.</p>
182    pub fn get_capacity_provider_arn(&self) -> &::std::option::Option<::std::string::String> {
183        &self.capacity_provider_arn
184    }
185    /// <p>The name of the capacity provider.</p>
186    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.name = ::std::option::Option::Some(input.into());
188        self
189    }
190    /// <p>The name of the capacity provider.</p>
191    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.name = input;
193        self
194    }
195    /// <p>The name of the capacity provider.</p>
196    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
197        &self.name
198    }
199    /// <p>The cluster that this capacity provider is associated with. Managed instances capacity providers are cluster-scoped, meaning they can only be used within their associated cluster.</p>
200    /// <p>This is required for Managed instances.</p>
201    pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202        self.cluster = ::std::option::Option::Some(input.into());
203        self
204    }
205    /// <p>The cluster that this capacity provider is associated with. Managed instances capacity providers are cluster-scoped, meaning they can only be used within their associated cluster.</p>
206    /// <p>This is required for Managed instances.</p>
207    pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208        self.cluster = input;
209        self
210    }
211    /// <p>The cluster that this capacity provider is associated with. Managed instances capacity providers are cluster-scoped, meaning they can only be used within their associated cluster.</p>
212    /// <p>This is required for Managed instances.</p>
213    pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
214        &self.cluster
215    }
216    /// <p>The current status of the capacity provider. Only capacity providers in an <code>ACTIVE</code> state can be used in a cluster. When a capacity provider is successfully deleted, it has an <code>INACTIVE</code> status.</p>
217    pub fn status(mut self, input: crate::types::CapacityProviderStatus) -> Self {
218        self.status = ::std::option::Option::Some(input);
219        self
220    }
221    /// <p>The current status of the capacity provider. Only capacity providers in an <code>ACTIVE</code> state can be used in a cluster. When a capacity provider is successfully deleted, it has an <code>INACTIVE</code> status.</p>
222    pub fn set_status(mut self, input: ::std::option::Option<crate::types::CapacityProviderStatus>) -> Self {
223        self.status = input;
224        self
225    }
226    /// <p>The current status of the capacity provider. Only capacity providers in an <code>ACTIVE</code> state can be used in a cluster. When a capacity provider is successfully deleted, it has an <code>INACTIVE</code> status.</p>
227    pub fn get_status(&self) -> &::std::option::Option<crate::types::CapacityProviderStatus> {
228        &self.status
229    }
230    /// <p>The Auto Scaling group settings for the capacity provider.</p>
231    pub fn auto_scaling_group_provider(mut self, input: crate::types::AutoScalingGroupProvider) -> Self {
232        self.auto_scaling_group_provider = ::std::option::Option::Some(input);
233        self
234    }
235    /// <p>The Auto Scaling group settings for the capacity provider.</p>
236    pub fn set_auto_scaling_group_provider(mut self, input: ::std::option::Option<crate::types::AutoScalingGroupProvider>) -> Self {
237        self.auto_scaling_group_provider = input;
238        self
239    }
240    /// <p>The Auto Scaling group settings for the capacity provider.</p>
241    pub fn get_auto_scaling_group_provider(&self) -> &::std::option::Option<crate::types::AutoScalingGroupProvider> {
242        &self.auto_scaling_group_provider
243    }
244    /// <p>The configuration for the Amazon ECS Managed Instances provider. This includes the infrastructure role, the launch template configuration, and tag propagation settings.</p>
245    pub fn managed_instances_provider(mut self, input: crate::types::ManagedInstancesProvider) -> Self {
246        self.managed_instances_provider = ::std::option::Option::Some(input);
247        self
248    }
249    /// <p>The configuration for the Amazon ECS Managed Instances provider. This includes the infrastructure role, the launch template configuration, and tag propagation settings.</p>
250    pub fn set_managed_instances_provider(mut self, input: ::std::option::Option<crate::types::ManagedInstancesProvider>) -> Self {
251        self.managed_instances_provider = input;
252        self
253    }
254    /// <p>The configuration for the Amazon ECS Managed Instances provider. This includes the infrastructure role, the launch template configuration, and tag propagation settings.</p>
255    pub fn get_managed_instances_provider(&self) -> &::std::option::Option<crate::types::ManagedInstancesProvider> {
256        &self.managed_instances_provider
257    }
258    /// <p>The update status of the capacity provider. The following are the possible states that is returned.</p>
259    /// <dl>
260    /// <dt>
261    /// DELETE_IN_PROGRESS
262    /// </dt>
263    /// <dd>
264    /// <p>The capacity provider is in the process of being deleted.</p>
265    /// </dd>
266    /// <dt>
267    /// DELETE_COMPLETE
268    /// </dt>
269    /// <dd>
270    /// <p>The capacity provider was successfully deleted and has an <code>INACTIVE</code> status.</p>
271    /// </dd>
272    /// <dt>
273    /// DELETE_FAILED
274    /// </dt>
275    /// <dd>
276    /// <p>The capacity provider can't be deleted. The update status reason provides further details about why the delete failed.</p>
277    /// </dd>
278    /// </dl>
279    pub fn update_status(mut self, input: crate::types::CapacityProviderUpdateStatus) -> Self {
280        self.update_status = ::std::option::Option::Some(input);
281        self
282    }
283    /// <p>The update status of the capacity provider. The following are the possible states that is returned.</p>
284    /// <dl>
285    /// <dt>
286    /// DELETE_IN_PROGRESS
287    /// </dt>
288    /// <dd>
289    /// <p>The capacity provider is in the process of being deleted.</p>
290    /// </dd>
291    /// <dt>
292    /// DELETE_COMPLETE
293    /// </dt>
294    /// <dd>
295    /// <p>The capacity provider was successfully deleted and has an <code>INACTIVE</code> status.</p>
296    /// </dd>
297    /// <dt>
298    /// DELETE_FAILED
299    /// </dt>
300    /// <dd>
301    /// <p>The capacity provider can't be deleted. The update status reason provides further details about why the delete failed.</p>
302    /// </dd>
303    /// </dl>
304    pub fn set_update_status(mut self, input: ::std::option::Option<crate::types::CapacityProviderUpdateStatus>) -> Self {
305        self.update_status = input;
306        self
307    }
308    /// <p>The update status of the capacity provider. The following are the possible states that is returned.</p>
309    /// <dl>
310    /// <dt>
311    /// DELETE_IN_PROGRESS
312    /// </dt>
313    /// <dd>
314    /// <p>The capacity provider is in the process of being deleted.</p>
315    /// </dd>
316    /// <dt>
317    /// DELETE_COMPLETE
318    /// </dt>
319    /// <dd>
320    /// <p>The capacity provider was successfully deleted and has an <code>INACTIVE</code> status.</p>
321    /// </dd>
322    /// <dt>
323    /// DELETE_FAILED
324    /// </dt>
325    /// <dd>
326    /// <p>The capacity provider can't be deleted. The update status reason provides further details about why the delete failed.</p>
327    /// </dd>
328    /// </dl>
329    pub fn get_update_status(&self) -> &::std::option::Option<crate::types::CapacityProviderUpdateStatus> {
330        &self.update_status
331    }
332    /// <p>The update status reason. This provides further details about the update status for the capacity provider.</p>
333    pub fn update_status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
334        self.update_status_reason = ::std::option::Option::Some(input.into());
335        self
336    }
337    /// <p>The update status reason. This provides further details about the update status for the capacity provider.</p>
338    pub fn set_update_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
339        self.update_status_reason = input;
340        self
341    }
342    /// <p>The update status reason. This provides further details about the update status for the capacity provider.</p>
343    pub fn get_update_status_reason(&self) -> &::std::option::Option<::std::string::String> {
344        &self.update_status_reason
345    }
346    /// Appends an item to `tags`.
347    ///
348    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
349    ///
350    /// <p>The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.</p>
351    /// <p>The following basic restrictions apply to tags:</p>
352    /// <ul>
353    /// <li>
354    /// <p>Maximum number of tags per resource - 50</p></li>
355    /// <li>
356    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
357    /// <li>
358    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
359    /// <li>
360    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
361    /// <li>
362    /// <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>
363    /// <li>
364    /// <p>Tag keys and values are case-sensitive.</p></li>
365    /// <li>
366    /// <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>
367    /// </ul>
368    pub fn tags(mut self, input: crate::types::Tag) -> Self {
369        let mut v = self.tags.unwrap_or_default();
370        v.push(input);
371        self.tags = ::std::option::Option::Some(v);
372        self
373    }
374    /// <p>The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.</p>
375    /// <p>The following basic restrictions apply to tags:</p>
376    /// <ul>
377    /// <li>
378    /// <p>Maximum number of tags per resource - 50</p></li>
379    /// <li>
380    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
381    /// <li>
382    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
383    /// <li>
384    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
385    /// <li>
386    /// <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>
387    /// <li>
388    /// <p>Tag keys and values are case-sensitive.</p></li>
389    /// <li>
390    /// <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>
391    /// </ul>
392    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
393        self.tags = input;
394        self
395    }
396    /// <p>The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.</p>
397    /// <p>The following basic restrictions apply to tags:</p>
398    /// <ul>
399    /// <li>
400    /// <p>Maximum number of tags per resource - 50</p></li>
401    /// <li>
402    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
403    /// <li>
404    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
405    /// <li>
406    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
407    /// <li>
408    /// <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>
409    /// <li>
410    /// <p>Tag keys and values are case-sensitive.</p></li>
411    /// <li>
412    /// <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>
413    /// </ul>
414    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
415        &self.tags
416    }
417    /// <p>The type of capacity provider. For Amazon ECS Managed Instances, this value is <code>MANAGED_INSTANCES</code>, indicating that Amazon ECS manages the underlying Amazon EC2 instances on your behalf.</p>
418    pub fn r#type(mut self, input: crate::types::CapacityProviderType) -> Self {
419        self.r#type = ::std::option::Option::Some(input);
420        self
421    }
422    /// <p>The type of capacity provider. For Amazon ECS Managed Instances, this value is <code>MANAGED_INSTANCES</code>, indicating that Amazon ECS manages the underlying Amazon EC2 instances on your behalf.</p>
423    pub fn set_type(mut self, input: ::std::option::Option<crate::types::CapacityProviderType>) -> Self {
424        self.r#type = input;
425        self
426    }
427    /// <p>The type of capacity provider. For Amazon ECS Managed Instances, this value is <code>MANAGED_INSTANCES</code>, indicating that Amazon ECS manages the underlying Amazon EC2 instances on your behalf.</p>
428    pub fn get_type(&self) -> &::std::option::Option<crate::types::CapacityProviderType> {
429        &self.r#type
430    }
431    /// Consumes the builder and constructs a [`CapacityProvider`](crate::types::CapacityProvider).
432    pub fn build(self) -> crate::types::CapacityProvider {
433        crate::types::CapacityProvider {
434            capacity_provider_arn: self.capacity_provider_arn,
435            name: self.name,
436            cluster: self.cluster,
437            status: self.status,
438            auto_scaling_group_provider: self.auto_scaling_group_provider,
439            managed_instances_provider: self.managed_instances_provider,
440            update_status: self.update_status,
441            update_status_reason: self.update_status_reason,
442            tags: self.tags,
443            r#type: self.r#type,
444        }
445    }
446}