aws_sdk_elasticbeanstalk/operation/request_environment_info/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::request_environment_info::_request_environment_info_output::RequestEnvironmentInfoOutputBuilder;
3
4pub use crate::operation::request_environment_info::_request_environment_info_input::RequestEnvironmentInfoInputBuilder;
5
6impl crate::operation::request_environment_info::builders::RequestEnvironmentInfoInputBuilder {
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::request_environment_info::RequestEnvironmentInfoOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::request_environment_info::RequestEnvironmentInfoError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.request_environment_info();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `RequestEnvironmentInfo`.
24///
25/// <p>Initiates a request to compile the specified type of information of the deployed environment.</p>
26/// <p>Setting the <code>InfoType</code> to <code>tail</code> compiles the last lines from the application server log files of every Amazon EC2 instance in your environment.</p>
27/// <p>Setting the <code>InfoType</code> to <code>bundle</code> compresses the application server log files for every Amazon EC2 instance into a <code>.zip</code> file. Legacy and .NET containers do not support bundle logs.</p>
28/// <p>Use <code>RetrieveEnvironmentInfo</code> to obtain the set of logs.</p>
29/// <p>Related Topics</p>
30/// <ul>
31/// <li>
32/// <p><code>RetrieveEnvironmentInfo</code></p></li>
33/// </ul>
34#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct RequestEnvironmentInfoFluentBuilder {
36    handle: ::std::sync::Arc<crate::client::Handle>,
37    inner: crate::operation::request_environment_info::builders::RequestEnvironmentInfoInputBuilder,
38    config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41    crate::client::customize::internal::CustomizableSend<
42        crate::operation::request_environment_info::RequestEnvironmentInfoOutput,
43        crate::operation::request_environment_info::RequestEnvironmentInfoError,
44    > for RequestEnvironmentInfoFluentBuilder
45{
46    fn send(
47        self,
48        config_override: crate::config::Builder,
49    ) -> crate::client::customize::internal::BoxFuture<
50        crate::client::customize::internal::SendResult<
51            crate::operation::request_environment_info::RequestEnvironmentInfoOutput,
52            crate::operation::request_environment_info::RequestEnvironmentInfoError,
53        >,
54    > {
55        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56    }
57}
58impl RequestEnvironmentInfoFluentBuilder {
59    /// Creates a new `RequestEnvironmentInfoFluentBuilder`.
60    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
61        Self {
62            handle,
63            inner: ::std::default::Default::default(),
64            config_override: ::std::option::Option::None,
65        }
66    }
67    /// Access the RequestEnvironmentInfo as a reference.
68    pub fn as_input(&self) -> &crate::operation::request_environment_info::builders::RequestEnvironmentInfoInputBuilder {
69        &self.inner
70    }
71    /// Sends the request and returns the response.
72    ///
73    /// If an error occurs, an `SdkError` will be returned with additional details that
74    /// can be matched against.
75    ///
76    /// By default, any retryable failures will be retried twice. Retry behavior
77    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
78    /// set when configuring the client.
79    pub async fn send(
80        self,
81    ) -> ::std::result::Result<
82        crate::operation::request_environment_info::RequestEnvironmentInfoOutput,
83        ::aws_smithy_runtime_api::client::result::SdkError<
84            crate::operation::request_environment_info::RequestEnvironmentInfoError,
85            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
86        >,
87    > {
88        let input = self
89            .inner
90            .build()
91            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
92        let runtime_plugins = crate::operation::request_environment_info::RequestEnvironmentInfo::operation_runtime_plugins(
93            self.handle.runtime_plugins.clone(),
94            &self.handle.conf,
95            self.config_override,
96        );
97        crate::operation::request_environment_info::RequestEnvironmentInfo::orchestrate(&runtime_plugins, input).await
98    }
99
100    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
101    pub fn customize(
102        self,
103    ) -> crate::client::customize::CustomizableOperation<
104        crate::operation::request_environment_info::RequestEnvironmentInfoOutput,
105        crate::operation::request_environment_info::RequestEnvironmentInfoError,
106        Self,
107    > {
108        crate::client::customize::CustomizableOperation::new(self)
109    }
110    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
111        self.set_config_override(::std::option::Option::Some(config_override.into()));
112        self
113    }
114
115    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
116        self.config_override = config_override;
117        self
118    }
119    /// <p>The ID of the environment of the requested data.</p>
120    /// <p>If no such environment is found, <code>RequestEnvironmentInfo</code> returns an <code>InvalidParameterValue</code> error.</p>
121    /// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
122    pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.inner = self.inner.environment_id(input.into());
124        self
125    }
126    /// <p>The ID of the environment of the requested data.</p>
127    /// <p>If no such environment is found, <code>RequestEnvironmentInfo</code> returns an <code>InvalidParameterValue</code> error.</p>
128    /// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
129    pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.inner = self.inner.set_environment_id(input);
131        self
132    }
133    /// <p>The ID of the environment of the requested data.</p>
134    /// <p>If no such environment is found, <code>RequestEnvironmentInfo</code> returns an <code>InvalidParameterValue</code> error.</p>
135    /// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
136    pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_environment_id()
138    }
139    /// <p>The name of the environment of the requested data.</p>
140    /// <p>If no such environment is found, <code>RequestEnvironmentInfo</code> returns an <code>InvalidParameterValue</code> error.</p>
141    /// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
142    pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.inner = self.inner.environment_name(input.into());
144        self
145    }
146    /// <p>The name of the environment of the requested data.</p>
147    /// <p>If no such environment is found, <code>RequestEnvironmentInfo</code> returns an <code>InvalidParameterValue</code> error.</p>
148    /// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
149    pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.inner = self.inner.set_environment_name(input);
151        self
152    }
153    /// <p>The name of the environment of the requested data.</p>
154    /// <p>If no such environment is found, <code>RequestEnvironmentInfo</code> returns an <code>InvalidParameterValue</code> error.</p>
155    /// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
156    pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
157        self.inner.get_environment_name()
158    }
159    /// <p>The type of information to request.</p>
160    pub fn info_type(mut self, input: crate::types::EnvironmentInfoType) -> Self {
161        self.inner = self.inner.info_type(input);
162        self
163    }
164    /// <p>The type of information to request.</p>
165    pub fn set_info_type(mut self, input: ::std::option::Option<crate::types::EnvironmentInfoType>) -> Self {
166        self.inner = self.inner.set_info_type(input);
167        self
168    }
169    /// <p>The type of information to request.</p>
170    pub fn get_info_type(&self) -> &::std::option::Option<crate::types::EnvironmentInfoType> {
171        self.inner.get_info_type()
172    }
173}