GetAliases

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

NOTE: Available in v1.79.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var kmsAliases = Output.Create(AliCloud.Kms.GetAliases.InvokeAsync(new AliCloud.Kms.GetAliasesArgs
        {
            Ids = 
            {
                "d89e8a53-b708-41aa-8c67-6873axxx",
            },
            NameRegex = "alias/tf-testKmsAlias_123",
        }));
        this.FirstKeyId = data.Alicloud_kms_keys.Kms_keys_ds.Keys[0].Id;
    }

    [Output("firstKeyId")]
    public Output<string> FirstKeyId { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

kms_aliases = alicloud.kms.get_aliases(ids=["d89e8a53-b708-41aa-8c67-6873axxx"],
    name_regex="alias/tf-testKmsAlias_123")
pulumi.export("firstKeyId", data["alicloud.kms.getKeys"]["kms_keys_ds"]["keys"][0]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

// Declare the data source
const kmsAliases = pulumi.output(alicloud.kms.getAliases({
    ids: ["d89e8a53-b708-41aa-8c67-6873axxx"],
    nameRegex: "alias/tf-testKmsAlias_123",
}, { async: true }));

export const firstKeyId = alicloud_kms_keys_kms_keys_ds.keys.0.id;

Using GetAliases

function getAliases(args: GetAliasesArgs, opts?: InvokeOptions): Promise<GetAliasesResult>
function  get_aliases(ids=None, name_regex=None, output_file=None, opts=None)
func GetAliases(ctx *Context, args *GetAliasesArgs, opts ...InvokeOption) (*GetAliasesResult, error)
public static class GetAliases {
    public static Task<GetAliasesResult> InvokeAsync(GetAliasesArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Ids List<string>

A list of KMS aliases IDs. The value is same as KMS alias_name.

NameRegex string

A regex string to filter the results by the KMS alias name.

OutputFile string
Ids []string

A list of KMS aliases IDs. The value is same as KMS alias_name.

NameRegex string

A regex string to filter the results by the KMS alias name.

OutputFile string
ids string[]

A list of KMS aliases IDs. The value is same as KMS alias_name.

nameRegex string

A regex string to filter the results by the KMS alias name.

outputFile string
ids List[str]

A list of KMS aliases IDs. The value is same as KMS alias_name.

name_regex str

A regex string to filter the results by the KMS alias name.

output_file str

GetAliases Result

The following output properties are available:

Aliases List<Pulumi.AliCloud.Kms.Outputs.GetAliasesAlias>

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

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of kms aliases IDs. The value is same as KMS alias_name.

Names List<string>

A list of KMS alias name.

NameRegex string
OutputFile string
Aliases []GetAliasesAlias

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

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of kms aliases IDs. The value is same as KMS alias_name.

Names []string

A list of KMS alias name.

NameRegex string
OutputFile string
aliases GetAliasesAlias[]

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

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of kms aliases IDs. The value is same as KMS alias_name.

names string[]

A list of KMS alias name.

nameRegex string
outputFile string
aliases List[GetAliasesAlias]

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

id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of kms aliases IDs. The value is same as KMS alias_name.

names List[str]

A list of KMS alias name.

name_regex str
output_file str

Supporting Types

GetAliasesAlias

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AliasName string

The unique identifier of the alias.

Id string

ID of the alias. The value is same as KMS alias_name.

KeyId string

ID of the key.

AliasName string

The unique identifier of the alias.

Id string

ID of the alias. The value is same as KMS alias_name.

KeyId string

ID of the key.

aliasName string

The unique identifier of the alias.

id string

ID of the alias. The value is same as KMS alias_name.

keyId string

ID of the key.

alias_name str

The unique identifier of the alias.

id str

ID of the alias. The value is same as KMS alias_name.

key_id str

ID of the key.

Package Details

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