aws_sdk_swf/operation/get_workflow_execution_history/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_workflow_execution_history::_get_workflow_execution_history_output::GetWorkflowExecutionHistoryOutputBuilder;
3
4pub use crate::operation::get_workflow_execution_history::_get_workflow_execution_history_input::GetWorkflowExecutionHistoryInputBuilder;
5
6impl crate::operation::get_workflow_execution_history::builders::GetWorkflowExecutionHistoryInputBuilder {
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_workflow_execution_history::GetWorkflowExecutionHistoryOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_workflow_execution_history::GetWorkflowExecutionHistoryError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_workflow_execution_history();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetWorkflowExecutionHistory`.
24///
25/// <p>Returns the history of the specified workflow execution. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the <code>nextPageToken</code> returned by the initial call.</p><note>
26/// <p>This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.</p>
27/// </note>
28/// <p><b>Access Control</b></p>
29/// <p>You can use IAM policies to control this action's access to Amazon SWF resources as follows:</p>
30/// <ul>
31/// <li>
32/// <p>Use a <code>Resource</code> element with the domain name to limit the action to only specified domains.</p></li>
33/// <li>
34/// <p>Use an <code>Action</code> element to allow or deny permission to call this action.</p></li>
35/// <li>
36/// <p>You cannot use an IAM policy to constrain this action's parameters.</p></li>
37/// </ul>
38/// <p>If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's <code>cause</code> parameter is set to <code>OPERATION_NOT_PERMITTED</code>. For details and example IAM policies, see <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html">Using IAM to Manage Access to Amazon SWF Workflows</a> in the <i>Amazon SWF Developer Guide</i>.</p>
39#[derive(::std::clone::Clone, ::std::fmt::Debug)]
40pub struct GetWorkflowExecutionHistoryFluentBuilder {
41    handle: ::std::sync::Arc<crate::client::Handle>,
42    inner: crate::operation::get_workflow_execution_history::builders::GetWorkflowExecutionHistoryInputBuilder,
43    config_override: ::std::option::Option<crate::config::Builder>,
44}
45impl
46    crate::client::customize::internal::CustomizableSend<
47        crate::operation::get_workflow_execution_history::GetWorkflowExecutionHistoryOutput,
48        crate::operation::get_workflow_execution_history::GetWorkflowExecutionHistoryError,
49    > for GetWorkflowExecutionHistoryFluentBuilder
50{
51    fn send(
52        self,
53        config_override: crate::config::Builder,
54    ) -> crate::client::customize::internal::BoxFuture<
55        crate::client::customize::internal::SendResult<
56            crate::operation::get_workflow_execution_history::GetWorkflowExecutionHistoryOutput,
57            crate::operation::get_workflow_execution_history::GetWorkflowExecutionHistoryError,
58        >,
59    > {
60        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
61    }
62}
63impl GetWorkflowExecutionHistoryFluentBuilder {
64    /// Creates a new `GetWorkflowExecutionHistoryFluentBuilder`.
65    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
66        Self {
67            handle,
68            inner: ::std::default::Default::default(),
69            config_override: ::std::option::Option::None,
70        }
71    }
72    /// Access the GetWorkflowExecutionHistory as a reference.
73    pub fn as_input(&self) -> &crate::operation::get_workflow_execution_history::builders::GetWorkflowExecutionHistoryInputBuilder {
74        &self.inner
75    }
76    /// Sends the request and returns the response.
77    ///
78    /// If an error occurs, an `SdkError` will be returned with additional details that
79    /// can be matched against.
80    ///
81    /// By default, any retryable failures will be retried twice. Retry behavior
82    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
83    /// set when configuring the client.
84    pub async fn send(
85        self,
86    ) -> ::std::result::Result<
87        crate::operation::get_workflow_execution_history::GetWorkflowExecutionHistoryOutput,
88        ::aws_smithy_runtime_api::client::result::SdkError<
89            crate::operation::get_workflow_execution_history::GetWorkflowExecutionHistoryError,
90            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
91        >,
92    > {
93        let input = self
94            .inner
95            .build()
96            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
97        let runtime_plugins = crate::operation::get_workflow_execution_history::GetWorkflowExecutionHistory::operation_runtime_plugins(
98            self.handle.runtime_plugins.clone(),
99            &self.handle.conf,
100            self.config_override,
101        );
102        crate::operation::get_workflow_execution_history::GetWorkflowExecutionHistory::orchestrate(&runtime_plugins, input).await
103    }
104
105    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
106    pub fn customize(
107        self,
108    ) -> crate::client::customize::CustomizableOperation<
109        crate::operation::get_workflow_execution_history::GetWorkflowExecutionHistoryOutput,
110        crate::operation::get_workflow_execution_history::GetWorkflowExecutionHistoryError,
111        Self,
112    > {
113        crate::client::customize::CustomizableOperation::new(self)
114    }
115    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
116        self.set_config_override(::std::option::Option::Some(config_override.into()));
117        self
118    }
119
120    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
121        self.config_override = config_override;
122        self
123    }
124    /// Create a paginator for this request
125    ///
126    /// Paginators are used by calling [`send().await`](crate::operation::get_workflow_execution_history::paginator::GetWorkflowExecutionHistoryPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
127    pub fn into_paginator(self) -> crate::operation::get_workflow_execution_history::paginator::GetWorkflowExecutionHistoryPaginator {
128        crate::operation::get_workflow_execution_history::paginator::GetWorkflowExecutionHistoryPaginator::new(self.handle, self.inner)
129    }
130    /// <p>The name of the domain containing the workflow execution.</p>
131    pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.inner = self.inner.domain(input.into());
133        self
134    }
135    /// <p>The name of the domain containing the workflow execution.</p>
136    pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.inner = self.inner.set_domain(input);
138        self
139    }
140    /// <p>The name of the domain containing the workflow execution.</p>
141    pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
142        self.inner.get_domain()
143    }
144    /// <p>Specifies the workflow execution for which to return the history.</p>
145    pub fn execution(mut self, input: crate::types::WorkflowExecution) -> Self {
146        self.inner = self.inner.execution(input);
147        self
148    }
149    /// <p>Specifies the workflow execution for which to return the history.</p>
150    pub fn set_execution(mut self, input: ::std::option::Option<crate::types::WorkflowExecution>) -> Self {
151        self.inner = self.inner.set_execution(input);
152        self
153    }
154    /// <p>Specifies the workflow execution for which to return the history.</p>
155    pub fn get_execution(&self) -> &::std::option::Option<crate::types::WorkflowExecution> {
156        self.inner.get_execution()
157    }
158    /// <p>If <code>NextPageToken</code> is returned there are more results available. The value of <code>NextPageToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return a <code>400</code> error: "<code>Specified token has exceeded its maximum lifetime</code>".</p>
159    /// <p>The configured <code>maximumPageSize</code> determines how many results can be returned in a single call.</p>
160    pub fn next_page_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161        self.inner = self.inner.next_page_token(input.into());
162        self
163    }
164    /// <p>If <code>NextPageToken</code> is returned there are more results available. The value of <code>NextPageToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return a <code>400</code> error: "<code>Specified token has exceeded its maximum lifetime</code>".</p>
165    /// <p>The configured <code>maximumPageSize</code> determines how many results can be returned in a single call.</p>
166    pub fn set_next_page_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.inner = self.inner.set_next_page_token(input);
168        self
169    }
170    /// <p>If <code>NextPageToken</code> is returned there are more results available. The value of <code>NextPageToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return a <code>400</code> error: "<code>Specified token has exceeded its maximum lifetime</code>".</p>
171    /// <p>The configured <code>maximumPageSize</code> determines how many results can be returned in a single call.</p>
172    pub fn get_next_page_token(&self) -> &::std::option::Option<::std::string::String> {
173        self.inner.get_next_page_token()
174    }
175    /// <p>The maximum number of results that are returned per call. Use <code>nextPageToken</code> to obtain further pages of results.</p>
176    pub fn maximum_page_size(mut self, input: i32) -> Self {
177        self.inner = self.inner.maximum_page_size(input);
178        self
179    }
180    /// <p>The maximum number of results that are returned per call. Use <code>nextPageToken</code> to obtain further pages of results.</p>
181    pub fn set_maximum_page_size(mut self, input: ::std::option::Option<i32>) -> Self {
182        self.inner = self.inner.set_maximum_page_size(input);
183        self
184    }
185    /// <p>The maximum number of results that are returned per call. Use <code>nextPageToken</code> to obtain further pages of results.</p>
186    pub fn get_maximum_page_size(&self) -> &::std::option::Option<i32> {
187        self.inner.get_maximum_page_size()
188    }
189    /// <p>When set to <code>true</code>, returns the events in reverse order. By default the results are returned in ascending order of the <code>eventTimeStamp</code> of the events.</p>
190    pub fn reverse_order(mut self, input: bool) -> Self {
191        self.inner = self.inner.reverse_order(input);
192        self
193    }
194    /// <p>When set to <code>true</code>, returns the events in reverse order. By default the results are returned in ascending order of the <code>eventTimeStamp</code> of the events.</p>
195    pub fn set_reverse_order(mut self, input: ::std::option::Option<bool>) -> Self {
196        self.inner = self.inner.set_reverse_order(input);
197        self
198    }
199    /// <p>When set to <code>true</code>, returns the events in reverse order. By default the results are returned in ascending order of the <code>eventTimeStamp</code> of the events.</p>
200    pub fn get_reverse_order(&self) -> &::std::option::Option<bool> {
201        self.inner.get_reverse_order()
202    }
203}