Class Alias
Provides an alias for a KMS customer master key. AWS Console enforces 1-to-1 mapping between aliases & keys, but API (hence this provider too) allows you to create as many aliases as the account limits allow you.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var key = new Aws.Kms.Key("key", new Aws.Kms.KeyArgs
{
});
var @alias = new Aws.Kms.Alias("alias", new Aws.Kms.AliasArgs
{
TargetKeyId = key.KeyId,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Kms
Assembly: Pulumi.Aws.dll
Syntax
public class Alias : CustomResource
Constructors
View SourceAlias(String, AliasArgs, CustomResourceOptions)
Create a Alias resource with the given unique name, arguments, and options.
Declaration
public Alias(string name, AliasArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AliasArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
The Amazon Resource Name (ARN) of the key alias.
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The display name of the alias. The name must start with the word "alias" followed by a forward slash (alias/)
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamePrefix
Creates an unique alias beginning with the specified prefix.
The name must start with the word "alias" followed by a forward slash (alias/). Conflicts with name.
Declaration
public Output<string> NamePrefix { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TargetKeyArn
The Amazon Resource Name (ARN) of the target key identifier.
Declaration
public Output<string> TargetKeyArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TargetKeyId
Identifier for the key for which the alias is for, can be either an ARN or key_id.
Declaration
public Output<string> TargetKeyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AliasState, CustomResourceOptions)
Get an existing Alias resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Alias Get(string name, Input<string> id, AliasState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AliasState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Alias |