Skip to main content

aws_lite_rs/types/
securityhub.rs

1//! Types for the AWS Security Hub API (v1).
2//!
3//! Auto-generated from the AWS Botocore Model.
4//! **Do not edit manually** — modify the manifest and re-run codegen.
5
6use serde::{Deserialize, Serialize};
7
8///
9/// **AWS API**: `securityhub.v1.DescribeHubResponse`
10/// **Reference**: <https://docs.aws.amazon.com/securityhub/1.0/APIReference//DescribeHubResponse>
11#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12#[serde(rename_all = "PascalCase")]
13pub struct DescribeHubResponse {
14    /// The ARN of the Hub resource that was retrieved.
15    #[serde(skip_serializing_if = "Option::is_none")]
16    pub hub_arn: Option<String>,
17
18    /// The date and time when Security Hub CSPM was enabled in the account.
19    #[serde(skip_serializing_if = "Option::is_none")]
20    pub subscribed_at: Option<String>,
21
22    /// Whether to automatically enable new controls when they are added to standards that are
23    /// enabled. If set to true, then new controls for enabled standards are enabled
24    /// automatically. If set to false, then new controls are not enabled. When you
25    /// automatically enable new controls, you can interact with the controls in the console and
26    /// programmatically immediately after release. However, automatically enabled controls have
27    /// a temporary default status of DISABLED. It can take up to several days for Security Hub
28    /// CSPM to process the control release and designate the control as ENABLED in your
29    /// account. During the processing period, you can manually enable or disable a control, and
30    /// Security Hub CSPM will maintain that designation regardless of whether you have
31    /// AutoEnableControls set to true.
32    #[serde(skip_serializing_if = "Option::is_none")]
33    pub auto_enable_controls: Option<bool>,
34
35    /// Specifies whether the calling account has consolidated control findings turned on. If
36    /// the value for this field is set to SECURITY_CONTROL, Security Hub CSPM generates a
37    /// single finding for a control check even when the check applies to multiple enabled
38    /// standards. If the value for this field is set to STANDARD_CONTROL, Security Hub CSPM
39    /// generates separate findings for a control check when the check applies to multiple
40    /// enabled standards. The value for this field in a member account matches the value in the
41    /// administrator account. For accounts that aren't part of an organization, the default
42    /// value of this field is SECURITY_CONTROL if you enabled Security Hub CSPM on or after
43    /// February 23, 2023.
44    #[serde(skip_serializing_if = "Option::is_none")]
45    pub control_finding_generator: Option<String>,
46}
47
48impl DescribeHubResponse {
49    #[cfg(any(test, feature = "test-support"))]
50    /// Create a fixture instance for testing.
51    pub fn fixture() -> Self {
52        Self {
53            hub_arn: Some("test-hub_arn".into()),
54            subscribed_at: Some("test-subscribed_at".into()),
55            auto_enable_controls: Some(false),
56            control_finding_generator: Some("test-control_finding_generator".into()),
57        }
58    }
59}
60
61///
62/// **AWS API**: `securityhub.v1.DescribeHubRequest`
63/// **Reference**: <https://docs.aws.amazon.com/securityhub/1.0/APIReference//DescribeHubRequest>
64#[derive(Debug, Clone, Default, Serialize, Deserialize)]
65#[serde(rename_all = "PascalCase")]
66pub struct DescribeHubRequest {
67    /// The ARN of the Hub resource to retrieve.
68    #[serde(skip_serializing_if = "Option::is_none")]
69    pub hub_arn: Option<String>,
70}
71
72impl DescribeHubRequest {
73    #[cfg(any(test, feature = "test-support"))]
74    /// Create a fixture instance for testing.
75    pub fn fixture() -> Self {
76        Self {
77            hub_arn: Some("test-hub_arn".into()),
78        }
79    }
80}