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
112
113
114
115
116
117
118
119
120
121
//! MockClient helpers for Amazon ElastiCache 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 ElastiCache helpers.
#[cfg(any(test, feature = "test-support"))]
pub trait ElasticacheMockHelpers {
/// Helper to expect `describe_cache_clusters`: Returns information about all provisioned
/// clusters if no cluster identifier is specified, or about a specific cache cluster if a
/// cluster identifier is supplied. By default, abbreviated information about the clusters is
/// returned. You can use the optional ShowCacheNodeInfo flag to retrieve detailed information
/// about the cache nodes associated with the clusters. These details include the DNS address
/// and port for the cache node endpoint. If the cluster is in the creating state, only cluster-
/// level information is displayed until all of the nodes are successfully provisioned. If the
/// cluster is in the deleting state, only cluster-level information is displayed. If cache
/// nodes are currently being added to the cluster, node endpoint information and creation time
/// for the additional nodes are not displayed until they are completely provisioned. When the
/// cluster state is available, the cluster is ready for use. If cache nodes are currently being
/// removed from the cluster, no endpoint information for the removed nodes is displayed.
fn expect_describe_cache_clusters(&mut self) -> ExpectationBuilder<'_>;
/// Helper to expect `describe_replication_groups`: Returns information about a particular
/// replication group. If no identifier is specified, DescribeReplicationGroups returns
/// information about all replication groups. This operation is valid for Valkey or Redis OSS
/// only.
fn expect_describe_replication_groups(&mut self) -> ExpectationBuilder<'_>;
/// Helper to expect `delete_cache_cluster`: Deletes a previously provisioned cluster.
/// DeleteCacheCluster deletes all associated cache nodes, node endpoints and the cluster
/// itself. When you receive a successful response from this operation, Amazon ElastiCache
/// immediately begins deleting the cluster; you cannot cancel or revert this operation. This
/// operation is not valid for: Valkey or Redis OSS (cluster mode enabled) clusters Valkey or
/// Redis OSS (cluster mode disabled) clusters A cluster that is the last read replica of a
/// replication group A cluster that is the primary node of a replication group A node group
/// (shard) that has Multi-AZ mode enabled A cluster from a Valkey or Redis OSS (cluster mode
/// enabled) replication group A cluster that is not in the available state
fn expect_delete_cache_cluster(&mut self) -> ExpectationBuilder<'_>;
/// Helper to expect `delete_replication_group`: Deletes an existing replication group. By
/// default, this operation deletes the entire replication group, including the
/// primary/primaries and all of the read replicas. If the replication group has only one
/// primary, you can optionally delete only the read replicas, while retaining the primary by
/// setting RetainPrimaryCluster=true. When you receive a successful response from this
/// operation, Amazon ElastiCache immediately begins deleting the selected resources; you cannot
/// cancel or revert this operation. CreateSnapshot permission is required to create a final
/// snapshot. Without this permission, the API call will fail with an Access Denied exception.
/// This operation is valid for Redis OSS only.
fn expect_delete_replication_group(&mut self) -> ExpectationBuilder<'_>;
/// Helper to expect `create_snapshot`: Creates a copy of an entire cluster or replication group
/// at a specific moment in time. This operation is valid for Valkey or Redis OSS only.
fn expect_create_snapshot(&mut self) -> ExpectationBuilder<'_>;
}
#[cfg(any(test, feature = "test-support"))]
impl ElasticacheMockHelpers for MockClient {
/// Helper to expect `describe_cache_clusters`: Returns information about all provisioned
/// clusters if no cluster identifier is specified, or about a specific cache cluster if a
/// cluster identifier is supplied. By default, abbreviated information about the clusters is
/// returned. You can use the optional ShowCacheNodeInfo flag to retrieve detailed information
/// about the cache nodes associated with the clusters. These details include the DNS address
/// and port for the cache node endpoint. If the cluster is in the creating state, only cluster-
/// level information is displayed until all of the nodes are successfully provisioned. If the
/// cluster is in the deleting state, only cluster-level information is displayed. If cache
/// nodes are currently being added to the cluster, node endpoint information and creation time
/// for the additional nodes are not displayed until they are completely provisioned. When the
/// cluster state is available, the cluster is ready for use. If cache nodes are currently being
/// removed from the cluster, no endpoint information for the removed nodes is displayed.
fn expect_describe_cache_clusters(&mut self) -> crate::mock_client::ExpectationBuilder<'_> {
let path = "/".to_string();
self.expect_post(&path)
}
/// Helper to expect `describe_replication_groups`: Returns information about a particular
/// replication group. If no identifier is specified, DescribeReplicationGroups returns
/// information about all replication groups. This operation is valid for Valkey or Redis OSS
/// only.
fn expect_describe_replication_groups(&mut self) -> crate::mock_client::ExpectationBuilder<'_> {
let path = "/".to_string();
self.expect_post(&path)
}
/// Helper to expect `delete_cache_cluster`: Deletes a previously provisioned cluster.
/// DeleteCacheCluster deletes all associated cache nodes, node endpoints and the cluster
/// itself. When you receive a successful response from this operation, Amazon ElastiCache
/// immediately begins deleting the cluster; you cannot cancel or revert this operation. This
/// operation is not valid for: Valkey or Redis OSS (cluster mode enabled) clusters Valkey or
/// Redis OSS (cluster mode disabled) clusters A cluster that is the last read replica of a
/// replication group A cluster that is the primary node of a replication group A node group
/// (shard) that has Multi-AZ mode enabled A cluster from a Valkey or Redis OSS (cluster mode
/// enabled) replication group A cluster that is not in the available state
fn expect_delete_cache_cluster(&mut self) -> crate::mock_client::ExpectationBuilder<'_> {
let path = "/".to_string();
self.expect_post(&path)
}
/// Helper to expect `delete_replication_group`: Deletes an existing replication group. By
/// default, this operation deletes the entire replication group, including the
/// primary/primaries and all of the read replicas. If the replication group has only one
/// primary, you can optionally delete only the read replicas, while retaining the primary by
/// setting RetainPrimaryCluster=true. When you receive a successful response from this
/// operation, Amazon ElastiCache immediately begins deleting the selected resources; you cannot
/// cancel or revert this operation. CreateSnapshot permission is required to create a final
/// snapshot. Without this permission, the API call will fail with an Access Denied exception.
/// This operation is valid for Redis OSS only.
fn expect_delete_replication_group(&mut self) -> crate::mock_client::ExpectationBuilder<'_> {
let path = "/".to_string();
self.expect_post(&path)
}
/// Helper to expect `create_snapshot`: Creates a copy of an entire cluster or replication group
/// at a specific moment in time. This operation is valid for Valkey or Redis OSS only.
fn expect_create_snapshot(&mut self) -> crate::mock_client::ExpectationBuilder<'_> {
let path = "/".to_string();
self.expect_post(&path)
}
}