aws_lite_rs/types/redshift.rs
1//! Types for the Amazon Redshift 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**: `redshift.v1.DescribeClustersMessage`
10/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//DescribeClustersMessage>
11///
12/// ## Coverage
13/// 3 of 5 fields included.
14/// Omitted fields:
15/// - `TagKeys` — not selected in manifest
16/// - `TagValues` — not selected in manifest
17#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18#[serde(rename_all = "PascalCase")]
19pub struct DescribeClustersRequest {
20 /// The unique identifier of a cluster whose properties you are requesting. This parameter
21 /// is case sensitive. The default is that all clusters defined for an account are returned.
22 #[serde(skip_serializing_if = "Option::is_none")]
23 pub cluster_identifier: Option<String>,
24
25 /// The maximum number of response records to return in each call. If the number of
26 /// remaining response records exceeds the specified MaxRecords value, a value is returned
27 /// in a marker field of the response. You can retrieve the next set of records by retrying
28 /// the command with the returned marker value. Default: 100 Constraints: minimum 20,
29 /// maximum 100.
30 #[serde(skip_serializing_if = "Option::is_none")]
31 pub max_records: Option<i32>,
32
33 /// An optional parameter that specifies the starting point to return a set of response
34 /// records. When the results of a DescribeClusters request exceed the value specified in
35 /// MaxRecords, Amazon Web Services returns a value in the Marker field of the response. You
36 /// can retrieve the next set of response records by providing the returned marker value in
37 /// the Marker parameter and retrying the request. Constraints: You can specify either the
38 /// ClusterIdentifier parameter or the Marker parameter, but not both.
39 #[serde(skip_serializing_if = "Option::is_none")]
40 pub marker: Option<String>,
41}
42
43impl DescribeClustersRequest {
44 #[cfg(any(test, feature = "test-support"))]
45 /// Create a fixture instance for testing.
46 pub fn fixture() -> Self {
47 Self {
48 cluster_identifier: Some("test-cluster_identifier".into()),
49 max_records: Some(100),
50 marker: Some("test-marker".into()),
51 }
52 }
53}
54
55/// Contains the output from the DescribeClusters action.
56///
57/// **AWS API**: `redshift.v1.ClustersMessage`
58/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//ClustersMessage>
59#[derive(Debug, Clone, Default, Serialize, Deserialize)]
60#[serde(rename_all = "PascalCase")]
61pub struct DescribeClustersResponse {
62 /// A list of Cluster objects, where each object describes one cluster.
63 #[serde(default)]
64 #[serde(skip_serializing_if = "Vec::is_empty")]
65 pub clusters: Vec<Cluster>,
66
67 /// A value that indicates the starting point for the next set of response records in a
68 /// subsequent request. If a value is returned in a response, you can retrieve the next set
69 /// of records by providing this returned marker value in the Marker parameter and retrying
70 /// the command. If the Marker field is empty, all response records have been retrieved for
71 /// the request.
72 #[serde(skip_serializing_if = "Option::is_none")]
73 pub marker: Option<String>,
74}
75
76impl DescribeClustersResponse {
77 #[cfg(any(test, feature = "test-support"))]
78 /// Create a fixture instance for testing.
79 pub fn fixture() -> Self {
80 Self {
81 clusters: vec![],
82 marker: Some("test-marker".into()),
83 }
84 }
85}
86
87/// Describes a cluster.
88///
89/// **AWS API**: `redshift.v1.Cluster`
90/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//Cluster>
91///
92/// ## Coverage
93/// 21 of 63 fields included.
94/// Omitted fields:
95/// - `ModifyStatus` — not selected in manifest
96/// - `DBName` — not selected in manifest
97/// - `ClusterSecurityGroups` — not selected in manifest
98/// - `VpcSecurityGroups` — not selected in manifest
99/// - `ClusterParameterGroups` — not selected in manifest
100/// - `ClusterSubnetGroupName` — not selected in manifest
101/// - `PendingModifiedValues` — not selected in manifest
102/// - `RestoreStatus` — not selected in manifest
103/// - `DataTransferProgress` — not selected in manifest
104/// - `HsmStatus` — not selected in manifest
105/// - `ClusterSnapshotCopyStatus` — not selected in manifest
106/// - `ClusterPublicKey` — not selected in manifest
107/// - `ClusterNodes` — not selected in manifest
108/// - `ElasticIpStatus` — not selected in manifest
109/// - `ClusterRevisionNumber` — not selected in manifest
110/// - `Tags` — not selected in manifest
111/// - `IamRoles` — not selected in manifest
112/// - `PendingActions` — not selected in manifest
113/// - `MaintenanceTrackName` — not selected in manifest
114/// - `ElasticResizeNumberOfNodeOptions` — not selected in manifest
115/// - `DeferredMaintenanceWindows` — not selected in manifest
116/// - `SnapshotScheduleIdentifier` — not selected in manifest
117/// - `SnapshotScheduleState` — not selected in manifest
118/// - `ExpectedNextSnapshotScheduleTime` — not selected in manifest
119/// - `ExpectedNextSnapshotScheduleTimeStatus` — not selected in manifest
120/// - `NextMaintenanceWindowStartTime` — not selected in manifest
121/// - `ResizeInfo` — not selected in manifest
122/// - `AvailabilityZoneRelocationStatus` — not selected in manifest
123/// - `AquaConfiguration` — not selected in manifest
124/// - `DefaultIamRoleArn` — not selected in manifest
125/// - `ReservedNodeExchangeStatus` — not selected in manifest
126/// - `CustomDomainName` — not selected in manifest
127/// - `CustomDomainCertificateArn` — not selected in manifest
128/// - `CustomDomainCertificateExpiryDate` — not selected in manifest
129/// - `MasterPasswordSecretArn` — not selected in manifest
130/// - `MasterPasswordSecretKmsKeyId` — not selected in manifest
131/// - `IpAddressType` — not selected in manifest
132/// - `MultiAZ` — not selected in manifest
133/// - `MultiAZSecondary` — not selected in manifest
134/// - `LakehouseRegistrationStatus` — not selected in manifest
135/// - `CatalogArn` — not selected in manifest
136/// - `ExtraComputeForAutomaticOptimization` — not selected in manifest
137#[derive(Debug, Clone, Default, Serialize, Deserialize)]
138#[serde(rename_all = "PascalCase")]
139pub struct Cluster {
140 /// The unique identifier of the cluster.
141 #[serde(skip_serializing_if = "Option::is_none")]
142 pub cluster_identifier: Option<String>,
143
144 /// The node type for the nodes in the cluster.
145 #[serde(skip_serializing_if = "Option::is_none")]
146 pub node_type: Option<String>,
147
148 /// The current state of the cluster. Possible values are the following: available
149 /// available, prep-for-resize available, resize-cleanup cancelling-resize creating deleting
150 /// final-snapshot hardware-failure incompatible-hsm incompatible-network incompatible-
151 /// parameters incompatible-restore modifying paused rebooting renaming resizing rotating-
152 /// keys storage-full updating-hsm
153 #[serde(skip_serializing_if = "Option::is_none")]
154 pub cluster_status: Option<String>,
155
156 /// The availability status of the cluster for queries. Possible values are the following:
157 /// Available
158 /// - The cluster is available for queries. Unavailable
159 /// - The cluster is not available for queries. Maintenance
160 /// - The cluster is intermittently available for queries due to maintenance activities.
161 /// Modifying
162 /// - The cluster is intermittently available for queries due to changes that modify the
163 /// cluster. Failed
164 /// - The cluster failed and is not available for queries.
165 #[serde(skip_serializing_if = "Option::is_none")]
166 pub cluster_availability_status: Option<String>,
167
168 /// The admin user name for the cluster. This name is used to connect to the database that
169 /// is specified in the DBName parameter.
170 #[serde(skip_serializing_if = "Option::is_none")]
171 pub master_username: Option<String>,
172
173 /// The connection endpoint.
174 #[serde(skip_serializing_if = "Option::is_none")]
175 pub endpoint: Option<Endpoint>,
176
177 /// The date and time that the cluster was created.
178 #[serde(skip_serializing_if = "Option::is_none")]
179 pub cluster_create_time: Option<String>,
180
181 /// The number of compute nodes in the cluster.
182 #[serde(skip_serializing_if = "Option::is_none")]
183 pub number_of_nodes: Option<i32>,
184
185 /// A boolean value that, if true, indicates that the cluster can be accessed from a public
186 /// network. Default: false
187 #[serde(skip_serializing_if = "Option::is_none")]
188 pub publicly_accessible: Option<bool>,
189
190 /// A boolean value that, if true, indicates that data in the cluster is encrypted at rest.
191 #[serde(skip_serializing_if = "Option::is_none")]
192 pub encrypted: Option<bool>,
193
194 /// The identifier of the VPC the cluster is in, if the cluster is in a VPC.
195 #[serde(skip_serializing_if = "Option::is_none")]
196 pub vpc_id: Option<String>,
197
198 /// The name of the Availability Zone in which the cluster is located.
199 #[serde(skip_serializing_if = "Option::is_none")]
200 pub availability_zone: Option<String>,
201
202 /// The weekly time range, in Universal Coordinated Time (UTC), during which system
203 /// maintenance can occur.
204 #[serde(skip_serializing_if = "Option::is_none")]
205 pub preferred_maintenance_window: Option<String>,
206
207 /// The version ID of the Amazon Redshift engine that is running on the cluster.
208 #[serde(skip_serializing_if = "Option::is_none")]
209 pub cluster_version: Option<String>,
210
211 /// A boolean value that, if true, indicates that major version upgrades will be applied
212 /// automatically to the cluster during the maintenance window.
213 #[serde(skip_serializing_if = "Option::is_none")]
214 pub allow_version_upgrade: Option<bool>,
215
216 /// The number of days that automatic cluster snapshots are retained.
217 #[serde(skip_serializing_if = "Option::is_none")]
218 pub automated_snapshot_retention_period: Option<i32>,
219
220 /// The default number of days to retain a manual snapshot. If the value is -1, the snapshot
221 /// is retained indefinitely. This setting doesn't change the retention period of existing
222 /// snapshots. The value must be either -1 or an integer between 1 and 3,653.
223 #[serde(skip_serializing_if = "Option::is_none")]
224 pub manual_snapshot_retention_period: Option<i32>,
225
226 /// The Key Management Service (KMS) key ID of the encryption key used to encrypt data in
227 /// the cluster.
228 #[serde(skip_serializing_if = "Option::is_none")]
229 pub kms_key_id: Option<String>,
230
231 /// An option that specifies whether to create the cluster with enhanced VPC routing
232 /// enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a
233 /// VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster
234 /// Management Guide. If this option is true, enhanced VPC routing is enabled. Default:
235 /// false
236 #[serde(skip_serializing_if = "Option::is_none")]
237 pub enhanced_vpc_routing: Option<bool>,
238
239 /// The namespace Amazon Resource Name (ARN) of the cluster.
240 #[serde(skip_serializing_if = "Option::is_none")]
241 pub cluster_namespace_arn: Option<String>,
242
243 /// The total storage capacity of the cluster in megabytes.
244 #[serde(skip_serializing_if = "Option::is_none")]
245 pub total_storage_capacity_in_mega_bytes: Option<i64>,
246}
247
248impl Cluster {
249 #[cfg(any(test, feature = "test-support"))]
250 /// Create a fixture instance for testing.
251 pub fn fixture() -> Self {
252 Self {
253 cluster_identifier: Some("test-cluster_identifier".into()),
254 node_type: Some("test-node_type".into()),
255 cluster_status: Some("test-cluster_status".into()),
256 cluster_availability_status: Some("test-cluster_availability_status".into()),
257 master_username: Some("test-master_username".into()),
258 endpoint: Some(Endpoint::fixture()),
259 cluster_create_time: Some("test-cluster_create_time".into()),
260 number_of_nodes: Some(100),
261 publicly_accessible: Some(false),
262 encrypted: Some(false),
263 vpc_id: Some("test-vpc_id".into()),
264 availability_zone: Some("test-availability_zone".into()),
265 preferred_maintenance_window: Some("test-preferred_maintenance_window".into()),
266 cluster_version: Some("test-cluster_version".into()),
267 allow_version_upgrade: Some(false),
268 automated_snapshot_retention_period: Some(100),
269 manual_snapshot_retention_period: Some(100),
270 kms_key_id: Some("test-kms_key_id".into()),
271 enhanced_vpc_routing: Some(false),
272 cluster_namespace_arn: Some("test-cluster_namespace_arn".into()),
273 total_storage_capacity_in_mega_bytes: Some(100),
274 }
275 }
276}
277
278/// Describes a connection endpoint.
279///
280/// **AWS API**: `redshift.v1.Endpoint`
281/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//Endpoint>
282///
283/// ## Coverage
284/// 2 of 3 fields included.
285/// Omitted fields:
286/// - `VpcEndpoints` — not selected in manifest
287#[derive(Debug, Clone, Default, Serialize, Deserialize)]
288#[serde(rename_all = "PascalCase")]
289pub struct Endpoint {
290 /// The DNS address of the Cluster.
291 #[serde(skip_serializing_if = "Option::is_none")]
292 pub address: Option<String>,
293
294 /// The port that the database engine is listening on.
295 #[serde(skip_serializing_if = "Option::is_none")]
296 pub port: Option<i32>,
297}
298
299impl Endpoint {
300 #[cfg(any(test, feature = "test-support"))]
301 /// Create a fixture instance for testing.
302 pub fn fixture() -> Self {
303 Self {
304 address: Some("test-address".into()),
305 port: Some(100),
306 }
307 }
308}
309
310/// Describes a pause cluster operation. For example, a scheduled action to run the PauseCluster
311/// API operation.
312///
313/// **AWS API**: `redshift.v1.PauseClusterMessage`
314/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//PauseClusterMessage>
315#[derive(Debug, Clone, Default, Serialize, Deserialize)]
316#[serde(rename_all = "PascalCase")]
317pub struct PauseClusterRequest {
318 /// The identifier of the cluster to be paused.
319 pub cluster_identifier: String,
320}
321
322impl PauseClusterRequest {
323 #[cfg(any(test, feature = "test-support"))]
324 /// Create a fixture instance for testing.
325 pub fn fixture() -> Self {
326 Self {
327 cluster_identifier: "test-cluster_identifier".into(),
328 }
329 }
330}
331
332///
333/// **AWS API**: `redshift.v1.PauseClusterResult`
334/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//PauseClusterResult>
335#[derive(Debug, Clone, Default, Serialize, Deserialize)]
336#[serde(rename_all = "PascalCase")]
337pub struct PauseClusterResponse {
338 /// The `Cluster` field.
339 #[serde(skip_serializing_if = "Option::is_none")]
340 pub cluster: Option<Cluster>,
341}
342
343impl PauseClusterResponse {
344 #[cfg(any(test, feature = "test-support"))]
345 /// Create a fixture instance for testing.
346 pub fn fixture() -> Self {
347 Self {
348 cluster: Some(Cluster::fixture()),
349 }
350 }
351}
352
353/// Describes a resume cluster operation. For example, a scheduled action to run the
354/// ResumeCluster API operation.
355///
356/// **AWS API**: `redshift.v1.ResumeClusterMessage`
357/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//ResumeClusterMessage>
358#[derive(Debug, Clone, Default, Serialize, Deserialize)]
359#[serde(rename_all = "PascalCase")]
360pub struct ResumeClusterRequest {
361 /// The identifier of the cluster to be resumed.
362 pub cluster_identifier: String,
363}
364
365impl ResumeClusterRequest {
366 #[cfg(any(test, feature = "test-support"))]
367 /// Create a fixture instance for testing.
368 pub fn fixture() -> Self {
369 Self {
370 cluster_identifier: "test-cluster_identifier".into(),
371 }
372 }
373}
374
375///
376/// **AWS API**: `redshift.v1.ResumeClusterResult`
377/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//ResumeClusterResult>
378#[derive(Debug, Clone, Default, Serialize, Deserialize)]
379#[serde(rename_all = "PascalCase")]
380pub struct ResumeClusterResponse {
381 /// The `Cluster` field.
382 #[serde(skip_serializing_if = "Option::is_none")]
383 pub cluster: Option<Cluster>,
384}
385
386impl ResumeClusterResponse {
387 #[cfg(any(test, feature = "test-support"))]
388 /// Create a fixture instance for testing.
389 pub fn fixture() -> Self {
390 Self {
391 cluster: Some(Cluster::fixture()),
392 }
393 }
394}
395
396/// Describes a resize cluster operation. For example, a scheduled action to run the
397/// ResizeCluster API operation.
398///
399/// **AWS API**: `redshift.v1.ResizeClusterMessage`
400/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//ResizeClusterMessage>
401///
402/// ## Coverage
403/// 5 of 7 fields included.
404/// Omitted fields:
405/// - `ReservedNodeId` — not selected in manifest
406/// - `TargetReservedNodeOfferingId` — not selected in manifest
407#[derive(Debug, Clone, Default, Serialize, Deserialize)]
408#[serde(rename_all = "PascalCase")]
409pub struct ResizeClusterRequest {
410 /// The unique identifier for the cluster to resize.
411 pub cluster_identifier: String,
412
413 /// The new cluster type for the specified cluster.
414 #[serde(skip_serializing_if = "Option::is_none")]
415 pub cluster_type: Option<String>,
416
417 /// The new node type for the nodes you are adding. If not specified, the cluster's current
418 /// node type is used.
419 #[serde(skip_serializing_if = "Option::is_none")]
420 pub node_type: Option<String>,
421
422 /// The new number of nodes for the cluster. If not specified, the cluster's current number
423 /// of nodes is used.
424 #[serde(skip_serializing_if = "Option::is_none")]
425 pub number_of_nodes: Option<i32>,
426
427 /// A boolean value indicating whether the resize operation is using the classic resize
428 /// process. If you don't provide this parameter or set the value to false, the resize type
429 /// is elastic.
430 #[serde(skip_serializing_if = "Option::is_none")]
431 pub classic: Option<bool>,
432}
433
434impl ResizeClusterRequest {
435 #[cfg(any(test, feature = "test-support"))]
436 /// Create a fixture instance for testing.
437 pub fn fixture() -> Self {
438 Self {
439 cluster_identifier: "test-cluster_identifier".into(),
440 cluster_type: Some("test-cluster_type".into()),
441 node_type: Some("test-node_type".into()),
442 number_of_nodes: Some(100),
443 classic: Some(false),
444 }
445 }
446}
447
448///
449/// **AWS API**: `redshift.v1.ResizeClusterResult`
450/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//ResizeClusterResult>
451#[derive(Debug, Clone, Default, Serialize, Deserialize)]
452#[serde(rename_all = "PascalCase")]
453pub struct ResizeClusterResponse {
454 /// The `Cluster` field.
455 #[serde(skip_serializing_if = "Option::is_none")]
456 pub cluster: Option<Cluster>,
457}
458
459impl ResizeClusterResponse {
460 #[cfg(any(test, feature = "test-support"))]
461 /// Create a fixture instance for testing.
462 pub fn fixture() -> Self {
463 Self {
464 cluster: Some(Cluster::fixture()),
465 }
466 }
467}
468
469///
470/// **AWS API**: `redshift.v1.DeleteClusterMessage`
471/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//DeleteClusterMessage>
472///
473/// ## Coverage
474/// 3 of 4 fields included.
475/// Omitted fields:
476/// - `FinalClusterSnapshotRetentionPeriod` — not selected in manifest
477#[derive(Debug, Clone, Default, Serialize, Deserialize)]
478#[serde(rename_all = "PascalCase")]
479pub struct DeleteClusterRequest {
480 /// The identifier of the cluster to be deleted. Constraints: Must contain lowercase
481 /// characters. Must contain from 1 to 63 alphanumeric characters or hyphens. First
482 /// character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens.
483 pub cluster_identifier: String,
484
485 /// Determines whether a final snapshot of the cluster is created before Amazon Redshift
486 /// deletes the cluster. If true, a final cluster snapshot is not created. If false, a final
487 /// cluster snapshot is created before the cluster is deleted. The
488 /// FinalClusterSnapshotIdentifier parameter must be specified if SkipFinalClusterSnapshot
489 /// is false. Default: false
490 #[serde(skip_serializing_if = "Option::is_none")]
491 pub skip_final_cluster_snapshot: Option<bool>,
492
493 /// The identifier of the final snapshot that is to be created immediately before deleting
494 /// the cluster. If this parameter is provided, SkipFinalClusterSnapshot must be false.
495 /// Constraints: Must be 1 to 255 alphanumeric characters. First character must be a letter.
496 /// Cannot end with a hyphen or contain two consecutive hyphens.
497 #[serde(skip_serializing_if = "Option::is_none")]
498 pub final_cluster_snapshot_identifier: Option<String>,
499}
500
501impl DeleteClusterRequest {
502 #[cfg(any(test, feature = "test-support"))]
503 /// Create a fixture instance for testing.
504 pub fn fixture() -> Self {
505 Self {
506 cluster_identifier: "test-cluster_identifier".into(),
507 skip_final_cluster_snapshot: Some(false),
508 final_cluster_snapshot_identifier: Some(
509 "test-final_cluster_snapshot_identifier".into(),
510 ),
511 }
512 }
513}
514
515///
516/// **AWS API**: `redshift.v1.DeleteClusterResult`
517/// **Reference**: <https://docs.aws.amazon.com/redshift/latest/APIReference//DeleteClusterResult>
518#[derive(Debug, Clone, Default, Serialize, Deserialize)]
519#[serde(rename_all = "PascalCase")]
520pub struct DeleteClusterResponse {
521 /// The `Cluster` field.
522 #[serde(skip_serializing_if = "Option::is_none")]
523 pub cluster: Option<Cluster>,
524}
525
526impl DeleteClusterResponse {
527 #[cfg(any(test, feature = "test-support"))]
528 /// Create a fixture instance for testing.
529 pub fn fixture() -> Self {
530 Self {
531 cluster: Some(Cluster::fixture()),
532 }
533 }
534}