aws_sdk_applicationdiscovery/operation/start_export_task/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_export_task::_start_export_task_output::StartExportTaskOutputBuilder;
3
4pub use crate::operation::start_export_task::_start_export_task_input::StartExportTaskInputBuilder;
5
6impl crate::operation::start_export_task::builders::StartExportTaskInputBuilder {
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::start_export_task::StartExportTaskOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::start_export_task::StartExportTaskError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.start_export_task();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `StartExportTask`.
24///
25/// <p>Begins the export of a discovered data report to an Amazon S3 bucket managed by Amazon Web Services.</p><note>
26/// <p>Exports might provide an estimate of fees and savings based on certain information that you provide. Fee estimates do not include any taxes that might apply. Your actual fees and savings depend on a variety of factors, including your actual usage of Amazon Web Services services, which might vary from the estimates provided in this report.</p>
27/// </note>
28/// <p>If you do not specify <code>preferences</code> or <code>agentIds</code> in the filter, a summary of all servers, applications, tags, and performance is generated. This data is an aggregation of all server data collected through on-premises tooling, file import, application grouping and applying tags.</p>
29/// <p>If you specify <code>agentIds</code> in a filter, the task exports up to 72 hours of detailed data collected by the identified Application Discovery Agent, including network, process, and performance details. A time range for exported agent data may be set by using <code>startTime</code> and <code>endTime</code>. Export of detailed agent data is limited to five concurrently running exports. Export of detailed agent data is limited to two exports per day.</p>
30/// <p>If you enable <code>ec2RecommendationsPreferences</code> in <code>preferences</code> , an Amazon EC2 instance matching the characteristics of each server in Application Discovery Service is generated. Changing the attributes of the <code>ec2RecommendationsPreferences</code> changes the criteria of the recommendation.</p>
31#[derive(::std::clone::Clone, ::std::fmt::Debug)]
32pub struct StartExportTaskFluentBuilder {
33    handle: ::std::sync::Arc<crate::client::Handle>,
34    inner: crate::operation::start_export_task::builders::StartExportTaskInputBuilder,
35    config_override: ::std::option::Option<crate::config::Builder>,
36}
37impl
38    crate::client::customize::internal::CustomizableSend<
39        crate::operation::start_export_task::StartExportTaskOutput,
40        crate::operation::start_export_task::StartExportTaskError,
41    > for StartExportTaskFluentBuilder
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::start_export_task::StartExportTaskOutput,
49            crate::operation::start_export_task::StartExportTaskError,
50        >,
51    > {
52        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
53    }
54}
55impl StartExportTaskFluentBuilder {
56    /// Creates a new `StartExportTaskFluentBuilder`.
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 StartExportTask as a reference.
65    pub fn as_input(&self) -> &crate::operation::start_export_task::builders::StartExportTaskInputBuilder {
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::start_export_task::StartExportTaskOutput,
80        ::aws_smithy_runtime_api::client::result::SdkError<
81            crate::operation::start_export_task::StartExportTaskError,
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::start_export_task::StartExportTask::operation_runtime_plugins(
90            self.handle.runtime_plugins.clone(),
91            &self.handle.conf,
92            self.config_override,
93        );
94        crate::operation::start_export_task::StartExportTask::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::start_export_task::StartExportTaskOutput,
102        crate::operation::start_export_task::StartExportTaskError,
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    ///
117    /// Appends an item to `exportDataFormat`.
118    ///
119    /// To override the contents of this collection use [`set_export_data_format`](Self::set_export_data_format).
120    ///
121    /// <p>The file format for the returned export data. Default value is <code>CSV</code>. <b>Note:</b> <i>The</i> <code>GRAPHML</code> <i>option has been deprecated.</i></p>
122    pub fn export_data_format(mut self, input: crate::types::ExportDataFormat) -> Self {
123        self.inner = self.inner.export_data_format(input);
124        self
125    }
126    /// <p>The file format for the returned export data. Default value is <code>CSV</code>. <b>Note:</b> <i>The</i> <code>GRAPHML</code> <i>option has been deprecated.</i></p>
127    pub fn set_export_data_format(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ExportDataFormat>>) -> Self {
128        self.inner = self.inner.set_export_data_format(input);
129        self
130    }
131    /// <p>The file format for the returned export data. Default value is <code>CSV</code>. <b>Note:</b> <i>The</i> <code>GRAPHML</code> <i>option has been deprecated.</i></p>
132    pub fn get_export_data_format(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ExportDataFormat>> {
133        self.inner.get_export_data_format()
134    }
135    ///
136    /// Appends an item to `filters`.
137    ///
138    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
139    ///
140    /// <p>If a filter is present, it selects the single <code>agentId</code> of the Application Discovery Agent for which data is exported. The <code>agentId</code> can be found in the results of the <code>DescribeAgents</code> API or CLI. If no filter is present, <code>startTime</code> and <code>endTime</code> are ignored and exported data includes both Amazon Web Services Application Discovery Service Agentless Collector collectors data and summary data from Application Discovery Agent agents.</p>
141    pub fn filters(mut self, input: crate::types::ExportFilter) -> Self {
142        self.inner = self.inner.filters(input);
143        self
144    }
145    /// <p>If a filter is present, it selects the single <code>agentId</code> of the Application Discovery Agent for which data is exported. The <code>agentId</code> can be found in the results of the <code>DescribeAgents</code> API or CLI. If no filter is present, <code>startTime</code> and <code>endTime</code> are ignored and exported data includes both Amazon Web Services Application Discovery Service Agentless Collector collectors data and summary data from Application Discovery Agent agents.</p>
146    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ExportFilter>>) -> Self {
147        self.inner = self.inner.set_filters(input);
148        self
149    }
150    /// <p>If a filter is present, it selects the single <code>agentId</code> of the Application Discovery Agent for which data is exported. The <code>agentId</code> can be found in the results of the <code>DescribeAgents</code> API or CLI. If no filter is present, <code>startTime</code> and <code>endTime</code> are ignored and exported data includes both Amazon Web Services Application Discovery Service Agentless Collector collectors data and summary data from Application Discovery Agent agents.</p>
151    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ExportFilter>> {
152        self.inner.get_filters()
153    }
154    /// <p>The start timestamp for exported data from the single Application Discovery Agent selected in the filters. If no value is specified, data is exported starting from the first data collected by the agent.</p>
155    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
156        self.inner = self.inner.start_time(input);
157        self
158    }
159    /// <p>The start timestamp for exported data from the single Application Discovery Agent selected in the filters. If no value is specified, data is exported starting from the first data collected by the agent.</p>
160    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
161        self.inner = self.inner.set_start_time(input);
162        self
163    }
164    /// <p>The start timestamp for exported data from the single Application Discovery Agent selected in the filters. If no value is specified, data is exported starting from the first data collected by the agent.</p>
165    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
166        self.inner.get_start_time()
167    }
168    /// <p>The end timestamp for exported data from the single Application Discovery Agent selected in the filters. If no value is specified, exported data includes the most recent data collected by the agent.</p>
169    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
170        self.inner = self.inner.end_time(input);
171        self
172    }
173    /// <p>The end timestamp for exported data from the single Application Discovery Agent selected in the filters. If no value is specified, exported data includes the most recent data collected by the agent.</p>
174    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
175        self.inner = self.inner.set_end_time(input);
176        self
177    }
178    /// <p>The end timestamp for exported data from the single Application Discovery Agent selected in the filters. If no value is specified, exported data includes the most recent data collected by the agent.</p>
179    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
180        self.inner.get_end_time()
181    }
182    /// <p>Indicates the type of data that needs to be exported. Only one <a href="https://docs.aws.amazon.com/application-discovery/latest/APIReference/API_ExportPreferences.html">ExportPreferences</a> can be enabled at any time.</p>
183    pub fn preferences(mut self, input: crate::types::ExportPreferences) -> Self {
184        self.inner = self.inner.preferences(input);
185        self
186    }
187    /// <p>Indicates the type of data that needs to be exported. Only one <a href="https://docs.aws.amazon.com/application-discovery/latest/APIReference/API_ExportPreferences.html">ExportPreferences</a> can be enabled at any time.</p>
188    pub fn set_preferences(mut self, input: ::std::option::Option<crate::types::ExportPreferences>) -> Self {
189        self.inner = self.inner.set_preferences(input);
190        self
191    }
192    /// <p>Indicates the type of data that needs to be exported. Only one <a href="https://docs.aws.amazon.com/application-discovery/latest/APIReference/API_ExportPreferences.html">ExportPreferences</a> can be enabled at any time.</p>
193    pub fn get_preferences(&self) -> &::std::option::Option<crate::types::ExportPreferences> {
194        self.inner.get_preferences()
195    }
196}