GetKeyVersions

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

NOTE: Available in v1.85.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var alicloudKmsKeyVersionsDs = Output.Create(AliCloud.Kms.GetKeyVersions.InvokeAsync(new AliCloud.Kms.GetKeyVersionsArgs
        {
            Ids = 
            {
                "d89e8a53-b708-41aa-8c67-6873axxx",
            },
            KeyId = "08438c-b4d5-4d05-928c-07b7xxxx",
        }));
        this.AllVersions = alicloudKmsKeyVersionsDs.Apply(alicloudKmsKeyVersionsDs => alicloudKmsKeyVersionsDs.Versions);
    }

    [Output("allVersions")]
    public Output<string> AllVersions { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

alicloud_kms_key_versions_ds = alicloud.kms.get_key_versions(ids=["d89e8a53-b708-41aa-8c67-6873axxx"],
    key_id="08438c-b4d5-4d05-928c-07b7xxxx")
pulumi.export("allVersions", alicloud_kms_key_versions_ds.versions)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

// Declare the data source
const alicloudKmsKeyVersionsDs = pulumi.output(alicloud.kms.getKeyVersions({
    ids: ["d89e8a53-b708-41aa-8c67-6873axxx"],
    keyId: "08438c-b4d5-4d05-928c-07b7xxxx",
}, { async: true }));

export const allVersions = alicloudKmsKeyVersionsDs.versions;

Using GetKeyVersions

function getKeyVersions(args: GetKeyVersionsArgs, opts?: InvokeOptions): Promise<GetKeyVersionsResult>
function  get_key_versions(ids=None, key_id=None, output_file=None, opts=None)
func GetKeyVersions(ctx *Context, args *GetKeyVersionsArgs, opts ...InvokeOption) (*GetKeyVersionsResult, error)
public static class GetKeyVersions {
    public static Task<GetKeyVersionsResult> InvokeAsync(GetKeyVersionsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

KeyId string

The id of kms key.

Ids List<string>

A list of KMS KeyVersion IDs.

OutputFile string
KeyId string

The id of kms key.

Ids []string

A list of KMS KeyVersion IDs.

OutputFile string
keyId string

The id of kms key.

ids string[]

A list of KMS KeyVersion IDs.

outputFile string
key_id str

The id of kms key.

ids List[str]

A list of KMS KeyVersion IDs.

output_file str

GetKeyVersions 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 KeyVersion IDs.

KeyId string

ID of the key.

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

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

OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of KMS KeyVersion IDs.

KeyId string

ID of the key.

Versions []GetKeyVersionsVersion

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

OutputFile string
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of KMS KeyVersion IDs.

keyId string

ID of the key.

versions GetKeyVersionsVersion[]

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

outputFile string
id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of KMS KeyVersion IDs.

key_id str

ID of the key.

versions List[GetKeyVersionsVersion]

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

output_file str

Supporting Types

GetKeyVersionsVersion

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

CreationDate string

Date and time when the key version was created (UTC time).

Id string

ID of the KMS KeyVersion resource.

KeyId string

The id of kms key.

KeyVersionId string

ID of the key version.

CreationDate string

Date and time when the key version was created (UTC time).

Id string

ID of the KMS KeyVersion resource.

KeyId string

The id of kms key.

KeyVersionId string

ID of the key version.

creationDate string

Date and time when the key version was created (UTC time).

id string

ID of the KMS KeyVersion resource.

keyId string

The id of kms key.

keyVersionId string

ID of the key version.

creation_date str

Date and time when the key version was created (UTC time).

id str

ID of the KMS KeyVersion resource.

key_id str

The id of kms key.

key_version_id str

ID of the key 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.