1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//! MockClient helpers for Amazon Redshift API.
//!
//! Auto-generated extension methods for ergonomic test setup.
//! **Do not edit manually** — modify the manifest and re-run codegen.
#[cfg(any(test, feature = "test-support"))]
use crate::mock_client::{ExpectationBuilder, MockClient};
/// Extension trait for MockClient with Amazon Redshift helpers.
#[cfg(any(test, feature = "test-support"))]
pub trait RedshiftMockHelpers {
/// Helper to expect `describe_clusters`: Returns properties of provisioned clusters including
/// general cluster properties, cluster database properties, maintenance and backup properties,
/// and security and access properties. This operation supports pagination. For more information
/// about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster
/// Management Guide. If you specify both tag keys and tag values in the same request, Amazon
/// Redshift returns all clusters that match any combination of the specified keys and values.
/// For example, if you have owner and environment for tag keys, and admin and test for tag
/// values, all clusters that have any combination of those values are returned. If both tag
/// keys and values are omitted from the request, clusters are returned regardless of whether
/// they have tag keys or values associated with them.
fn expect_describe_clusters(&mut self) -> ExpectationBuilder<'_>;
/// Helper to expect `pause_cluster`: Pauses a cluster.
fn expect_pause_cluster(&mut self) -> ExpectationBuilder<'_>;
/// Helper to expect `resume_cluster`: Resumes a paused cluster.
fn expect_resume_cluster(&mut self) -> ExpectationBuilder<'_>;
/// Helper to expect `resize_cluster`: Changes the size of the cluster. You can change the
/// cluster's type, or change the number or type of nodes. The default behavior is to use the
/// elastic resize method. With an elastic resize, your cluster is available for read and write
/// operations more quickly than with the classic resize method. Elastic resize operations have
/// the following restrictions: You can only resize clusters of the following types: dc2.large
/// dc2.8xlarge ra3.large ra3.xlplus ra3.4xlarge ra3.16xlarge The type of nodes that you add
/// must match the node type for the cluster.
fn expect_resize_cluster(&mut self) -> ExpectationBuilder<'_>;
/// Helper to expect `delete_cluster`: Deletes a previously provisioned cluster without its
/// final snapshot being created. A successful response from the web service indicates that the
/// request was received correctly. Use DescribeClusters to monitor the status of the deletion.
/// The delete operation cannot be canceled or reverted once submitted. For more information
/// about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster
/// Management Guide. If you want to shut down the cluster and retain it for future use, set
/// SkipFinalClusterSnapshot to false and specify a name for FinalClusterSnapshotIdentifier. You
/// can later restore this snapshot to resume using the cluster. If a final cluster snapshot is
/// requested, the status of the cluster will be "final-snapshot" while the snapshot is being
/// taken, then it's "deleting" once Amazon Redshift begins deleting the cluster. For more
/// information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift
/// Cluster Management Guide.
fn expect_delete_cluster(&mut self) -> ExpectationBuilder<'_>;
}
#[cfg(any(test, feature = "test-support"))]
impl RedshiftMockHelpers for MockClient {
/// Helper to expect `describe_clusters`: Returns properties of provisioned clusters including
/// general cluster properties, cluster database properties, maintenance and backup properties,
/// and security and access properties. This operation supports pagination. For more information
/// about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster
/// Management Guide. If you specify both tag keys and tag values in the same request, Amazon
/// Redshift returns all clusters that match any combination of the specified keys and values.
/// For example, if you have owner and environment for tag keys, and admin and test for tag
/// values, all clusters that have any combination of those values are returned. If both tag
/// keys and values are omitted from the request, clusters are returned regardless of whether
/// they have tag keys or values associated with them.
fn expect_describe_clusters(&mut self) -> crate::mock_client::ExpectationBuilder<'_> {
let path = "/".to_string();
self.expect_post(&path)
}
/// Helper to expect `pause_cluster`: Pauses a cluster.
fn expect_pause_cluster(&mut self) -> crate::mock_client::ExpectationBuilder<'_> {
let path = "/".to_string();
self.expect_post(&path)
}
/// Helper to expect `resume_cluster`: Resumes a paused cluster.
fn expect_resume_cluster(&mut self) -> crate::mock_client::ExpectationBuilder<'_> {
let path = "/".to_string();
self.expect_post(&path)
}
/// Helper to expect `resize_cluster`: Changes the size of the cluster. You can change the
/// cluster's type, or change the number or type of nodes. The default behavior is to use the
/// elastic resize method. With an elastic resize, your cluster is available for read and write
/// operations more quickly than with the classic resize method. Elastic resize operations have
/// the following restrictions: You can only resize clusters of the following types: dc2.large
/// dc2.8xlarge ra3.large ra3.xlplus ra3.4xlarge ra3.16xlarge The type of nodes that you add
/// must match the node type for the cluster.
fn expect_resize_cluster(&mut self) -> crate::mock_client::ExpectationBuilder<'_> {
let path = "/".to_string();
self.expect_post(&path)
}
/// Helper to expect `delete_cluster`: Deletes a previously provisioned cluster without its
/// final snapshot being created. A successful response from the web service indicates that the
/// request was received correctly. Use DescribeClusters to monitor the status of the deletion.
/// The delete operation cannot be canceled or reverted once submitted. For more information
/// about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster
/// Management Guide. If you want to shut down the cluster and retain it for future use, set
/// SkipFinalClusterSnapshot to false and specify a name for FinalClusterSnapshotIdentifier. You
/// can later restore this snapshot to resume using the cluster. If a final cluster snapshot is
/// requested, the status of the cluster will be "final-snapshot" while the snapshot is being
/// taken, then it's "deleting" once Amazon Redshift begins deleting the cluster. For more
/// information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift
/// Cluster Management Guide.
fn expect_delete_cluster(&mut self) -> crate::mock_client::ExpectationBuilder<'_> {
let path = "/".to_string();
self.expect_post(&path)
}
}