aws_lite_rs/types/accessanalyzer.rs
1//! Types for the AWS IAM Access Analyzer 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/// Retrieves a list of analyzers.
9///
10/// **AWS API**: `accessanalyzer.v1.ListAnalyzersRequest`
11/// **Reference**: <https://docs.aws.amazon.com/access-analyzer/latest/APIReference//ListAnalyzersRequest>
12///
13/// ## Coverage
14/// 2 of 3 fields included.
15/// Omitted fields:
16/// - `type` — not selected in manifest
17#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18#[serde(rename_all = "camelCase")]
19pub struct ListAnalyzersRequest {
20 /// A token used for pagination of results returned.
21 #[serde(skip_serializing_if = "Option::is_none")]
22 pub next_token: Option<String>,
23
24 /// The maximum number of results to return in the response.
25 #[serde(skip_serializing_if = "Option::is_none")]
26 pub max_results: Option<i32>,
27}
28
29impl ListAnalyzersRequest {
30 #[cfg(any(test, feature = "test-support"))]
31 /// Create a fixture instance for testing.
32 pub fn fixture() -> Self {
33 Self {
34 next_token: Some("test-next_token".into()),
35 max_results: Some(100),
36 }
37 }
38}
39
40/// The response to the request.
41///
42/// **AWS API**: `accessanalyzer.v1.ListAnalyzersResponse`
43/// **Reference**: <https://docs.aws.amazon.com/access-analyzer/latest/APIReference//ListAnalyzersResponse>
44#[derive(Debug, Clone, Default, Serialize, Deserialize)]
45#[serde(rename_all = "camelCase")]
46pub struct ListAnalyzersResponse {
47 /// The analyzers retrieved.
48 #[serde(default)]
49 pub analyzers: Vec<AnalyzerSummary>,
50
51 /// A token used for pagination of results returned.
52 #[serde(skip_serializing_if = "Option::is_none")]
53 pub next_token: Option<String>,
54}
55
56impl ListAnalyzersResponse {
57 #[cfg(any(test, feature = "test-support"))]
58 /// Create a fixture instance for testing.
59 pub fn fixture() -> Self {
60 Self {
61 analyzers: vec![],
62 next_token: Some("test-next_token".into()),
63 }
64 }
65}
66
67/// Contains information about the analyzer.
68///
69/// **AWS API**: `accessanalyzer.v1.AnalyzerSummary`
70/// **Reference**: <https://docs.aws.amazon.com/access-analyzer/latest/APIReference//AnalyzerSummary>
71///
72/// ## Coverage
73/// 7 of 10 fields included.
74/// Omitted fields:
75/// - `tags` — not selected in manifest
76/// - `statusReason` — not selected in manifest
77/// - `configuration` — not selected in manifest
78#[derive(Debug, Clone, Default, Serialize, Deserialize)]
79#[serde(rename_all = "camelCase")]
80pub struct AnalyzerSummary {
81 /// The ARN of the analyzer.
82 pub arn: String,
83
84 /// The name of the analyzer.
85 pub name: String,
86
87 /// The type represents the zone of trust or scope for the analyzer.
88 #[serde(rename = "type")]
89 pub r#type: String,
90
91 /// The status of the analyzer. An Active analyzer successfully monitors supported resources
92 /// and generates new findings. The analyzer is Disabled when a user action, such as
93 /// removing trusted access for Identity and Access Management Access Analyzer from
94 /// Organizations, causes the analyzer to stop generating new findings. The status is
95 /// Creating when the analyzer creation is in progress and Failed when the analyzer creation
96 /// has failed.
97 pub status: String,
98
99 /// A timestamp for the time at which the analyzer was created.
100 pub created_at: String,
101
102 /// The time at which the most recently analyzed resource was analyzed.
103 #[serde(skip_serializing_if = "Option::is_none")]
104 pub last_resource_analyzed_at: Option<String>,
105
106 /// The resource that was most recently analyzed by the analyzer.
107 #[serde(skip_serializing_if = "Option::is_none")]
108 pub last_resource_analyzed: Option<String>,
109}
110
111impl AnalyzerSummary {
112 #[cfg(any(test, feature = "test-support"))]
113 /// Create a fixture instance for testing.
114 pub fn fixture() -> Self {
115 Self {
116 arn: "test-arn".into(),
117 name: "test-analyzer_summary".into(),
118 r#type: "test-type".into(),
119 status: "test-status".into(),
120 created_at: "test-created_at".into(),
121 last_resource_analyzed_at: Some("test-last_resource_analyzed_at".into()),
122 last_resource_analyzed: Some("test-last_resource_analyzed".into()),
123 }
124 }
125}