aws_sdk_codedeploy/operation/list_deployment_instances/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_deployment_instances::_list_deployment_instances_output::ListDeploymentInstancesOutputBuilder;
3
4pub use crate::operation::list_deployment_instances::_list_deployment_instances_input::ListDeploymentInstancesInputBuilder;
5
6impl crate::operation::list_deployment_instances::builders::ListDeploymentInstancesInputBuilder {
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::list_deployment_instances::ListDeploymentInstancesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::list_deployment_instances::ListDeploymentInstancesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.list_deployment_instances();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ListDeploymentInstances`.
24///
25/// <note>
26/// <p>The newer <code>BatchGetDeploymentTargets</code> should be used instead because it works with all compute types. <code>ListDeploymentInstances</code> throws an exception if it is used with a compute platform other than EC2/On-premises or Lambda.</p>
27/// </note>
28/// <p>Lists the instance for a deployment associated with the user or Amazon Web Services account.</p>
29#[deprecated(note = "This operation is deprecated, use ListDeploymentTargets instead.")]
30#[derive(::std::clone::Clone, ::std::fmt::Debug)]
31pub struct ListDeploymentInstancesFluentBuilder {
32 handle: ::std::sync::Arc<crate::client::Handle>,
33 inner: crate::operation::list_deployment_instances::builders::ListDeploymentInstancesInputBuilder,
34 config_override: ::std::option::Option<crate::config::Builder>,
35}
36impl
37 crate::client::customize::internal::CustomizableSend<
38 crate::operation::list_deployment_instances::ListDeploymentInstancesOutput,
39 crate::operation::list_deployment_instances::ListDeploymentInstancesError,
40 > for ListDeploymentInstancesFluentBuilder
41{
42 fn send(
43 self,
44 config_override: crate::config::Builder,
45 ) -> crate::client::customize::internal::BoxFuture<
46 crate::client::customize::internal::SendResult<
47 crate::operation::list_deployment_instances::ListDeploymentInstancesOutput,
48 crate::operation::list_deployment_instances::ListDeploymentInstancesError,
49 >,
50 > {
51 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
52 }
53}
54impl ListDeploymentInstancesFluentBuilder {
55 /// Creates a new `ListDeploymentInstancesFluentBuilder`.
56 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
57 Self {
58 handle,
59 inner: ::std::default::Default::default(),
60 config_override: ::std::option::Option::None,
61 }
62 }
63 /// Access the ListDeploymentInstances as a reference.
64 pub fn as_input(&self) -> &crate::operation::list_deployment_instances::builders::ListDeploymentInstancesInputBuilder {
65 &self.inner
66 }
67 /// Sends the request and returns the response.
68 ///
69 /// If an error occurs, an `SdkError` will be returned with additional details that
70 /// can be matched against.
71 ///
72 /// By default, any retryable failures will be retried twice. Retry behavior
73 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
74 /// set when configuring the client.
75 pub async fn send(
76 self,
77 ) -> ::std::result::Result<
78 crate::operation::list_deployment_instances::ListDeploymentInstancesOutput,
79 ::aws_smithy_runtime_api::client::result::SdkError<
80 crate::operation::list_deployment_instances::ListDeploymentInstancesError,
81 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
82 >,
83 > {
84 let input = self
85 .inner
86 .build()
87 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
88 let runtime_plugins = crate::operation::list_deployment_instances::ListDeploymentInstances::operation_runtime_plugins(
89 self.handle.runtime_plugins.clone(),
90 &self.handle.conf,
91 self.config_override,
92 );
93 crate::operation::list_deployment_instances::ListDeploymentInstances::orchestrate(&runtime_plugins, input).await
94 }
95
96 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97 pub fn customize(
98 self,
99 ) -> crate::client::customize::CustomizableOperation<
100 crate::operation::list_deployment_instances::ListDeploymentInstancesOutput,
101 crate::operation::list_deployment_instances::ListDeploymentInstancesError,
102 Self,
103 > {
104 crate::client::customize::CustomizableOperation::new(self)
105 }
106 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107 self.set_config_override(::std::option::Option::Some(config_override.into()));
108 self
109 }
110
111 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112 self.config_override = config_override;
113 self
114 }
115 /// Create a paginator for this request
116 ///
117 /// Paginators are used by calling [`send().await`](crate::operation::list_deployment_instances::paginator::ListDeploymentInstancesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
118 pub fn into_paginator(self) -> crate::operation::list_deployment_instances::paginator::ListDeploymentInstancesPaginator {
119 crate::operation::list_deployment_instances::paginator::ListDeploymentInstancesPaginator::new(self.handle, self.inner)
120 }
121 /// <p>The unique ID of a deployment.</p>
122 pub fn deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.inner = self.inner.deployment_id(input.into());
124 self
125 }
126 /// <p>The unique ID of a deployment.</p>
127 pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.inner = self.inner.set_deployment_id(input);
129 self
130 }
131 /// <p>The unique ID of a deployment.</p>
132 pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
133 self.inner.get_deployment_id()
134 }
135 /// <p>An identifier returned from the previous list deployment instances call. It can be used to return the next set of deployment instances in the list.</p>
136 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.inner = self.inner.next_token(input.into());
138 self
139 }
140 /// <p>An identifier returned from the previous list deployment instances call. It can be used to return the next set of deployment instances in the list.</p>
141 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142 self.inner = self.inner.set_next_token(input);
143 self
144 }
145 /// <p>An identifier returned from the previous list deployment instances call. It can be used to return the next set of deployment instances in the list.</p>
146 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
147 self.inner.get_next_token()
148 }
149 ///
150 /// Appends an item to `instanceStatusFilter`.
151 ///
152 /// To override the contents of this collection use [`set_instance_status_filter`](Self::set_instance_status_filter).
153 ///
154 /// <p>A subset of instances to list by status:</p>
155 /// <ul>
156 /// <li>
157 /// <p><code>Pending</code>: Include those instances with pending deployments.</p></li>
158 /// <li>
159 /// <p><code>InProgress</code>: Include those instances where deployments are still in progress.</p></li>
160 /// <li>
161 /// <p><code>Succeeded</code>: Include those instances with successful deployments.</p></li>
162 /// <li>
163 /// <p><code>Failed</code>: Include those instances with failed deployments.</p></li>
164 /// <li>
165 /// <p><code>Skipped</code>: Include those instances with skipped deployments.</p></li>
166 /// <li>
167 /// <p><code>Unknown</code>: Include those instances with deployments in an unknown state.</p></li>
168 /// </ul>
169 pub fn instance_status_filter(mut self, input: crate::types::InstanceStatus) -> Self {
170 self.inner = self.inner.instance_status_filter(input);
171 self
172 }
173 /// <p>A subset of instances to list by status:</p>
174 /// <ul>
175 /// <li>
176 /// <p><code>Pending</code>: Include those instances with pending deployments.</p></li>
177 /// <li>
178 /// <p><code>InProgress</code>: Include those instances where deployments are still in progress.</p></li>
179 /// <li>
180 /// <p><code>Succeeded</code>: Include those instances with successful deployments.</p></li>
181 /// <li>
182 /// <p><code>Failed</code>: Include those instances with failed deployments.</p></li>
183 /// <li>
184 /// <p><code>Skipped</code>: Include those instances with skipped deployments.</p></li>
185 /// <li>
186 /// <p><code>Unknown</code>: Include those instances with deployments in an unknown state.</p></li>
187 /// </ul>
188 pub fn set_instance_status_filter(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceStatus>>) -> Self {
189 self.inner = self.inner.set_instance_status_filter(input);
190 self
191 }
192 /// <p>A subset of instances to list by status:</p>
193 /// <ul>
194 /// <li>
195 /// <p><code>Pending</code>: Include those instances with pending deployments.</p></li>
196 /// <li>
197 /// <p><code>InProgress</code>: Include those instances where deployments are still in progress.</p></li>
198 /// <li>
199 /// <p><code>Succeeded</code>: Include those instances with successful deployments.</p></li>
200 /// <li>
201 /// <p><code>Failed</code>: Include those instances with failed deployments.</p></li>
202 /// <li>
203 /// <p><code>Skipped</code>: Include those instances with skipped deployments.</p></li>
204 /// <li>
205 /// <p><code>Unknown</code>: Include those instances with deployments in an unknown state.</p></li>
206 /// </ul>
207 pub fn get_instance_status_filter(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceStatus>> {
208 self.inner.get_instance_status_filter()
209 }
210 ///
211 /// Appends an item to `instanceTypeFilter`.
212 ///
213 /// To override the contents of this collection use [`set_instance_type_filter`](Self::set_instance_type_filter).
214 ///
215 /// <p>The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in the replacement environment ("GREEN"), for which you want to view instance information.</p>
216 pub fn instance_type_filter(mut self, input: crate::types::InstanceType) -> Self {
217 self.inner = self.inner.instance_type_filter(input);
218 self
219 }
220 /// <p>The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in the replacement environment ("GREEN"), for which you want to view instance information.</p>
221 pub fn set_instance_type_filter(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceType>>) -> Self {
222 self.inner = self.inner.set_instance_type_filter(input);
223 self
224 }
225 /// <p>The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in the replacement environment ("GREEN"), for which you want to view instance information.</p>
226 pub fn get_instance_type_filter(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceType>> {
227 self.inner.get_instance_type_filter()
228 }
229}