aws_lite_rs/types/config.rs
1//! Types for the AWS Config 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/// Possible values for `config.ConfigurationRecorderStatus.lastStatus`.
9///
10/// **AWS API**: `config.ConfigurationRecorderStatus.lastStatus`
11#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
12pub enum RecorderStatus {
13 #[serde(rename = "Pending")]
14 Pending,
15
16 #[serde(rename = "Success")]
17 Success,
18
19 #[serde(rename = "Failure")]
20 Failure,
21
22 #[serde(rename = "NotApplicable")]
23 NotApplicable,
24
25 /// Unknown or future value not yet represented.
26 #[serde(other)]
27 Unknown,
28}
29
30///
31/// **AWS API**: `config.v1.SelectResourceConfigResponse`
32/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//SelectResourceConfigResponse>
33#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34#[serde(rename_all = "PascalCase")]
35pub struct SelectResourceConfigResponse {
36 /// Returns the results for the SQL query.
37 #[serde(default)]
38 #[serde(skip_serializing_if = "Vec::is_empty")]
39 pub results: Vec<String>,
40
41 /// Returns the QueryInfo object.
42 #[serde(skip_serializing_if = "Option::is_none")]
43 pub query_info: Option<QueryInfo>,
44
45 /// The nextToken string returned in a previous request that you use to request the next
46 /// page of results in a paginated response.
47 #[serde(skip_serializing_if = "Option::is_none")]
48 pub next_token: Option<String>,
49}
50
51impl SelectResourceConfigResponse {
52 #[cfg(any(test, feature = "test-support"))]
53 /// Create a fixture instance for testing.
54 pub fn fixture() -> Self {
55 Self {
56 results: vec![],
57 query_info: Some(QueryInfo::fixture()),
58 next_token: Some("test-next_token".into()),
59 }
60 }
61}
62
63/// Details about the query.
64///
65/// **AWS API**: `config.v1.QueryInfo`
66/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//QueryInfo>
67#[derive(Debug, Clone, Default, Serialize, Deserialize)]
68#[serde(rename_all = "PascalCase")]
69pub struct QueryInfo {
70 /// Returns a FieldInfo object.
71 #[serde(default)]
72 #[serde(skip_serializing_if = "Vec::is_empty")]
73 pub select_fields: Vec<FieldInfo>,
74}
75
76impl QueryInfo {
77 #[cfg(any(test, feature = "test-support"))]
78 /// Create a fixture instance for testing.
79 pub fn fixture() -> Self {
80 Self {
81 select_fields: vec![],
82 }
83 }
84}
85
86/// Details about the fields such as name of the field.
87///
88/// **AWS API**: `config.v1.FieldInfo`
89/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//FieldInfo>
90#[derive(Debug, Clone, Default, Serialize, Deserialize)]
91#[serde(rename_all = "PascalCase")]
92pub struct FieldInfo {
93 /// Name of the field.
94 #[serde(skip_serializing_if = "Option::is_none")]
95 pub name: Option<String>,
96}
97
98impl FieldInfo {
99 #[cfg(any(test, feature = "test-support"))]
100 /// Create a fixture instance for testing.
101 pub fn fixture() -> Self {
102 Self {
103 name: Some("test-name".into()),
104 }
105 }
106}
107
108/// The output for the DescribeConfigurationRecorders action.
109///
110/// **AWS API**: `config.v1.DescribeConfigurationRecordersResponse`
111/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//DescribeConfigurationRecordersResponse>
112#[derive(Debug, Clone, Default, Serialize, Deserialize)]
113#[serde(rename_all = "PascalCase")]
114pub struct DescribeConfigurationRecordersResponse {
115 /// A list that contains the descriptions of the specified configuration recorders.
116 #[serde(default)]
117 #[serde(skip_serializing_if = "Vec::is_empty")]
118 pub configuration_recorders: Vec<ConfigurationRecorder>,
119}
120
121impl DescribeConfigurationRecordersResponse {
122 #[cfg(any(test, feature = "test-support"))]
123 /// Create a fixture instance for testing.
124 pub fn fixture() -> Self {
125 Self {
126 configuration_recorders: vec![],
127 }
128 }
129}
130
131/// Records configuration changes to the resource types in scope. For more information about the
132/// configuration recorder, see Working with the Configuration Recorder in the Config Developer
133/// Guide.
134///
135/// **AWS API**: `config.v1.ConfigurationRecorder`
136/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//ConfigurationRecorder>
137///
138/// ## Coverage
139/// 4 of 7 fields included.
140/// Omitted fields:
141/// - `recordingMode` — not selected in manifest
142/// - `recordingScope` — not selected in manifest
143/// - `servicePrincipal` — not selected in manifest
144#[derive(Debug, Clone, Default, Serialize, Deserialize)]
145#[serde(rename_all = "PascalCase")]
146pub struct ConfigurationRecorder {
147 /// The Amazon Resource Name (ARN) of the specified configuration recorder.
148 #[serde(rename = "arn")]
149 #[serde(skip_serializing_if = "Option::is_none")]
150 pub arn: Option<String>,
151
152 /// The name of the configuration recorder. For customer managed configuration recorders,
153 /// Config automatically assigns the name of "default" when creating a configuration
154 /// recorder if you do not specify a name at creation time. For service-linked configuration
155 /// recorders, Config automatically assigns a name that has the prefix
156 /// "AWSConfigurationRecorderFor" to a new service-linked configuration recorder. Changing
157 /// the name of a configuration recorder To change the name of the customer managed
158 /// configuration recorder, you must delete it and create a new customer managed
159 /// configuration recorder with a new name. You cannot change the name of a service-linked
160 /// configuration recorder.
161 #[serde(rename = "name")]
162 #[serde(skip_serializing_if = "Option::is_none")]
163 pub name: Option<String>,
164
165 /// The Amazon Resource Name (ARN) of the IAM role assumed by Config and used by the
166 /// specified configuration recorder. The server will reject a request without a defined
167 /// roleARN for the configuration recorder While the API model does not require this field,
168 /// the server will reject a request without a defined roleARN for the configuration
169 /// recorder. Policies and compliance results IAM policies and other policies managed in
170 /// Organizations can impact whether Config has permissions to record configuration changes
171 /// for your resources. Additionally, rules directly evaluate the configuration of a
172 /// resource and rules don't take into account these policies when running evaluations. Make
173 /// sure that the policies in effect align with how you intend to use Config. Keep Minimum
174 /// Permisions When Reusing an IAM role If you use an Amazon Web Services service that uses
175 /// Config, such as Security Hub CSPM or Control Tower, and an IAM role has already been
176 /// created, make sure that the IAM role that you use when setting up Config keeps the same
177 /// minimum permissions as the pre-existing IAM role. You must do this to ensure that the
178 /// other Amazon Web Services service continues to run as expected. For example, if Control
179 /// Tower has an IAM role that allows Config to read S3 objects, make sure that the same
180 /// permissions are granted to the IAM role you use when setting up Config. Otherwise, it
181 /// may interfere with how Control Tower operates. The service-linked IAM role for Config
182 /// must be used for service-linked configuration recorders For service-linked configuration
183 /// recorders, you must use the service-linked IAM role for Config: AWSServiceRoleForConfig.
184 #[serde(rename = "roleARN")]
185 #[serde(skip_serializing_if = "Option::is_none")]
186 pub role_arn: Option<String>,
187
188 /// Specifies which resource types are in scope for the configuration recorder to record.
189 /// High Number of Config Evaluations You might notice increased activity in your account
190 /// during your initial month recording with Config when compared to subsequent months.
191 /// During the initial bootstrapping process, Config runs evaluations on all the resources
192 /// in your account that you have selected for Config to record. If you are running
193 /// ephemeral workloads, you may see increased activity from Config as it records
194 /// configuration changes associated with creating and deleting these temporary resources.
195 /// An ephemeral workload is a temporary use of computing resources that are loaded and run
196 /// when needed. Examples include Amazon Elastic Compute Cloud (Amazon EC2) Spot Instances,
197 /// Amazon EMR jobs, and Auto Scaling. If you want to avoid the increased activity from
198 /// running ephemeral workloads, you can set up the configuration recorder to exclude these
199 /// resource types from being recorded, or run these types of workloads in a separate
200 /// account with Config turned off to avoid increased configuration recording and rule
201 /// evaluations.
202 #[serde(rename = "recordingGroup")]
203 #[serde(skip_serializing_if = "Option::is_none")]
204 pub recording_group: Option<RecordingGroup>,
205}
206
207impl ConfigurationRecorder {
208 #[cfg(any(test, feature = "test-support"))]
209 /// Create a fixture instance for testing.
210 pub fn fixture() -> Self {
211 Self {
212 arn: Some("test-arn".into()),
213 name: Some("test-configuration_recorder".into()),
214 role_arn: Some("test-role_arn".into()),
215 recording_group: Some(RecordingGroup::fixture()),
216 }
217 }
218}
219
220/// Specifies which resource types Config records for configuration changes. By default, Config
221/// records configuration changes for all current and future supported resource types in the
222/// Amazon Web Services Region where you have enabled Config, excluding the global IAM resource
223/// types: IAM users, groups, roles, and customer managed policies. In the recording group, you
224/// specify whether you want to record all supported current and future supported resource types
225/// or to include or exclude specific resources types. For a list of supported resource types,
226/// see Supported Resource Types in the Config developer guide. If you don't want Config to
227/// record all current and future supported resource types (excluding the global IAM resource
228/// types), use one of the following recording strategies: Record all current and future
229/// resource types with exclusions (EXCLUSION_BY_RESOURCE_TYPES), or Record specific resource
230/// types (INCLUSION_BY_RESOURCE_TYPES). If you use the recording strategy to Record all current
231/// and future resource types (ALL_SUPPORTED_RESOURCE_TYPES), you can use the flag
232/// includeGlobalResourceTypes to include the global IAM resource types in your recording.
233/// Aurora global clusters are recorded in all enabled Regions The AWS::RDS::GlobalCluster
234/// resource type will be recorded in all supported Config Regions where the configuration
235/// recorder is enabled. If you do not want to record AWS::RDS::GlobalCluster in all enabled
236/// Regions, use the EXCLUSION_BY_RESOURCE_TYPES or INCLUSION_BY_RESOURCE_TYPES recording
237/// strategy.
238///
239/// **AWS API**: `config.v1.RecordingGroup`
240/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//RecordingGroup>
241///
242/// ## Coverage
243/// 3 of 5 fields included.
244/// Omitted fields:
245/// - `resourceTypes` — not selected in manifest
246/// - `exclusionByResourceTypes` — not selected in manifest
247#[derive(Debug, Clone, Default, Serialize, Deserialize)]
248#[serde(rename_all = "PascalCase")]
249pub struct RecordingGroup {
250 /// Specifies whether Config records configuration changes for all supported resource types,
251 /// excluding the global IAM resource types. If you set this field to true, when Config adds
252 /// support for a new resource type, Config starts recording resources of that type
253 /// automatically. If you set this field to true, you cannot enumerate specific resource
254 /// types to record in the resourceTypes field of RecordingGroup, or to exclude in the
255 /// resourceTypes field of ExclusionByResourceTypes. Region availability Check Resource
256 /// Coverage by Region Availability to see if a resource type is supported in the Amazon Web
257 /// Services Region where you set up Config.
258 #[serde(rename = "allSupported")]
259 #[serde(skip_serializing_if = "Option::is_none")]
260 pub all_supported: Option<bool>,
261
262 /// This option is a bundle which only applies to the global IAM resource types: IAM users,
263 /// groups, roles, and customer managed policies. These global IAM resource types can only
264 /// be recorded by Config in Regions where Config was available before February 2022. You
265 /// cannot be record the global IAM resouce types in Regions supported by Config after
266 /// February 2022. For a list of those Regions, see Recording Amazon Web Services Resources
267 /// | Global Resources. Aurora global clusters are recorded in all enabled Regions The
268 /// AWS::RDS::GlobalCluster resource type will be recorded in all supported Config Regions
269 /// where the configuration recorder is enabled, even if includeGlobalResourceTypes is
270 /// setfalse. The includeGlobalResourceTypes option is a bundle which only applies to IAM
271 /// users, groups, roles, and customer managed policies. If you do not want to record
272 /// AWS::RDS::GlobalCluster in all enabled Regions, use one of the following recording
273 /// strategies: Record all current and future resource types with exclusions
274 /// (EXCLUSION_BY_RESOURCE_TYPES), or Record specific resource types
275 /// (INCLUSION_BY_RESOURCE_TYPES). For more information, see Selecting Which Resources are
276 /// Recorded in the Config developer guide. includeGlobalResourceTypes and the exclusion
277 /// recording strategy The includeGlobalResourceTypes field has no impact on the
278 /// EXCLUSION_BY_RESOURCE_TYPES recording strategy. This means that the global IAM resource
279 /// types (IAM users, groups, roles, and customer managed policies) will not be
280 /// automatically added as exclusions for exclusionByResourceTypes when
281 /// includeGlobalResourceTypes is set to false. The includeGlobalResourceTypes field should
282 /// only be used to modify the AllSupported field, as the default for the AllSupported field
283 /// is to record configuration changes for all supported resource types excluding the global
284 /// IAM resource types. To include the global IAM resource types when AllSupported is set to
285 /// true, make sure to set includeGlobalResourceTypes to true. To exclude the global IAM
286 /// resource types for the EXCLUSION_BY_RESOURCE_TYPES recording strategy, you need to
287 /// manually add them to the resourceTypes field of exclusionByResourceTypes. Required and
288 /// optional fields Before you set this field to true, set the allSupported field of
289 /// RecordingGroup to true. Optionally, you can set the useOnly field of RecordingStrategy
290 /// to ALL_SUPPORTED_RESOURCE_TYPES. Overriding fields If you set this field to false but
291 /// list global IAM resource types in the resourceTypes field of RecordingGroup, Config will
292 /// still record configuration changes for those specified resource types regardless of if
293 /// you set the includeGlobalResourceTypes field to false. If you do not want to record
294 /// configuration changes to the global IAM resource types (IAM users, groups, roles, and
295 /// customer managed policies), make sure to not list them in the resourceTypes field in
296 /// addition to setting the includeGlobalResourceTypes field to false.
297 #[serde(rename = "includeGlobalResourceTypes")]
298 #[serde(skip_serializing_if = "Option::is_none")]
299 pub include_global_resource_types: Option<bool>,
300
301 /// An object that specifies the recording strategy for the configuration recorder. If you
302 /// set the useOnly field of RecordingStrategy to ALL_SUPPORTED_RESOURCE_TYPES, Config
303 /// records configuration changes for all supported resource types, excluding the global IAM
304 /// resource types. You also must set the allSupported field of RecordingGroup to true. When
305 /// Config adds support for a new resource type, Config automatically starts recording
306 /// resources of that type. If you set the useOnly field of RecordingStrategy to
307 /// INCLUSION_BY_RESOURCE_TYPES, Config records configuration changes for only the resource
308 /// types you specify in the resourceTypes field of RecordingGroup. If you set the useOnly
309 /// field of RecordingStrategy to EXCLUSION_BY_RESOURCE_TYPES, Config records configuration
310 /// changes for all supported resource types except the resource types that you specify to
311 /// exclude from being recorded in the resourceTypes field of ExclusionByResourceTypes.
312 /// Required and optional fields The recordingStrategy field is optional when you set the
313 /// allSupported field of RecordingGroup to true. The recordingStrategy field is optional
314 /// when you list resource types in the resourceTypes field of RecordingGroup. The
315 /// recordingStrategy field is required if you list resource types to exclude from recording
316 /// in the resourceTypes field of ExclusionByResourceTypes. Overriding fields If you choose
317 /// EXCLUSION_BY_RESOURCE_TYPES for the recording strategy, the exclusionByResourceTypes
318 /// field will override other properties in the request. For example, even if you set
319 /// includeGlobalResourceTypes to false, global IAM resource types will still be
320 /// automatically recorded in this option unless those resource types are specifically
321 /// listed as exclusions in the resourceTypes field of exclusionByResourceTypes. Global
322 /// resources types and the resource exclusion recording strategy By default, if you choose
323 /// the EXCLUSION_BY_RESOURCE_TYPES recording strategy, when Config adds support for a new
324 /// resource type in the Region where you set up the configuration recorder, including
325 /// global resource types, Config starts recording resources of that type automatically.
326 /// Unless specifically listed as exclusions, AWS::RDS::GlobalCluster will be recorded
327 /// automatically in all supported Config Regions were the configuration recorder is
328 /// enabled. IAM users, groups, roles, and customer managed policies will be recorded in the
329 /// Region where you set up the configuration recorder if that is a Region where Config was
330 /// available before February 2022. You cannot be record the global IAM resouce types in
331 /// Regions supported by Config after February 2022. For a list of those Regions, see
332 /// Recording Amazon Web Services Resources | Global Resources.
333 #[serde(rename = "recordingStrategy")]
334 #[serde(skip_serializing_if = "Option::is_none")]
335 pub recording_strategy: Option<RecordingStrategy>,
336}
337
338impl RecordingGroup {
339 #[cfg(any(test, feature = "test-support"))]
340 /// Create a fixture instance for testing.
341 pub fn fixture() -> Self {
342 Self {
343 all_supported: Some(false),
344 include_global_resource_types: Some(false),
345 recording_strategy: Some(RecordingStrategy::fixture()),
346 }
347 }
348}
349
350/// Specifies the recording strategy of the configuration recorder.
351///
352/// **AWS API**: `config.v1.RecordingStrategy`
353/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//RecordingStrategy>
354#[derive(Debug, Clone, Default, Serialize, Deserialize)]
355#[serde(rename_all = "PascalCase")]
356pub struct RecordingStrategy {
357 /// The recording strategy for the configuration recorder. If you set this option to
358 /// ALL_SUPPORTED_RESOURCE_TYPES, Config records configuration changes for all supported
359 /// resource types, excluding the global IAM resource types. You also must set the
360 /// allSupported field of RecordingGroup to true. When Config adds support for a new
361 /// resource type, Config automatically starts recording resources of that type. For a list
362 /// of supported resource types, see Supported Resource Types in the Config developer guide.
363 /// If you set this option to INCLUSION_BY_RESOURCE_TYPES, Config records configuration
364 /// changes for only the resource types that you specify in the resourceTypes field of
365 /// RecordingGroup. If you set this option to EXCLUSION_BY_RESOURCE_TYPES, Config records
366 /// configuration changes for all supported resource types, except the resource types that
367 /// you specify to exclude from being recorded in the resourceTypes field of
368 /// ExclusionByResourceTypes. Required and optional fields The recordingStrategy field is
369 /// optional when you set the allSupported field of RecordingGroup to true. The
370 /// recordingStrategy field is optional when you list resource types in the resourceTypes
371 /// field of RecordingGroup. The recordingStrategy field is required if you list resource
372 /// types to exclude from recording in the resourceTypes field of ExclusionByResourceTypes.
373 /// Overriding fields If you choose EXCLUSION_BY_RESOURCE_TYPES for the recording strategy,
374 /// the exclusionByResourceTypes field will override other properties in the request. For
375 /// example, even if you set includeGlobalResourceTypes to false, global IAM resource types
376 /// will still be automatically recorded in this option unless those resource types are
377 /// specifically listed as exclusions in the resourceTypes field of
378 /// exclusionByResourceTypes. Global resource types and the exclusion recording strategy By
379 /// default, if you choose the EXCLUSION_BY_RESOURCE_TYPES recording strategy, when Config
380 /// adds support for a new resource type in the Region where you set up the configuration
381 /// recorder, including global resource types, Config starts recording resources of that
382 /// type automatically. Unless specifically listed as exclusions, AWS::RDS::GlobalCluster
383 /// will be recorded automatically in all supported Config Regions were the configuration
384 /// recorder is enabled. IAM users, groups, roles, and customer managed policies will be
385 /// recorded in the Region where you set up the configuration recorder if that is a Region
386 /// where Config was available before February 2022. You cannot be record the global IAM
387 /// resouce types in Regions supported by Config after February 2022. This list where you
388 /// cannot record the global IAM resource types includes the following Regions: Asia Pacific
389 /// (Hyderabad) Asia Pacific (Melbourne) Canada West (Calgary) Europe (Spain) Europe
390 /// (Zurich) Israel (Tel Aviv) Middle East (UAE)
391 #[serde(rename = "useOnly")]
392 #[serde(skip_serializing_if = "Option::is_none")]
393 pub use_only: Option<String>,
394}
395
396impl RecordingStrategy {
397 #[cfg(any(test, feature = "test-support"))]
398 /// Create a fixture instance for testing.
399 pub fn fixture() -> Self {
400 Self {
401 use_only: Some("test-use_only".into()),
402 }
403 }
404}
405
406/// The output for the DescribeConfigurationRecorderStatus action, in JSON format.
407///
408/// **AWS API**: `config.v1.DescribeConfigurationRecorderStatusResponse`
409/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//DescribeConfigurationRecorderStatusResponse>
410#[derive(Debug, Clone, Default, Serialize, Deserialize)]
411#[serde(rename_all = "PascalCase")]
412pub struct DescribeConfigurationRecorderStatusResponse {
413 /// A list that contains status of the specified recorders.
414 #[serde(default)]
415 #[serde(skip_serializing_if = "Vec::is_empty")]
416 pub configuration_recorders_status: Vec<ConfigurationRecorderStatus>,
417}
418
419impl DescribeConfigurationRecorderStatusResponse {
420 #[cfg(any(test, feature = "test-support"))]
421 /// Create a fixture instance for testing.
422 pub fn fixture() -> Self {
423 Self {
424 configuration_recorders_status: vec![],
425 }
426 }
427}
428
429/// The current status of the configuration recorder. For a detailed status of recording events
430/// over time, add your Config events to CloudWatch metrics and use CloudWatch metrics.
431///
432/// **AWS API**: `config.v1.ConfigurationRecorderStatus`
433/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//ConfigurationRecorderStatus>
434///
435/// ## Coverage
436/// 6 of 10 fields included.
437/// Omitted fields:
438/// - `lastStartTime` — not selected in manifest
439/// - `lastStopTime` — not selected in manifest
440/// - `lastStatusChangeTime` — not selected in manifest
441/// - `servicePrincipal` — not selected in manifest
442#[derive(Debug, Clone, Default, Serialize, Deserialize)]
443#[serde(rename_all = "PascalCase")]
444pub struct ConfigurationRecorderStatus {
445 /// The Amazon Resource Name (ARN) of the configuration recorder.
446 #[serde(rename = "arn")]
447 #[serde(skip_serializing_if = "Option::is_none")]
448 pub arn: Option<String>,
449
450 /// The name of the configuration recorder.
451 #[serde(rename = "name")]
452 #[serde(skip_serializing_if = "Option::is_none")]
453 pub name: Option<String>,
454
455 /// Specifies whether or not the recorder is currently recording.
456 #[serde(rename = "recording")]
457 #[serde(skip_serializing_if = "Option::is_none")]
458 pub recording: Option<bool>,
459
460 /// The status of the latest recording event processed by the recorder.
461 #[serde(rename = "lastStatus")]
462 #[serde(skip_serializing_if = "Option::is_none")]
463 pub last_status: Option<RecorderStatus>,
464
465 /// The latest error code from when the recorder last failed.
466 #[serde(rename = "lastErrorCode")]
467 #[serde(skip_serializing_if = "Option::is_none")]
468 pub last_error_code: Option<String>,
469
470 /// The latest error message from when the recorder last failed.
471 #[serde(rename = "lastErrorMessage")]
472 #[serde(skip_serializing_if = "Option::is_none")]
473 pub last_error_message: Option<String>,
474}
475
476impl ConfigurationRecorderStatus {
477 #[cfg(any(test, feature = "test-support"))]
478 /// Create a fixture instance for testing.
479 pub fn fixture() -> Self {
480 Self {
481 arn: Some("test-arn".into()),
482 name: Some("test-configuration_recorder_status".into()),
483 recording: Some(false),
484 last_error_code: Some("test-last_error_code".into()),
485 last_error_message: Some("test-last_error_message".into()),
486 ..Default::default()
487 }
488 }
489}
490
491///
492/// **AWS API**: `config.v1.SelectResourceConfigRequest`
493/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//SelectResourceConfigRequest>
494#[derive(Debug, Clone, Default, Serialize, Deserialize)]
495#[serde(rename_all = "PascalCase")]
496pub struct SelectResourceConfigRequest {
497 /// The SQL query SELECT command.
498 pub expression: String,
499
500 /// The maximum number of query results returned on each page.
501 #[serde(skip_serializing_if = "Option::is_none")]
502 pub limit: Option<i32>,
503
504 /// The nextToken string returned in a previous request that you use to request the next
505 /// page of results in a paginated response.
506 #[serde(skip_serializing_if = "Option::is_none")]
507 pub next_token: Option<String>,
508}
509
510impl SelectResourceConfigRequest {
511 #[cfg(any(test, feature = "test-support"))]
512 /// Create a fixture instance for testing.
513 pub fn fixture() -> Self {
514 Self {
515 expression: "test-expression".into(),
516 limit: Some(100),
517 next_token: Some("test-next_token".into()),
518 }
519 }
520}
521
522/// The input for the DescribeConfigurationRecorders action.
523///
524/// **AWS API**: `config.v1.DescribeConfigurationRecordersRequest`
525/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//DescribeConfigurationRecordersRequest>
526#[derive(Debug, Clone, Default, Serialize, Deserialize)]
527#[serde(rename_all = "PascalCase")]
528pub struct DescribeConfigurationRecordersRequest {
529 /// A list of names of the configuration recorders that you want to specify. When making a
530 /// request to this operation, you can only specify one configuration recorder.
531 #[serde(default)]
532 #[serde(skip_serializing_if = "Vec::is_empty")]
533 pub configuration_recorder_names: Vec<String>,
534
535 /// For service-linked configuration recorders, you can use the service principal of the
536 /// linked Amazon Web Services service to specify the configuration recorder.
537 #[serde(skip_serializing_if = "Option::is_none")]
538 pub service_principal: Option<String>,
539
540 /// The Amazon Resource Name (ARN) of the configuration recorder that you want to specify.
541 #[serde(skip_serializing_if = "Option::is_none")]
542 pub arn: Option<String>,
543}
544
545impl DescribeConfigurationRecordersRequest {
546 #[cfg(any(test, feature = "test-support"))]
547 /// Create a fixture instance for testing.
548 pub fn fixture() -> Self {
549 Self {
550 configuration_recorder_names: vec![],
551 service_principal: Some("test-service_principal".into()),
552 arn: Some("test-arn".into()),
553 }
554 }
555}
556
557/// The input for the DescribeConfigurationRecorderStatus action.
558///
559/// **AWS API**: `config.v1.DescribeConfigurationRecorderStatusRequest`
560/// **Reference**: <https://docs.aws.amazon.com/config/latest/APIReference//DescribeConfigurationRecorderStatusRequest>
561#[derive(Debug, Clone, Default, Serialize, Deserialize)]
562#[serde(rename_all = "PascalCase")]
563pub struct DescribeConfigurationRecorderStatusRequest {
564 /// The name of the configuration recorder. If the name is not specified, the operation
565 /// returns the status for the customer managed configuration recorder configured for the
566 /// account, if applicable. When making a request to this operation, you can only specify
567 /// one configuration recorder.
568 #[serde(default)]
569 #[serde(skip_serializing_if = "Vec::is_empty")]
570 pub configuration_recorder_names: Vec<String>,
571
572 /// For service-linked configuration recorders, you can use the service principal of the
573 /// linked Amazon Web Services service to specify the configuration recorder.
574 #[serde(skip_serializing_if = "Option::is_none")]
575 pub service_principal: Option<String>,
576
577 /// The Amazon Resource Name (ARN) of the configuration recorder that you want to specify.
578 #[serde(skip_serializing_if = "Option::is_none")]
579 pub arn: Option<String>,
580}
581
582impl DescribeConfigurationRecorderStatusRequest {
583 #[cfg(any(test, feature = "test-support"))]
584 /// Create a fixture instance for testing.
585 pub fn fixture() -> Self {
586 Self {
587 configuration_recorder_names: vec![],
588 service_principal: Some("test-service_principal".into()),
589 arn: Some("test-arn".into()),
590 }
591 }
592}