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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents the input of a <code>DeleteReplicationGroup</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteReplicationGroupInput {
/// <p>The identifier for the cluster to be deleted. This parameter is not case sensitive.</p>
pub replication_group_id: ::std::option::Option<::std::string::String>,
/// <p>If set to <code>true</code>, all of the read replicas are deleted, but the primary node is retained.</p>
pub retain_primary_cluster: ::std::option::Option<bool>,
/// <p>The name of a final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the replication group is immediately deleted.</p>
pub final_snapshot_identifier: ::std::option::Option<::std::string::String>,
}
impl DeleteReplicationGroupInput {
/// <p>The identifier for the cluster to be deleted. This parameter is not case sensitive.</p>
pub fn replication_group_id(&self) -> ::std::option::Option<&str> {
self.replication_group_id.as_deref()
}
/// <p>If set to <code>true</code>, all of the read replicas are deleted, but the primary node is retained.</p>
pub fn retain_primary_cluster(&self) -> ::std::option::Option<bool> {
self.retain_primary_cluster
}
/// <p>The name of a final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the replication group is immediately deleted.</p>
pub fn final_snapshot_identifier(&self) -> ::std::option::Option<&str> {
self.final_snapshot_identifier.as_deref()
}
}
impl DeleteReplicationGroupInput {
/// Creates a new builder-style object to manufacture [`DeleteReplicationGroupInput`](crate::operation::delete_replication_group::DeleteReplicationGroupInput).
pub fn builder() -> crate::operation::delete_replication_group::builders::DeleteReplicationGroupInputBuilder {
crate::operation::delete_replication_group::builders::DeleteReplicationGroupInputBuilder::default()
}
}
/// A builder for [`DeleteReplicationGroupInput`](crate::operation::delete_replication_group::DeleteReplicationGroupInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteReplicationGroupInputBuilder {
pub(crate) replication_group_id: ::std::option::Option<::std::string::String>,
pub(crate) retain_primary_cluster: ::std::option::Option<bool>,
pub(crate) final_snapshot_identifier: ::std::option::Option<::std::string::String>,
}
impl DeleteReplicationGroupInputBuilder {
/// <p>The identifier for the cluster to be deleted. This parameter is not case sensitive.</p>
/// This field is required.
pub fn replication_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.replication_group_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier for the cluster to be deleted. This parameter is not case sensitive.</p>
pub fn set_replication_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.replication_group_id = input;
self
}
/// <p>The identifier for the cluster to be deleted. This parameter is not case sensitive.</p>
pub fn get_replication_group_id(&self) -> &::std::option::Option<::std::string::String> {
&self.replication_group_id
}
/// <p>If set to <code>true</code>, all of the read replicas are deleted, but the primary node is retained.</p>
pub fn retain_primary_cluster(mut self, input: bool) -> Self {
self.retain_primary_cluster = ::std::option::Option::Some(input);
self
}
/// <p>If set to <code>true</code>, all of the read replicas are deleted, but the primary node is retained.</p>
pub fn set_retain_primary_cluster(mut self, input: ::std::option::Option<bool>) -> Self {
self.retain_primary_cluster = input;
self
}
/// <p>If set to <code>true</code>, all of the read replicas are deleted, but the primary node is retained.</p>
pub fn get_retain_primary_cluster(&self) -> &::std::option::Option<bool> {
&self.retain_primary_cluster
}
/// <p>The name of a final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the replication group is immediately deleted.</p>
pub fn final_snapshot_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.final_snapshot_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of a final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the replication group is immediately deleted.</p>
pub fn set_final_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.final_snapshot_identifier = input;
self
}
/// <p>The name of a final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the replication group is immediately deleted.</p>
pub fn get_final_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.final_snapshot_identifier
}
/// Consumes the builder and constructs a [`DeleteReplicationGroupInput`](crate::operation::delete_replication_group::DeleteReplicationGroupInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::delete_replication_group::DeleteReplicationGroupInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::delete_replication_group::DeleteReplicationGroupInput {
replication_group_id: self.replication_group_id,
retain_primary_cluster: self.retain_primary_cluster,
final_snapshot_identifier: self.final_snapshot_identifier,
})
}
}