aws_sdk_outposts/client/get_capacity_task.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 [`GetCapacityTask`](crate::operation::get_capacity_task::builders::GetCapacityTaskFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`capacity_task_id(impl Into<String>)`](crate::operation::get_capacity_task::builders::GetCapacityTaskFluentBuilder::capacity_task_id) / [`set_capacity_task_id(Option<String>)`](crate::operation::get_capacity_task::builders::GetCapacityTaskFluentBuilder::set_capacity_task_id):<br>required: **true**<br><p>ID of the capacity task.</p><br>
7 /// - [`outpost_identifier(impl Into<String>)`](crate::operation::get_capacity_task::builders::GetCapacityTaskFluentBuilder::outpost_identifier) / [`set_outpost_identifier(Option<String>)`](crate::operation::get_capacity_task::builders::GetCapacityTaskFluentBuilder::set_outpost_identifier):<br>required: **true**<br><p>ID or ARN of the Outpost associated with the specified capacity task.</p><br>
8 /// - On success, responds with [`GetCapacityTaskOutput`](crate::operation::get_capacity_task::GetCapacityTaskOutput) with field(s):
9 /// - [`capacity_task_id(Option<String>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::capacity_task_id): <p>ID of the capacity task.</p>
10 /// - [`outpost_id(Option<String>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::outpost_id): <p>ID of the Outpost associated with the specified capacity task.</p>
11 /// - [`order_id(Option<String>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::order_id): <p>ID of the Amazon Web Services Outposts order associated with the specified capacity task.</p>
12 /// - [`asset_id(Option<String>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::asset_id): <p>The ID of the Outpost asset. An Outpost asset can be a single server within an Outposts rack or an Outposts server configuration.</p>
13 /// - [`requested_instance_pools(Option<Vec::<InstanceTypeCapacity>>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::requested_instance_pools): <p>List of instance pools requested in the capacity task.</p>
14 /// - [`instances_to_exclude(Option<InstancesToExclude>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::instances_to_exclude): <p>Instances that the user specified they cannot stop in order to free up the capacity needed to run the capacity task.</p>
15 /// - [`dry_run(bool)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::dry_run): <p>Performs a dry run to determine if you are above or below instance capacity.</p>
16 /// - [`capacity_task_status(Option<CapacityTaskStatus>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::capacity_task_status): <p>Status of the capacity task.</p> <p>A capacity task can have one of the following statuses:</p> <ul> <li> <p><code>REQUESTED</code> - The capacity task was created and is awaiting the next step by Amazon Web Services Outposts.</p></li> <li> <p><code>IN_PROGRESS</code> - The capacity task is running and cannot be cancelled.</p></li> <li> <p><code>FAILED</code> - The capacity task could not be completed.</p></li> <li> <p><code>COMPLETED</code> - The capacity task has completed successfully.</p></li> <li> <p><code>WAITING_FOR_EVACUATION</code> - The capacity task requires capacity to run. You must stop the recommended EC2 running instances to free up capacity for the task to run.</p></li> <li> <p><code>CANCELLATION_IN_PROGRESS</code> - The capacity task has been cancelled and is in the process of cleaning up resources.</p></li> <li> <p><code>CANCELLED</code> - The capacity task is cancelled.</p></li> </ul>
17 /// - [`failed(Option<CapacityTaskFailure>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::failed): <p>Reason why the capacity task failed.</p>
18 /// - [`creation_date(Option<DateTime>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::creation_date): <p>The date the capacity task was created.</p>
19 /// - [`completion_date(Option<DateTime>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::completion_date): <p>The date the capacity task ran successfully.</p>
20 /// - [`last_modified_date(Option<DateTime>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::last_modified_date): <p>The date the capacity task was last modified.</p>
21 /// - [`task_action_on_blocking_instances(Option<TaskActionOnBlockingInstances>)`](crate::operation::get_capacity_task::GetCapacityTaskOutput::task_action_on_blocking_instances): <p>User-specified option in case an instance is blocking the capacity task from running. Shows one of the following options:</p> <ul> <li> <p><code>WAIT_FOR_EVACUATION</code> - Checks every 10 minutes over 48 hours to determine if instances have stopped and capacity is available to complete the task.</p></li> <li> <p><code>FAIL_TASK</code> - The capacity task fails.</p></li> </ul>
22 /// - On failure, responds with [`SdkError<GetCapacityTaskError>`](crate::operation::get_capacity_task::GetCapacityTaskError)
23 pub fn get_capacity_task(&self) -> crate::operation::get_capacity_task::builders::GetCapacityTaskFluentBuilder {
24 crate::operation::get_capacity_task::builders::GetCapacityTaskFluentBuilder::new(self.handle.clone())
25 }
26}