1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getSsmSecretVersions
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getSsmSecretVersions

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query detailed information of SSM secret version

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const exampleSsmSecret = new tencentcloud.SsmSecret("exampleSsmSecret", {
        secretName: "tf-example",
        description: "desc.",
        tags: {
            createdBy: "terraform",
        },
    });
    const v1 = new tencentcloud.SsmSecretVersion("v1", {
        secretName: exampleSsmSecret.secretName,
        versionId: "v1",
        secretBinary: "MTIzMTIzMTIzMTIzMTIzQQ==",
    });
    const exampleSsmSecretVersions = tencentcloud.getSsmSecretVersionsOutput({
        secretName: v1.secretName,
        versionId: v1.versionId,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example_ssm_secret = tencentcloud.SsmSecret("exampleSsmSecret",
        secret_name="tf-example",
        description="desc.",
        tags={
            "createdBy": "terraform",
        })
    v1 = tencentcloud.SsmSecretVersion("v1",
        secret_name=example_ssm_secret.secret_name,
        version_id="v1",
        secret_binary="MTIzMTIzMTIzMTIzMTIzQQ==")
    example_ssm_secret_versions = tencentcloud.get_ssm_secret_versions_output(secret_name=v1.secret_name,
        version_id=v1.version_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleSsmSecret, err := tencentcloud.NewSsmSecret(ctx, "exampleSsmSecret", &tencentcloud.SsmSecretArgs{
    			SecretName:  pulumi.String("tf-example"),
    			Description: pulumi.String("desc."),
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		v1, err := tencentcloud.NewSsmSecretVersion(ctx, "v1", &tencentcloud.SsmSecretVersionArgs{
    			SecretName:   exampleSsmSecret.SecretName,
    			VersionId:    pulumi.String("v1"),
    			SecretBinary: pulumi.String("MTIzMTIzMTIzMTIzMTIzQQ=="),
    		})
    		if err != nil {
    			return err
    		}
    		_ = tencentcloud.GetSsmSecretVersionsOutput(ctx, tencentcloud.GetSsmSecretVersionsOutputArgs{
    			SecretName: v1.SecretName,
    			VersionId:  v1.VersionId,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleSsmSecret = new Tencentcloud.SsmSecret("exampleSsmSecret", new()
        {
            SecretName = "tf-example",
            Description = "desc.",
            Tags = 
            {
                { "createdBy", "terraform" },
            },
        });
    
        var v1 = new Tencentcloud.SsmSecretVersion("v1", new()
        {
            SecretName = exampleSsmSecret.SecretName,
            VersionId = "v1",
            SecretBinary = "MTIzMTIzMTIzMTIzMTIzQQ==",
        });
    
        var exampleSsmSecretVersions = Tencentcloud.GetSsmSecretVersions.Invoke(new()
        {
            SecretName = v1.SecretName,
            VersionId = v1.VersionId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.SsmSecret;
    import com.pulumi.tencentcloud.SsmSecretArgs;
    import com.pulumi.tencentcloud.SsmSecretVersion;
    import com.pulumi.tencentcloud.SsmSecretVersionArgs;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetSsmSecretVersionsArgs;
    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) {
            var exampleSsmSecret = new SsmSecret("exampleSsmSecret", SsmSecretArgs.builder()
                .secretName("tf-example")
                .description("desc.")
                .tags(Map.of("createdBy", "terraform"))
                .build());
    
            var v1 = new SsmSecretVersion("v1", SsmSecretVersionArgs.builder()
                .secretName(exampleSsmSecret.secretName())
                .versionId("v1")
                .secretBinary("MTIzMTIzMTIzMTIzMTIzQQ==")
                .build());
    
            final var exampleSsmSecretVersions = TencentcloudFunctions.getSsmSecretVersions(GetSsmSecretVersionsArgs.builder()
                .secretName(v1.secretName())
                .versionId(v1.versionId())
                .build());
    
        }
    }
    
    resources:
      exampleSsmSecret:
        type: tencentcloud:SsmSecret
        properties:
          secretName: tf-example
          description: desc.
          tags:
            createdBy: terraform
      v1:
        type: tencentcloud:SsmSecretVersion
        properties:
          secretName: ${exampleSsmSecret.secretName}
          versionId: v1
          secretBinary: MTIzMTIzMTIzMTIzMTIzQQ==
    variables:
      exampleSsmSecretVersions:
        fn::invoke:
          function: tencentcloud:getSsmSecretVersions
          arguments:
            secretName: ${v1.secretName}
            versionId: ${v1.versionId}
    

    Using getSsmSecretVersions

    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 getSsmSecretVersions(args: GetSsmSecretVersionsArgs, opts?: InvokeOptions): Promise<GetSsmSecretVersionsResult>
    function getSsmSecretVersionsOutput(args: GetSsmSecretVersionsOutputArgs, opts?: InvokeOptions): Output<GetSsmSecretVersionsResult>
    def get_ssm_secret_versions(id: Optional[str] = None,
                                result_output_file: Optional[str] = None,
                                secret_name: Optional[str] = None,
                                version_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetSsmSecretVersionsResult
    def get_ssm_secret_versions_output(id: Optional[pulumi.Input[str]] = None,
                                result_output_file: Optional[pulumi.Input[str]] = None,
                                secret_name: Optional[pulumi.Input[str]] = None,
                                version_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetSsmSecretVersionsResult]
    func GetSsmSecretVersions(ctx *Context, args *GetSsmSecretVersionsArgs, opts ...InvokeOption) (*GetSsmSecretVersionsResult, error)
    func GetSsmSecretVersionsOutput(ctx *Context, args *GetSsmSecretVersionsOutputArgs, opts ...InvokeOption) GetSsmSecretVersionsResultOutput

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

    public static class GetSsmSecretVersions 
    {
        public static Task<GetSsmSecretVersionsResult> InvokeAsync(GetSsmSecretVersionsArgs args, InvokeOptions? opts = null)
        public static Output<GetSsmSecretVersionsResult> Invoke(GetSsmSecretVersionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSsmSecretVersionsResult> getSsmSecretVersions(GetSsmSecretVersionsArgs args, InvokeOptions options)
    public static Output<GetSsmSecretVersionsResult> getSsmSecretVersions(GetSsmSecretVersionsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getSsmSecretVersions:getSsmSecretVersions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    SecretName string
    Secret name used to filter result.
    Id string
    ResultOutputFile string
    Used to save results.
    VersionId string
    VersionId used to filter result.
    SecretName string
    Secret name used to filter result.
    Id string
    ResultOutputFile string
    Used to save results.
    VersionId string
    VersionId used to filter result.
    secretName String
    Secret name used to filter result.
    id String
    resultOutputFile String
    Used to save results.
    versionId String
    VersionId used to filter result.
    secretName string
    Secret name used to filter result.
    id string
    resultOutputFile string
    Used to save results.
    versionId string
    VersionId used to filter result.
    secret_name str
    Secret name used to filter result.
    id str
    result_output_file str
    Used to save results.
    version_id str
    VersionId used to filter result.
    secretName String
    Secret name used to filter result.
    id String
    resultOutputFile String
    Used to save results.
    versionId String
    VersionId used to filter result.

    getSsmSecretVersions Result

    The following output properties are available:

    Id string
    SecretName string
    SecretVersionLists List<GetSsmSecretVersionsSecretVersionList>
    A list of SSM secret versions. When secret status is Disabled, this field will not update anymore.
    ResultOutputFile string
    VersionId string
    Version of secret.
    Id string
    SecretName string
    SecretVersionLists []GetSsmSecretVersionsSecretVersionList
    A list of SSM secret versions. When secret status is Disabled, this field will not update anymore.
    ResultOutputFile string
    VersionId string
    Version of secret.
    id String
    secretName String
    secretVersionLists List<GetSsmSecretVersionsSecretVersionList>
    A list of SSM secret versions. When secret status is Disabled, this field will not update anymore.
    resultOutputFile String
    versionId String
    Version of secret.
    id string
    secretName string
    secretVersionLists GetSsmSecretVersionsSecretVersionList[]
    A list of SSM secret versions. When secret status is Disabled, this field will not update anymore.
    resultOutputFile string
    versionId string
    Version of secret.
    id str
    secret_name str
    secret_version_lists Sequence[GetSsmSecretVersionsSecretVersionList]
    A list of SSM secret versions. When secret status is Disabled, this field will not update anymore.
    result_output_file str
    version_id str
    Version of secret.
    id String
    secretName String
    secretVersionLists List<Property Map>
    A list of SSM secret versions. When secret status is Disabled, this field will not update anymore.
    resultOutputFile String
    versionId String
    Version of secret.

    Supporting Types

    GetSsmSecretVersionsSecretVersionList

    SecretBinary string
    The base64-encoded binary secret.
    SecretString string
    The string text of secret.
    VersionId string
    VersionId used to filter result.
    SecretBinary string
    The base64-encoded binary secret.
    SecretString string
    The string text of secret.
    VersionId string
    VersionId used to filter result.
    secretBinary String
    The base64-encoded binary secret.
    secretString String
    The string text of secret.
    versionId String
    VersionId used to filter result.
    secretBinary string
    The base64-encoded binary secret.
    secretString string
    The string text of secret.
    versionId string
    VersionId used to filter result.
    secret_binary str
    The base64-encoded binary secret.
    secret_string str
    The string text of secret.
    version_id str
    VersionId used to filter result.
    secretBinary String
    The base64-encoded binary secret.
    secretString String
    The string text of secret.
    versionId String
    VersionId used to filter result.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack