GetSecretVersions

This data source provides a list of KMS Secret Versions in an Alibaba Cloud account according to the specified filters.

NOTE: Available in v1.88.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var kmsSecretVersionsDs = Output.Create(AliCloud.Kms.GetSecretVersions.InvokeAsync(new AliCloud.Kms.GetSecretVersionsArgs
        {
            EnableDetails = true,
            SecretName = "secret_name",
        }));
        this.FirstSecretData = kmsSecretVersionsDs.Apply(kmsSecretVersionsDs => kmsSecretVersionsDs.Versions[0].SecretData);
    }

    [Output("firstSecretData")]
    public Output<string> FirstSecretData { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

kms_secret_versions_ds = alicloud.kms.get_secret_versions(enable_details=True,
    secret_name="secret_name")
pulumi.export("firstSecretData", kms_secret_versions_ds.versions[0]["secret_data"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

// Declare the data source
const kmsSecretVersionsDs = pulumi.output(alicloud.kms.getSecretVersions({
    enableDetails: true,
    secretName: "secret_name",
}, { async: true }));

export const firstSecretData = kmsSecretVersionsDs.versions[0].secretData;

Using GetSecretVersions

function getSecretVersions(args: GetSecretVersionsArgs, opts?: InvokeOptions): Promise<GetSecretVersionsResult>
function  get_secret_versions(enable_details=None, ids=None, include_deprecated=None, output_file=None, secret_name=None, version_stage=None, opts=None)
func GetSecretVersions(ctx *Context, args *GetSecretVersionsArgs, opts ...InvokeOption) (*GetSecretVersionsResult, error)
public static class GetSecretVersions {
    public static Task<GetSecretVersionsResult> InvokeAsync(GetSecretVersionsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

SecretName string

The name of the secret.

EnableDetails bool

Default to false and only output secret_name, version_id, version_stages. Set it to true can output more details.

Ids List<string>

A list of KMS Secret Version ids.

IncludeDeprecated string

Specifies whether to return deprecated secret versions. Default to false.

OutputFile string
VersionStage string

The stage of the secret version.

SecretName string

The name of the secret.

EnableDetails bool

Default to false and only output secret_name, version_id, version_stages. Set it to true can output more details.

Ids []string

A list of KMS Secret Version ids.

IncludeDeprecated string

Specifies whether to return deprecated secret versions. Default to false.

OutputFile string
VersionStage string

The stage of the secret version.

secretName string

The name of the secret.

enableDetails boolean

Default to false and only output secret_name, version_id, version_stages. Set it to true can output more details.

ids string[]

A list of KMS Secret Version ids.

includeDeprecated string

Specifies whether to return deprecated secret versions. Default to false.

outputFile string
versionStage string

The stage of the secret version.

secret_name str

The name of the secret.

enable_details bool

Default to false and only output secret_name, version_id, version_stages. Set it to true can output more details.

ids List[str]

A list of KMS Secret Version ids.

include_deprecated str

Specifies whether to return deprecated secret versions. Default to false.

output_file str
version_stage str

The stage of the secret version.

GetSecretVersions Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of Kms Secret Version ids.

SecretName string

The name of the secret.

Versions List<Pulumi.AliCloud.Kms.Outputs.GetSecretVersionsVersion>

A list of KMS Secret Versions. Each element contains the following attributes:

EnableDetails bool
IncludeDeprecated string
OutputFile string
VersionStage string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of Kms Secret Version ids.

SecretName string

The name of the secret.

Versions []GetSecretVersionsVersion

A list of KMS Secret Versions. Each element contains the following attributes:

EnableDetails bool
IncludeDeprecated string
OutputFile string
VersionStage string
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of Kms Secret Version ids.

secretName string

The name of the secret.

versions GetSecretVersionsVersion[]

A list of KMS Secret Versions. Each element contains the following attributes:

enableDetails boolean
includeDeprecated string
outputFile string
versionStage string
id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of Kms Secret Version ids.

secret_name str

The name of the secret.

versions List[GetSecretVersionsVersion]

A list of KMS Secret Versions. Each element contains the following attributes:

enable_details bool
include_deprecated str
output_file str
version_stage str

Supporting Types

GetSecretVersionsVersion

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

SecretData string

The secret value. Secrets Manager decrypts the stored secret value in ciphertext and returns it. (Returned when enable_details is true).

SecretDataType string

The type of the secret value. (Returned when enable_details is true).

SecretName string

The name of the secret.

VersionId string

The version number of the secret value.

VersionStages List<string>

Stage labels that mark the secret version.

SecretData string

The secret value. Secrets Manager decrypts the stored secret value in ciphertext and returns it. (Returned when enable_details is true).

SecretDataType string

The type of the secret value. (Returned when enable_details is true).

SecretName string

The name of the secret.

VersionId string

The version number of the secret value.

VersionStages []string

Stage labels that mark the secret version.

secretData string

The secret value. Secrets Manager decrypts the stored secret value in ciphertext and returns it. (Returned when enable_details is true).

secretDataType string

The type of the secret value. (Returned when enable_details is true).

secretName string

The name of the secret.

versionId string

The version number of the secret value.

versionStages string[]

Stage labels that mark the secret version.

secret_data str

The secret value. Secrets Manager decrypts the stored secret value in ciphertext and returns it. (Returned when enable_details is true).

secret_data_type str

The type of the secret value. (Returned when enable_details is true).

secret_name str

The name of the secret.

version_id str

The version number of the secret value.

version_stages List[str]

Stage labels that mark the secret version.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.