aws_sdk_secretsmanager/operation/update_secret/
_update_secret_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 UpdateSecretInput {
6    /// <p>The ARN or name of the secret.</p>
7    /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
8    pub secret_id: ::std::option::Option<::std::string::String>,
9    /// <p>If you include <code>SecretString</code> or <code>SecretBinary</code>, then Secrets Manager creates a new version for the secret, and this parameter specifies the unique identifier for the new version.</p><note>
10    /// <p>If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.</p>
11    /// </note>
12    /// <p>If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a <code>ClientRequestToken</code> and include it in the request.</p>
13    /// <p>This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a> value to ensure uniqueness of your versions within the specified secret.</p>
14    pub client_request_token: ::std::option::Option<::std::string::String>,
15    /// <p>The description of the secret.</p>
16    pub description: ::std::option::Option<::std::string::String>,
17    /// <p>The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt new secret versions as well as any existing versions with the staging labels <code>AWSCURRENT</code>, <code>AWSPENDING</code>, or <code>AWSPREVIOUS</code>. If you don't have <code>kms:Encrypt</code> permission to the new key, Secrets Manager does not re-encrypt existing secret versions with the new key. For more information about versions and staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version">Concepts: Version</a>.</p>
18    /// <p>A key alias is always prefixed by <code>alias/</code>, for example <code>alias/aws/secretsmanager</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html">About aliases</a>.</p>
19    /// <p>If you set this to an empty string, Secrets Manager uses the Amazon Web Services managed key <code>aws/secretsmanager</code>. If this key doesn't already exist in your account, then Secrets Manager creates it for you automatically. All users and roles in the Amazon Web Services account automatically have access to use <code>aws/secretsmanager</code>. Creating <code>aws/secretsmanager</code> can result in a one-time significant delay in returning the result.</p><important>
20    /// <p>You can only use the Amazon Web Services managed key <code>aws/secretsmanager</code> if you call this operation using credentials from the same Amazon Web Services account that owns the secret. If the secret is in a different account, then you must use a customer managed key and provide the ARN of that KMS key in this field. The user making the call must have permissions to both the secret and the KMS key in their respective accounts.</p>
21    /// </important>
22    pub kms_key_id: ::std::option::Option<::std::string::String>,
23    /// <p>The binary data to encrypt and store in the new version of the secret. We recommend that you store your binary data in a file and then pass the contents of the file as a parameter.</p>
24    /// <p>Either <code>SecretBinary</code> or <code>SecretString</code> must have a value, but not both.</p>
25    /// <p>You can't access this parameter in the Secrets Manager console.</p>
26    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
27    pub secret_binary: ::std::option::Option<::aws_smithy_types::Blob>,
28    /// <p>The text data to encrypt and store in the new version of the secret. We recommend you use a JSON structure of key/value pairs for your secret value.</p>
29    /// <p>Either <code>SecretBinary</code> or <code>SecretString</code> must have a value, but not both.</p>
30    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
31    pub secret_string: ::std::option::Option<::std::string::String>,
32    /// <p>The exact string that identifies the third-party partner that holds the external secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-partners.html">Managed external secret partners</a>.</p>
33    pub r#type: ::std::option::Option<::std::string::String>,
34}
35impl UpdateSecretInput {
36    /// <p>The ARN or name of the secret.</p>
37    /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
38    pub fn secret_id(&self) -> ::std::option::Option<&str> {
39        self.secret_id.as_deref()
40    }
41    /// <p>If you include <code>SecretString</code> or <code>SecretBinary</code>, then Secrets Manager creates a new version for the secret, and this parameter specifies the unique identifier for the new version.</p><note>
42    /// <p>If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.</p>
43    /// </note>
44    /// <p>If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a <code>ClientRequestToken</code> and include it in the request.</p>
45    /// <p>This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a> value to ensure uniqueness of your versions within the specified secret.</p>
46    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
47        self.client_request_token.as_deref()
48    }
49    /// <p>The description of the secret.</p>
50    pub fn description(&self) -> ::std::option::Option<&str> {
51        self.description.as_deref()
52    }
53    /// <p>The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt new secret versions as well as any existing versions with the staging labels <code>AWSCURRENT</code>, <code>AWSPENDING</code>, or <code>AWSPREVIOUS</code>. If you don't have <code>kms:Encrypt</code> permission to the new key, Secrets Manager does not re-encrypt existing secret versions with the new key. For more information about versions and staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version">Concepts: Version</a>.</p>
54    /// <p>A key alias is always prefixed by <code>alias/</code>, for example <code>alias/aws/secretsmanager</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html">About aliases</a>.</p>
55    /// <p>If you set this to an empty string, Secrets Manager uses the Amazon Web Services managed key <code>aws/secretsmanager</code>. If this key doesn't already exist in your account, then Secrets Manager creates it for you automatically. All users and roles in the Amazon Web Services account automatically have access to use <code>aws/secretsmanager</code>. Creating <code>aws/secretsmanager</code> can result in a one-time significant delay in returning the result.</p><important>
56    /// <p>You can only use the Amazon Web Services managed key <code>aws/secretsmanager</code> if you call this operation using credentials from the same Amazon Web Services account that owns the secret. If the secret is in a different account, then you must use a customer managed key and provide the ARN of that KMS key in this field. The user making the call must have permissions to both the secret and the KMS key in their respective accounts.</p>
57    /// </important>
58    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
59        self.kms_key_id.as_deref()
60    }
61    /// <p>The binary data to encrypt and store in the new version of the secret. We recommend that you store your binary data in a file and then pass the contents of the file as a parameter.</p>
62    /// <p>Either <code>SecretBinary</code> or <code>SecretString</code> must have a value, but not both.</p>
63    /// <p>You can't access this parameter in the Secrets Manager console.</p>
64    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
65    pub fn secret_binary(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
66        self.secret_binary.as_ref()
67    }
68    /// <p>The text data to encrypt and store in the new version of the secret. We recommend you use a JSON structure of key/value pairs for your secret value.</p>
69    /// <p>Either <code>SecretBinary</code> or <code>SecretString</code> must have a value, but not both.</p>
70    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
71    pub fn secret_string(&self) -> ::std::option::Option<&str> {
72        self.secret_string.as_deref()
73    }
74    /// <p>The exact string that identifies the third-party partner that holds the external secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-partners.html">Managed external secret partners</a>.</p>
75    pub fn r#type(&self) -> ::std::option::Option<&str> {
76        self.r#type.as_deref()
77    }
78}
79impl ::std::fmt::Debug for UpdateSecretInput {
80    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
81        let mut formatter = f.debug_struct("UpdateSecretInput");
82        formatter.field("secret_id", &self.secret_id);
83        formatter.field("client_request_token", &self.client_request_token);
84        formatter.field("description", &self.description);
85        formatter.field("kms_key_id", &self.kms_key_id);
86        formatter.field("secret_binary", &"*** Sensitive Data Redacted ***");
87        formatter.field("secret_string", &"*** Sensitive Data Redacted ***");
88        formatter.field("r#type", &self.r#type);
89        formatter.finish()
90    }
91}
92impl UpdateSecretInput {
93    /// Creates a new builder-style object to manufacture [`UpdateSecretInput`](crate::operation::update_secret::UpdateSecretInput).
94    pub fn builder() -> crate::operation::update_secret::builders::UpdateSecretInputBuilder {
95        crate::operation::update_secret::builders::UpdateSecretInputBuilder::default()
96    }
97}
98
99/// A builder for [`UpdateSecretInput`](crate::operation::update_secret::UpdateSecretInput).
100#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
101#[non_exhaustive]
102pub struct UpdateSecretInputBuilder {
103    pub(crate) secret_id: ::std::option::Option<::std::string::String>,
104    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
105    pub(crate) description: ::std::option::Option<::std::string::String>,
106    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
107    pub(crate) secret_binary: ::std::option::Option<::aws_smithy_types::Blob>,
108    pub(crate) secret_string: ::std::option::Option<::std::string::String>,
109    pub(crate) r#type: ::std::option::Option<::std::string::String>,
110}
111impl UpdateSecretInputBuilder {
112    /// <p>The ARN or name of the secret.</p>
113    /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
114    /// This field is required.
115    pub fn secret_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.secret_id = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The ARN or name of the secret.</p>
120    /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
121    pub fn set_secret_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.secret_id = input;
123        self
124    }
125    /// <p>The ARN or name of the secret.</p>
126    /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
127    pub fn get_secret_id(&self) -> &::std::option::Option<::std::string::String> {
128        &self.secret_id
129    }
130    /// <p>If you include <code>SecretString</code> or <code>SecretBinary</code>, then Secrets Manager creates a new version for the secret, and this parameter specifies the unique identifier for the new version.</p><note>
131    /// <p>If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.</p>
132    /// </note>
133    /// <p>If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a <code>ClientRequestToken</code> and include it in the request.</p>
134    /// <p>This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a> value to ensure uniqueness of your versions within the specified secret.</p>
135    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.client_request_token = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>If you include <code>SecretString</code> or <code>SecretBinary</code>, then Secrets Manager creates a new version for the secret, and this parameter specifies the unique identifier for the new version.</p><note>
140    /// <p>If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.</p>
141    /// </note>
142    /// <p>If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a <code>ClientRequestToken</code> and include it in the request.</p>
143    /// <p>This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a> value to ensure uniqueness of your versions within the specified secret.</p>
144    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.client_request_token = input;
146        self
147    }
148    /// <p>If you include <code>SecretString</code> or <code>SecretBinary</code>, then Secrets Manager creates a new version for the secret, and this parameter specifies the unique identifier for the new version.</p><note>
149    /// <p>If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.</p>
150    /// </note>
151    /// <p>If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a <code>ClientRequestToken</code> and include it in the request.</p>
152    /// <p>This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a> value to ensure uniqueness of your versions within the specified secret.</p>
153    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
154        &self.client_request_token
155    }
156    /// <p>The description of the secret.</p>
157    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.description = ::std::option::Option::Some(input.into());
159        self
160    }
161    /// <p>The description of the secret.</p>
162    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.description = input;
164        self
165    }
166    /// <p>The description of the secret.</p>
167    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
168        &self.description
169    }
170    /// <p>The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt new secret versions as well as any existing versions with the staging labels <code>AWSCURRENT</code>, <code>AWSPENDING</code>, or <code>AWSPREVIOUS</code>. If you don't have <code>kms:Encrypt</code> permission to the new key, Secrets Manager does not re-encrypt existing secret versions with the new key. For more information about versions and staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version">Concepts: Version</a>.</p>
171    /// <p>A key alias is always prefixed by <code>alias/</code>, for example <code>alias/aws/secretsmanager</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html">About aliases</a>.</p>
172    /// <p>If you set this to an empty string, Secrets Manager uses the Amazon Web Services managed key <code>aws/secretsmanager</code>. If this key doesn't already exist in your account, then Secrets Manager creates it for you automatically. All users and roles in the Amazon Web Services account automatically have access to use <code>aws/secretsmanager</code>. Creating <code>aws/secretsmanager</code> can result in a one-time significant delay in returning the result.</p><important>
173    /// <p>You can only use the Amazon Web Services managed key <code>aws/secretsmanager</code> if you call this operation using credentials from the same Amazon Web Services account that owns the secret. If the secret is in a different account, then you must use a customer managed key and provide the ARN of that KMS key in this field. The user making the call must have permissions to both the secret and the KMS key in their respective accounts.</p>
174    /// </important>
175    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176        self.kms_key_id = ::std::option::Option::Some(input.into());
177        self
178    }
179    /// <p>The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt new secret versions as well as any existing versions with the staging labels <code>AWSCURRENT</code>, <code>AWSPENDING</code>, or <code>AWSPREVIOUS</code>. If you don't have <code>kms:Encrypt</code> permission to the new key, Secrets Manager does not re-encrypt existing secret versions with the new key. For more information about versions and staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version">Concepts: Version</a>.</p>
180    /// <p>A key alias is always prefixed by <code>alias/</code>, for example <code>alias/aws/secretsmanager</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html">About aliases</a>.</p>
181    /// <p>If you set this to an empty string, Secrets Manager uses the Amazon Web Services managed key <code>aws/secretsmanager</code>. If this key doesn't already exist in your account, then Secrets Manager creates it for you automatically. All users and roles in the Amazon Web Services account automatically have access to use <code>aws/secretsmanager</code>. Creating <code>aws/secretsmanager</code> can result in a one-time significant delay in returning the result.</p><important>
182    /// <p>You can only use the Amazon Web Services managed key <code>aws/secretsmanager</code> if you call this operation using credentials from the same Amazon Web Services account that owns the secret. If the secret is in a different account, then you must use a customer managed key and provide the ARN of that KMS key in this field. The user making the call must have permissions to both the secret and the KMS key in their respective accounts.</p>
183    /// </important>
184    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185        self.kms_key_id = input;
186        self
187    }
188    /// <p>The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt new secret versions as well as any existing versions with the staging labels <code>AWSCURRENT</code>, <code>AWSPENDING</code>, or <code>AWSPREVIOUS</code>. If you don't have <code>kms:Encrypt</code> permission to the new key, Secrets Manager does not re-encrypt existing secret versions with the new key. For more information about versions and staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version">Concepts: Version</a>.</p>
189    /// <p>A key alias is always prefixed by <code>alias/</code>, for example <code>alias/aws/secretsmanager</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html">About aliases</a>.</p>
190    /// <p>If you set this to an empty string, Secrets Manager uses the Amazon Web Services managed key <code>aws/secretsmanager</code>. If this key doesn't already exist in your account, then Secrets Manager creates it for you automatically. All users and roles in the Amazon Web Services account automatically have access to use <code>aws/secretsmanager</code>. Creating <code>aws/secretsmanager</code> can result in a one-time significant delay in returning the result.</p><important>
191    /// <p>You can only use the Amazon Web Services managed key <code>aws/secretsmanager</code> if you call this operation using credentials from the same Amazon Web Services account that owns the secret. If the secret is in a different account, then you must use a customer managed key and provide the ARN of that KMS key in this field. The user making the call must have permissions to both the secret and the KMS key in their respective accounts.</p>
192    /// </important>
193    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
194        &self.kms_key_id
195    }
196    /// <p>The binary data to encrypt and store in the new version of the secret. We recommend that you store your binary data in a file and then pass the contents of the file as a parameter.</p>
197    /// <p>Either <code>SecretBinary</code> or <code>SecretString</code> must have a value, but not both.</p>
198    /// <p>You can't access this parameter in the Secrets Manager console.</p>
199    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
200    pub fn secret_binary(mut self, input: ::aws_smithy_types::Blob) -> Self {
201        self.secret_binary = ::std::option::Option::Some(input);
202        self
203    }
204    /// <p>The binary data to encrypt and store in the new version of the secret. We recommend that you store your binary data in a file and then pass the contents of the file as a parameter.</p>
205    /// <p>Either <code>SecretBinary</code> or <code>SecretString</code> must have a value, but not both.</p>
206    /// <p>You can't access this parameter in the Secrets Manager console.</p>
207    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
208    pub fn set_secret_binary(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
209        self.secret_binary = input;
210        self
211    }
212    /// <p>The binary data to encrypt and store in the new version of the secret. We recommend that you store your binary data in a file and then pass the contents of the file as a parameter.</p>
213    /// <p>Either <code>SecretBinary</code> or <code>SecretString</code> must have a value, but not both.</p>
214    /// <p>You can't access this parameter in the Secrets Manager console.</p>
215    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
216    pub fn get_secret_binary(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
217        &self.secret_binary
218    }
219    /// <p>The text data to encrypt and store in the new version of the secret. We recommend you use a JSON structure of key/value pairs for your secret value.</p>
220    /// <p>Either <code>SecretBinary</code> or <code>SecretString</code> must have a value, but not both.</p>
221    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
222    pub fn secret_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223        self.secret_string = ::std::option::Option::Some(input.into());
224        self
225    }
226    /// <p>The text data to encrypt and store in the new version of the secret. We recommend you use a JSON structure of key/value pairs for your secret value.</p>
227    /// <p>Either <code>SecretBinary</code> or <code>SecretString</code> must have a value, but not both.</p>
228    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
229    pub fn set_secret_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230        self.secret_string = input;
231        self
232    }
233    /// <p>The text data to encrypt and store in the new version of the secret. We recommend you use a JSON structure of key/value pairs for your secret value.</p>
234    /// <p>Either <code>SecretBinary</code> or <code>SecretString</code> must have a value, but not both.</p>
235    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
236    pub fn get_secret_string(&self) -> &::std::option::Option<::std::string::String> {
237        &self.secret_string
238    }
239    /// <p>The exact string that identifies the third-party partner that holds the external secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-partners.html">Managed external secret partners</a>.</p>
240    pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241        self.r#type = ::std::option::Option::Some(input.into());
242        self
243    }
244    /// <p>The exact string that identifies the third-party partner that holds the external secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-partners.html">Managed external secret partners</a>.</p>
245    pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
246        self.r#type = input;
247        self
248    }
249    /// <p>The exact string that identifies the third-party partner that holds the external secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-partners.html">Managed external secret partners</a>.</p>
250    pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
251        &self.r#type
252    }
253    /// Consumes the builder and constructs a [`UpdateSecretInput`](crate::operation::update_secret::UpdateSecretInput).
254    pub fn build(
255        self,
256    ) -> ::std::result::Result<crate::operation::update_secret::UpdateSecretInput, ::aws_smithy_types::error::operation::BuildError> {
257        ::std::result::Result::Ok(crate::operation::update_secret::UpdateSecretInput {
258            secret_id: self.secret_id,
259            client_request_token: self.client_request_token,
260            description: self.description,
261            kms_key_id: self.kms_key_id,
262            secret_binary: self.secret_binary,
263            secret_string: self.secret_string,
264            r#type: self.r#type,
265        })
266    }
267}
268impl ::std::fmt::Debug for UpdateSecretInputBuilder {
269    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
270        let mut formatter = f.debug_struct("UpdateSecretInputBuilder");
271        formatter.field("secret_id", &self.secret_id);
272        formatter.field("client_request_token", &self.client_request_token);
273        formatter.field("description", &self.description);
274        formatter.field("kms_key_id", &self.kms_key_id);
275        formatter.field("secret_binary", &"*** Sensitive Data Redacted ***");
276        formatter.field("secret_string", &"*** Sensitive Data Redacted ***");
277        formatter.field("r#type", &self.r#type);
278        formatter.finish()
279    }
280}