import { Value } from '../../cloudformation/Value';
import { Tag } from '../Tag';
import { Attribute } from '../../cloudformation/Attribute';
import { AwsResource } from '../../cloudformation/resources/AwsResource';
export type KeyAttributes = {
    KeyId: Attribute<string>;
    Arn: Attribute<string>;
};
export type Key = AwsResource<'AWS::KMS::Key', KeyProperties, KeyAttributes>;
/**
  The <code>AWS::KMS::Key</code> resource specifies an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys">KMS key</a> in AWS Key Management Service. You can use this resource to create symmetric encryption KMS keys, asymmetric KMS keys for encryption or signing, and symmetric HMAC KMS keys. You can use <code>AWS::KMS::Key</code> to create <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-primary-key">multi-Region primary keys</a> of all supported types. To replicate a multi-Region key, use the <code>AWS::KMS::ReplicaKey</code> resource.
  For full documentation go to <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html">the AWS Docs</a>
*/
export declare function key(keyProps?: KeyProperties): Key;
/**
  The <code>AWS::KMS::Key</code> resource specifies an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys">KMS key</a> in AWS Key Management Service. You can use this resource to create symmetric encryption KMS keys, asymmetric KMS keys for encryption or signing, and symmetric HMAC KMS keys. You can use <code>AWS::KMS::Key</code> to create <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-primary-key">multi-Region primary keys</a> of all supported types. To replicate a multi-Region key, use the <code>AWS::KMS::ReplicaKey</code> resource.
  For full documentation go to <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html">the AWS Docs</a>
*/
export interface KeyProperties {
    /** <code>Origin</code>  <a name="cfn-kms-key-origin"></a>
  The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is <code>AWS_KMS</code>, which means that AWS KMS creates the key material.<br />
  To <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html">create a KMS key with no key material</a> (for imported key material), set this value to <code>EXTERNAL</code>. For more information about importing key material into AWS KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing Key Material</a> in the * AWS Key Management Service Developer Guide*.<br />
  You can ignore <code>ENABLED</code> when Origin is <code>EXTERNAL</code>. When a KMS key with Origin <code>EXTERNAL</code> is created, the key state is <code>PENDING_IMPORT</code> and <code>ENABLED</code> is <code>false</code>. After you import the key material, <code>ENABLED</code> updated to <code>true</code>. The KMS key can then be used for Cryptographic Operations.<br />
  AWS CloudFormation doesn’t support creating an <code>Origin</code> parameter of the <code>AWS_CLOUDHSM</code> or <code>EXTERNAL_KEY_STORE</code> values.
  
  Allowed Values: <code>AWS_KMS</code> | <code>EXTERNAL</code><br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    origin?: Value<string>;
    /** <code>MultiRegion</code>  <a name="cfn-kms-key-multiregion"></a>
  Creates a multi-Region primary key that you can replicate in other AWS Regions. You can’t change the <code>MultiRegion</code> value after the KMS key is created.<br />
  For a list of AWS Regions in which multi-Region keys are supported, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Multi-Region keys in AWS KMS</a> in the
  AWS Key Management Service Developer Guide: br />
  You can create a symmetric encryption, HMAC, or asymmetric multi-Region KMS key, and you can create a multi-Region key with imported key material. However, you cannot create a multi-Region key in a custom key store.<br />
  To create a replica of this primary key in a different AWS Region , create an <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-replicakey.html">AWS::KMS::ReplicaKey</a> resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key.<br />
  
  Multi-Region keys: re an AWS KMS feature that lets you create multiple interoperable KMS keys in different AWS Regions. Because these KMS keys have the same key ID, key material, and other metadata, you can use them to encrypt data in one AWS Region and decrypt it in a different AWS Region without making a cross-Region call or exposing the plaintext data. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Multi-Region keys</a> in the
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    multiRegion?: Value<boolean>;
    /** <code>Description</code>  <a name="cfn-kms-key-description"></a>
  A description of the KMS key. Use a description that helps you to distinguish this KMS key from others in the account, such as its intended use.<br />
  
  Required: No<br />
  
  Minimum: <code>0</code><br />
  
  Maximum: <code>8192</code><br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    description?: Value<string>;
    /** <code>PendingWindowInDays</code>  <a name="cfn-kms-key-pendingwindowindays"></a>
  Specifies the number of days in the waiting period before AWS KMS deletes a KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.<br />
  When you remove a KMS key from a CloudFormation stack, AWS KMS schedules the KMS key for deletion and starts the mandatory waiting period. The <code>PendingWindowInDays</code> property determines the length of waiting period. During the waiting period, the key state of KMS key is <code>Pending Deletion</code> or <code>Pending Replica Deletion</code>, which prevents the KMS key from being used in cryptographic operations. When the waiting period expires, AWS KMS permanently deletes the KMS key.<br />
  AWS KMS will not delete a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">multi-Region primary key</a> that has replica keys. If you remove a multi-Region primary key from a CloudFormation stack, its key state changes to <code>PendingReplicaDeletion</code> so it cannot be replicated or used in cryptographic operations. This state can persist indefinitely. When the last of its replica keys is deleted, the key state of the primary key changes to <code>PendingDeletion</code> and the waiting period specified by <code>PendingWindowInDays</code> begins. When this waiting period expires, AWS KMS deletes the primary key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html">Deleting multi-Region keys</a> in the
  AWS Key Management Service Developer Guide: br />
  
  AWS Key Management Service API Reference: nd <a href="https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html">Deleting KMS keys</a> in the
  Minimum: 7<br />
  
  Maximum: 30<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    pendingWindowInDays?: Value<number>;
    /** <code>BypassPolicyLockoutSafetyCheck</code>  <a name="cfn-kms-key-bypasspolicylockoutsafetycheck"></a>
  Skips (“bypasses”) the key policy lockout safety check. The default value is false.<br />
  Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately.<br />
  For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key">Default key policy</a> in the
  AWS Key Management Service Developer Guide: Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html">PutKeyPolicy</a> request on the KMS key.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    bypassPolicyLockoutSafetyCheck?: Value<boolean>;
    /** <p> */
    keyPolicy?: Value<any>;
    /** <code>KeySpec</code>  <a name="cfn-kms-key-keyspec"></a>
  Specifies the type of KMS key to create. The default value, <code>SYMMETRIC_DEFAULT</code>, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions, <code>SYMMETRIC_DEFAULT</code> creates a 128-bit symmetric key that uses SM4 encryption. You can’t change the <code>KeySpec</code> value after the KMS key is created. For help choosing a key spec for your KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html">Choosing a KMS key type</a> in the
  AWS Key Management Service Developer Guide: AWS KMS supports the following key specs for KMS keys: */
    keySpec?: Value<string>;
    /** <code>Enabled</code>  <a name="cfn-kms-key-enabled"></a>
  Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.<br />
  When <code>Enabled</code> is <code>true</code>, the
  key state: f the KMS key is <code>Enabled</code>. When <code>Enabled</code> is <code>false</code>, the key state of the KMS key is <code>Disabled</code>. The default value is <code>true</code>.<br />
  The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html">EnableKey</a>, <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html">DisableKey</a>, or <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html">ScheduleKeyDeletion</a> operations.<br />
  For information about the key states of a KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the
  AWS Key Management Service Developer Guide: br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    enabled?: Value<boolean>;
    /** <p> */
    keyUsage?: Value<string>;
    /** <code>EnableKeyRotation</code>  <a name="cfn-kms-key-enablekeyrotation"></a>
  Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.<br />
  AWS KMS supports automatic rotation only for symmetric encryption KMS keys (<code>KeySpec</code> = <code>SYMMETRIC_DEFAULT</code>). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with Origin <code>EXTERNAL</code>, omit the <code>EnableKeyRotation</code> property or set it to <code>false</code>.<br />
  To enable automatic key rotation of the key material for a multi-Region KMS key, set <code>EnableKeyRotation</code> to <code>true</code> on the primary key (created by using <code>AWS::KMS::Key</code>). AWS KMS copies the rotation status to all replica keys. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate">Rotating multi-Region keys</a> in the
  AWS Key Management Service Developer Guide: br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    enableKeyRotation?: Value<boolean>;
    /** <code>Tags</code>  <a name="cfn-kms-key-tags"></a>
  Assigns one or more tags to the replica key.<br />
  Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">ABAC for AWS KMS</a> in the
  AWS Key Management Service Developer Guide: For information about tags in CloudFormation, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html">Tag</a>.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    tags?: Tag[];
}
