// 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 UpdateConfigurationPolicyInput {
/// <p>The Amazon Resource Name (ARN) or universally unique identifier (UUID) of the configuration policy.</p>
pub identifier: ::std::option::Option<::std::string::String>,
/// <p>The name of the configuration policy. Alphanumeric characters and the following ASCII characters are permitted: <code>-, ., !, *, /</code>.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The description of the configuration policy.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>The reason for updating the configuration policy.</p>
pub updated_reason: ::std::option::Option<::std::string::String>,
/// <p>An object that defines how Security Hub CSPM is configured. It includes whether Security Hub CSPM is enabled or disabled, a list of enabled security standards, a list of enabled or disabled security controls, and a list of custom parameter values for specified controls. If you provide a list of security controls that are enabled in the configuration policy, Security Hub CSPM disables all other controls (including newly released controls). If you provide a list of security controls that are disabled in the configuration policy, Security Hub CSPM enables all other controls (including newly released controls).</p>
/// <p>When updating a configuration policy, provide a complete list of standards that you want to enable and a complete list of controls that you want to enable or disable. The updated configuration replaces the current configuration.</p>
pub configuration_policy: ::std::option::Option<crate::types::Policy>,
}
impl UpdateConfigurationPolicyInput {
/// <p>The Amazon Resource Name (ARN) or universally unique identifier (UUID) of the configuration policy.</p>
pub fn identifier(&self) -> ::std::option::Option<&str> {
self.identifier.as_deref()
}
/// <p>The name of the configuration policy. Alphanumeric characters and the following ASCII characters are permitted: <code>-, ., !, *, /</code>.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The description of the configuration policy.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The reason for updating the configuration policy.</p>
pub fn updated_reason(&self) -> ::std::option::Option<&str> {
self.updated_reason.as_deref()
}
/// <p>An object that defines how Security Hub CSPM is configured. It includes whether Security Hub CSPM is enabled or disabled, a list of enabled security standards, a list of enabled or disabled security controls, and a list of custom parameter values for specified controls. If you provide a list of security controls that are enabled in the configuration policy, Security Hub CSPM disables all other controls (including newly released controls). If you provide a list of security controls that are disabled in the configuration policy, Security Hub CSPM enables all other controls (including newly released controls).</p>
/// <p>When updating a configuration policy, provide a complete list of standards that you want to enable and a complete list of controls that you want to enable or disable. The updated configuration replaces the current configuration.</p>
pub fn configuration_policy(&self) -> ::std::option::Option<&crate::types::Policy> {
self.configuration_policy.as_ref()
}
}
impl UpdateConfigurationPolicyInput {
/// Creates a new builder-style object to manufacture [`UpdateConfigurationPolicyInput`](crate::operation::update_configuration_policy::UpdateConfigurationPolicyInput).
pub fn builder() -> crate::operation::update_configuration_policy::builders::UpdateConfigurationPolicyInputBuilder {
crate::operation::update_configuration_policy::builders::UpdateConfigurationPolicyInputBuilder::default()
}
}
/// A builder for [`UpdateConfigurationPolicyInput`](crate::operation::update_configuration_policy::UpdateConfigurationPolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateConfigurationPolicyInputBuilder {
pub(crate) identifier: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) updated_reason: ::std::option::Option<::std::string::String>,
pub(crate) configuration_policy: ::std::option::Option<crate::types::Policy>,
}
impl UpdateConfigurationPolicyInputBuilder {
/// <p>The Amazon Resource Name (ARN) or universally unique identifier (UUID) of the configuration policy.</p>
/// This field is required.
pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) or universally unique identifier (UUID) of the configuration policy.</p>
pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.identifier = input;
self
}
/// <p>The Amazon Resource Name (ARN) or universally unique identifier (UUID) of the configuration policy.</p>
pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.identifier
}
/// <p>The name of the configuration policy. Alphanumeric characters and the following ASCII characters are permitted: <code>-, ., !, *, /</code>.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the configuration policy. Alphanumeric characters and the following ASCII characters are permitted: <code>-, ., !, *, /</code>.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the configuration policy. Alphanumeric characters and the following ASCII characters are permitted: <code>-, ., !, *, /</code>.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The description of the configuration policy.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>The description of the configuration policy.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The description of the configuration policy.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>The reason for updating the configuration policy.</p>
pub fn updated_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.updated_reason = ::std::option::Option::Some(input.into());
self
}
/// <p>The reason for updating the configuration policy.</p>
pub fn set_updated_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.updated_reason = input;
self
}
/// <p>The reason for updating the configuration policy.</p>
pub fn get_updated_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.updated_reason
}
/// <p>An object that defines how Security Hub CSPM is configured. It includes whether Security Hub CSPM is enabled or disabled, a list of enabled security standards, a list of enabled or disabled security controls, and a list of custom parameter values for specified controls. If you provide a list of security controls that are enabled in the configuration policy, Security Hub CSPM disables all other controls (including newly released controls). If you provide a list of security controls that are disabled in the configuration policy, Security Hub CSPM enables all other controls (including newly released controls).</p>
/// <p>When updating a configuration policy, provide a complete list of standards that you want to enable and a complete list of controls that you want to enable or disable. The updated configuration replaces the current configuration.</p>
pub fn configuration_policy(mut self, input: crate::types::Policy) -> Self {
self.configuration_policy = ::std::option::Option::Some(input);
self
}
/// <p>An object that defines how Security Hub CSPM is configured. It includes whether Security Hub CSPM is enabled or disabled, a list of enabled security standards, a list of enabled or disabled security controls, and a list of custom parameter values for specified controls. If you provide a list of security controls that are enabled in the configuration policy, Security Hub CSPM disables all other controls (including newly released controls). If you provide a list of security controls that are disabled in the configuration policy, Security Hub CSPM enables all other controls (including newly released controls).</p>
/// <p>When updating a configuration policy, provide a complete list of standards that you want to enable and a complete list of controls that you want to enable or disable. The updated configuration replaces the current configuration.</p>
pub fn set_configuration_policy(mut self, input: ::std::option::Option<crate::types::Policy>) -> Self {
self.configuration_policy = input;
self
}
/// <p>An object that defines how Security Hub CSPM is configured. It includes whether Security Hub CSPM is enabled or disabled, a list of enabled security standards, a list of enabled or disabled security controls, and a list of custom parameter values for specified controls. If you provide a list of security controls that are enabled in the configuration policy, Security Hub CSPM disables all other controls (including newly released controls). If you provide a list of security controls that are disabled in the configuration policy, Security Hub CSPM enables all other controls (including newly released controls).</p>
/// <p>When updating a configuration policy, provide a complete list of standards that you want to enable and a complete list of controls that you want to enable or disable. The updated configuration replaces the current configuration.</p>
pub fn get_configuration_policy(&self) -> &::std::option::Option<crate::types::Policy> {
&self.configuration_policy
}
/// Consumes the builder and constructs a [`UpdateConfigurationPolicyInput`](crate::operation::update_configuration_policy::UpdateConfigurationPolicyInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::update_configuration_policy::UpdateConfigurationPolicyInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::update_configuration_policy::UpdateConfigurationPolicyInput {
identifier: self.identifier,
name: self.name,
description: self.description,
updated_reason: self.updated_reason,
configuration_policy: self.configuration_policy,
})
}
}