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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartScanJobInput {
    /// <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 backup_vault_name: ::std::option::Option<::std::string::String>,
    /// <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 iam_role_arn: ::std::option::Option<::std::string::String>,
    /// <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 idempotency_token: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the malware scanner used during the scan job. Currently only supports <code>GUARDDUTY</code>.</p>
    pub malware_scanner: ::std::option::Option<crate::types::MalwareScanner>,
    /// <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 recovery_point_arn: ::std::option::Option<::std::string::String>,
    /// <p>An ARN that uniquely identifies the base recovery point to be used for incremental scanning.</p>
    pub scan_base_recovery_point_arn: ::std::option::Option<::std::string::String>,
    /// <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 scan_mode: ::std::option::Option<crate::types::ScanMode>,
    /// <p>Specified the IAM scanner role ARN.</p>
    pub scanner_role_arn: ::std::option::Option<::std::string::String>,
}
impl StartScanJobInput {
    /// <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(&self) -> ::std::option::Option<&str> {
        self.backup_vault_name.as_deref()
    }
    /// <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(&self) -> ::std::option::Option<&str> {
        self.iam_role_arn.as_deref()
    }
    /// <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(&self) -> ::std::option::Option<&str> {
        self.idempotency_token.as_deref()
    }
    /// <p>Specifies the malware scanner used during the scan job. Currently only supports <code>GUARDDUTY</code>.</p>
    pub fn malware_scanner(&self) -> ::std::option::Option<&crate::types::MalwareScanner> {
        self.malware_scanner.as_ref()
    }
    /// <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(&self) -> ::std::option::Option<&str> {
        self.recovery_point_arn.as_deref()
    }
    /// <p>An ARN that uniquely identifies the base recovery point to be used for incremental scanning.</p>
    pub fn scan_base_recovery_point_arn(&self) -> ::std::option::Option<&str> {
        self.scan_base_recovery_point_arn.as_deref()
    }
    /// <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(&self) -> ::std::option::Option<&crate::types::ScanMode> {
        self.scan_mode.as_ref()
    }
    /// <p>Specified the IAM scanner role ARN.</p>
    pub fn scanner_role_arn(&self) -> ::std::option::Option<&str> {
        self.scanner_role_arn.as_deref()
    }
}
impl StartScanJobInput {
    /// Creates a new builder-style object to manufacture [`StartScanJobInput`](crate::operation::start_scan_job::StartScanJobInput).
    pub fn builder() -> crate::operation::start_scan_job::builders::StartScanJobInputBuilder {
        crate::operation::start_scan_job::builders::StartScanJobInputBuilder::default()
    }
}

/// A builder for [`StartScanJobInput`](crate::operation::start_scan_job::StartScanJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartScanJobInputBuilder {
    pub(crate) backup_vault_name: ::std::option::Option<::std::string::String>,
    pub(crate) iam_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) idempotency_token: ::std::option::Option<::std::string::String>,
    pub(crate) malware_scanner: ::std::option::Option<crate::types::MalwareScanner>,
    pub(crate) recovery_point_arn: ::std::option::Option<::std::string::String>,
    pub(crate) scan_base_recovery_point_arn: ::std::option::Option<::std::string::String>,
    pub(crate) scan_mode: ::std::option::Option<crate::types::ScanMode>,
    pub(crate) scanner_role_arn: ::std::option::Option<::std::string::String>,
}
impl StartScanJobInputBuilder {
    /// <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>
    /// This field is required.
    pub fn backup_vault_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.backup_vault_name = ::std::option::Option::Some(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.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.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>
    /// This field is required.
    pub fn iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.iam_role_arn = ::std::option::Option::Some(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.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.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.idempotency_token = ::std::option::Option::Some(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.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.idempotency_token
    }
    /// <p>Specifies the malware scanner used during the scan job. Currently only supports <code>GUARDDUTY</code>.</p>
    /// This field is required.
    pub fn malware_scanner(mut self, input: crate::types::MalwareScanner) -> Self {
        self.malware_scanner = ::std::option::Option::Some(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.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.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>
    /// This field is required.
    pub fn recovery_point_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recovery_point_arn = ::std::option::Option::Some(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.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.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.scan_base_recovery_point_arn = ::std::option::Option::Some(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.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.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>
    /// This field is required.
    pub fn scan_mode(mut self, input: crate::types::ScanMode) -> Self {
        self.scan_mode = ::std::option::Option::Some(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.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.scan_mode
    }
    /// <p>Specified the IAM scanner role ARN.</p>
    /// This field is required.
    pub fn scanner_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.scanner_role_arn = ::std::option::Option::Some(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.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.scanner_role_arn
    }
    /// Consumes the builder and constructs a [`StartScanJobInput`](crate::operation::start_scan_job::StartScanJobInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_scan_job::StartScanJobInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::start_scan_job::StartScanJobInput {
            backup_vault_name: self.backup_vault_name,
            iam_role_arn: self.iam_role_arn,
            idempotency_token: self.idempotency_token,
            malware_scanner: self.malware_scanner,
            recovery_point_arn: self.recovery_point_arn,
            scan_base_recovery_point_arn: self.scan_base_recovery_point_arn,
            scan_mode: self.scan_mode,
            scanner_role_arn: self.scanner_role_arn,
        })
    }
}