@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
142 lines (141 loc) • 5.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* 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](http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) allow you.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const a = new aws.kms.Key("a", {});
* const aAlias = new aws.kms.Alias("a", {
* name: "alias/my-key-alias",
* targetKeyId: a.keyId,
* });
* ```
*
* ## Import
*
* ### Identity Schema
*
* #### Required
*
* * `name` - (String) Name of the KMS key alias.
*
* #### Optional
*
* * `account_id` (String) AWS Account where this resource is managed.
*
* * `region` (String) Region where this resource is managed.
*
* Using `pulumi import`, import KMS aliases using the `name`. For example:
*
* console
*
* % pulumi import aws_kms_alias.a alias/my-key-alias
*/
export declare class Alias extends pulumi.CustomResource {
/**
* Get an existing Alias resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AliasState, opts?: pulumi.CustomResourceOptions): Alias;
/**
* Returns true if the given object is an instance of Alias. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Alias;
/**
* The Amazon Resource Name (ARN) of the key alias.
*/
readonly arn: pulumi.Output<string>;
/**
* The display name of the alias. The name must start with the word "alias" followed by a forward slash (alias/)
*/
readonly name: pulumi.Output<string>;
/**
* 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`.
*/
readonly namePrefix: pulumi.Output<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* The Amazon Resource Name (ARN) of the target key identifier.
*/
readonly targetKeyArn: pulumi.Output<string>;
/**
* Identifier for the key for which the alias is for, can be either an ARN or key_id.
*/
readonly targetKeyId: pulumi.Output<string>;
/**
* Create a Alias resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: AliasArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Alias resources.
*/
export interface AliasState {
/**
* The Amazon Resource Name (ARN) of the key alias.
*/
arn?: pulumi.Input<string>;
/**
* The display name of the alias. The name must start with the word "alias" followed by a forward slash (alias/)
*/
name?: pulumi.Input<string>;
/**
* 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`.
*/
namePrefix?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* The Amazon Resource Name (ARN) of the target key identifier.
*/
targetKeyArn?: pulumi.Input<string>;
/**
* Identifier for the key for which the alias is for, can be either an ARN or key_id.
*/
targetKeyId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Alias resource.
*/
export interface AliasArgs {
/**
* The display name of the alias. The name must start with the word "alias" followed by a forward slash (alias/)
*/
name?: pulumi.Input<string>;
/**
* 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`.
*/
namePrefix?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Identifier for the key for which the alias is for, can be either an ARN or key_id.
*/
targetKeyId: pulumi.Input<string>;
}