aws-sdk-assurance 1.0.0

AWS SDK for AWS Assurance
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::delete_framework::_delete_framework_input::DeleteFrameworkInputBuilder;

pub use crate::operation::delete_framework::_delete_framework_output::DeleteFrameworkOutputBuilder;

impl crate::operation::delete_framework::builders::DeleteFrameworkInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::delete_framework::DeleteFrameworkOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::delete_framework::DeleteFrameworkError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.delete_framework();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `DeleteFramework`.
///
/// <p>Deletes a custom framework that you no longer need. You can delete only custom frameworks. Managed frameworks are read-only. Before you delete a framework, you must disable it in every project where it is enabled. Otherwise, you receive a <code>ConflictException</code>.</p>
/// <p>A framework in <code>PENDING</code> status must be empty (no control groups or controls) before you delete it. Otherwise, you receive a <code>ConflictException</code>. When you delete an <code>ACTIVE</code> (published) framework, AWS Assurance also deletes its control groups and controls.</p>
/// <p>In every project, AWS Assurance also deletes your data for this framework version:</p>
/// <ul>
/// <li>
/// <p>Assessments and their results</p></li>
/// <li>
/// <p>Annotations</p></li>
/// <li>
/// <p>Tasks, task history, and comments</p></li>
/// <li>
/// <p>Decisions that mark a control or requirement as not applicable, and their justifications</p></li>
/// </ul>
/// <p>Consider this data permanently deleted as soon as the operation succeeds. Your evidence remains available, but it is no longer linked to the framework's controls.</p>
/// <p>To keep an assessment report, export it before you disable the framework. First, call <code>StartAssessmentReportExport</code>. Then wait until <code>GetAssessmentReportExport</code> reports <code>COMPLETED</code>. Finally, get the report with <code>GetAssessmentReportContent</code>.</p>
/// <p>The deletion can continue after the operation returns and might take some time. For example, the deletion might take longer while an assessment that uses the framework is still running. Until the deletion completes, creating a framework with the same name and version returns a <code>ConflictException</code>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct DeleteFrameworkFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::delete_framework::builders::DeleteFrameworkInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::delete_framework::DeleteFrameworkOutput,
        crate::operation::delete_framework::DeleteFrameworkError,
    > for DeleteFrameworkFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::delete_framework::DeleteFrameworkOutput,
            crate::operation::delete_framework::DeleteFrameworkError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl DeleteFrameworkFluentBuilder {
    /// Creates a new `DeleteFrameworkFluentBuilder`.
    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 DeleteFramework as a reference.
    pub fn as_input(&self) -> &crate::operation::delete_framework::builders::DeleteFrameworkInputBuilder {
        &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::delete_framework::DeleteFrameworkOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::delete_framework::DeleteFrameworkError,
            ::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::delete_framework::DeleteFramework::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::delete_framework::DeleteFramework::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::delete_framework::DeleteFrameworkOutput,
        crate::operation::delete_framework::DeleteFrameworkError,
        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>The ARN of this governance environment.</p>
    pub fn environment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.environment_arn(input.into());
        self
    }
    /// <p>The ARN of this governance environment.</p>
    pub fn set_environment_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_environment_arn(input);
        self
    }
    /// <p>The ARN of this governance environment.</p>
    pub fn get_environment_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_environment_arn()
    }
    /// <p>The name of the compliance framework.</p>
    pub fn framework(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.framework(input.into());
        self
    }
    /// <p>The name of the compliance framework.</p>
    pub fn set_framework(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_framework(input);
        self
    }
    /// <p>The name of the compliance framework.</p>
    pub fn get_framework(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_framework()
    }
    /// <p>The version of the compliance framework.</p>
    pub fn framework_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.framework_version(input.into());
        self
    }
    /// <p>The version of the compliance framework.</p>
    pub fn set_framework_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_framework_version(input);
        self
    }
    /// <p>The version of the compliance framework.</p>
    pub fn get_framework_version(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_framework_version()
    }
}