AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
This is the response object from the GetSecretValue operation.
Namespace: Amazon.SecretsManager.Model
Assembly: AWSSDK.SecretsManager.dll
Version: 3.x.y.z
public class GetSecretValueResponse : AmazonWebServiceResponse
The GetSecretValueResponse type exposes the following members
Name | Description | |
---|---|---|
![]() |
GetSecretValueResponse() |
Name | Type | Description | |
---|---|---|---|
![]() |
ARN | System.String |
Gets and sets the property ARN. The ARN of the secret. |
![]() |
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
![]() |
CreatedDate | System.DateTime |
Gets and sets the property CreatedDate.
The date and time that this version of the secret was created. If you don't specify
which version in |
![]() |
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
![]() |
Name | System.String |
Gets and sets the property Name. The friendly name of the secret. |
![]() |
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
![]() |
SecretBinary | System.IO.MemoryStream |
Gets and sets the property SecretBinary.
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
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 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. |
![]() |
SecretString | System.String |
Gets and sets the property SecretString. The decrypted secret value, if the secret value was originally provided as a string or through the Secrets Manager console. If this secret was created by using the console, then Secrets Manager stores the information as a JSON structure of key/value pairs. 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. |
![]() |
VersionId | System.String |
Gets and sets the property VersionId. The unique identifier of this version of the secret. |
![]() |
VersionStages | System.Collections.Generic.List<System.String> |
Gets and sets the property VersionStages. A list of all of the staging labels currently attached to this version of the secret. |
The following example shows how to retrieve a secret string value.
var client = new AmazonSecretsManagerClient(); var response = client.GetSecretValue(new GetSecretValueRequest { SecretId = "MyTestDatabaseSecret" }); string arn = response.ARN; DateTime createdDate = response.CreatedDate; string name = response.Name; string secretString = response.SecretString; string versionId = response.VersionId; List<string> versionStages = response.VersionStages;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5