GetAlias
Use this data source to get the ARN of a KMS key alias. By using this data source, you can reference key alias without having to hard code the ARN as input.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var s3 = Output.Create(Aws.Kms.GetAlias.InvokeAsync(new Aws.Kms.GetAliasArgs
{
Name = "alias/aws/s3",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/kms"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kms.LookupAlias(ctx, &kms.LookupAliasArgs{
Name: "alias/aws/s3",
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
s3 = aws.kms.get_alias(name="alias/aws/s3")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const s3 = pulumi.output(aws.kms.getAlias({
name: "alias/aws/s3",
}, { async: true }));Using GetAlias
function getAlias(args: GetAliasArgs, opts?: InvokeOptions): Promise<GetAliasResult>function get_alias(name=None, opts=None)func LookupAlias(ctx *Context, args *LookupAliasArgs, opts ...InvokeOption) (*LookupAliasResult, error)Note: This function is named
LookupAliasin the Go SDK.
public static class GetAlias {
public static Task<GetAliasResult> InvokeAsync(GetAliasArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetAlias Result
The following output properties are available:
- Arn string
The Amazon Resource Name(ARN) of the key alias.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Target
Key stringArn ARN pointed to by the alias.
- Target
Key stringId Key identifier pointed to by the alias.
- Arn string
The Amazon Resource Name(ARN) of the key alias.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Target
Key stringArn ARN pointed to by the alias.
- Target
Key stringId Key identifier pointed to by the alias.
- arn string
The Amazon Resource Name(ARN) of the key alias.
- id string
The provider-assigned unique ID for this managed resource.
- name string
- target
Key stringArn ARN pointed to by the alias.
- target
Key stringId Key identifier pointed to by the alias.
- arn str
The Amazon Resource Name(ARN) of the key alias.
- id str
The provider-assigned unique ID for this managed resource.
- name str
- target_
key_ strarn ARN pointed to by the alias.
- target_
key_ strid Key identifier pointed to by the alias.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.