Skip to main content

aws_sdk_securityagent/client/
create_threat.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 [`CreateThreat`](crate::operation::create_threat::builders::CreateThreatFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`agent_space_id(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::agent_space_id) / [`set_agent_space_id(Option<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_agent_space_id):<br>required: **true**<br><p>The unique identifier of the agent space.</p><br>
7    ///   - [`threat_job_id(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::threat_job_id) / [`set_threat_job_id(Option<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_threat_job_id):<br>required: **true**<br><p>The unique identifier of the threat model job the threat belongs to.</p><br>
8    ///   - [`title(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::title) / [`set_title(Option<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_title):<br>required: **false**<br><p>A short title summarizing the threat.</p><br>
9    ///   - [`statement(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::statement) / [`set_statement(Option<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_statement):<br>required: **false**<br><p>The natural-language threat statement.</p><br>
10    ///   - [`severity(ThreatSeverity)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::severity) / [`set_severity(Option<ThreatSeverity>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_severity):<br>required: **false**<br><p>The severity level of the threat.</p><br>
11    ///   - [`comments(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::comments) / [`set_comments(Option<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_comments):<br>required: **false**<br><p>Optional customer comment on the threat.</p><br>
12    ///   - [`stride(StrideCategory)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::stride) / [`set_stride(Option<Vec::<StrideCategory>>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_stride):<br>required: **false**<br><p>The STRIDE categories applicable to this threat.</p><br>
13    ///   - [`threat_source(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::threat_source) / [`set_threat_source(Option<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_threat_source):<br>required: **false**<br><p>The actor or origin of the threat.</p><br>
14    ///   - [`prerequisites(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::prerequisites) / [`set_prerequisites(Option<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_prerequisites):<br>required: **false**<br><p>The conditions required for the threat to be exploitable.</p><br>
15    ///   - [`threat_action(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::threat_action) / [`set_threat_action(Option<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_threat_action):<br>required: **false**<br><p>What the threat source can do.</p><br>
16    ///   - [`threat_impact(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::threat_impact) / [`set_threat_impact(Option<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_threat_impact):<br>required: **false**<br><p>The direct consequence of the threat action.</p><br>
17    ///   - [`impacted_goal(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::impacted_goal) / [`set_impacted_goal(Option<Vec::<String>>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_impacted_goal):<br>required: **false**<br><p>The security goals affected by the threat.</p><br>
18    ///   - [`impacted_assets(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::impacted_assets) / [`set_impacted_assets(Option<Vec::<String>>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_impacted_assets):<br>required: **false**<br><p>The specific assets affected by the threat.</p><br>
19    ///   - [`anchor(ThreatAnchorShape)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::anchor) / [`set_anchor(Option<ThreatAnchorShape>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_anchor):<br>required: **false**<br><p>The DFD element this threat is anchored to.</p><br>
20    ///   - [`evidence(ThreatEvidenceShape)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::evidence) / [`set_evidence(Option<Vec::<ThreatEvidenceShape>>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_evidence):<br>required: **false**<br><p>The source code files supporting the threat.</p><br>
21    ///   - [`recommendation(impl Into<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::recommendation) / [`set_recommendation(Option<String>)`](crate::operation::create_threat::builders::CreateThreatFluentBuilder::set_recommendation):<br>required: **false**<br><p>The recommended mitigation guidance for this threat.</p><br>
22    /// - On success, responds with [`CreateThreatOutput`](crate::operation::create_threat::CreateThreatOutput) with field(s):
23    ///   - [`threat_id(String)`](crate::operation::create_threat::CreateThreatOutput::threat_id): <p>The unique identifier of the created threat.</p>
24    ///   - [`threat_job_id(String)`](crate::operation::create_threat::CreateThreatOutput::threat_job_id): <p>The unique identifier of the threat model job the threat belongs to.</p>
25    ///   - [`title(Option<String>)`](crate::operation::create_threat::CreateThreatOutput::title): <p>A short title summarizing the threat.</p>
26    ///   - [`statement(Option<String>)`](crate::operation::create_threat::CreateThreatOutput::statement): <p>The natural-language threat statement.</p>
27    ///   - [`severity(Option<ThreatSeverity>)`](crate::operation::create_threat::CreateThreatOutput::severity): <p>The severity level of the threat.</p>
28    ///   - [`status(Option<ThreatStatus>)`](crate::operation::create_threat::CreateThreatOutput::status): <p>The current status of the threat.</p>
29    ///   - [`comments(Option<String>)`](crate::operation::create_threat::CreateThreatOutput::comments): <p>Optional customer comment on the threat.</p>
30    ///   - [`stride(Option<Vec::<StrideCategory>>)`](crate::operation::create_threat::CreateThreatOutput::stride): <p>The STRIDE categories applicable to this threat.</p>
31    ///   - [`threat_source(Option<String>)`](crate::operation::create_threat::CreateThreatOutput::threat_source): <p>The actor or origin of the threat.</p>
32    ///   - [`prerequisites(Option<String>)`](crate::operation::create_threat::CreateThreatOutput::prerequisites): <p>The conditions required for the threat to be exploitable.</p>
33    ///   - [`threat_action(Option<String>)`](crate::operation::create_threat::CreateThreatOutput::threat_action): <p>What the threat source can do.</p>
34    ///   - [`threat_impact(Option<String>)`](crate::operation::create_threat::CreateThreatOutput::threat_impact): <p>The direct consequence of the threat action.</p>
35    ///   - [`impacted_goal(Option<Vec::<String>>)`](crate::operation::create_threat::CreateThreatOutput::impacted_goal): <p>The security goals affected by the threat.</p>
36    ///   - [`impacted_assets(Option<Vec::<String>>)`](crate::operation::create_threat::CreateThreatOutput::impacted_assets): <p>The specific assets affected by the threat.</p>
37    ///   - [`anchor(Option<ThreatAnchorShape>)`](crate::operation::create_threat::CreateThreatOutput::anchor): <p>The DFD element this threat is anchored to.</p>
38    ///   - [`evidence(Option<Vec::<ThreatEvidenceShape>>)`](crate::operation::create_threat::CreateThreatOutput::evidence): <p>The source code files supporting the threat.</p>
39    ///   - [`recommendation(Option<String>)`](crate::operation::create_threat::CreateThreatOutput::recommendation): <p>The recommended mitigation guidance for this threat.</p>
40    ///   - [`created_by(Option<ThreatActor>)`](crate::operation::create_threat::CreateThreatOutput::created_by): <p>Who created this threat.</p>
41    ///   - [`updated_by(Option<ThreatActor>)`](crate::operation::create_threat::CreateThreatOutput::updated_by): <p>Who last updated this threat.</p>
42    ///   - [`created_at(Option<DateTime>)`](crate::operation::create_threat::CreateThreatOutput::created_at): <p>The date and time the threat was created, in UTC format.</p>
43    ///   - [`updated_at(Option<DateTime>)`](crate::operation::create_threat::CreateThreatOutput::updated_at): <p>The date and time the threat was last updated, in UTC format.</p>
44    /// - On failure, responds with [`SdkError<CreateThreatError>`](crate::operation::create_threat::CreateThreatError)
45    pub fn create_threat(&self) -> crate::operation::create_threat::builders::CreateThreatFluentBuilder {
46        crate::operation::create_threat::builders::CreateThreatFluentBuilder::new(self.handle.clone())
47    }
48}