pub struct GetSecretValueFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to GetSecretValue
.
Retrieves the contents of the encrypted fields SecretString
or SecretBinary
from the specified version of a secret, whichever contains content.
To retrieve the values for a group of secrets, call BatchGetSecretValue
.
We recommend that you cache your secret values by using client-side caching. Caching secrets improves speed and reduces your costs. For more information, see Cache secrets for your applications.
To retrieve the previous version of a secret, use VersionStage
and specify AWSPREVIOUS. To revert to the previous version of a secret, call UpdateSecretVersionStage.
Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.
Required permissions: secretsmanager:GetSecretValue
. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key aws/secretsmanager
, then you also need kms:Decrypt
permissions for that key. For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager.
Implementations§
Source§impl GetSecretValueFluentBuilder
impl GetSecretValueFluentBuilder
Sourcepub fn as_input(&self) -> &GetSecretValueInputBuilder
pub fn as_input(&self) -> &GetSecretValueInputBuilder
Access the GetSecretValue as a reference.
Sourcepub async fn send(
self,
) -> Result<GetSecretValueOutput, SdkError<GetSecretValueError, HttpResponse>>
pub async fn send( self, ) -> Result<GetSecretValueOutput, SdkError<GetSecretValueError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
Sourcepub fn customize(
self,
) -> CustomizableOperation<GetSecretValueOutput, GetSecretValueError, Self>
pub fn customize( self, ) -> CustomizableOperation<GetSecretValueOutput, GetSecretValueError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
Sourcepub fn secret_id(self, input: impl Into<String>) -> Self
pub fn secret_id(self, input: impl Into<String>) -> Self
The ARN or name of the secret to retrieve.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN.
Sourcepub fn set_secret_id(self, input: Option<String>) -> Self
pub fn set_secret_id(self, input: Option<String>) -> Self
The ARN or name of the secret to retrieve.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN.
Sourcepub fn get_secret_id(&self) -> &Option<String>
pub fn get_secret_id(&self) -> &Option<String>
The ARN or name of the secret to retrieve.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN.
Sourcepub fn version_id(self, input: impl Into<String>) -> Self
pub fn version_id(self, input: impl Into<String>) -> Self
The unique identifier of the version of the secret to retrieve. If you include both this parameter and VersionStage
, the two parameters must refer to the same secret version. If you don't specify either a VersionStage
or VersionId
, then Secrets Manager returns the AWSCURRENT
version.
This value is typically a UUID-type value with 32 hexadecimal digits.
Sourcepub fn set_version_id(self, input: Option<String>) -> Self
pub fn set_version_id(self, input: Option<String>) -> Self
The unique identifier of the version of the secret to retrieve. If you include both this parameter and VersionStage
, the two parameters must refer to the same secret version. If you don't specify either a VersionStage
or VersionId
, then Secrets Manager returns the AWSCURRENT
version.
This value is typically a UUID-type value with 32 hexadecimal digits.
Sourcepub fn get_version_id(&self) -> &Option<String>
pub fn get_version_id(&self) -> &Option<String>
The unique identifier of the version of the secret to retrieve. If you include both this parameter and VersionStage
, the two parameters must refer to the same secret version. If you don't specify either a VersionStage
or VersionId
, then Secrets Manager returns the AWSCURRENT
version.
This value is typically a UUID-type value with 32 hexadecimal digits.
Sourcepub fn version_stage(self, input: impl Into<String>) -> Self
pub fn version_stage(self, input: impl Into<String>) -> Self
The staging label of the version of the secret to retrieve.
Secrets Manager uses staging labels to keep track of different versions during the rotation process. If you include both this parameter and VersionId
, the two parameters must refer to the same secret version. If you don't specify either a VersionStage
or VersionId
, Secrets Manager returns the AWSCURRENT
version.
Sourcepub fn set_version_stage(self, input: Option<String>) -> Self
pub fn set_version_stage(self, input: Option<String>) -> Self
The staging label of the version of the secret to retrieve.
Secrets Manager uses staging labels to keep track of different versions during the rotation process. If you include both this parameter and VersionId
, the two parameters must refer to the same secret version. If you don't specify either a VersionStage
or VersionId
, Secrets Manager returns the AWSCURRENT
version.
Sourcepub fn get_version_stage(&self) -> &Option<String>
pub fn get_version_stage(&self) -> &Option<String>
The staging label of the version of the secret to retrieve.
Secrets Manager uses staging labels to keep track of different versions during the rotation process. If you include both this parameter and VersionId
, the two parameters must refer to the same secret version. If you don't specify either a VersionStage
or VersionId
, Secrets Manager returns the AWSCURRENT
version.
Trait Implementations§
Source§impl Clone for GetSecretValueFluentBuilder
impl Clone for GetSecretValueFluentBuilder
Source§fn clone(&self) -> GetSecretValueFluentBuilder
fn clone(&self) -> GetSecretValueFluentBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for GetSecretValueFluentBuilder
impl !RefUnwindSafe for GetSecretValueFluentBuilder
impl Send for GetSecretValueFluentBuilder
impl Sync for GetSecretValueFluentBuilder
impl Unpin for GetSecretValueFluentBuilder
impl !UnwindSafe for GetSecretValueFluentBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)