aws_sdk_secretsmanager/client/get_secret_value.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`GetSecretValue`](crate::operation::get_secret_value::builders::GetSecretValueFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`secret_id(impl Into<String>)`](crate::operation::get_secret_value::builders::GetSecretValueFluentBuilder::secret_id) / [`set_secret_id(Option<String>)`](crate::operation::get_secret_value::builders::GetSecretValueFluentBuilder::set_secret_id):<br>required: **true**<br><p>The ARN or name of the secret to retrieve. To retrieve a secret from another account, you must use an ARN.</p> <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><br>
7 /// - [`version_id(impl Into<String>)`](crate::operation::get_secret_value::builders::GetSecretValueFluentBuilder::version_id) / [`set_version_id(Option<String>)`](crate::operation::get_secret_value::builders::GetSecretValueFluentBuilder::set_version_id):<br>required: **false**<br><p>The unique identifier of the version of the secret to retrieve. If you include both this parameter and <code>VersionStage</code>, the two parameters must refer to the same secret version. If you don't specify either a <code>VersionStage</code> or <code>VersionId</code>, then Secrets Manager returns the <code>AWSCURRENT</code> version.</p> <p>This value is typically a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a> value with 32 hexadecimal digits.</p><br>
8 /// - [`version_stage(impl Into<String>)`](crate::operation::get_secret_value::builders::GetSecretValueFluentBuilder::version_stage) / [`set_version_stage(Option<String>)`](crate::operation::get_secret_value::builders::GetSecretValueFluentBuilder::set_version_stage):<br>required: **false**<br><p>The staging label of the version of the secret to retrieve.</p> <p>Secrets Manager uses staging labels to keep track of different versions during the rotation process. If you include both this parameter and <code>VersionId</code>, the two parameters must refer to the same secret version. If you don't specify either a <code>VersionStage</code> or <code>VersionId</code>, Secrets Manager returns the <code>AWSCURRENT</code> version.</p><br>
9 /// - On success, responds with [`GetSecretValueOutput`](crate::operation::get_secret_value::GetSecretValueOutput) with field(s):
10 /// - [`arn(Option<String>)`](crate::operation::get_secret_value::GetSecretValueOutput::arn): <p>The ARN of the secret.</p>
11 /// - [`name(Option<String>)`](crate::operation::get_secret_value::GetSecretValueOutput::name): <p>The friendly name of the secret.</p>
12 /// - [`version_id(Option<String>)`](crate::operation::get_secret_value::GetSecretValueOutput::version_id): <p>The unique identifier of this version of the secret.</p>
13 /// - [`secret_binary(Option<Blob>)`](crate::operation::get_secret_value::GetSecretValueOutput::secret_binary): <p>The decrypted secret value, if the secret value was originally provided as binary data in the form of a byte array. When you retrieve a <code>SecretBinary</code> using the HTTP API, the Python SDK, or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not encoded.</p> <p>If the secret was created by using the Secrets Manager console, or if the secret value was originally provided as a string, then this field is omitted. The secret value appears in <code>SecretString</code> instead.</p> <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>
14 /// - [`secret_string(Option<String>)`](crate::operation::get_secret_value::GetSecretValueOutput::secret_string): <p>The decrypted secret value, if the secret value was originally provided as a string or through the Secrets Manager console.</p> <p>If this secret was created by using the console, then Secrets Manager stores the information as a JSON structure of key/value pairs.</p> <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>
15 /// - [`version_stages(Option<Vec::<String>>)`](crate::operation::get_secret_value::GetSecretValueOutput::version_stages): <p>A list of all of the staging labels currently attached to this version of the secret.</p>
16 /// - [`created_date(Option<DateTime>)`](crate::operation::get_secret_value::GetSecretValueOutput::created_date): <p>The date and time that this version of the secret was created. If you don't specify which version in <code>VersionId</code> or <code>VersionStage</code>, then Secrets Manager uses the <code>AWSCURRENT</code> version.</p>
17 /// - On failure, responds with [`SdkError<GetSecretValueError>`](crate::operation::get_secret_value::GetSecretValueError)
18 pub fn get_secret_value(&self) -> crate::operation::get_secret_value::builders::GetSecretValueFluentBuilder {
19 crate::operation::get_secret_value::builders::GetSecretValueFluentBuilder::new(self.handle.clone())
20 }
21}