aws-sdk-lambda 1.121.0

AWS SDK for AWS Lambda
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::list_durable_executions_by_function::_list_durable_executions_by_function_input::ListDurableExecutionsByFunctionInputBuilder;

pub use crate::operation::list_durable_executions_by_function::_list_durable_executions_by_function_output::ListDurableExecutionsByFunctionOutputBuilder;

impl crate::operation::list_durable_executions_by_function::builders::ListDurableExecutionsByFunctionInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunctionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunctionError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.list_durable_executions_by_function();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `ListDurableExecutionsByFunction`.
///
/// <p>Returns a list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html">durable executions</a> for a specified Lambda function. You can filter the results by execution name, status, and start time range. This API supports pagination for large result sets.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ListDurableExecutionsByFunctionFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::list_durable_executions_by_function::builders::ListDurableExecutionsByFunctionInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunctionOutput,
        crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunctionError,
    > for ListDurableExecutionsByFunctionFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunctionOutput,
            crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunctionError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl ListDurableExecutionsByFunctionFluentBuilder {
    /// Creates a new `ListDurableExecutionsByFunctionFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the ListDurableExecutionsByFunction as a reference.
    pub fn as_input(&self) -> &crate::operation::list_durable_executions_by_function::builders::ListDurableExecutionsByFunctionInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunctionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunctionError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunction::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunction::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunctionOutput,
        crate::operation::list_durable_executions_by_function::ListDurableExecutionsByFunctionError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// Create a paginator for this request
    ///
    /// Paginators are used by calling [`send().await`](crate::operation::list_durable_executions_by_function::paginator::ListDurableExecutionsByFunctionPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
    pub fn into_paginator(self) -> crate::operation::list_durable_executions_by_function::paginator::ListDurableExecutionsByFunctionPaginator {
        crate::operation::list_durable_executions_by_function::paginator::ListDurableExecutionsByFunctionPaginator::new(self.handle, self.inner)
    }
    /// <p>The name or ARN of the Lambda function. You can specify a function name, a partial ARN, or a full ARN.</p>
    pub fn function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.function_name(input.into());
        self
    }
    /// <p>The name or ARN of the Lambda function. You can specify a function name, a partial ARN, or a full ARN.</p>
    pub fn set_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_function_name(input);
        self
    }
    /// <p>The name or ARN of the Lambda function. You can specify a function name, a partial ARN, or a full ARN.</p>
    pub fn get_function_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_function_name()
    }
    /// <p>The function version or alias. If not specified, lists executions for the $LATEST version.</p>
    pub fn qualifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.qualifier(input.into());
        self
    }
    /// <p>The function version or alias. If not specified, lists executions for the $LATEST version.</p>
    pub fn set_qualifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_qualifier(input);
        self
    }
    /// <p>The function version or alias. If not specified, lists executions for the $LATEST version.</p>
    pub fn get_qualifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_qualifier()
    }
    /// <p>Filter executions by name. Only executions with names that matches this string are returned.</p>
    pub fn durable_execution_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.durable_execution_name(input.into());
        self
    }
    /// <p>Filter executions by name. Only executions with names that matches this string are returned.</p>
    pub fn set_durable_execution_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_durable_execution_name(input);
        self
    }
    /// <p>Filter executions by name. Only executions with names that matches this string are returned.</p>
    pub fn get_durable_execution_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_durable_execution_name()
    }
    ///
    /// Appends an item to `Statuses`.
    ///
    /// To override the contents of this collection use [`set_statuses`](Self::set_statuses).
    ///
    /// <p>Filter executions by status. Valid values: RUNNING, SUCCEEDED, FAILED, TIMED_OUT, STOPPED.</p>
    pub fn statuses(mut self, input: crate::types::ExecutionStatus) -> Self {
        self.inner = self.inner.statuses(input);
        self
    }
    /// <p>Filter executions by status. Valid values: RUNNING, SUCCEEDED, FAILED, TIMED_OUT, STOPPED.</p>
    pub fn set_statuses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ExecutionStatus>>) -> Self {
        self.inner = self.inner.set_statuses(input);
        self
    }
    /// <p>Filter executions by status. Valid values: RUNNING, SUCCEEDED, FAILED, TIMED_OUT, STOPPED.</p>
    pub fn get_statuses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ExecutionStatus>> {
        self.inner.get_statuses()
    }
    /// <p>Filter executions that started after this timestamp (ISO 8601 format).</p>
    pub fn started_after(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.inner = self.inner.started_after(input);
        self
    }
    /// <p>Filter executions that started after this timestamp (ISO 8601 format).</p>
    pub fn set_started_after(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.inner = self.inner.set_started_after(input);
        self
    }
    /// <p>Filter executions that started after this timestamp (ISO 8601 format).</p>
    pub fn get_started_after(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        self.inner.get_started_after()
    }
    /// <p>Filter executions that started before this timestamp (ISO 8601 format).</p>
    pub fn started_before(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.inner = self.inner.started_before(input);
        self
    }
    /// <p>Filter executions that started before this timestamp (ISO 8601 format).</p>
    pub fn set_started_before(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.inner = self.inner.set_started_before(input);
        self
    }
    /// <p>Filter executions that started before this timestamp (ISO 8601 format).</p>
    pub fn get_started_before(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        self.inner.get_started_before()
    }
    /// <p>Set to true to return results in reverse chronological order (newest first). Default is false.</p>
    pub fn reverse_order(mut self, input: bool) -> Self {
        self.inner = self.inner.reverse_order(input);
        self
    }
    /// <p>Set to true to return results in reverse chronological order (newest first). Default is false.</p>
    pub fn set_reverse_order(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_reverse_order(input);
        self
    }
    /// <p>Set to true to return results in reverse chronological order (newest first). Default is false.</p>
    pub fn get_reverse_order(&self) -> &::std::option::Option<bool> {
        self.inner.get_reverse_order()
    }
    /// <p>Pagination token from a previous request to continue retrieving results.</p>
    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.marker(input.into());
        self
    }
    /// <p>Pagination token from a previous request to continue retrieving results.</p>
    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_marker(input);
        self
    }
    /// <p>Pagination token from a previous request to continue retrieving results.</p>
    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_marker()
    }
    /// <p>Maximum number of executions to return (1-1000). Default is 100.</p>
    pub fn max_items(mut self, input: i32) -> Self {
        self.inner = self.inner.max_items(input);
        self
    }
    /// <p>Maximum number of executions to return (1-1000). Default is 100.</p>
    pub fn set_max_items(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_max_items(input);
        self
    }
    /// <p>Maximum number of executions to return (1-1000). Default is 100.</p>
    pub fn get_max_items(&self) -> &::std::option::Option<i32> {
        self.inner.get_max_items()
    }
}