aws_sdk_elasticache/operation/describe_cache_clusters/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_cache_clusters::_describe_cache_clusters_output::DescribeCacheClustersOutputBuilder;
3
4pub use crate::operation::describe_cache_clusters::_describe_cache_clusters_input::DescribeCacheClustersInputBuilder;
5
6impl crate::operation::describe_cache_clusters::builders::DescribeCacheClustersInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::describe_cache_clusters::DescribeCacheClustersError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.describe_cache_clusters();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `DescribeCacheClusters`.
24///
25/// <p>Returns information about all provisioned clusters if no cluster identifier is specified, or about a specific cache cluster if a cluster identifier is supplied.</p>
26/// <p>By default, abbreviated information about the clusters is returned. You can use the optional <i>ShowCacheNodeInfo</i> flag to retrieve detailed information about the cache nodes associated with the clusters. These details include the DNS address and port for the cache node endpoint.</p>
27/// <p>If the cluster is in the <i>creating</i> state, only cluster-level information is displayed until all of the nodes are successfully provisioned.</p>
28/// <p>If the cluster is in the <i>deleting</i> state, only cluster-level information is displayed.</p>
29/// <p>If cache nodes are currently being added to the cluster, node endpoint information and creation time for the additional nodes are not displayed until they are completely provisioned. When the cluster state is <i>available</i>, the cluster is ready for use.</p>
30/// <p>If cache nodes are currently being removed from the cluster, no endpoint information for the removed nodes is displayed.</p>
31#[derive(::std::clone::Clone, ::std::fmt::Debug)]
32pub struct DescribeCacheClustersFluentBuilder {
33 handle: ::std::sync::Arc<crate::client::Handle>,
34 inner: crate::operation::describe_cache_clusters::builders::DescribeCacheClustersInputBuilder,
35 config_override: ::std::option::Option<crate::config::Builder>,
36}
37impl
38 crate::client::customize::internal::CustomizableSend<
39 crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
40 crate::operation::describe_cache_clusters::DescribeCacheClustersError,
41 > for DescribeCacheClustersFluentBuilder
42{
43 fn send(
44 self,
45 config_override: crate::config::Builder,
46 ) -> crate::client::customize::internal::BoxFuture<
47 crate::client::customize::internal::SendResult<
48 crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
49 crate::operation::describe_cache_clusters::DescribeCacheClustersError,
50 >,
51 > {
52 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
53 }
54}
55impl DescribeCacheClustersFluentBuilder {
56 /// Creates a new `DescribeCacheClustersFluentBuilder`.
57 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
58 Self {
59 handle,
60 inner: ::std::default::Default::default(),
61 config_override: ::std::option::Option::None,
62 }
63 }
64 /// Access the DescribeCacheClusters as a reference.
65 pub fn as_input(&self) -> &crate::operation::describe_cache_clusters::builders::DescribeCacheClustersInputBuilder {
66 &self.inner
67 }
68 /// Sends the request and returns the response.
69 ///
70 /// If an error occurs, an `SdkError` will be returned with additional details that
71 /// can be matched against.
72 ///
73 /// By default, any retryable failures will be retried twice. Retry behavior
74 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
75 /// set when configuring the client.
76 pub async fn send(
77 self,
78 ) -> ::std::result::Result<
79 crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
80 ::aws_smithy_runtime_api::client::result::SdkError<
81 crate::operation::describe_cache_clusters::DescribeCacheClustersError,
82 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
83 >,
84 > {
85 let input = self
86 .inner
87 .build()
88 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
89 let runtime_plugins = crate::operation::describe_cache_clusters::DescribeCacheClusters::operation_runtime_plugins(
90 self.handle.runtime_plugins.clone(),
91 &self.handle.conf,
92 self.config_override,
93 );
94 crate::operation::describe_cache_clusters::DescribeCacheClusters::orchestrate(&runtime_plugins, input).await
95 }
96
97 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
98 pub fn customize(
99 self,
100 ) -> crate::client::customize::CustomizableOperation<
101 crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
102 crate::operation::describe_cache_clusters::DescribeCacheClustersError,
103 Self,
104 > {
105 crate::client::customize::CustomizableOperation::new(self)
106 }
107 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
108 self.set_config_override(::std::option::Option::Some(config_override.into()));
109 self
110 }
111
112 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
113 self.config_override = config_override;
114 self
115 }
116 /// Create a paginator for this request
117 ///
118 /// Paginators are used by calling [`send().await`](crate::operation::describe_cache_clusters::paginator::DescribeCacheClustersPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
119 pub fn into_paginator(self) -> crate::operation::describe_cache_clusters::paginator::DescribeCacheClustersPaginator {
120 crate::operation::describe_cache_clusters::paginator::DescribeCacheClustersPaginator::new(self.handle, self.inner)
121 }
122 /// <p>The user-supplied cluster identifier. If this parameter is specified, only information about that specific cluster is returned. This parameter isn't case sensitive.</p>
123 pub fn cache_cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124 self.inner = self.inner.cache_cluster_id(input.into());
125 self
126 }
127 /// <p>The user-supplied cluster identifier. If this parameter is specified, only information about that specific cluster is returned. This parameter isn't case sensitive.</p>
128 pub fn set_cache_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.inner = self.inner.set_cache_cluster_id(input);
130 self
131 }
132 /// <p>The user-supplied cluster identifier. If this parameter is specified, only information about that specific cluster is returned. This parameter isn't case sensitive.</p>
133 pub fn get_cache_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
134 self.inner.get_cache_cluster_id()
135 }
136 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p>
137 /// <p>Default: 100</p>
138 /// <p>Constraints: minimum 20; maximum 100.</p>
139 pub fn max_records(mut self, input: i32) -> Self {
140 self.inner = self.inner.max_records(input);
141 self
142 }
143 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p>
144 /// <p>Default: 100</p>
145 /// <p>Constraints: minimum 20; maximum 100.</p>
146 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
147 self.inner = self.inner.set_max_records(input);
148 self
149 }
150 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p>
151 /// <p>Default: 100</p>
152 /// <p>Constraints: minimum 20; maximum 100.</p>
153 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
154 self.inner.get_max_records()
155 }
156 /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
157 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158 self.inner = self.inner.marker(input.into());
159 self
160 }
161 /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
162 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.inner = self.inner.set_marker(input);
164 self
165 }
166 /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
167 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
168 self.inner.get_marker()
169 }
170 /// <p>An optional flag that can be included in the <code>DescribeCacheCluster</code> request to retrieve information about the individual cache nodes.</p>
171 pub fn show_cache_node_info(mut self, input: bool) -> Self {
172 self.inner = self.inner.show_cache_node_info(input);
173 self
174 }
175 /// <p>An optional flag that can be included in the <code>DescribeCacheCluster</code> request to retrieve information about the individual cache nodes.</p>
176 pub fn set_show_cache_node_info(mut self, input: ::std::option::Option<bool>) -> Self {
177 self.inner = self.inner.set_show_cache_node_info(input);
178 self
179 }
180 /// <p>An optional flag that can be included in the <code>DescribeCacheCluster</code> request to retrieve information about the individual cache nodes.</p>
181 pub fn get_show_cache_node_info(&self) -> &::std::option::Option<bool> {
182 self.inner.get_show_cache_node_info()
183 }
184 /// <p>An optional flag that can be included in the <code>DescribeCacheCluster</code> request to show only nodes (API/CLI: clusters) that are not members of a replication group. In practice, this means Memcached and single node Valkey or Redis OSS clusters.</p>
185 pub fn show_cache_clusters_not_in_replication_groups(mut self, input: bool) -> Self {
186 self.inner = self.inner.show_cache_clusters_not_in_replication_groups(input);
187 self
188 }
189 /// <p>An optional flag that can be included in the <code>DescribeCacheCluster</code> request to show only nodes (API/CLI: clusters) that are not members of a replication group. In practice, this means Memcached and single node Valkey or Redis OSS clusters.</p>
190 pub fn set_show_cache_clusters_not_in_replication_groups(mut self, input: ::std::option::Option<bool>) -> Self {
191 self.inner = self.inner.set_show_cache_clusters_not_in_replication_groups(input);
192 self
193 }
194 /// <p>An optional flag that can be included in the <code>DescribeCacheCluster</code> request to show only nodes (API/CLI: clusters) that are not members of a replication group. In practice, this means Memcached and single node Valkey or Redis OSS clusters.</p>
195 pub fn get_show_cache_clusters_not_in_replication_groups(&self) -> &::std::option::Option<bool> {
196 self.inner.get_show_cache_clusters_not_in_replication_groups()
197 }
198}