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:
- Key
Id string The id of kms key.
- Ids List<string>
A list of KMS KeyVersion IDs.
- Output
File string
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.
- Key
Id string ID of the key.
- Versions
List<Pulumi.
Ali Cloud. Kms. Outputs. Get Key Versions Version> A list of KMS KeyVersions. Each element contains the following attributes:
- Output
File string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of KMS KeyVersion IDs.
- Key
Id string ID of the key.
- Versions
[]Get
Key Versions Version A list of KMS KeyVersions. Each element contains the following attributes:
- Output
File string
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of KMS KeyVersion IDs.
- key
Id string ID of the key.
- versions
Get
Key Versions Version[] A list of KMS KeyVersions. Each element contains the following attributes:
- output
File 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[Get
Key Versions Version] 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.
- Creation
Date string Date and time when the key version was created (UTC time).
- Id string
ID of the KMS KeyVersion resource.
- Key
Id string The id of kms key.
- Key
Version stringId ID of the key version.
- Creation
Date string Date and time when the key version was created (UTC time).
- Id string
ID of the KMS KeyVersion resource.
- Key
Id string The id of kms key.
- Key
Version stringId ID of the key version.
- creation
Date string Date and time when the key version was created (UTC time).
- id string
ID of the KMS KeyVersion resource.
- key
Id string The id of kms key.
- key
Version stringId 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_ strid 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
alicloudTerraform Provider.