Struct aws_sdk_securityhub::model::workflow::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for Workflow
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn status(self, input: WorkflowStatus) -> Self
pub fn status(self, input: WorkflowStatus) -> Self
The status of the investigation into the finding. The workflow status is specific to an individual finding. It does not affect the generation of new findings. For example, setting the workflow status to SUPPRESSED
or RESOLVED
does not prevent a new finding for the same issue.
The allowed values are the following.
-
NEW
- The initial state of a finding, before it is reviewed.Security Hub also resets the workflow status from
NOTIFIED
orRESOLVED
toNEW
in the following cases:-
RecordState
changes fromARCHIVED
toACTIVE
. -
ComplianceStatus
changes fromPASSED
to eitherWARNING
,FAILED
, orNOT_AVAILABLE
.
-
-
NOTIFIED
- Indicates that you notified the resource owner about the security issue. Used when the initial reviewer is not the resource owner, and needs intervention from the resource owner. -
SUPPRESSED
- Indicates that you reviewed the finding and do not believe that any action is needed. The finding is no longer updated. -
RESOLVED
- The finding was reviewed and remediated and is now considered resolved.
sourcepub fn set_status(self, input: Option<WorkflowStatus>) -> Self
pub fn set_status(self, input: Option<WorkflowStatus>) -> Self
The status of the investigation into the finding. The workflow status is specific to an individual finding. It does not affect the generation of new findings. For example, setting the workflow status to SUPPRESSED
or RESOLVED
does not prevent a new finding for the same issue.
The allowed values are the following.
-
NEW
- The initial state of a finding, before it is reviewed.Security Hub also resets the workflow status from
NOTIFIED
orRESOLVED
toNEW
in the following cases:-
RecordState
changes fromARCHIVED
toACTIVE
. -
ComplianceStatus
changes fromPASSED
to eitherWARNING
,FAILED
, orNOT_AVAILABLE
.
-
-
NOTIFIED
- Indicates that you notified the resource owner about the security issue. Used when the initial reviewer is not the resource owner, and needs intervention from the resource owner. -
SUPPRESSED
- Indicates that you reviewed the finding and do not believe that any action is needed. The finding is no longer updated. -
RESOLVED
- The finding was reviewed and remediated and is now considered resolved.
Examples found in repository?
5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922
pub(crate) fn deser_structure_crate_model_workflow<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Workflow>, aws_smithy_json::deserialize::error::DeserializeError>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::workflow::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Status" => {
builder = builder.set_status(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::WorkflowStatus::from(u.as_ref()))
})
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn build(self) -> Workflow
pub fn build(self) -> Workflow
Consumes the builder and constructs a Workflow
.
Examples found in repository?
5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922
pub(crate) fn deser_structure_crate_model_workflow<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Workflow>, aws_smithy_json::deserialize::error::DeserializeError>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::workflow::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Status" => {
builder = builder.set_status(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::WorkflowStatus::from(u.as_ref()))
})
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}