Show / Hide Table of Contents

Class GetSecretVersion

Inheritance
System.Object
GetSecretVersion
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.SecretsManager
Assembly: Pulumi.Aws.dll
Syntax
public static class GetSecretVersion

Methods

View Source

InvokeAsync(GetSecretVersionArgs, InvokeOptions)

Retrieve information about a Secrets Manager secret version, including its secret value. To retrieve secret metadata, see the aws.secretsmanager.Secret data source.

{{% examples %}}

Example Usage

{{% example %}}

Retrieve Current Secret Version

By default, this data sources retrieves information based on the AWSCURRENT staging label.

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = Output.Create(Aws.SecretsManager.GetSecretVersion.InvokeAsync(new Aws.SecretsManager.GetSecretVersionArgs
    {
        SecretId = data.Aws_secretsmanager_secret.Example.Id,
    }));
}

}

{{% /example %}} {{% example %}}

Retrieve Specific Secret Version

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var by_version_stage = Output.Create(Aws.SecretsManager.GetSecretVersion.InvokeAsync(new Aws.SecretsManager.GetSecretVersionArgs
    {
        SecretId = data.Aws_secretsmanager_secret.Example.Id,
        VersionStage = "example",
    }));
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetSecretVersionResult> InvokeAsync(GetSecretVersionArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetSecretVersionArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetSecretVersionResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.