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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct FailoverDbClusterInput {
/// <p>The identifier of the DB cluster to force a failover for. This parameter isn't case-sensitive.</p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>Must match the identifier of an existing DB cluster.</p></li>
/// </ul>
pub db_cluster_identifier: ::std::option::Option<::std::string::String>,
/// <p>The name of the DB instance to promote to the primary DB instance.</p>
/// <p>Specify the DB instance identifier for an Aurora Replica or a Multi-AZ readable standby in the DB cluster, for example <code>mydbcluster-replica1</code>.</p>
/// <p>This setting isn't supported for RDS for MySQL Multi-AZ DB clusters.</p>
pub target_db_instance_identifier: ::std::option::Option<::std::string::String>,
}
impl FailoverDbClusterInput {
/// <p>The identifier of the DB cluster to force a failover for. This parameter isn't case-sensitive.</p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>Must match the identifier of an existing DB cluster.</p></li>
/// </ul>
pub fn db_cluster_identifier(&self) -> ::std::option::Option<&str> {
self.db_cluster_identifier.as_deref()
}
/// <p>The name of the DB instance to promote to the primary DB instance.</p>
/// <p>Specify the DB instance identifier for an Aurora Replica or a Multi-AZ readable standby in the DB cluster, for example <code>mydbcluster-replica1</code>.</p>
/// <p>This setting isn't supported for RDS for MySQL Multi-AZ DB clusters.</p>
pub fn target_db_instance_identifier(&self) -> ::std::option::Option<&str> {
self.target_db_instance_identifier.as_deref()
}
}
impl FailoverDbClusterInput {
/// Creates a new builder-style object to manufacture [`FailoverDbClusterInput`](crate::operation::failover_db_cluster::FailoverDbClusterInput).
pub fn builder() -> crate::operation::failover_db_cluster::builders::FailoverDbClusterInputBuilder {
crate::operation::failover_db_cluster::builders::FailoverDbClusterInputBuilder::default()
}
}
/// A builder for [`FailoverDbClusterInput`](crate::operation::failover_db_cluster::FailoverDbClusterInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct FailoverDbClusterInputBuilder {
pub(crate) db_cluster_identifier: ::std::option::Option<::std::string::String>,
pub(crate) target_db_instance_identifier: ::std::option::Option<::std::string::String>,
}
impl FailoverDbClusterInputBuilder {
/// <p>The identifier of the DB cluster to force a failover for. This parameter isn't case-sensitive.</p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>Must match the identifier of an existing DB cluster.</p></li>
/// </ul>
/// This field is required.
pub fn db_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.db_cluster_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the DB cluster to force a failover for. This parameter isn't case-sensitive.</p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>Must match the identifier of an existing DB cluster.</p></li>
/// </ul>
pub fn set_db_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.db_cluster_identifier = input;
self
}
/// <p>The identifier of the DB cluster to force a failover for. This parameter isn't case-sensitive.</p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>Must match the identifier of an existing DB cluster.</p></li>
/// </ul>
pub fn get_db_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.db_cluster_identifier
}
/// <p>The name of the DB instance to promote to the primary DB instance.</p>
/// <p>Specify the DB instance identifier for an Aurora Replica or a Multi-AZ readable standby in the DB cluster, for example <code>mydbcluster-replica1</code>.</p>
/// <p>This setting isn't supported for RDS for MySQL Multi-AZ DB clusters.</p>
pub fn target_db_instance_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.target_db_instance_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the DB instance to promote to the primary DB instance.</p>
/// <p>Specify the DB instance identifier for an Aurora Replica or a Multi-AZ readable standby in the DB cluster, for example <code>mydbcluster-replica1</code>.</p>
/// <p>This setting isn't supported for RDS for MySQL Multi-AZ DB clusters.</p>
pub fn set_target_db_instance_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.target_db_instance_identifier = input;
self
}
/// <p>The name of the DB instance to promote to the primary DB instance.</p>
/// <p>Specify the DB instance identifier for an Aurora Replica or a Multi-AZ readable standby in the DB cluster, for example <code>mydbcluster-replica1</code>.</p>
/// <p>This setting isn't supported for RDS for MySQL Multi-AZ DB clusters.</p>
pub fn get_target_db_instance_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.target_db_instance_identifier
}
/// Consumes the builder and constructs a [`FailoverDbClusterInput`](crate::operation::failover_db_cluster::FailoverDbClusterInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::failover_db_cluster::FailoverDbClusterInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::failover_db_cluster::FailoverDbClusterInput {
db_cluster_identifier: self.db_cluster_identifier,
target_db_instance_identifier: self.target_db_instance_identifier,
})
}
}