aws_sdk_secretsmanager/operation/describe_secret/_describe_secret_output.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, ::std::fmt::Debug)]
5pub struct DescribeSecretOutput {
6 /// <p>The ARN of the secret.</p>
7 pub arn: ::std::option::Option<::std::string::String>,
8 /// <p>The name of the secret.</p>
9 pub name: ::std::option::Option<::std::string::String>,
10 /// <p>The exact string that identifies the partner that holds the external secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/managed-external-secrets.html">Using Secrets Manager managed external secrets</a>.</p>
11 pub r#type: ::std::option::Option<::std::string::String>,
12 /// <p>The description of the secret.</p>
13 pub description: ::std::option::Option<::std::string::String>,
14 /// <p>The key ID or alias ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with the Amazon Web Services managed key <code>aws/secretsmanager</code>, this field is omitted. Secrets created using the console use an KMS key ID.</p>
15 pub kms_key_id: ::std::option::Option<::std::string::String>,
16 /// <p>Specifies whether automatic rotation is turned on for this secret. If the secret has never been configured for rotation, Secrets Manager returns null.</p>
17 /// <p>To turn on rotation, use <code>RotateSecret</code>. To turn off rotation, use <code>CancelRotateSecret</code>.</p>
18 pub rotation_enabled: ::std::option::Option<bool>,
19 /// <p>The ARN of the Lambda function that Secrets Manager invokes to rotate the secret.</p>
20 pub rotation_lambda_arn: ::std::option::Option<::std::string::String>,
21 /// <p>The rotation schedule and Lambda function for this secret. If the secret previously had rotation turned on, but it is now turned off, this field shows the previous rotation schedule and rotation function. If the secret never had rotation turned on, this field is omitted.</p>
22 pub rotation_rules: ::std::option::Option<crate::types::RotationRulesType>,
23 /// <p>The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-partners.html">Managed external secrets partners</a>.</p>
24 pub external_secret_rotation_metadata: ::std::option::Option<::std::vec::Vec<crate::types::ExternalSecretRotationMetadataItem>>,
25 /// <p>The Amazon Resource Name (ARN) of the role that allows Secrets Manager to rotate a secret held by a third-party partner. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-security.html">Security and permissions</a>.</p>
26 pub external_secret_rotation_role_arn: ::std::option::Option<::std::string::String>,
27 /// <p>The last date and time that Secrets Manager rotated the secret. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.</p>
28 pub last_rotated_date: ::std::option::Option<::aws_smithy_types::DateTime>,
29 /// <p>The last date and time that this secret was modified in any way.</p>
30 pub last_changed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
31 /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
32 pub last_accessed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
33 /// <p>The date the secret is scheduled for deletion. If it is not scheduled for deletion, this field is omitted. When you delete a secret, Secrets Manager requires a recovery window of at least 7 days before deleting the secret. Some time after the deleted date, Secrets Manager deletes the secret, including all of its versions.</p>
34 /// <p>If a secret is scheduled for deletion, then its details, including the encrypted secret value, is not accessible. To cancel a scheduled deletion and restore access to the secret, use <code>RestoreSecret</code>.</p>
35 pub deleted_date: ::std::option::Option<::aws_smithy_types::DateTime>,
36 /// <p>The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null. If rotation fails, Secrets Manager retries the entire rotation process multiple times. If rotation is unsuccessful, this date may be in the past.</p>
37 /// <p>This date represents the latest date that rotation will occur, but it is not an approximate rotation date. In some cases, for example if you turn off automatic rotation and then turn it back on, the next rotation may occur much sooner than this date.</p>
38 pub next_rotation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
39 /// <p>The list of tags attached to the secret. To add tags to a secret, use <code>TagResource</code>. To remove tags, use <code>UntagResource</code>.</p>
40 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
41 /// <p>A list of the versions of the secret that have staging labels attached. Versions that don't have staging labels are considered deprecated and Secrets Manager can delete them.</p>
42 /// <p>Secrets Manager uses staging labels to indicate the status of a secret version during rotation. The three staging labels for rotation are:</p>
43 /// <ul>
44 /// <li>
45 /// <p><code>AWSCURRENT</code>, which indicates the current version of the secret.</p></li>
46 /// <li>
47 /// <p><code>AWSPENDING</code>, which indicates the version of the secret that contains new secret information that will become the next current version when rotation finishes.</p>
48 /// <p>During rotation, Secrets Manager creates an <code>AWSPENDING</code> version ID before creating the new secret version. To check if a secret version exists, call <code>GetSecretValue</code>.</p></li>
49 /// <li>
50 /// <p><code>AWSPREVIOUS</code>, which indicates the previous current version of the secret. You can use this as the <i>last known good</i> version.</p></li>
51 /// </ul>
52 /// <p>For more information about rotation and staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation works</a>.</p>
53 pub version_ids_to_stages: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
54 /// <p>The ID of the service that created this secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p>
55 pub owning_service: ::std::option::Option<::std::string::String>,
56 /// <p>The date the secret was created.</p>
57 pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
58 /// <p>The Region the secret is in. If a secret is replicated to other Regions, the replicas are listed in <code>ReplicationStatus</code>.</p>
59 pub primary_region: ::std::option::Option<::std::string::String>,
60 /// <p>A list of the replicas of this secret and their status:</p>
61 /// <ul>
62 /// <li>
63 /// <p><code>Failed</code>, which indicates that the replica was not created.</p></li>
64 /// <li>
65 /// <p><code>InProgress</code>, which indicates that Secrets Manager is in the process of creating the replica.</p></li>
66 /// <li>
67 /// <p><code>InSync</code>, which indicates that the replica was created.</p></li>
68 /// </ul>
69 pub replication_status: ::std::option::Option<::std::vec::Vec<crate::types::ReplicationStatusType>>,
70 /// <p>Information about the primary secret in the other Amazon Web Services account that this cross-account replica secret replicates from, including the primary secret ARN and the replication status. This field is omitted if the secret is not a cross-account replica.</p>
71 pub cross_account_primary: ::std::option::Option<crate::types::CrossAccountPrimaryType>,
72 /// <p>A list of this secret's cross-account replica secrets and their replication status, if this secret is the primary for cross-account replication. This field is omitted if the secret has no cross-account replicas.</p>
73 pub cross_account_replicas: ::std::option::Option<::std::vec::Vec<crate::types::CrossAccountReplicaEntry>>,
74 _request_id: Option<String>,
75}
76impl DescribeSecretOutput {
77 /// <p>The ARN of the secret.</p>
78 pub fn arn(&self) -> ::std::option::Option<&str> {
79 self.arn.as_deref()
80 }
81 /// <p>The name of the secret.</p>
82 pub fn name(&self) -> ::std::option::Option<&str> {
83 self.name.as_deref()
84 }
85 /// <p>The exact string that identifies the partner that holds the external secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/managed-external-secrets.html">Using Secrets Manager managed external secrets</a>.</p>
86 pub fn r#type(&self) -> ::std::option::Option<&str> {
87 self.r#type.as_deref()
88 }
89 /// <p>The description of the secret.</p>
90 pub fn description(&self) -> ::std::option::Option<&str> {
91 self.description.as_deref()
92 }
93 /// <p>The key ID or alias ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with the Amazon Web Services managed key <code>aws/secretsmanager</code>, this field is omitted. Secrets created using the console use an KMS key ID.</p>
94 pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
95 self.kms_key_id.as_deref()
96 }
97 /// <p>Specifies whether automatic rotation is turned on for this secret. If the secret has never been configured for rotation, Secrets Manager returns null.</p>
98 /// <p>To turn on rotation, use <code>RotateSecret</code>. To turn off rotation, use <code>CancelRotateSecret</code>.</p>
99 pub fn rotation_enabled(&self) -> ::std::option::Option<bool> {
100 self.rotation_enabled
101 }
102 /// <p>The ARN of the Lambda function that Secrets Manager invokes to rotate the secret.</p>
103 pub fn rotation_lambda_arn(&self) -> ::std::option::Option<&str> {
104 self.rotation_lambda_arn.as_deref()
105 }
106 /// <p>The rotation schedule and Lambda function for this secret. If the secret previously had rotation turned on, but it is now turned off, this field shows the previous rotation schedule and rotation function. If the secret never had rotation turned on, this field is omitted.</p>
107 pub fn rotation_rules(&self) -> ::std::option::Option<&crate::types::RotationRulesType> {
108 self.rotation_rules.as_ref()
109 }
110 /// <p>The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-partners.html">Managed external secrets partners</a>.</p>
111 ///
112 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.external_secret_rotation_metadata.is_none()`.
113 pub fn external_secret_rotation_metadata(&self) -> &[crate::types::ExternalSecretRotationMetadataItem] {
114 self.external_secret_rotation_metadata.as_deref().unwrap_or_default()
115 }
116 /// <p>The Amazon Resource Name (ARN) of the role that allows Secrets Manager to rotate a secret held by a third-party partner. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-security.html">Security and permissions</a>.</p>
117 pub fn external_secret_rotation_role_arn(&self) -> ::std::option::Option<&str> {
118 self.external_secret_rotation_role_arn.as_deref()
119 }
120 /// <p>The last date and time that Secrets Manager rotated the secret. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.</p>
121 pub fn last_rotated_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
122 self.last_rotated_date.as_ref()
123 }
124 /// <p>The last date and time that this secret was modified in any way.</p>
125 pub fn last_changed_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
126 self.last_changed_date.as_ref()
127 }
128 /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
129 pub fn last_accessed_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
130 self.last_accessed_date.as_ref()
131 }
132 /// <p>The date the secret is scheduled for deletion. If it is not scheduled for deletion, this field is omitted. When you delete a secret, Secrets Manager requires a recovery window of at least 7 days before deleting the secret. Some time after the deleted date, Secrets Manager deletes the secret, including all of its versions.</p>
133 /// <p>If a secret is scheduled for deletion, then its details, including the encrypted secret value, is not accessible. To cancel a scheduled deletion and restore access to the secret, use <code>RestoreSecret</code>.</p>
134 pub fn deleted_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
135 self.deleted_date.as_ref()
136 }
137 /// <p>The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null. If rotation fails, Secrets Manager retries the entire rotation process multiple times. If rotation is unsuccessful, this date may be in the past.</p>
138 /// <p>This date represents the latest date that rotation will occur, but it is not an approximate rotation date. In some cases, for example if you turn off automatic rotation and then turn it back on, the next rotation may occur much sooner than this date.</p>
139 pub fn next_rotation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
140 self.next_rotation_date.as_ref()
141 }
142 /// <p>The list of tags attached to the secret. To add tags to a secret, use <code>TagResource</code>. To remove tags, use <code>UntagResource</code>.</p>
143 ///
144 /// 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()`.
145 pub fn tags(&self) -> &[crate::types::Tag] {
146 self.tags.as_deref().unwrap_or_default()
147 }
148 /// <p>A list of the versions of the secret that have staging labels attached. Versions that don't have staging labels are considered deprecated and Secrets Manager can delete them.</p>
149 /// <p>Secrets Manager uses staging labels to indicate the status of a secret version during rotation. The three staging labels for rotation are:</p>
150 /// <ul>
151 /// <li>
152 /// <p><code>AWSCURRENT</code>, which indicates the current version of the secret.</p></li>
153 /// <li>
154 /// <p><code>AWSPENDING</code>, which indicates the version of the secret that contains new secret information that will become the next current version when rotation finishes.</p>
155 /// <p>During rotation, Secrets Manager creates an <code>AWSPENDING</code> version ID before creating the new secret version. To check if a secret version exists, call <code>GetSecretValue</code>.</p></li>
156 /// <li>
157 /// <p><code>AWSPREVIOUS</code>, which indicates the previous current version of the secret. You can use this as the <i>last known good</i> version.</p></li>
158 /// </ul>
159 /// <p>For more information about rotation and staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation works</a>.</p>
160 pub fn version_ids_to_stages(
161 &self,
162 ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
163 self.version_ids_to_stages.as_ref()
164 }
165 /// <p>The ID of the service that created this secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p>
166 pub fn owning_service(&self) -> ::std::option::Option<&str> {
167 self.owning_service.as_deref()
168 }
169 /// <p>The date the secret was created.</p>
170 pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
171 self.created_date.as_ref()
172 }
173 /// <p>The Region the secret is in. If a secret is replicated to other Regions, the replicas are listed in <code>ReplicationStatus</code>.</p>
174 pub fn primary_region(&self) -> ::std::option::Option<&str> {
175 self.primary_region.as_deref()
176 }
177 /// <p>A list of the replicas of this secret and their status:</p>
178 /// <ul>
179 /// <li>
180 /// <p><code>Failed</code>, which indicates that the replica was not created.</p></li>
181 /// <li>
182 /// <p><code>InProgress</code>, which indicates that Secrets Manager is in the process of creating the replica.</p></li>
183 /// <li>
184 /// <p><code>InSync</code>, which indicates that the replica was created.</p></li>
185 /// </ul>
186 ///
187 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.replication_status.is_none()`.
188 pub fn replication_status(&self) -> &[crate::types::ReplicationStatusType] {
189 self.replication_status.as_deref().unwrap_or_default()
190 }
191 /// <p>Information about the primary secret in the other Amazon Web Services account that this cross-account replica secret replicates from, including the primary secret ARN and the replication status. This field is omitted if the secret is not a cross-account replica.</p>
192 pub fn cross_account_primary(&self) -> ::std::option::Option<&crate::types::CrossAccountPrimaryType> {
193 self.cross_account_primary.as_ref()
194 }
195 /// <p>A list of this secret's cross-account replica secrets and their replication status, if this secret is the primary for cross-account replication. This field is omitted if the secret has no cross-account replicas.</p>
196 ///
197 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.cross_account_replicas.is_none()`.
198 pub fn cross_account_replicas(&self) -> &[crate::types::CrossAccountReplicaEntry] {
199 self.cross_account_replicas.as_deref().unwrap_or_default()
200 }
201}
202impl ::aws_types::request_id::RequestId for DescribeSecretOutput {
203 fn request_id(&self) -> Option<&str> {
204 self._request_id.as_deref()
205 }
206}
207impl DescribeSecretOutput {
208 /// Creates a new builder-style object to manufacture [`DescribeSecretOutput`](crate::operation::describe_secret::DescribeSecretOutput).
209 pub fn builder() -> crate::operation::describe_secret::builders::DescribeSecretOutputBuilder {
210 crate::operation::describe_secret::builders::DescribeSecretOutputBuilder::default()
211 }
212}
213
214/// A builder for [`DescribeSecretOutput`](crate::operation::describe_secret::DescribeSecretOutput).
215#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
216#[non_exhaustive]
217pub struct DescribeSecretOutputBuilder {
218 pub(crate) arn: ::std::option::Option<::std::string::String>,
219 pub(crate) name: ::std::option::Option<::std::string::String>,
220 pub(crate) r#type: ::std::option::Option<::std::string::String>,
221 pub(crate) description: ::std::option::Option<::std::string::String>,
222 pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
223 pub(crate) rotation_enabled: ::std::option::Option<bool>,
224 pub(crate) rotation_lambda_arn: ::std::option::Option<::std::string::String>,
225 pub(crate) rotation_rules: ::std::option::Option<crate::types::RotationRulesType>,
226 pub(crate) external_secret_rotation_metadata: ::std::option::Option<::std::vec::Vec<crate::types::ExternalSecretRotationMetadataItem>>,
227 pub(crate) external_secret_rotation_role_arn: ::std::option::Option<::std::string::String>,
228 pub(crate) last_rotated_date: ::std::option::Option<::aws_smithy_types::DateTime>,
229 pub(crate) last_changed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
230 pub(crate) last_accessed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
231 pub(crate) deleted_date: ::std::option::Option<::aws_smithy_types::DateTime>,
232 pub(crate) next_rotation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
233 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
234 pub(crate) version_ids_to_stages:
235 ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
236 pub(crate) owning_service: ::std::option::Option<::std::string::String>,
237 pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
238 pub(crate) primary_region: ::std::option::Option<::std::string::String>,
239 pub(crate) replication_status: ::std::option::Option<::std::vec::Vec<crate::types::ReplicationStatusType>>,
240 pub(crate) cross_account_primary: ::std::option::Option<crate::types::CrossAccountPrimaryType>,
241 pub(crate) cross_account_replicas: ::std::option::Option<::std::vec::Vec<crate::types::CrossAccountReplicaEntry>>,
242 _request_id: Option<String>,
243}
244impl DescribeSecretOutputBuilder {
245 /// <p>The ARN of the secret.</p>
246 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
247 self.arn = ::std::option::Option::Some(input.into());
248 self
249 }
250 /// <p>The ARN of the secret.</p>
251 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
252 self.arn = input;
253 self
254 }
255 /// <p>The ARN of the secret.</p>
256 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
257 &self.arn
258 }
259 /// <p>The name of the secret.</p>
260 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
261 self.name = ::std::option::Option::Some(input.into());
262 self
263 }
264 /// <p>The name of the secret.</p>
265 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
266 self.name = input;
267 self
268 }
269 /// <p>The name of the secret.</p>
270 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
271 &self.name
272 }
273 /// <p>The exact string that identifies the partner that holds the external secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/managed-external-secrets.html">Using Secrets Manager managed external secrets</a>.</p>
274 pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
275 self.r#type = ::std::option::Option::Some(input.into());
276 self
277 }
278 /// <p>The exact string that identifies the partner that holds the external secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/managed-external-secrets.html">Using Secrets Manager managed external secrets</a>.</p>
279 pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
280 self.r#type = input;
281 self
282 }
283 /// <p>The exact string that identifies the partner that holds the external secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/managed-external-secrets.html">Using Secrets Manager managed external secrets</a>.</p>
284 pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
285 &self.r#type
286 }
287 /// <p>The description of the secret.</p>
288 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
289 self.description = ::std::option::Option::Some(input.into());
290 self
291 }
292 /// <p>The description of the secret.</p>
293 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
294 self.description = input;
295 self
296 }
297 /// <p>The description of the secret.</p>
298 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
299 &self.description
300 }
301 /// <p>The key ID or alias ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with the Amazon Web Services managed key <code>aws/secretsmanager</code>, this field is omitted. Secrets created using the console use an KMS key ID.</p>
302 pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
303 self.kms_key_id = ::std::option::Option::Some(input.into());
304 self
305 }
306 /// <p>The key ID or alias ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with the Amazon Web Services managed key <code>aws/secretsmanager</code>, this field is omitted. Secrets created using the console use an KMS key ID.</p>
307 pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
308 self.kms_key_id = input;
309 self
310 }
311 /// <p>The key ID or alias ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with the Amazon Web Services managed key <code>aws/secretsmanager</code>, this field is omitted. Secrets created using the console use an KMS key ID.</p>
312 pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
313 &self.kms_key_id
314 }
315 /// <p>Specifies whether automatic rotation is turned on for this secret. If the secret has never been configured for rotation, Secrets Manager returns null.</p>
316 /// <p>To turn on rotation, use <code>RotateSecret</code>. To turn off rotation, use <code>CancelRotateSecret</code>.</p>
317 pub fn rotation_enabled(mut self, input: bool) -> Self {
318 self.rotation_enabled = ::std::option::Option::Some(input);
319 self
320 }
321 /// <p>Specifies whether automatic rotation is turned on for this secret. If the secret has never been configured for rotation, Secrets Manager returns null.</p>
322 /// <p>To turn on rotation, use <code>RotateSecret</code>. To turn off rotation, use <code>CancelRotateSecret</code>.</p>
323 pub fn set_rotation_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
324 self.rotation_enabled = input;
325 self
326 }
327 /// <p>Specifies whether automatic rotation is turned on for this secret. If the secret has never been configured for rotation, Secrets Manager returns null.</p>
328 /// <p>To turn on rotation, use <code>RotateSecret</code>. To turn off rotation, use <code>CancelRotateSecret</code>.</p>
329 pub fn get_rotation_enabled(&self) -> &::std::option::Option<bool> {
330 &self.rotation_enabled
331 }
332 /// <p>The ARN of the Lambda function that Secrets Manager invokes to rotate the secret.</p>
333 pub fn rotation_lambda_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
334 self.rotation_lambda_arn = ::std::option::Option::Some(input.into());
335 self
336 }
337 /// <p>The ARN of the Lambda function that Secrets Manager invokes to rotate the secret.</p>
338 pub fn set_rotation_lambda_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
339 self.rotation_lambda_arn = input;
340 self
341 }
342 /// <p>The ARN of the Lambda function that Secrets Manager invokes to rotate the secret.</p>
343 pub fn get_rotation_lambda_arn(&self) -> &::std::option::Option<::std::string::String> {
344 &self.rotation_lambda_arn
345 }
346 /// <p>The rotation schedule and Lambda function for this secret. If the secret previously had rotation turned on, but it is now turned off, this field shows the previous rotation schedule and rotation function. If the secret never had rotation turned on, this field is omitted.</p>
347 pub fn rotation_rules(mut self, input: crate::types::RotationRulesType) -> Self {
348 self.rotation_rules = ::std::option::Option::Some(input);
349 self
350 }
351 /// <p>The rotation schedule and Lambda function for this secret. If the secret previously had rotation turned on, but it is now turned off, this field shows the previous rotation schedule and rotation function. If the secret never had rotation turned on, this field is omitted.</p>
352 pub fn set_rotation_rules(mut self, input: ::std::option::Option<crate::types::RotationRulesType>) -> Self {
353 self.rotation_rules = input;
354 self
355 }
356 /// <p>The rotation schedule and Lambda function for this secret. If the secret previously had rotation turned on, but it is now turned off, this field shows the previous rotation schedule and rotation function. If the secret never had rotation turned on, this field is omitted.</p>
357 pub fn get_rotation_rules(&self) -> &::std::option::Option<crate::types::RotationRulesType> {
358 &self.rotation_rules
359 }
360 /// Appends an item to `external_secret_rotation_metadata`.
361 ///
362 /// To override the contents of this collection use [`set_external_secret_rotation_metadata`](Self::set_external_secret_rotation_metadata).
363 ///
364 /// <p>The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-partners.html">Managed external secrets partners</a>.</p>
365 pub fn external_secret_rotation_metadata(mut self, input: crate::types::ExternalSecretRotationMetadataItem) -> Self {
366 let mut v = self.external_secret_rotation_metadata.unwrap_or_default();
367 v.push(input);
368 self.external_secret_rotation_metadata = ::std::option::Option::Some(v);
369 self
370 }
371 /// <p>The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-partners.html">Managed external secrets partners</a>.</p>
372 pub fn set_external_secret_rotation_metadata(
373 mut self,
374 input: ::std::option::Option<::std::vec::Vec<crate::types::ExternalSecretRotationMetadataItem>>,
375 ) -> Self {
376 self.external_secret_rotation_metadata = input;
377 self
378 }
379 /// <p>The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-partners.html">Managed external secrets partners</a>.</p>
380 pub fn get_external_secret_rotation_metadata(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ExternalSecretRotationMetadataItem>> {
381 &self.external_secret_rotation_metadata
382 }
383 /// <p>The Amazon Resource Name (ARN) of the role that allows Secrets Manager to rotate a secret held by a third-party partner. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-security.html">Security and permissions</a>.</p>
384 pub fn external_secret_rotation_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
385 self.external_secret_rotation_role_arn = ::std::option::Option::Some(input.into());
386 self
387 }
388 /// <p>The Amazon Resource Name (ARN) of the role that allows Secrets Manager to rotate a secret held by a third-party partner. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-security.html">Security and permissions</a>.</p>
389 pub fn set_external_secret_rotation_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
390 self.external_secret_rotation_role_arn = input;
391 self
392 }
393 /// <p>The Amazon Resource Name (ARN) of the role that allows Secrets Manager to rotate a secret held by a third-party partner. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-security.html">Security and permissions</a>.</p>
394 pub fn get_external_secret_rotation_role_arn(&self) -> &::std::option::Option<::std::string::String> {
395 &self.external_secret_rotation_role_arn
396 }
397 /// <p>The last date and time that Secrets Manager rotated the secret. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.</p>
398 pub fn last_rotated_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
399 self.last_rotated_date = ::std::option::Option::Some(input);
400 self
401 }
402 /// <p>The last date and time that Secrets Manager rotated the secret. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.</p>
403 pub fn set_last_rotated_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
404 self.last_rotated_date = input;
405 self
406 }
407 /// <p>The last date and time that Secrets Manager rotated the secret. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.</p>
408 pub fn get_last_rotated_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
409 &self.last_rotated_date
410 }
411 /// <p>The last date and time that this secret was modified in any way.</p>
412 pub fn last_changed_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
413 self.last_changed_date = ::std::option::Option::Some(input);
414 self
415 }
416 /// <p>The last date and time that this secret was modified in any way.</p>
417 pub fn set_last_changed_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
418 self.last_changed_date = input;
419 self
420 }
421 /// <p>The last date and time that this secret was modified in any way.</p>
422 pub fn get_last_changed_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
423 &self.last_changed_date
424 }
425 /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
426 pub fn last_accessed_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
427 self.last_accessed_date = ::std::option::Option::Some(input);
428 self
429 }
430 /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
431 pub fn set_last_accessed_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
432 self.last_accessed_date = input;
433 self
434 }
435 /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
436 pub fn get_last_accessed_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
437 &self.last_accessed_date
438 }
439 /// <p>The date the secret is scheduled for deletion. If it is not scheduled for deletion, this field is omitted. When you delete a secret, Secrets Manager requires a recovery window of at least 7 days before deleting the secret. Some time after the deleted date, Secrets Manager deletes the secret, including all of its versions.</p>
440 /// <p>If a secret is scheduled for deletion, then its details, including the encrypted secret value, is not accessible. To cancel a scheduled deletion and restore access to the secret, use <code>RestoreSecret</code>.</p>
441 pub fn deleted_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
442 self.deleted_date = ::std::option::Option::Some(input);
443 self
444 }
445 /// <p>The date the secret is scheduled for deletion. If it is not scheduled for deletion, this field is omitted. When you delete a secret, Secrets Manager requires a recovery window of at least 7 days before deleting the secret. Some time after the deleted date, Secrets Manager deletes the secret, including all of its versions.</p>
446 /// <p>If a secret is scheduled for deletion, then its details, including the encrypted secret value, is not accessible. To cancel a scheduled deletion and restore access to the secret, use <code>RestoreSecret</code>.</p>
447 pub fn set_deleted_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
448 self.deleted_date = input;
449 self
450 }
451 /// <p>The date the secret is scheduled for deletion. If it is not scheduled for deletion, this field is omitted. When you delete a secret, Secrets Manager requires a recovery window of at least 7 days before deleting the secret. Some time after the deleted date, Secrets Manager deletes the secret, including all of its versions.</p>
452 /// <p>If a secret is scheduled for deletion, then its details, including the encrypted secret value, is not accessible. To cancel a scheduled deletion and restore access to the secret, use <code>RestoreSecret</code>.</p>
453 pub fn get_deleted_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
454 &self.deleted_date
455 }
456 /// <p>The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null. If rotation fails, Secrets Manager retries the entire rotation process multiple times. If rotation is unsuccessful, this date may be in the past.</p>
457 /// <p>This date represents the latest date that rotation will occur, but it is not an approximate rotation date. In some cases, for example if you turn off automatic rotation and then turn it back on, the next rotation may occur much sooner than this date.</p>
458 pub fn next_rotation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
459 self.next_rotation_date = ::std::option::Option::Some(input);
460 self
461 }
462 /// <p>The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null. If rotation fails, Secrets Manager retries the entire rotation process multiple times. If rotation is unsuccessful, this date may be in the past.</p>
463 /// <p>This date represents the latest date that rotation will occur, but it is not an approximate rotation date. In some cases, for example if you turn off automatic rotation and then turn it back on, the next rotation may occur much sooner than this date.</p>
464 pub fn set_next_rotation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
465 self.next_rotation_date = input;
466 self
467 }
468 /// <p>The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null. If rotation fails, Secrets Manager retries the entire rotation process multiple times. If rotation is unsuccessful, this date may be in the past.</p>
469 /// <p>This date represents the latest date that rotation will occur, but it is not an approximate rotation date. In some cases, for example if you turn off automatic rotation and then turn it back on, the next rotation may occur much sooner than this date.</p>
470 pub fn get_next_rotation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
471 &self.next_rotation_date
472 }
473 /// Appends an item to `tags`.
474 ///
475 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
476 ///
477 /// <p>The list of tags attached to the secret. To add tags to a secret, use <code>TagResource</code>. To remove tags, use <code>UntagResource</code>.</p>
478 pub fn tags(mut self, input: crate::types::Tag) -> Self {
479 let mut v = self.tags.unwrap_or_default();
480 v.push(input);
481 self.tags = ::std::option::Option::Some(v);
482 self
483 }
484 /// <p>The list of tags attached to the secret. To add tags to a secret, use <code>TagResource</code>. To remove tags, use <code>UntagResource</code>.</p>
485 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
486 self.tags = input;
487 self
488 }
489 /// <p>The list of tags attached to the secret. To add tags to a secret, use <code>TagResource</code>. To remove tags, use <code>UntagResource</code>.</p>
490 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
491 &self.tags
492 }
493 /// Adds a key-value pair to `version_ids_to_stages`.
494 ///
495 /// To override the contents of this collection use [`set_version_ids_to_stages`](Self::set_version_ids_to_stages).
496 ///
497 /// <p>A list of the versions of the secret that have staging labels attached. Versions that don't have staging labels are considered deprecated and Secrets Manager can delete them.</p>
498 /// <p>Secrets Manager uses staging labels to indicate the status of a secret version during rotation. The three staging labels for rotation are:</p>
499 /// <ul>
500 /// <li>
501 /// <p><code>AWSCURRENT</code>, which indicates the current version of the secret.</p></li>
502 /// <li>
503 /// <p><code>AWSPENDING</code>, which indicates the version of the secret that contains new secret information that will become the next current version when rotation finishes.</p>
504 /// <p>During rotation, Secrets Manager creates an <code>AWSPENDING</code> version ID before creating the new secret version. To check if a secret version exists, call <code>GetSecretValue</code>.</p></li>
505 /// <li>
506 /// <p><code>AWSPREVIOUS</code>, which indicates the previous current version of the secret. You can use this as the <i>last known good</i> version.</p></li>
507 /// </ul>
508 /// <p>For more information about rotation and staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation works</a>.</p>
509 pub fn version_ids_to_stages(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
510 let mut hash_map = self.version_ids_to_stages.unwrap_or_default();
511 hash_map.insert(k.into(), v);
512 self.version_ids_to_stages = ::std::option::Option::Some(hash_map);
513 self
514 }
515 /// <p>A list of the versions of the secret that have staging labels attached. Versions that don't have staging labels are considered deprecated and Secrets Manager can delete them.</p>
516 /// <p>Secrets Manager uses staging labels to indicate the status of a secret version during rotation. The three staging labels for rotation are:</p>
517 /// <ul>
518 /// <li>
519 /// <p><code>AWSCURRENT</code>, which indicates the current version of the secret.</p></li>
520 /// <li>
521 /// <p><code>AWSPENDING</code>, which indicates the version of the secret that contains new secret information that will become the next current version when rotation finishes.</p>
522 /// <p>During rotation, Secrets Manager creates an <code>AWSPENDING</code> version ID before creating the new secret version. To check if a secret version exists, call <code>GetSecretValue</code>.</p></li>
523 /// <li>
524 /// <p><code>AWSPREVIOUS</code>, which indicates the previous current version of the secret. You can use this as the <i>last known good</i> version.</p></li>
525 /// </ul>
526 /// <p>For more information about rotation and staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation works</a>.</p>
527 pub fn set_version_ids_to_stages(
528 mut self,
529 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
530 ) -> Self {
531 self.version_ids_to_stages = input;
532 self
533 }
534 /// <p>A list of the versions of the secret that have staging labels attached. Versions that don't have staging labels are considered deprecated and Secrets Manager can delete them.</p>
535 /// <p>Secrets Manager uses staging labels to indicate the status of a secret version during rotation. The three staging labels for rotation are:</p>
536 /// <ul>
537 /// <li>
538 /// <p><code>AWSCURRENT</code>, which indicates the current version of the secret.</p></li>
539 /// <li>
540 /// <p><code>AWSPENDING</code>, which indicates the version of the secret that contains new secret information that will become the next current version when rotation finishes.</p>
541 /// <p>During rotation, Secrets Manager creates an <code>AWSPENDING</code> version ID before creating the new secret version. To check if a secret version exists, call <code>GetSecretValue</code>.</p></li>
542 /// <li>
543 /// <p><code>AWSPREVIOUS</code>, which indicates the previous current version of the secret. You can use this as the <i>last known good</i> version.</p></li>
544 /// </ul>
545 /// <p>For more information about rotation and staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation works</a>.</p>
546 pub fn get_version_ids_to_stages(
547 &self,
548 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
549 &self.version_ids_to_stages
550 }
551 /// <p>The ID of the service that created this secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p>
552 pub fn owning_service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
553 self.owning_service = ::std::option::Option::Some(input.into());
554 self
555 }
556 /// <p>The ID of the service that created this secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p>
557 pub fn set_owning_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
558 self.owning_service = input;
559 self
560 }
561 /// <p>The ID of the service that created this secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p>
562 pub fn get_owning_service(&self) -> &::std::option::Option<::std::string::String> {
563 &self.owning_service
564 }
565 /// <p>The date the secret was created.</p>
566 pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
567 self.created_date = ::std::option::Option::Some(input);
568 self
569 }
570 /// <p>The date the secret was created.</p>
571 pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
572 self.created_date = input;
573 self
574 }
575 /// <p>The date the secret was created.</p>
576 pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
577 &self.created_date
578 }
579 /// <p>The Region the secret is in. If a secret is replicated to other Regions, the replicas are listed in <code>ReplicationStatus</code>.</p>
580 pub fn primary_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
581 self.primary_region = ::std::option::Option::Some(input.into());
582 self
583 }
584 /// <p>The Region the secret is in. If a secret is replicated to other Regions, the replicas are listed in <code>ReplicationStatus</code>.</p>
585 pub fn set_primary_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
586 self.primary_region = input;
587 self
588 }
589 /// <p>The Region the secret is in. If a secret is replicated to other Regions, the replicas are listed in <code>ReplicationStatus</code>.</p>
590 pub fn get_primary_region(&self) -> &::std::option::Option<::std::string::String> {
591 &self.primary_region
592 }
593 /// Appends an item to `replication_status`.
594 ///
595 /// To override the contents of this collection use [`set_replication_status`](Self::set_replication_status).
596 ///
597 /// <p>A list of the replicas of this secret and their status:</p>
598 /// <ul>
599 /// <li>
600 /// <p><code>Failed</code>, which indicates that the replica was not created.</p></li>
601 /// <li>
602 /// <p><code>InProgress</code>, which indicates that Secrets Manager is in the process of creating the replica.</p></li>
603 /// <li>
604 /// <p><code>InSync</code>, which indicates that the replica was created.</p></li>
605 /// </ul>
606 pub fn replication_status(mut self, input: crate::types::ReplicationStatusType) -> Self {
607 let mut v = self.replication_status.unwrap_or_default();
608 v.push(input);
609 self.replication_status = ::std::option::Option::Some(v);
610 self
611 }
612 /// <p>A list of the replicas of this secret and their status:</p>
613 /// <ul>
614 /// <li>
615 /// <p><code>Failed</code>, which indicates that the replica was not created.</p></li>
616 /// <li>
617 /// <p><code>InProgress</code>, which indicates that Secrets Manager is in the process of creating the replica.</p></li>
618 /// <li>
619 /// <p><code>InSync</code>, which indicates that the replica was created.</p></li>
620 /// </ul>
621 pub fn set_replication_status(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReplicationStatusType>>) -> Self {
622 self.replication_status = input;
623 self
624 }
625 /// <p>A list of the replicas of this secret and their status:</p>
626 /// <ul>
627 /// <li>
628 /// <p><code>Failed</code>, which indicates that the replica was not created.</p></li>
629 /// <li>
630 /// <p><code>InProgress</code>, which indicates that Secrets Manager is in the process of creating the replica.</p></li>
631 /// <li>
632 /// <p><code>InSync</code>, which indicates that the replica was created.</p></li>
633 /// </ul>
634 pub fn get_replication_status(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReplicationStatusType>> {
635 &self.replication_status
636 }
637 /// <p>Information about the primary secret in the other Amazon Web Services account that this cross-account replica secret replicates from, including the primary secret ARN and the replication status. This field is omitted if the secret is not a cross-account replica.</p>
638 pub fn cross_account_primary(mut self, input: crate::types::CrossAccountPrimaryType) -> Self {
639 self.cross_account_primary = ::std::option::Option::Some(input);
640 self
641 }
642 /// <p>Information about the primary secret in the other Amazon Web Services account that this cross-account replica secret replicates from, including the primary secret ARN and the replication status. This field is omitted if the secret is not a cross-account replica.</p>
643 pub fn set_cross_account_primary(mut self, input: ::std::option::Option<crate::types::CrossAccountPrimaryType>) -> Self {
644 self.cross_account_primary = input;
645 self
646 }
647 /// <p>Information about the primary secret in the other Amazon Web Services account that this cross-account replica secret replicates from, including the primary secret ARN and the replication status. This field is omitted if the secret is not a cross-account replica.</p>
648 pub fn get_cross_account_primary(&self) -> &::std::option::Option<crate::types::CrossAccountPrimaryType> {
649 &self.cross_account_primary
650 }
651 /// Appends an item to `cross_account_replicas`.
652 ///
653 /// To override the contents of this collection use [`set_cross_account_replicas`](Self::set_cross_account_replicas).
654 ///
655 /// <p>A list of this secret's cross-account replica secrets and their replication status, if this secret is the primary for cross-account replication. This field is omitted if the secret has no cross-account replicas.</p>
656 pub fn cross_account_replicas(mut self, input: crate::types::CrossAccountReplicaEntry) -> Self {
657 let mut v = self.cross_account_replicas.unwrap_or_default();
658 v.push(input);
659 self.cross_account_replicas = ::std::option::Option::Some(v);
660 self
661 }
662 /// <p>A list of this secret's cross-account replica secrets and their replication status, if this secret is the primary for cross-account replication. This field is omitted if the secret has no cross-account replicas.</p>
663 pub fn set_cross_account_replicas(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CrossAccountReplicaEntry>>) -> Self {
664 self.cross_account_replicas = input;
665 self
666 }
667 /// <p>A list of this secret's cross-account replica secrets and their replication status, if this secret is the primary for cross-account replication. This field is omitted if the secret has no cross-account replicas.</p>
668 pub fn get_cross_account_replicas(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CrossAccountReplicaEntry>> {
669 &self.cross_account_replicas
670 }
671 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
672 self._request_id = Some(request_id.into());
673 self
674 }
675
676 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
677 self._request_id = request_id;
678 self
679 }
680 /// Consumes the builder and constructs a [`DescribeSecretOutput`](crate::operation::describe_secret::DescribeSecretOutput).
681 pub fn build(self) -> crate::operation::describe_secret::DescribeSecretOutput {
682 crate::operation::describe_secret::DescribeSecretOutput {
683 arn: self.arn,
684 name: self.name,
685 r#type: self.r#type,
686 description: self.description,
687 kms_key_id: self.kms_key_id,
688 rotation_enabled: self.rotation_enabled,
689 rotation_lambda_arn: self.rotation_lambda_arn,
690 rotation_rules: self.rotation_rules,
691 external_secret_rotation_metadata: self.external_secret_rotation_metadata,
692 external_secret_rotation_role_arn: self.external_secret_rotation_role_arn,
693 last_rotated_date: self.last_rotated_date,
694 last_changed_date: self.last_changed_date,
695 last_accessed_date: self.last_accessed_date,
696 deleted_date: self.deleted_date,
697 next_rotation_date: self.next_rotation_date,
698 tags: self.tags,
699 version_ids_to_stages: self.version_ids_to_stages,
700 owning_service: self.owning_service,
701 created_date: self.created_date,
702 primary_region: self.primary_region,
703 replication_status: self.replication_status,
704 cross_account_primary: self.cross_account_primary,
705 cross_account_replicas: self.cross_account_replicas,
706 _request_id: self._request_id,
707 }
708 }
709}