aws_sdk_codegurusecurity/client/
create_scan.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateScan`](crate::operation::create_scan::builders::CreateScanFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`client_token(impl Into<String>)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::set_client_token):<br>required: **false**<br><p>The idempotency token for the request. Amazon CodeGuru Security uses this value to prevent the accidental creation of duplicate scans if there are failures and retries.</p><br>
7    ///   - [`resource_id(ResourceId)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::resource_id) / [`set_resource_id(Option<ResourceId>)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::set_resource_id):<br>required: **true**<br><p>The identifier for the resource object to be scanned.</p><br>
8    ///   - [`scan_name(impl Into<String>)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::scan_name) / [`set_scan_name(Option<String>)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::set_scan_name):<br>required: **true**<br><p>The unique name that CodeGuru Security uses to track revisions across multiple scans of the same resource. Only allowed for a <code>STANDARD</code> scan type.</p><br>
9    ///   - [`scan_type(ScanType)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::scan_type) / [`set_scan_type(Option<ScanType>)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::set_scan_type):<br>required: **false**<br><p>The type of scan, either <code>Standard</code> or <code>Express</code>. Defaults to <code>Standard</code> type if missing.</p> <p><code>Express</code> scans run on limited resources and use a limited set of detectors to analyze your code in near-real time. <code>Standard</code> scans have standard resource limits and use the full set of detectors to analyze your code.</p><br>
10    ///   - [`analysis_type(AnalysisType)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::analysis_type) / [`set_analysis_type(Option<AnalysisType>)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::set_analysis_type):<br>required: **false**<br><p>The type of analysis you want CodeGuru Security to perform in the scan, either <code>Security</code> or <code>All</code>. The <code>Security</code> type only generates findings related to security. The <code>All</code> type generates both security findings and quality findings. Defaults to <code>Security</code> type if missing.</p><br>
11    ///   - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_scan::builders::CreateScanFluentBuilder::set_tags):<br>required: **false**<br><p>An array of key-value pairs used to tag a scan. A tag is a custom attribute label with two parts:</p> <ul>  <li>   <p>A tag key. For example, <code>CostCenter</code>, <code>Environment</code>, or <code>Secret</code>. Tag keys are case sensitive.</p></li>  <li>   <p>An optional tag value field. For example, <code>111122223333</code>, <code>Production</code>, or a team name. Omitting the tag value is the same as using an empty string. Tag values are case sensitive.</p></li> </ul><br>
12    /// - On success, responds with [`CreateScanOutput`](crate::operation::create_scan::CreateScanOutput) with field(s):
13    ///   - [`scan_name(String)`](crate::operation::create_scan::CreateScanOutput::scan_name): <p>The name of the scan.</p>
14    ///   - [`run_id(String)`](crate::operation::create_scan::CreateScanOutput::run_id): <p>UUID that identifies the individual scan run.</p>
15    ///   - [`resource_id(Option<ResourceId>)`](crate::operation::create_scan::CreateScanOutput::resource_id): <p>The identifier for the resource object that contains resources that were scanned.</p>
16    ///   - [`scan_state(ScanState)`](crate::operation::create_scan::CreateScanOutput::scan_state): <p>The current state of the scan. Returns either <code>InProgress</code>, <code>Successful</code>, or <code>Failed</code>.</p>
17    ///   - [`scan_name_arn(Option<String>)`](crate::operation::create_scan::CreateScanOutput::scan_name_arn): <p>The ARN for the scan name.</p>
18    /// - On failure, responds with [`SdkError<CreateScanError>`](crate::operation::create_scan::CreateScanError)
19    pub fn create_scan(&self) -> crate::operation::create_scan::builders::CreateScanFluentBuilder {
20        crate::operation::create_scan::builders::CreateScanFluentBuilder::new(self.handle.clone())
21    }
22}