aws-sdk-backup 1.109.0

AWS SDK for AWS Backup
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::start_scan_job::_start_scan_job_input::StartScanJobInputBuilder;

pub use crate::operation::start_scan_job::_start_scan_job_output::StartScanJobOutputBuilder;

impl crate::operation::start_scan_job::builders::StartScanJobInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::start_scan_job::StartScanJobOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_scan_job::StartScanJobError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.start_scan_job();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `StartScanJob`.
///
/// <p>Starts scanning jobs for specific resources.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct StartScanJobFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::start_scan_job::builders::StartScanJobInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::start_scan_job::StartScanJobOutput,
        crate::operation::start_scan_job::StartScanJobError,
    > for StartScanJobFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::start_scan_job::StartScanJobOutput,
            crate::operation::start_scan_job::StartScanJobError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl StartScanJobFluentBuilder {
    /// Creates a new `StartScanJobFluentBuilder`.
    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 StartScanJob as a reference.
    pub fn as_input(&self) -> &crate::operation::start_scan_job::builders::StartScanJobInputBuilder {
        &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::start_scan_job::StartScanJobOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_scan_job::StartScanJobError,
            ::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::start_scan_job::StartScanJob::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::start_scan_job::StartScanJob::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::start_scan_job::StartScanJobOutput,
        crate::operation::start_scan_job::StartScanJobError,
        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 name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created.</p>
    /// <p>Pattern: <code>^\[a-zA-Z0-9\-\_\]{2,50}$</code></p>
    pub fn backup_vault_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.backup_vault_name(input.into());
        self
    }
    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created.</p>
    /// <p>Pattern: <code>^\[a-zA-Z0-9\-\_\]{2,50}$</code></p>
    pub fn set_backup_vault_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_backup_vault_name(input);
        self
    }
    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created.</p>
    /// <p>Pattern: <code>^\[a-zA-Z0-9\-\_\]{2,50}$</code></p>
    pub fn get_backup_vault_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_backup_vault_name()
    }
    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
    pub fn iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.iam_role_arn(input.into());
        self
    }
    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
    pub fn set_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_iam_role_arn(input);
        self
    }
    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
    pub fn get_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_iam_role_arn()
    }
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>StartScanJob</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub fn idempotency_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.idempotency_token(input.into());
        self
    }
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>StartScanJob</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub fn set_idempotency_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_idempotency_token(input);
        self
    }
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>StartScanJob</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub fn get_idempotency_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_idempotency_token()
    }
    /// <p>Specifies the malware scanner used during the scan job. Currently only supports <code>GUARDDUTY</code>.</p>
    pub fn malware_scanner(mut self, input: crate::types::MalwareScanner) -> Self {
        self.inner = self.inner.malware_scanner(input);
        self
    }
    /// <p>Specifies the malware scanner used during the scan job. Currently only supports <code>GUARDDUTY</code>.</p>
    pub fn set_malware_scanner(mut self, input: ::std::option::Option<crate::types::MalwareScanner>) -> Self {
        self.inner = self.inner.set_malware_scanner(input);
        self
    }
    /// <p>Specifies the malware scanner used during the scan job. Currently only supports <code>GUARDDUTY</code>.</p>
    pub fn get_malware_scanner(&self) -> &::std::option::Option<crate::types::MalwareScanner> {
        self.inner.get_malware_scanner()
    }
    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point. This is your target recovery point for a full scan. If you are running an incremental scan, this will be your a recovery point which has been created after your base recovery point selection.</p>
    pub fn recovery_point_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.recovery_point_arn(input.into());
        self
    }
    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point. This is your target recovery point for a full scan. If you are running an incremental scan, this will be your a recovery point which has been created after your base recovery point selection.</p>
    pub fn set_recovery_point_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_recovery_point_arn(input);
        self
    }
    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point. This is your target recovery point for a full scan. If you are running an incremental scan, this will be your a recovery point which has been created after your base recovery point selection.</p>
    pub fn get_recovery_point_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_recovery_point_arn()
    }
    /// <p>An ARN that uniquely identifies the base recovery point to be used for incremental scanning.</p>
    pub fn scan_base_recovery_point_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.scan_base_recovery_point_arn(input.into());
        self
    }
    /// <p>An ARN that uniquely identifies the base recovery point to be used for incremental scanning.</p>
    pub fn set_scan_base_recovery_point_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_scan_base_recovery_point_arn(input);
        self
    }
    /// <p>An ARN that uniquely identifies the base recovery point to be used for incremental scanning.</p>
    pub fn get_scan_base_recovery_point_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_scan_base_recovery_point_arn()
    }
    /// <p>Specifies the scan type use for the scan job.</p>
    /// <p>Includes:</p>
    /// <ul>
    /// <li>
    /// <p><code>FULL_SCAN</code> will scan the entire data lineage within the backup.</p></li>
    /// <li>
    /// <p><code>INCREMENTAL_SCAN</code> will scan the data difference between the target recovery point and base recovery point ARN.</p></li>
    /// </ul>
    pub fn scan_mode(mut self, input: crate::types::ScanMode) -> Self {
        self.inner = self.inner.scan_mode(input);
        self
    }
    /// <p>Specifies the scan type use for the scan job.</p>
    /// <p>Includes:</p>
    /// <ul>
    /// <li>
    /// <p><code>FULL_SCAN</code> will scan the entire data lineage within the backup.</p></li>
    /// <li>
    /// <p><code>INCREMENTAL_SCAN</code> will scan the data difference between the target recovery point and base recovery point ARN.</p></li>
    /// </ul>
    pub fn set_scan_mode(mut self, input: ::std::option::Option<crate::types::ScanMode>) -> Self {
        self.inner = self.inner.set_scan_mode(input);
        self
    }
    /// <p>Specifies the scan type use for the scan job.</p>
    /// <p>Includes:</p>
    /// <ul>
    /// <li>
    /// <p><code>FULL_SCAN</code> will scan the entire data lineage within the backup.</p></li>
    /// <li>
    /// <p><code>INCREMENTAL_SCAN</code> will scan the data difference between the target recovery point and base recovery point ARN.</p></li>
    /// </ul>
    pub fn get_scan_mode(&self) -> &::std::option::Option<crate::types::ScanMode> {
        self.inner.get_scan_mode()
    }
    /// <p>Specified the IAM scanner role ARN.</p>
    pub fn scanner_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.scanner_role_arn(input.into());
        self
    }
    /// <p>Specified the IAM scanner role ARN.</p>
    pub fn set_scanner_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_scanner_role_arn(input);
        self
    }
    /// <p>Specified the IAM scanner role ARN.</p>
    pub fn get_scanner_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_scanner_role_arn()
    }
}