aws_sdk_appflow/operation/reset_connector_metadata_cache/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::reset_connector_metadata_cache::_reset_connector_metadata_cache_output::ResetConnectorMetadataCacheOutputBuilder;
3
4pub use crate::operation::reset_connector_metadata_cache::_reset_connector_metadata_cache_input::ResetConnectorMetadataCacheInputBuilder;
5
6impl crate::operation::reset_connector_metadata_cache::builders::ResetConnectorMetadataCacheInputBuilder {
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::reset_connector_metadata_cache::ResetConnectorMetadataCacheOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::reset_connector_metadata_cache::ResetConnectorMetadataCacheError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.reset_connector_metadata_cache();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ResetConnectorMetadataCache`.
24///
25/// <p>Resets metadata about your connector entities that Amazon AppFlow stored in its cache. Use this action when you want Amazon AppFlow to return the latest information about the data that you have in a source application.</p>
26/// <p>Amazon AppFlow returns metadata about your entities when you use the ListConnectorEntities or DescribeConnectorEntities actions. Following these actions, Amazon AppFlow caches the metadata to reduce the number of API requests that it must send to the source application. Amazon AppFlow automatically resets the cache once every hour, but you can use this action when you want to get the latest metadata right away.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct ResetConnectorMetadataCacheFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::reset_connector_metadata_cache::builders::ResetConnectorMetadataCacheInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::reset_connector_metadata_cache::ResetConnectorMetadataCacheOutput,
36 crate::operation::reset_connector_metadata_cache::ResetConnectorMetadataCacheError,
37 > for ResetConnectorMetadataCacheFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::reset_connector_metadata_cache::ResetConnectorMetadataCacheOutput,
45 crate::operation::reset_connector_metadata_cache::ResetConnectorMetadataCacheError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl ResetConnectorMetadataCacheFluentBuilder {
52 /// Creates a new `ResetConnectorMetadataCacheFluentBuilder`.
53 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 /// Access the ResetConnectorMetadataCache as a reference.
61 pub fn as_input(&self) -> &crate::operation::reset_connector_metadata_cache::builders::ResetConnectorMetadataCacheInputBuilder {
62 &self.inner
63 }
64 /// Sends the request and returns the response.
65 ///
66 /// If an error occurs, an `SdkError` will be returned with additional details that
67 /// can be matched against.
68 ///
69 /// By default, any retryable failures will be retried twice. Retry behavior
70 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71 /// set when configuring the client.
72 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::reset_connector_metadata_cache::ResetConnectorMetadataCacheOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::reset_connector_metadata_cache::ResetConnectorMetadataCacheError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::reset_connector_metadata_cache::ResetConnectorMetadataCache::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::reset_connector_metadata_cache::ResetConnectorMetadataCache::orchestrate(&runtime_plugins, input).await
91 }
92
93 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::reset_connector_metadata_cache::ResetConnectorMetadataCacheOutput,
98 crate::operation::reset_connector_metadata_cache::ResetConnectorMetadataCacheError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 /// <p>The name of the connector profile that you want to reset cached metadata for.</p>
113 /// <p>You can omit this parameter if you're resetting the cache for any of the following connectors: Amazon Connect, Amazon EventBridge, Amazon Lookout for Metrics, Amazon S3, or Upsolver. If you're resetting the cache for any other connector, you must include this parameter in your request.</p>
114 pub fn connector_profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.inner = self.inner.connector_profile_name(input.into());
116 self
117 }
118 /// <p>The name of the connector profile that you want to reset cached metadata for.</p>
119 /// <p>You can omit this parameter if you're resetting the cache for any of the following connectors: Amazon Connect, Amazon EventBridge, Amazon Lookout for Metrics, Amazon S3, or Upsolver. If you're resetting the cache for any other connector, you must include this parameter in your request.</p>
120 pub fn set_connector_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.inner = self.inner.set_connector_profile_name(input);
122 self
123 }
124 /// <p>The name of the connector profile that you want to reset cached metadata for.</p>
125 /// <p>You can omit this parameter if you're resetting the cache for any of the following connectors: Amazon Connect, Amazon EventBridge, Amazon Lookout for Metrics, Amazon S3, or Upsolver. If you're resetting the cache for any other connector, you must include this parameter in your request.</p>
126 pub fn get_connector_profile_name(&self) -> &::std::option::Option<::std::string::String> {
127 self.inner.get_connector_profile_name()
128 }
129 /// <p>The type of connector to reset cached metadata for.</p>
130 /// <p>You must include this parameter in your request if you're resetting the cache for any of the following connectors: Amazon Connect, Amazon EventBridge, Amazon Lookout for Metrics, Amazon S3, or Upsolver. If you're resetting the cache for any other connector, you can omit this parameter from your request.</p>
131 pub fn connector_type(mut self, input: crate::types::ConnectorType) -> Self {
132 self.inner = self.inner.connector_type(input);
133 self
134 }
135 /// <p>The type of connector to reset cached metadata for.</p>
136 /// <p>You must include this parameter in your request if you're resetting the cache for any of the following connectors: Amazon Connect, Amazon EventBridge, Amazon Lookout for Metrics, Amazon S3, or Upsolver. If you're resetting the cache for any other connector, you can omit this parameter from your request.</p>
137 pub fn set_connector_type(mut self, input: ::std::option::Option<crate::types::ConnectorType>) -> Self {
138 self.inner = self.inner.set_connector_type(input);
139 self
140 }
141 /// <p>The type of connector to reset cached metadata for.</p>
142 /// <p>You must include this parameter in your request if you're resetting the cache for any of the following connectors: Amazon Connect, Amazon EventBridge, Amazon Lookout for Metrics, Amazon S3, or Upsolver. If you're resetting the cache for any other connector, you can omit this parameter from your request.</p>
143 pub fn get_connector_type(&self) -> &::std::option::Option<crate::types::ConnectorType> {
144 self.inner.get_connector_type()
145 }
146 /// <p>Use this parameter if you want to reset cached metadata about the details for an individual entity.</p>
147 /// <p>If you don't include this parameter in your request, Amazon AppFlow only resets cached metadata about entity names, not entity details.</p>
148 pub fn connector_entity_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149 self.inner = self.inner.connector_entity_name(input.into());
150 self
151 }
152 /// <p>Use this parameter if you want to reset cached metadata about the details for an individual entity.</p>
153 /// <p>If you don't include this parameter in your request, Amazon AppFlow only resets cached metadata about entity names, not entity details.</p>
154 pub fn set_connector_entity_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.inner = self.inner.set_connector_entity_name(input);
156 self
157 }
158 /// <p>Use this parameter if you want to reset cached metadata about the details for an individual entity.</p>
159 /// <p>If you don't include this parameter in your request, Amazon AppFlow only resets cached metadata about entity names, not entity details.</p>
160 pub fn get_connector_entity_name(&self) -> &::std::option::Option<::std::string::String> {
161 self.inner.get_connector_entity_name()
162 }
163 /// <p>Use this parameter only if you’re resetting the cached metadata about a nested entity. Only some connectors support nested entities. A nested entity is one that has another entity as a parent. To use this parameter, specify the name of the parent entity.</p>
164 /// <p>To look up the parent-child relationship of entities, you can send a ListConnectorEntities request that omits the entitiesPath parameter. Amazon AppFlow will return a list of top-level entities. For each one, it indicates whether the entity has nested entities. Then, in a subsequent ListConnectorEntities request, you can specify a parent entity name for the entitiesPath parameter. Amazon AppFlow will return a list of the child entities for that parent.</p>
165 pub fn entities_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166 self.inner = self.inner.entities_path(input.into());
167 self
168 }
169 /// <p>Use this parameter only if you’re resetting the cached metadata about a nested entity. Only some connectors support nested entities. A nested entity is one that has another entity as a parent. To use this parameter, specify the name of the parent entity.</p>
170 /// <p>To look up the parent-child relationship of entities, you can send a ListConnectorEntities request that omits the entitiesPath parameter. Amazon AppFlow will return a list of top-level entities. For each one, it indicates whether the entity has nested entities. Then, in a subsequent ListConnectorEntities request, you can specify a parent entity name for the entitiesPath parameter. Amazon AppFlow will return a list of the child entities for that parent.</p>
171 pub fn set_entities_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172 self.inner = self.inner.set_entities_path(input);
173 self
174 }
175 /// <p>Use this parameter only if you’re resetting the cached metadata about a nested entity. Only some connectors support nested entities. A nested entity is one that has another entity as a parent. To use this parameter, specify the name of the parent entity.</p>
176 /// <p>To look up the parent-child relationship of entities, you can send a ListConnectorEntities request that omits the entitiesPath parameter. Amazon AppFlow will return a list of top-level entities. For each one, it indicates whether the entity has nested entities. Then, in a subsequent ListConnectorEntities request, you can specify a parent entity name for the entitiesPath parameter. Amazon AppFlow will return a list of the child entities for that parent.</p>
177 pub fn get_entities_path(&self) -> &::std::option::Option<::std::string::String> {
178 self.inner.get_entities_path()
179 }
180 /// <p>The API version that you specified in the connector profile that you’re resetting cached metadata for. You must use this parameter only if the connector supports multiple API versions or if the connector type is CustomConnector.</p>
181 /// <p>To look up how many versions a connector supports, use the DescribeConnectors action. In the response, find the value that Amazon AppFlow returns for the connectorVersion parameter.</p>
182 /// <p>To look up the connector type, use the DescribeConnectorProfiles action. In the response, find the value that Amazon AppFlow returns for the connectorType parameter.</p>
183 /// <p>To look up the API version that you specified in a connector profile, use the DescribeConnectorProfiles action.</p>
184 pub fn api_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185 self.inner = self.inner.api_version(input.into());
186 self
187 }
188 /// <p>The API version that you specified in the connector profile that you’re resetting cached metadata for. You must use this parameter only if the connector supports multiple API versions or if the connector type is CustomConnector.</p>
189 /// <p>To look up how many versions a connector supports, use the DescribeConnectors action. In the response, find the value that Amazon AppFlow returns for the connectorVersion parameter.</p>
190 /// <p>To look up the connector type, use the DescribeConnectorProfiles action. In the response, find the value that Amazon AppFlow returns for the connectorType parameter.</p>
191 /// <p>To look up the API version that you specified in a connector profile, use the DescribeConnectorProfiles action.</p>
192 pub fn set_api_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193 self.inner = self.inner.set_api_version(input);
194 self
195 }
196 /// <p>The API version that you specified in the connector profile that you’re resetting cached metadata for. You must use this parameter only if the connector supports multiple API versions or if the connector type is CustomConnector.</p>
197 /// <p>To look up how many versions a connector supports, use the DescribeConnectors action. In the response, find the value that Amazon AppFlow returns for the connectorVersion parameter.</p>
198 /// <p>To look up the connector type, use the DescribeConnectorProfiles action. In the response, find the value that Amazon AppFlow returns for the connectorType parameter.</p>
199 /// <p>To look up the API version that you specified in a connector profile, use the DescribeConnectorProfiles action.</p>
200 pub fn get_api_version(&self) -> &::std::option::Option<::std::string::String> {
201 self.inner.get_api_version()
202 }
203}