aws-sdk-cloudformation 1.111.0

AWS SDK for AWS CloudFormation
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::list_hook_results::_list_hook_results_input::ListHookResultsInputBuilder;

pub use crate::operation::list_hook_results::_list_hook_results_output::ListHookResultsOutputBuilder;

impl crate::operation::list_hook_results::builders::ListHookResultsInputBuilder {
    /// 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_hook_results::ListHookResultsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::list_hook_results::ListHookResultsError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.list_hook_results();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `ListHookResults`.
///
/// <p>Returns summaries of invoked Hooks. For more information, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/hooks-userguide/hooks-view-invocations.html">View invocation summaries for CloudFormation Hooks</a> in the <i>CloudFormation Hooks User Guide</i>.</p>
/// <p>This operation supports the following parameter combinations:</p>
/// <ul>
/// <li>
/// <p>No parameters: Returns all Hook invocation summaries.</p></li>
/// <li>
/// <p><code>TypeArn</code> only: Returns summaries for a specific Hook.</p></li>
/// <li>
/// <p><code>TypeArn</code> and <code>Status</code>: Returns summaries for a specific Hook filtered by status.</p></li>
/// <li>
/// <p><code>TargetId</code> and <code>TargetType</code>: Returns summaries for a specific Hook invocation target.</p></li>
/// </ul>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ListHookResultsFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::list_hook_results::builders::ListHookResultsInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::list_hook_results::ListHookResultsOutput,
        crate::operation::list_hook_results::ListHookResultsError,
    > for ListHookResultsFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::list_hook_results::ListHookResultsOutput,
            crate::operation::list_hook_results::ListHookResultsError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl ListHookResultsFluentBuilder {
    /// Creates a new `ListHookResultsFluentBuilder`.
    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 ListHookResults as a reference.
    pub fn as_input(&self) -> &crate::operation::list_hook_results::builders::ListHookResultsInputBuilder {
        &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_hook_results::ListHookResultsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::list_hook_results::ListHookResultsError,
            ::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_hook_results::ListHookResults::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::list_hook_results::ListHookResults::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_hook_results::ListHookResultsOutput,
        crate::operation::list_hook_results::ListHookResultsError,
        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
    }
    /// <p>Filters results by target type. Currently, only <code>CHANGE_SET</code> and <code>CLOUD_CONTROL</code> are supported filter options.</p>
    /// <p>Required when <code>TargetId</code> is specified and cannot be used otherwise.</p>
    pub fn target_type(mut self, input: crate::types::ListHookResultsTargetType) -> Self {
        self.inner = self.inner.target_type(input);
        self
    }
    /// <p>Filters results by target type. Currently, only <code>CHANGE_SET</code> and <code>CLOUD_CONTROL</code> are supported filter options.</p>
    /// <p>Required when <code>TargetId</code> is specified and cannot be used otherwise.</p>
    pub fn set_target_type(mut self, input: ::std::option::Option<crate::types::ListHookResultsTargetType>) -> Self {
        self.inner = self.inner.set_target_type(input);
        self
    }
    /// <p>Filters results by target type. Currently, only <code>CHANGE_SET</code> and <code>CLOUD_CONTROL</code> are supported filter options.</p>
    /// <p>Required when <code>TargetId</code> is specified and cannot be used otherwise.</p>
    pub fn get_target_type(&self) -> &::std::option::Option<crate::types::ListHookResultsTargetType> {
        self.inner.get_target_type()
    }
    /// <p>Filters results by the unique identifier of the target the Hook was invoked against.</p>
    /// <p>For change sets, this is the change set ARN. When the target is a Cloud Control API operation, this value must be the <code>HookRequestToken</code> returned by the Cloud Control API request. For more information on the <code>HookRequestToken</code>, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_ProgressEvent.html">ProgressEvent</a>.</p>
    /// <p>Required when <code>TargetType</code> is specified and cannot be used otherwise.</p>
    pub fn target_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.target_id(input.into());
        self
    }
    /// <p>Filters results by the unique identifier of the target the Hook was invoked against.</p>
    /// <p>For change sets, this is the change set ARN. When the target is a Cloud Control API operation, this value must be the <code>HookRequestToken</code> returned by the Cloud Control API request. For more information on the <code>HookRequestToken</code>, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_ProgressEvent.html">ProgressEvent</a>.</p>
    /// <p>Required when <code>TargetType</code> is specified and cannot be used otherwise.</p>
    pub fn set_target_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_target_id(input);
        self
    }
    /// <p>Filters results by the unique identifier of the target the Hook was invoked against.</p>
    /// <p>For change sets, this is the change set ARN. When the target is a Cloud Control API operation, this value must be the <code>HookRequestToken</code> returned by the Cloud Control API request. For more information on the <code>HookRequestToken</code>, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_ProgressEvent.html">ProgressEvent</a>.</p>
    /// <p>Required when <code>TargetType</code> is specified and cannot be used otherwise.</p>
    pub fn get_target_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_target_id()
    }
    /// <p>Filters results by the ARN of the Hook. Can be used alone or in combination with <code>Status</code>.</p>
    pub fn type_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.type_arn(input.into());
        self
    }
    /// <p>Filters results by the ARN of the Hook. Can be used alone or in combination with <code>Status</code>.</p>
    pub fn set_type_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_type_arn(input);
        self
    }
    /// <p>Filters results by the ARN of the Hook. Can be used alone or in combination with <code>Status</code>.</p>
    pub fn get_type_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_type_arn()
    }
    /// <p>Filters results by the status of Hook invocations. Can only be used in combination with <code>TypeArn</code>. Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>HOOK_IN_PROGRESS</code>: The Hook is currently running.</p></li>
    /// <li>
    /// <p><code>HOOK_COMPLETE_SUCCEEDED</code>: The Hook completed successfully.</p></li>
    /// <li>
    /// <p><code>HOOK_COMPLETE_FAILED</code>: The Hook completed but failed validation.</p></li>
    /// <li>
    /// <p><code>HOOK_FAILED</code>: The Hook encountered an error during execution.</p></li>
    /// </ul>
    pub fn status(mut self, input: crate::types::HookStatus) -> Self {
        self.inner = self.inner.status(input);
        self
    }
    /// <p>Filters results by the status of Hook invocations. Can only be used in combination with <code>TypeArn</code>. Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>HOOK_IN_PROGRESS</code>: The Hook is currently running.</p></li>
    /// <li>
    /// <p><code>HOOK_COMPLETE_SUCCEEDED</code>: The Hook completed successfully.</p></li>
    /// <li>
    /// <p><code>HOOK_COMPLETE_FAILED</code>: The Hook completed but failed validation.</p></li>
    /// <li>
    /// <p><code>HOOK_FAILED</code>: The Hook encountered an error during execution.</p></li>
    /// </ul>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::HookStatus>) -> Self {
        self.inner = self.inner.set_status(input);
        self
    }
    /// <p>Filters results by the status of Hook invocations. Can only be used in combination with <code>TypeArn</code>. Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>HOOK_IN_PROGRESS</code>: The Hook is currently running.</p></li>
    /// <li>
    /// <p><code>HOOK_COMPLETE_SUCCEEDED</code>: The Hook completed successfully.</p></li>
    /// <li>
    /// <p><code>HOOK_COMPLETE_FAILED</code>: The Hook completed but failed validation.</p></li>
    /// <li>
    /// <p><code>HOOK_FAILED</code>: The Hook encountered an error during execution.</p></li>
    /// </ul>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::HookStatus> {
        self.inner.get_status()
    }
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.next_token(input.into());
        self
    }
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_next_token(input);
        self
    }
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_next_token()
    }
}