aws_sdk_ec2/operation/get_flow_logs_integration_template/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_flow_logs_integration_template::_get_flow_logs_integration_template_output::GetFlowLogsIntegrationTemplateOutputBuilder;
3
4pub use crate::operation::get_flow_logs_integration_template::_get_flow_logs_integration_template_input::GetFlowLogsIntegrationTemplateInputBuilder;
5
6impl crate::operation::get_flow_logs_integration_template::builders::GetFlowLogsIntegrationTemplateInputBuilder {
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::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplateOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplateError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_flow_logs_integration_template();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetFlowLogsIntegrationTemplate`.
24///
25/// <p>Generates a CloudFormation template that streamlines and automates the integration of VPC flow logs with Amazon Athena. This make it easier for you to query and gain insights from VPC flow logs data. Based on the information that you provide, we configure resources in the template to do the following:</p>
26/// <ul>
27/// <li>
28/// <p>Create a table in Athena that maps fields to a custom log format</p></li>
29/// <li>
30/// <p>Create a Lambda function that updates the table with new partitions on a daily, weekly, or monthly basis</p></li>
31/// <li>
32/// <p>Create a table partitioned between two timestamps in the past</p></li>
33/// <li>
34/// <p>Create a set of named queries in Athena that you can use to get started quickly</p></li>
35/// </ul><note>
36/// <p><code>GetFlowLogsIntegrationTemplate</code> does not support integration between Amazon Web Services Transit Gateway Flow Logs and Amazon Athena.</p>
37/// </note>
38#[derive(::std::clone::Clone, ::std::fmt::Debug)]
39pub struct GetFlowLogsIntegrationTemplateFluentBuilder {
40    handle: ::std::sync::Arc<crate::client::Handle>,
41    inner: crate::operation::get_flow_logs_integration_template::builders::GetFlowLogsIntegrationTemplateInputBuilder,
42    config_override: ::std::option::Option<crate::config::Builder>,
43}
44impl
45    crate::client::customize::internal::CustomizableSend<
46        crate::operation::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplateOutput,
47        crate::operation::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplateError,
48    > for GetFlowLogsIntegrationTemplateFluentBuilder
49{
50    fn send(
51        self,
52        config_override: crate::config::Builder,
53    ) -> crate::client::customize::internal::BoxFuture<
54        crate::client::customize::internal::SendResult<
55            crate::operation::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplateOutput,
56            crate::operation::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplateError,
57        >,
58    > {
59        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
60    }
61}
62impl GetFlowLogsIntegrationTemplateFluentBuilder {
63    /// Creates a new `GetFlowLogsIntegrationTemplateFluentBuilder`.
64    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
65        Self {
66            handle,
67            inner: ::std::default::Default::default(),
68            config_override: ::std::option::Option::None,
69        }
70    }
71    /// Access the GetFlowLogsIntegrationTemplate as a reference.
72    pub fn as_input(&self) -> &crate::operation::get_flow_logs_integration_template::builders::GetFlowLogsIntegrationTemplateInputBuilder {
73        &self.inner
74    }
75    /// Sends the request and returns the response.
76    ///
77    /// If an error occurs, an `SdkError` will be returned with additional details that
78    /// can be matched against.
79    ///
80    /// By default, any retryable failures will be retried twice. Retry behavior
81    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
82    /// set when configuring the client.
83    pub async fn send(
84        self,
85    ) -> ::std::result::Result<
86        crate::operation::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplateOutput,
87        ::aws_smithy_runtime_api::client::result::SdkError<
88            crate::operation::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplateError,
89            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
90        >,
91    > {
92        let input = self
93            .inner
94            .build()
95            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
96        let runtime_plugins = crate::operation::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplate::operation_runtime_plugins(
97            self.handle.runtime_plugins.clone(),
98            &self.handle.conf,
99            self.config_override,
100        );
101        crate::operation::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplate::orchestrate(&runtime_plugins, input).await
102    }
103
104    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
105    pub fn customize(
106        self,
107    ) -> crate::client::customize::CustomizableOperation<
108        crate::operation::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplateOutput,
109        crate::operation::get_flow_logs_integration_template::GetFlowLogsIntegrationTemplateError,
110        Self,
111    > {
112        crate::client::customize::CustomizableOperation::new(self)
113    }
114    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
115        self.set_config_override(::std::option::Option::Some(config_override.into()));
116        self
117    }
118
119    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
120        self.config_override = config_override;
121        self
122    }
123    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
124    pub fn dry_run(mut self, input: bool) -> Self {
125        self.inner = self.inner.dry_run(input);
126        self
127    }
128    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
129    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
130        self.inner = self.inner.set_dry_run(input);
131        self
132    }
133    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
134    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
135        self.inner.get_dry_run()
136    }
137    /// <p>The ID of the flow log.</p>
138    pub fn flow_log_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139        self.inner = self.inner.flow_log_id(input.into());
140        self
141    }
142    /// <p>The ID of the flow log.</p>
143    pub fn set_flow_log_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144        self.inner = self.inner.set_flow_log_id(input);
145        self
146    }
147    /// <p>The ID of the flow log.</p>
148    pub fn get_flow_log_id(&self) -> &::std::option::Option<::std::string::String> {
149        self.inner.get_flow_log_id()
150    }
151    /// <p>To store the CloudFormation template in Amazon S3, specify the location in Amazon S3.</p>
152    pub fn config_delivery_s3_destination_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.inner = self.inner.config_delivery_s3_destination_arn(input.into());
154        self
155    }
156    /// <p>To store the CloudFormation template in Amazon S3, specify the location in Amazon S3.</p>
157    pub fn set_config_delivery_s3_destination_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.inner = self.inner.set_config_delivery_s3_destination_arn(input);
159        self
160    }
161    /// <p>To store the CloudFormation template in Amazon S3, specify the location in Amazon S3.</p>
162    pub fn get_config_delivery_s3_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
163        self.inner.get_config_delivery_s3_destination_arn()
164    }
165    /// <p>Information about the service integration.</p>
166    pub fn integrate_services(mut self, input: crate::types::IntegrateServices) -> Self {
167        self.inner = self.inner.integrate_services(input);
168        self
169    }
170    /// <p>Information about the service integration.</p>
171    pub fn set_integrate_services(mut self, input: ::std::option::Option<crate::types::IntegrateServices>) -> Self {
172        self.inner = self.inner.set_integrate_services(input);
173        self
174    }
175    /// <p>Information about the service integration.</p>
176    pub fn get_integrate_services(&self) -> &::std::option::Option<crate::types::IntegrateServices> {
177        self.inner.get_integrate_services()
178    }
179}