aws_sdk_ec2/client/describe_hosts.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 [`DescribeHosts`](crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder) operation.
4 /// This operation supports pagination; See [`into_paginator()`](crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder::into_paginator).
5 ///
6 /// - The fluent builder is configurable:
7 /// - [`host_ids(impl Into<String>)`](crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder::host_ids) / [`set_host_ids(Option<Vec::<String>>)`](crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder::set_host_ids):<br>required: **false**<br><p>The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches.</p><br>
8 /// - [`next_token(impl Into<String>)`](crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder::set_next_token):<br>required: **false**<br><p>The token to use to retrieve the next page of results.</p><br>
9 /// - [`max_results(i32)`](crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder::set_max_results):<br>required: **false**<br><p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p> <p>You cannot specify this parameter and the host IDs parameter in the same request.</p><br>
10 /// - [`filter(Filter)`](crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder::filter) / [`set_filter(Option<Vec::<Filter>>)`](crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder::set_filter):<br>required: **false**<br><p>The filters.</p> <ul> <li> <p><code>auto-placement</code> - Whether auto-placement is enabled or disabled (<code>on</code> | <code>off</code>).</p></li> <li> <p><code>availability-zone</code> - The Availability Zone of the host.</p></li> <li> <p><code>client-token</code> - The idempotency token that you provided when you allocated the host.</p></li> <li> <p><code>host-reservation-id</code> - The ID of the reservation assigned to this host.</p></li> <li> <p><code>instance-type</code> - The instance type size that the Dedicated Host is configured to support.</p></li> <li> <p><code>state</code> - The allocation state of the Dedicated Host (<code>available</code> | <code>under-assessment</code> | <code>permanent-failure</code> | <code>released</code> | <code>released-permanent-failure</code>).</p></li> <li> <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li> </ul><br>
11 /// - On success, responds with [`DescribeHostsOutput`](crate::operation::describe_hosts::DescribeHostsOutput) with field(s):
12 /// - [`hosts(Option<Vec::<Host>>)`](crate::operation::describe_hosts::DescribeHostsOutput::hosts): <p>Information about the Dedicated Hosts.</p>
13 /// - [`next_token(Option<String>)`](crate::operation::describe_hosts::DescribeHostsOutput::next_token): <p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>
14 /// - On failure, responds with [`SdkError<DescribeHostsError>`](crate::operation::describe_hosts::DescribeHostsError)
15 pub fn describe_hosts(&self) -> crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder {
16 crate::operation::describe_hosts::builders::DescribeHostsFluentBuilder::new(self.handle.clone())
17 }
18}