1. Packages
  2. Volcengine
  3. API Docs
  4. kms
  5. getSecretVersions
Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine
volcengine logo
Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine

    Use this data source to query detailed information of kms secret versions

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const default = volcengine.kms.getSecretVersions({
        secretName: "secret-9527",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    default = volcengine.kms.get_secret_versions(secret_name="secret-9527")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/kms"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := kms.GetSecretVersions(ctx, &kms.GetSecretVersionsArgs{
    			SecretName: "secret-9527",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Volcengine.Kms.GetSecretVersions.Invoke(new()
        {
            SecretName = "secret-9527",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.kms.KmsFunctions;
    import com.pulumi.volcengine.kms.inputs.GetSecretVersionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var default = KmsFunctions.getSecretVersions(GetSecretVersionsArgs.builder()
                .secretName("secret-9527")
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: volcengine:kms:getSecretVersions
          Arguments:
            secretName: secret-9527
    

    Using getSecretVersions

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSecretVersions(args: GetSecretVersionsArgs, opts?: InvokeOptions): Promise<GetSecretVersionsResult>
    function getSecretVersionsOutput(args: GetSecretVersionsOutputArgs, opts?: InvokeOptions): Output<GetSecretVersionsResult>
    def get_secret_versions(output_file: Optional[str] = None,
                            secret_name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetSecretVersionsResult
    def get_secret_versions_output(output_file: Optional[pulumi.Input[str]] = None,
                            secret_name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetSecretVersionsResult]
    func GetSecretVersions(ctx *Context, args *GetSecretVersionsArgs, opts ...InvokeOption) (*GetSecretVersionsResult, error)
    func GetSecretVersionsOutput(ctx *Context, args *GetSecretVersionsOutputArgs, opts ...InvokeOption) GetSecretVersionsResultOutput

    > Note: This function is named GetSecretVersions in the Go SDK.

    public static class GetSecretVersions 
    {
        public static Task<GetSecretVersionsResult> InvokeAsync(GetSecretVersionsArgs args, InvokeOptions? opts = null)
        public static Output<GetSecretVersionsResult> Invoke(GetSecretVersionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSecretVersionsResult> getSecretVersions(GetSecretVersionsArgs args, InvokeOptions options)
    public static Output<GetSecretVersionsResult> getSecretVersions(GetSecretVersionsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:kms/getSecretVersions:getSecretVersions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    SecretName string
    The name of the secret.
    OutputFile string
    File name where to save data source results.
    SecretName string
    The name of the secret.
    OutputFile string
    File name where to save data source results.
    secretName String
    The name of the secret.
    outputFile String
    File name where to save data source results.
    secretName string
    The name of the secret.
    outputFile string
    File name where to save data source results.
    secret_name str
    The name of the secret.
    output_file str
    File name where to save data source results.
    secretName String
    The name of the secret.
    outputFile String
    File name where to save data source results.

    getSecretVersions Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    SecretName string
    SecretVersions List<GetSecretVersionsSecretVersion>
    The version info of secret.
    TotalCount int
    The total count of query.
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretName string
    SecretVersions []GetSecretVersionsSecretVersion
    The version info of secret.
    TotalCount int
    The total count of query.
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    secretName String
    secretVersions List<GetSecretVersionsSecretVersion>
    The version info of secret.
    totalCount Integer
    The total count of query.
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    secretName string
    secretVersions GetSecretVersionsSecretVersion[]
    The version info of secret.
    totalCount number
    The total count of query.
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    secret_name str
    secret_versions Sequence[GetSecretVersionsSecretVersion]
    The version info of secret.
    total_count int
    The total count of query.
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    secretName String
    secretVersions List<Property Map>
    The version info of secret.
    totalCount Number
    The total count of query.
    outputFile String

    Supporting Types

    GetSecretVersionsSecretVersion

    CreationDate int
    The creation time of secret version.
    VersionId string
    The version ID of secret value.
    VersionStage string
    The version stage of secret value.
    CreationDate int
    The creation time of secret version.
    VersionId string
    The version ID of secret value.
    VersionStage string
    The version stage of secret value.
    creationDate Integer
    The creation time of secret version.
    versionId String
    The version ID of secret value.
    versionStage String
    The version stage of secret value.
    creationDate number
    The creation time of secret version.
    versionId string
    The version ID of secret value.
    versionStage string
    The version stage of secret value.
    creation_date int
    The creation time of secret version.
    version_id str
    The version ID of secret value.
    version_stage str
    The version stage of secret value.
    creationDate Number
    The creation time of secret version.
    versionId String
    The version ID of secret value.
    versionStage String
    The version stage of secret value.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine
      Meet Neo: Your AI Platform Teammate