aws_sdk_rds/operation/start_db_instance_automated_backups_replication/_start_db_instance_automated_backups_replication_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct StartDbInstanceAutomatedBackupsReplicationInput {
6 /// <p>The Amazon Resource Name (ARN) of the source DB instance for the replicated automated backups, for example, <code>arn:aws:rds:us-west-2:123456789012:db:mydatabase</code>.</p>
7 pub source_db_instance_arn: ::std::option::Option<::std::string::String>,
8 /// <p>The retention period for the replicated automated backups.</p>
9 pub backup_retention_period: ::std::option::Option<i32>,
10 /// <p>The Amazon Web Services KMS key identifier for encryption of the replicated automated backups. The KMS key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destination Amazon Web Services Region, for example, <code>arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE</code>.</p>
11 pub kms_key_id: ::std::option::Option<::std::string::String>,
12 /// <p>In an Amazon Web Services GovCloud (US) Region, an URL that contains a Signature Version 4 signed request for the <code>StartDBInstanceAutomatedBackupsReplication</code> operation to call in the Amazon Web Services Region of the source DB instance. The presigned URL must be a valid request for the <code>StartDBInstanceAutomatedBackupsReplication</code> API operation that can run in the Amazon Web Services Region that contains the source DB instance.</p>
13 /// <p>This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web Services Regions.</p>
14 /// <p>To learn how to generate a Signature Version 4 signed request, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html"> Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)</a> and <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html"> Signature Version 4 Signing Process</a>.</p><note>
15 /// <p>If you are using an Amazon Web Services SDK tool or the CLI, you can specify <code>SourceRegion</code> (or <code>--source-region</code> for the CLI) instead of specifying <code>PreSignedUrl</code> manually. Specifying <code>SourceRegion</code> autogenerates a presigned URL that is a valid request for the operation that can run in the source Amazon Web Services Region.</p>
16 /// </note>
17 pub pre_signed_url: ::std::option::Option<::std::string::String>,
18 /// <p>A list of tags to associate with the replicated automated backups.</p>
19 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
20}
21impl StartDbInstanceAutomatedBackupsReplicationInput {
22 /// <p>The Amazon Resource Name (ARN) of the source DB instance for the replicated automated backups, for example, <code>arn:aws:rds:us-west-2:123456789012:db:mydatabase</code>.</p>
23 pub fn source_db_instance_arn(&self) -> ::std::option::Option<&str> {
24 self.source_db_instance_arn.as_deref()
25 }
26 /// <p>The retention period for the replicated automated backups.</p>
27 pub fn backup_retention_period(&self) -> ::std::option::Option<i32> {
28 self.backup_retention_period
29 }
30 /// <p>The Amazon Web Services KMS key identifier for encryption of the replicated automated backups. The KMS key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destination Amazon Web Services Region, for example, <code>arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE</code>.</p>
31 pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
32 self.kms_key_id.as_deref()
33 }
34 /// <p>In an Amazon Web Services GovCloud (US) Region, an URL that contains a Signature Version 4 signed request for the <code>StartDBInstanceAutomatedBackupsReplication</code> operation to call in the Amazon Web Services Region of the source DB instance. The presigned URL must be a valid request for the <code>StartDBInstanceAutomatedBackupsReplication</code> API operation that can run in the Amazon Web Services Region that contains the source DB instance.</p>
35 /// <p>This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web Services Regions.</p>
36 /// <p>To learn how to generate a Signature Version 4 signed request, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html"> Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)</a> and <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html"> Signature Version 4 Signing Process</a>.</p><note>
37 /// <p>If you are using an Amazon Web Services SDK tool or the CLI, you can specify <code>SourceRegion</code> (or <code>--source-region</code> for the CLI) instead of specifying <code>PreSignedUrl</code> manually. Specifying <code>SourceRegion</code> autogenerates a presigned URL that is a valid request for the operation that can run in the source Amazon Web Services Region.</p>
38 /// </note>
39 pub fn pre_signed_url(&self) -> ::std::option::Option<&str> {
40 self.pre_signed_url.as_deref()
41 }
42 /// <p>A list of tags to associate with the replicated automated backups.</p>
43 ///
44 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
45 pub fn tags(&self) -> &[crate::types::Tag] {
46 self.tags.as_deref().unwrap_or_default()
47 }
48}
49impl ::std::fmt::Debug for StartDbInstanceAutomatedBackupsReplicationInput {
50 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
51 let mut formatter = f.debug_struct("StartDbInstanceAutomatedBackupsReplicationInput");
52 formatter.field("source_db_instance_arn", &self.source_db_instance_arn);
53 formatter.field("backup_retention_period", &self.backup_retention_period);
54 formatter.field("kms_key_id", &self.kms_key_id);
55 formatter.field("pre_signed_url", &"*** Sensitive Data Redacted ***");
56 formatter.field("tags", &self.tags);
57 formatter.finish()
58 }
59}
60impl StartDbInstanceAutomatedBackupsReplicationInput {
61 /// Creates a new builder-style object to manufacture [`StartDbInstanceAutomatedBackupsReplicationInput`](crate::operation::start_db_instance_automated_backups_replication::StartDbInstanceAutomatedBackupsReplicationInput).
62 pub fn builder(
63 ) -> crate::operation::start_db_instance_automated_backups_replication::builders::StartDbInstanceAutomatedBackupsReplicationInputBuilder {
64 crate::operation::start_db_instance_automated_backups_replication::builders::StartDbInstanceAutomatedBackupsReplicationInputBuilder::default()
65 }
66}
67
68/// A builder for [`StartDbInstanceAutomatedBackupsReplicationInput`](crate::operation::start_db_instance_automated_backups_replication::StartDbInstanceAutomatedBackupsReplicationInput).
69#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
70#[non_exhaustive]
71pub struct StartDbInstanceAutomatedBackupsReplicationInputBuilder {
72 pub(crate) source_db_instance_arn: ::std::option::Option<::std::string::String>,
73 pub(crate) backup_retention_period: ::std::option::Option<i32>,
74 pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
75 pub(crate) pre_signed_url: ::std::option::Option<::std::string::String>,
76 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
77}
78impl StartDbInstanceAutomatedBackupsReplicationInputBuilder {
79 /// <p>The Amazon Resource Name (ARN) of the source DB instance for the replicated automated backups, for example, <code>arn:aws:rds:us-west-2:123456789012:db:mydatabase</code>.</p>
80 /// This field is required.
81 pub fn source_db_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 self.source_db_instance_arn = ::std::option::Option::Some(input.into());
83 self
84 }
85 /// <p>The Amazon Resource Name (ARN) of the source DB instance for the replicated automated backups, for example, <code>arn:aws:rds:us-west-2:123456789012:db:mydatabase</code>.</p>
86 pub fn set_source_db_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87 self.source_db_instance_arn = input;
88 self
89 }
90 /// <p>The Amazon Resource Name (ARN) of the source DB instance for the replicated automated backups, for example, <code>arn:aws:rds:us-west-2:123456789012:db:mydatabase</code>.</p>
91 pub fn get_source_db_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
92 &self.source_db_instance_arn
93 }
94 /// <p>The retention period for the replicated automated backups.</p>
95 pub fn backup_retention_period(mut self, input: i32) -> Self {
96 self.backup_retention_period = ::std::option::Option::Some(input);
97 self
98 }
99 /// <p>The retention period for the replicated automated backups.</p>
100 pub fn set_backup_retention_period(mut self, input: ::std::option::Option<i32>) -> Self {
101 self.backup_retention_period = input;
102 self
103 }
104 /// <p>The retention period for the replicated automated backups.</p>
105 pub fn get_backup_retention_period(&self) -> &::std::option::Option<i32> {
106 &self.backup_retention_period
107 }
108 /// <p>The Amazon Web Services KMS key identifier for encryption of the replicated automated backups. The KMS key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destination Amazon Web Services Region, for example, <code>arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE</code>.</p>
109 pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110 self.kms_key_id = ::std::option::Option::Some(input.into());
111 self
112 }
113 /// <p>The Amazon Web Services KMS key identifier for encryption of the replicated automated backups. The KMS key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destination Amazon Web Services Region, for example, <code>arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE</code>.</p>
114 pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115 self.kms_key_id = input;
116 self
117 }
118 /// <p>The Amazon Web Services KMS key identifier for encryption of the replicated automated backups. The KMS key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destination Amazon Web Services Region, for example, <code>arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE</code>.</p>
119 pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
120 &self.kms_key_id
121 }
122 /// <p>In an Amazon Web Services GovCloud (US) Region, an URL that contains a Signature Version 4 signed request for the <code>StartDBInstanceAutomatedBackupsReplication</code> operation to call in the Amazon Web Services Region of the source DB instance. The presigned URL must be a valid request for the <code>StartDBInstanceAutomatedBackupsReplication</code> API operation that can run in the Amazon Web Services Region that contains the source DB instance.</p>
123 /// <p>This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web Services Regions.</p>
124 /// <p>To learn how to generate a Signature Version 4 signed request, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html"> Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)</a> and <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html"> Signature Version 4 Signing Process</a>.</p><note>
125 /// <p>If you are using an Amazon Web Services SDK tool or the CLI, you can specify <code>SourceRegion</code> (or <code>--source-region</code> for the CLI) instead of specifying <code>PreSignedUrl</code> manually. Specifying <code>SourceRegion</code> autogenerates a presigned URL that is a valid request for the operation that can run in the source Amazon Web Services Region.</p>
126 /// </note>
127 pub fn pre_signed_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.pre_signed_url = ::std::option::Option::Some(input.into());
129 self
130 }
131 /// <p>In an Amazon Web Services GovCloud (US) Region, an URL that contains a Signature Version 4 signed request for the <code>StartDBInstanceAutomatedBackupsReplication</code> operation to call in the Amazon Web Services Region of the source DB instance. The presigned URL must be a valid request for the <code>StartDBInstanceAutomatedBackupsReplication</code> API operation that can run in the Amazon Web Services Region that contains the source DB instance.</p>
132 /// <p>This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web Services Regions.</p>
133 /// <p>To learn how to generate a Signature Version 4 signed request, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html"> Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)</a> and <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html"> Signature Version 4 Signing Process</a>.</p><note>
134 /// <p>If you are using an Amazon Web Services SDK tool or the CLI, you can specify <code>SourceRegion</code> (or <code>--source-region</code> for the CLI) instead of specifying <code>PreSignedUrl</code> manually. Specifying <code>SourceRegion</code> autogenerates a presigned URL that is a valid request for the operation that can run in the source Amazon Web Services Region.</p>
135 /// </note>
136 pub fn set_pre_signed_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.pre_signed_url = input;
138 self
139 }
140 /// <p>In an Amazon Web Services GovCloud (US) Region, an URL that contains a Signature Version 4 signed request for the <code>StartDBInstanceAutomatedBackupsReplication</code> operation to call in the Amazon Web Services Region of the source DB instance. The presigned URL must be a valid request for the <code>StartDBInstanceAutomatedBackupsReplication</code> API operation that can run in the Amazon Web Services Region that contains the source DB instance.</p>
141 /// <p>This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web Services Regions.</p>
142 /// <p>To learn how to generate a Signature Version 4 signed request, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html"> Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)</a> and <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html"> Signature Version 4 Signing Process</a>.</p><note>
143 /// <p>If you are using an Amazon Web Services SDK tool or the CLI, you can specify <code>SourceRegion</code> (or <code>--source-region</code> for the CLI) instead of specifying <code>PreSignedUrl</code> manually. Specifying <code>SourceRegion</code> autogenerates a presigned URL that is a valid request for the operation that can run in the source Amazon Web Services Region.</p>
144 /// </note>
145 pub fn get_pre_signed_url(&self) -> &::std::option::Option<::std::string::String> {
146 &self.pre_signed_url
147 }
148 /// Appends an item to `tags`.
149 ///
150 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
151 ///
152 /// <p>A list of tags to associate with the replicated automated backups.</p>
153 pub fn tags(mut self, input: crate::types::Tag) -> Self {
154 let mut v = self.tags.unwrap_or_default();
155 v.push(input);
156 self.tags = ::std::option::Option::Some(v);
157 self
158 }
159 /// <p>A list of tags to associate with the replicated automated backups.</p>
160 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
161 self.tags = input;
162 self
163 }
164 /// <p>A list of tags to associate with the replicated automated backups.</p>
165 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
166 &self.tags
167 }
168 /// Consumes the builder and constructs a [`StartDbInstanceAutomatedBackupsReplicationInput`](crate::operation::start_db_instance_automated_backups_replication::StartDbInstanceAutomatedBackupsReplicationInput).
169 pub fn build(
170 self,
171 ) -> ::std::result::Result<
172 crate::operation::start_db_instance_automated_backups_replication::StartDbInstanceAutomatedBackupsReplicationInput,
173 ::aws_smithy_types::error::operation::BuildError,
174 > {
175 ::std::result::Result::Ok(
176 crate::operation::start_db_instance_automated_backups_replication::StartDbInstanceAutomatedBackupsReplicationInput {
177 source_db_instance_arn: self.source_db_instance_arn,
178 backup_retention_period: self.backup_retention_period,
179 kms_key_id: self.kms_key_id,
180 pre_signed_url: self.pre_signed_url,
181 tags: self.tags,
182 },
183 )
184 }
185}
186impl ::std::fmt::Debug for StartDbInstanceAutomatedBackupsReplicationInputBuilder {
187 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
188 let mut formatter = f.debug_struct("StartDbInstanceAutomatedBackupsReplicationInputBuilder");
189 formatter.field("source_db_instance_arn", &self.source_db_instance_arn);
190 formatter.field("backup_retention_period", &self.backup_retention_period);
191 formatter.field("kms_key_id", &self.kms_key_id);
192 formatter.field("pre_signed_url", &"*** Sensitive Data Redacted ***");
193 formatter.field("tags", &self.tags);
194 formatter.finish()
195 }
196}