kms

package
v0.104.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyOriginAwsKms   = KeyOrigin("AWS_KMS")
	KeyOriginExternal = KeyOrigin("EXTERNAL")
)
View Source
const (
	KeySpecSymmetricDefault = KeySpec("SYMMETRIC_DEFAULT")
	KeySpecRsa2048          = KeySpec("RSA_2048")
	KeySpecRsa3072          = KeySpec("RSA_3072")
	KeySpecRsa4096          = KeySpec("RSA_4096")
	KeySpecEccNistP256      = KeySpec("ECC_NIST_P256")
	KeySpecEccNistP384      = KeySpec("ECC_NIST_P384")
	KeySpecEccNistP521      = KeySpec("ECC_NIST_P521")
	KeySpecEccSecgP256k1    = KeySpec("ECC_SECG_P256K1")
	KeySpecHmac224          = KeySpec("HMAC_224")
	KeySpecHmac256          = KeySpec("HMAC_256")
	KeySpecHmac384          = KeySpec("HMAC_384")
	KeySpecHmac512          = KeySpec("HMAC_512")
	KeySpecSm2              = KeySpec("SM2")
)
View Source
const (
	KeyUsageEncryptDecrypt    = KeyUsage("ENCRYPT_DECRYPT")
	KeyUsageSignVerify        = KeyUsage("SIGN_VERIFY")
	KeyUsageGenerateVerifyMac = KeyUsage("GENERATE_VERIFY_MAC")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	pulumi.CustomResourceState

	// Specifies the alias name. This value must begin with “alias/“ followed by a name, such as “alias/ExampleAlias“.
	//   If you change the value of the “AliasName“ property, the existing alias is deleted and a new alias is created for the specified KMS key. This change can disrupt applications that use the alias. It can also allow or deny access to a KMS key affected by attribute-based access control (ABAC).
	//   The alias must be string of 1-256 characters. It can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). The alias name cannot begin with “alias/aws/“. The “alias/aws/“ prefix is reserved for [](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).
	AliasName pulumi.StringOutput `pulumi:"aliasName"`
	// Associates the alias with the specified [](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk). The KMS key must be in the same AWS-account and Region.
	//  A valid key ID is required. If you supply a null or empty string value, this operation returns an error.
	//  For help finding the key ID and ARN, see [Finding the key ID and ARN](https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn) in the *Developer Guide*.
	//  Specify the key ID or the key ARN of the KMS key.
	//  For example:
	//   +  Key ID: “1234abcd-12ab-34cd-56ef-1234567890ab“
	//   +  Key ARN: “arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab“
	//
	//  To get the key ID and key ARN for a KMS key, use [ListKeys](https://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeys.html) or [DescribeKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html).
	TargetKeyId pulumi.StringOutput `pulumi:"targetKeyId"`
}

The “AWS::KMS::Alias“ resource specifies a display name for a [KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys). You can use an alias to identify a KMS key in the KMS console, in the [DescribeKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html) operation, and in [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations), such as [Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) and [GenerateDataKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKey.html).

Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see [ABAC for](https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) in the *Developer Guide*.
Using an alias to refer to a KMS key can help you simplify key management. For example, an alias in your code can be associated with different KMS keys i

func GetAlias

func GetAlias(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AliasState, opts ...pulumi.ResourceOption) (*Alias, error)

GetAlias gets an existing Alias resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAlias

func NewAlias(ctx *pulumi.Context,
	name string, args *AliasArgs, opts ...pulumi.ResourceOption) (*Alias, error)

NewAlias registers a new resource with the given unique name, arguments, and options.

func (*Alias) ElementType

func (*Alias) ElementType() reflect.Type

func (*Alias) ToAliasOutput

func (i *Alias) ToAliasOutput() AliasOutput

func (*Alias) ToAliasOutputWithContext

func (i *Alias) ToAliasOutputWithContext(ctx context.Context) AliasOutput

type AliasArgs

type AliasArgs struct {
	// Specifies the alias name. This value must begin with “alias/“ followed by a name, such as “alias/ExampleAlias“.
	//   If you change the value of the “AliasName“ property, the existing alias is deleted and a new alias is created for the specified KMS key. This change can disrupt applications that use the alias. It can also allow or deny access to a KMS key affected by attribute-based access control (ABAC).
	//   The alias must be string of 1-256 characters. It can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). The alias name cannot begin with “alias/aws/“. The “alias/aws/“ prefix is reserved for [](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).
	AliasName pulumi.StringPtrInput
	// Associates the alias with the specified [](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk). The KMS key must be in the same AWS-account and Region.
	//  A valid key ID is required. If you supply a null or empty string value, this operation returns an error.
	//  For help finding the key ID and ARN, see [Finding the key ID and ARN](https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn) in the *Developer Guide*.
	//  Specify the key ID or the key ARN of the KMS key.
	//  For example:
	//   +  Key ID: “1234abcd-12ab-34cd-56ef-1234567890ab“
	//   +  Key ARN: “arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab“
	//
	//  To get the key ID and key ARN for a KMS key, use [ListKeys](https://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeys.html) or [DescribeKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html).
	TargetKeyId pulumi.StringInput
}

The set of arguments for constructing a Alias resource.

func (AliasArgs) ElementType

func (AliasArgs) ElementType() reflect.Type

type AliasInput

type AliasInput interface {
	pulumi.Input

	ToAliasOutput() AliasOutput
	ToAliasOutputWithContext(ctx context.Context) AliasOutput
}

type AliasOutput

type AliasOutput struct{ *pulumi.OutputState }

func (AliasOutput) AliasName added in v0.17.0

func (o AliasOutput) AliasName() pulumi.StringOutput

Specifies the alias name. This value must begin with “alias/“ followed by a name, such as “alias/ExampleAlias“.

If you change the value of the ``AliasName`` property, the existing alias is deleted and a new alias is created for the specified KMS key. This change can disrupt applications that use the alias. It can also allow or deny access to a KMS key affected by attribute-based access control (ABAC).
The alias must be string of 1-256 characters. It can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). The alias name cannot begin with ``alias/aws/``. The ``alias/aws/`` prefix is reserved for [](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).

func (AliasOutput) ElementType

func (AliasOutput) ElementType() reflect.Type

func (AliasOutput) TargetKeyId added in v0.17.0

func (o AliasOutput) TargetKeyId() pulumi.StringOutput

Associates the alias with the specified [](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk). The KMS key must be in the same AWS-account and Region.

A valid key ID is required. If you supply a null or empty string value, this operation returns an error.
For help finding the key ID and ARN, see [Finding the key ID and ARN](https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn) in the *Developer Guide*.
Specify the key ID or the key ARN of the KMS key.
For example:
 +  Key ID: ``1234abcd-12ab-34cd-56ef-1234567890ab``
 +  Key ARN: ``arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab``

To get the key ID and key ARN for a KMS key, use [ListKeys](https://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeys.html) or [DescribeKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html).

func (AliasOutput) ToAliasOutput

func (o AliasOutput) ToAliasOutput() AliasOutput

func (AliasOutput) ToAliasOutputWithContext

func (o AliasOutput) ToAliasOutputWithContext(ctx context.Context) AliasOutput

type AliasState

type AliasState struct {
}

func (AliasState) ElementType

func (AliasState) ElementType() reflect.Type

type Key

type Key struct {
	pulumi.CustomResourceState

	Arn pulumi.StringOutput `pulumi:"arn"`
	// Skips ("bypasses") the key policy lockout safety check. The default value is false.
	//   Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately.
	//  For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key) in the *Developer Guide*.
	//   Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent [PutKeyPolicy](https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html) request on the KMS key.
	BypassPolicyLockoutSafetyCheck pulumi.BoolPtrOutput `pulumi:"bypassPolicyLockoutSafetyCheck"`
	// 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.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.
	//   KMS supports automatic rotation only for symmetric encryption KMS keys (“KeySpec“ = “SYMMETRIC_DEFAULT“). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with Origin “EXTERNAL“, omit the “EnableKeyRotation“ property or set it to “false“.
	//  To enable automatic key rotation of the key material for a multi-Region KMS key, set “EnableKeyRotation“ to “true“ on the primary key (created by using “AWS::KMS::Key“). KMS copies the rotation status to all replica keys. For details, see [Rotating multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate) in the *Developer Guide*.
	//  When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see [Rotating KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) in the *Developer Guide*.
	EnableKeyRotation pulumi.BoolPtrOutput `pulumi:"enableKeyRotation"`
	// Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.
	//  When “Enabled“ is “true“, the *key state* of the KMS key is “Enabled“. When “Enabled“ is “false“, the key state of the KMS key is “Disabled“. The default value is “true“.
	//  The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the [EnableKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html), [DisableKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html), or [ScheduleKeyDeletion](https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html) operations.
	//  For information about the key states of a KMS key, see [Key state: Effect on your KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the *Developer Guide*.
	Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
	KeyId   pulumi.StringOutput  `pulumi:"keyId"`
	// The key policy to attach to the KMS key.
	//  If you provide a key policy, it must meet the following criteria:
	//   +  The key policy must allow the caller to make a subsequent [PutKeyPolicy](https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html) request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) in the *Developer Guide*. (To omit this condition, set “BypassPolicyLockoutSafetyCheck“ to true.)
	//   +  Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see [Changes that I make are not always immediately visible](https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) in the *User Guide*.
	//
	//  If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) in the *Developer Guide*.
	//  A key policy document can include only the following characters:
	//   +  Printable ASCII characters
	//   +  Printable characters in the Basic Latin and Latin-1 Supplement character set
	//   +  The tab (“\u0009“), line feed (“\u000A“), and carriage return (“\u000D“) special characters
	//
	//   *Minimum*: “1“
	//   *Maximum*: “32768“
	//
	// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::Key` for more information about the expected schema for this property.
	KeyPolicy pulumi.AnyOutput `pulumi:"keyPolicy"`
	// Specifies the type of KMS key to create. The default value, “SYMMETRIC_DEFAULT“, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions, “SYMMETRIC_DEFAULT“ creates a 128-bit symmetric key that uses SM4 encryption. You can't change the “KeySpec“ value after the KMS key is created. For help choosing a key spec for your KMS key, see [Choosing a KMS key type](https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html) in the *Developer Guide*.
	//  The “KeySpec“ property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see [condition keys](https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms) in the *Developer Guide*.
	//   If you change the value of the “KeySpec“ property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
	//     [services that are integrated with](https://docs.aws.amazon.com/kms/features/#AWS_Service_Integration) use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see [Identifying asymmetric KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html) in the *Developer Guide*.
	//    KMS supports the following key specs for KMS keys:
	//   +  Symmetric encryption key (default)
	//   +   “SYMMETRIC_DEFAULT“ (AES-256-GCM)
	//
	//   +  HMAC keys (symmetric)
	//   +   “HMAC_224“
	//   +   “HMAC_256“
	//   +   “HMAC_384“
	//   +   “HMAC_512“
	//
	//   +  Asymmetric RSA key pairs
	//   +   “RSA_2048“
	//   +   “RSA_3072“
	//   +   “RSA_4096“
	//
	//   +  Asymmetric NIST-recommended elliptic curve key pairs
	//   +   “ECC_NIST_P256“ (secp256r1)
	//   +   “ECC_NIST_P384“ (secp384r1)
	//   +   “ECC_NIST_P521“ (secp521r1)
	//
	//   +  Other asymmetric elliptic curve key pairs
	//   +   “ECC_SECG_P256K1“ (secp256k1), commonly used for cryptocurrencies.
	//
	//   +  SM2 key pairs (China Regions only)
	//   +   “SM2“
	KeySpec KeySpecPtrOutput `pulumi:"keySpec"`
	// Determines the [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. The default value is “ENCRYPT_DECRYPT“. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change the “KeyUsage“ value after the KMS key is created.
	//   If you change the value of the “KeyUsage“ property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
	//   Select only one valid value.
	//   +  For symmetric encryption KMS keys, omit the property or specify “ENCRYPT_DECRYPT“.
	//   +  For asymmetric KMS keys with RSA key material, specify “ENCRYPT_DECRYPT“ or “SIGN_VERIFY“.
	//   +  For asymmetric KMS keys with ECC key material, specify “SIGN_VERIFY“.
	//   +  For asymmetric KMS keys with SM2 (China Regions only) key material, specify “ENCRYPT_DECRYPT“ or “SIGN_VERIFY“.
	//   +  For HMAC KMS keys, specify “GENERATE_VERIFY_MAC“.
	KeyUsage KeyUsagePtrOutput `pulumi:"keyUsage"`
	// Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the “MultiRegion“ value after the KMS key is created.
	//  For a list of AWS-Regions in which multi-Region keys are supported, see [Multi-Region keys in](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the **.
	//   If you change the value of the “MultiRegion“ property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
	//   For a multi-Region key, set to this property to “true“. For a single-Region key, omit this property or set it to “false“. The default value is “false“.
	//   *Multi-Region keys* are an 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 [Multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the *Developer Guide*.
	//  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.
	//  To create a replica of this primary key in a different AWS-Region , create an [AWS::KMS::ReplicaKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-replicakey.html) resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key.
	MultiRegion pulumi.BoolPtrOutput `pulumi:"multiRegion"`
	// The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is “AWS_KMS“, which means that KMS creates the key material.
	//  To [create a KMS key with no key material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html) (for imported key material), set this value to “EXTERNAL“. For more information about importing key material into KMS, see [Importing Key Material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) in the *Developer Guide*.
	//  You can ignore “ENABLED“ when Origin is “EXTERNAL“. When a KMS key with Origin “EXTERNAL“ is created, the key state is “PENDING_IMPORT“ and “ENABLED“ is “false“. After you import the key material, “ENABLED“ updated to “true“. The KMS key can then be used for Cryptographic Operations.
	//    CFN doesn't support creating an “Origin“ parameter of the “AWS_CLOUDHSM“ or “EXTERNAL_KEY_STORE“ values.
	Origin KeyOriginPtrOutput `pulumi:"origin"`
	// Specifies the number of days in the waiting period before 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.
	//  When you remove a KMS key from a CloudFormation stack, KMS schedules the KMS key for deletion and starts the mandatory waiting period. The “PendingWindowInDays“ property determines the length of waiting period. During the waiting period, the key state of KMS key is “Pending Deletion“ or “Pending Replica Deletion“, which prevents the KMS key from being used in cryptographic operations. When the waiting period expires, KMS permanently deletes the KMS key.
	//   KMS will not delete a [multi-Region primary key](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) that has replica keys. If you remove a multi-Region primary key from a CloudFormation stack, its key state changes to “PendingReplicaDeletion“ 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 “PendingDeletion“ and the waiting period specified by “PendingWindowInDays“ begins. When this waiting period expires, KMS deletes the primary key. For details, see [Deleting multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html) in the *Developer Guide*.
	//  You cannot use a CloudFormation template to cancel deletion of the KMS key after you remove it from the stack, regardless of the waiting period. If you specify a KMS key in your template, even one with the same name, CloudFormation creates a new KMS key. To cancel deletion of a KMS key, use the KMS console or the [CancelKeyDeletion](https://docs.aws.amazon.com/kms/latest/APIReference/API_CancelKeyDeletion.html) operation.
	//  For information about the “Pending Deletion“ and “Pending Replica Deletion“ key states, see [Key state: Effect on your KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the *Developer Guide*. For more information about deleting KMS keys, see the [ScheduleKeyDeletion](https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html) operation in the *API Reference* and [Deleting KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) in the *Developer Guide*.
	PendingWindowInDays  pulumi.IntPtrOutput `pulumi:"pendingWindowInDays"`
	RotationPeriodInDays pulumi.IntPtrOutput `pulumi:"rotationPeriodInDays"`
	// Assigns one or more tags to the replica key.
	//   Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see [ABAC for](https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) in the *Developer Guide*.
	//   For information about tags in KMS, see [Tagging keys](https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html) in the *Developer Guide*. For information about tags in CloudFormation, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
	Tags aws.TagArrayOutput `pulumi:"tags"`
}

The “AWS::KMS::Key“ resource specifies an [KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys) in KMSlong. 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 “AWS::KMS::Key“ to create [multi-Region primary keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-primary-key) of all supported types. To replicate a multi-Region key, use the “AWS::KMS::ReplicaKey“ resource.

 If you change the value of the ``KeySpec``, ``KeyUsage``, ``Origin``, or ``MultiRegion`` properties of an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing any of its immutable property values.
   KMS replaced the term *customer master key (CMK)* with ** and *KMS key*. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.
 You can use symmetric encryption KMS keys to encrypt and decrypt small amounts of data, but they are more commonly used to generate data keys and data key pairs. You can also use a symmetric encryption KMS key to encrypt data stored in AWS services that are [integrated with](https://docs.aws.amazon.com//kms/features/#AWS_Service_Integration). For more information, see [Symmetric encryption KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks) in the *Developer Guide*.
You can use asymmetric KMS keys to encrypt and decrypt data or sign messages and verify signatures. To create an asymmetric key, you must specify an asymmetric ``KeySpec`` value and a ``KeyUsage`` value. For details, see [Asymmetric keys in](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) in the *Developer Guide*.
You can use HMAC KMS keys (which are also symmetric keys) to generate and verify hash-based message authentication codes. To create an HMAC key, you must specify an HMAC ``KeySpec`` value and a ``KeyUsage`` value of ``GENERATE_VERIFY_MAC``. For details, see [HMAC keys in](https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html) in the *Developer Guide*.
You can also create symmetric encryption, asymmetric, and HMAC multi-Region primary keys. To create a multi-Region primary key, set the ``MultiRegion`` property to ``true``. For information about multi-Region keys, see [Multi-Region keys in](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the *Developer Guide*.
You cannot use the ``AWS::KMS::Key`` resource to specify a KMS key with [imported key material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) or a KMS key in a [custom key store](https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
 *Regions*
 KMS CloudFormation resources are available in all Regions in which KMS and CFN are supported. You can use the ``AWS::KMS::Key`` resource to create and manage all KMS key types that are supported in a Region.

func GetKey

func GetKey(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *KeyState, opts ...pulumi.ResourceOption) (*Key, error)

GetKey gets an existing Key resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewKey

func NewKey(ctx *pulumi.Context,
	name string, args *KeyArgs, opts ...pulumi.ResourceOption) (*Key, error)

NewKey registers a new resource with the given unique name, arguments, and options.

func (*Key) ElementType

func (*Key) ElementType() reflect.Type

func (*Key) ToKeyOutput

func (i *Key) ToKeyOutput() KeyOutput

func (*Key) ToKeyOutputWithContext

func (i *Key) ToKeyOutputWithContext(ctx context.Context) KeyOutput

type KeyArgs

type KeyArgs struct {
	// Skips ("bypasses") the key policy lockout safety check. The default value is false.
	//   Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately.
	//  For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key) in the *Developer Guide*.
	//   Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent [PutKeyPolicy](https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html) request on the KMS key.
	BypassPolicyLockoutSafetyCheck pulumi.BoolPtrInput
	// 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.
	Description pulumi.StringPtrInput
	// Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.
	//   KMS supports automatic rotation only for symmetric encryption KMS keys (“KeySpec“ = “SYMMETRIC_DEFAULT“). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with Origin “EXTERNAL“, omit the “EnableKeyRotation“ property or set it to “false“.
	//  To enable automatic key rotation of the key material for a multi-Region KMS key, set “EnableKeyRotation“ to “true“ on the primary key (created by using “AWS::KMS::Key“). KMS copies the rotation status to all replica keys. For details, see [Rotating multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate) in the *Developer Guide*.
	//  When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see [Rotating KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) in the *Developer Guide*.
	EnableKeyRotation pulumi.BoolPtrInput
	// Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.
	//  When “Enabled“ is “true“, the *key state* of the KMS key is “Enabled“. When “Enabled“ is “false“, the key state of the KMS key is “Disabled“. The default value is “true“.
	//  The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the [EnableKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html), [DisableKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html), or [ScheduleKeyDeletion](https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html) operations.
	//  For information about the key states of a KMS key, see [Key state: Effect on your KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the *Developer Guide*.
	Enabled pulumi.BoolPtrInput
	// The key policy to attach to the KMS key.
	//  If you provide a key policy, it must meet the following criteria:
	//   +  The key policy must allow the caller to make a subsequent [PutKeyPolicy](https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html) request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) in the *Developer Guide*. (To omit this condition, set “BypassPolicyLockoutSafetyCheck“ to true.)
	//   +  Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see [Changes that I make are not always immediately visible](https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) in the *User Guide*.
	//
	//  If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) in the *Developer Guide*.
	//  A key policy document can include only the following characters:
	//   +  Printable ASCII characters
	//   +  Printable characters in the Basic Latin and Latin-1 Supplement character set
	//   +  The tab (“\u0009“), line feed (“\u000A“), and carriage return (“\u000D“) special characters
	//
	//   *Minimum*: “1“
	//   *Maximum*: “32768“
	//
	// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::Key` for more information about the expected schema for this property.
	KeyPolicy pulumi.Input
	// Specifies the type of KMS key to create. The default value, “SYMMETRIC_DEFAULT“, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions, “SYMMETRIC_DEFAULT“ creates a 128-bit symmetric key that uses SM4 encryption. You can't change the “KeySpec“ value after the KMS key is created. For help choosing a key spec for your KMS key, see [Choosing a KMS key type](https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html) in the *Developer Guide*.
	//  The “KeySpec“ property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see [condition keys](https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms) in the *Developer Guide*.
	//   If you change the value of the “KeySpec“ property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
	//     [services that are integrated with](https://docs.aws.amazon.com/kms/features/#AWS_Service_Integration) use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see [Identifying asymmetric KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html) in the *Developer Guide*.
	//    KMS supports the following key specs for KMS keys:
	//   +  Symmetric encryption key (default)
	//   +   “SYMMETRIC_DEFAULT“ (AES-256-GCM)
	//
	//   +  HMAC keys (symmetric)
	//   +   “HMAC_224“
	//   +   “HMAC_256“
	//   +   “HMAC_384“
	//   +   “HMAC_512“
	//
	//   +  Asymmetric RSA key pairs
	//   +   “RSA_2048“
	//   +   “RSA_3072“
	//   +   “RSA_4096“
	//
	//   +  Asymmetric NIST-recommended elliptic curve key pairs
	//   +   “ECC_NIST_P256“ (secp256r1)
	//   +   “ECC_NIST_P384“ (secp384r1)
	//   +   “ECC_NIST_P521“ (secp521r1)
	//
	//   +  Other asymmetric elliptic curve key pairs
	//   +   “ECC_SECG_P256K1“ (secp256k1), commonly used for cryptocurrencies.
	//
	//   +  SM2 key pairs (China Regions only)
	//   +   “SM2“
	KeySpec KeySpecPtrInput
	// Determines the [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. The default value is “ENCRYPT_DECRYPT“. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change the “KeyUsage“ value after the KMS key is created.
	//   If you change the value of the “KeyUsage“ property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
	//   Select only one valid value.
	//   +  For symmetric encryption KMS keys, omit the property or specify “ENCRYPT_DECRYPT“.
	//   +  For asymmetric KMS keys with RSA key material, specify “ENCRYPT_DECRYPT“ or “SIGN_VERIFY“.
	//   +  For asymmetric KMS keys with ECC key material, specify “SIGN_VERIFY“.
	//   +  For asymmetric KMS keys with SM2 (China Regions only) key material, specify “ENCRYPT_DECRYPT“ or “SIGN_VERIFY“.
	//   +  For HMAC KMS keys, specify “GENERATE_VERIFY_MAC“.
	KeyUsage KeyUsagePtrInput
	// Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the “MultiRegion“ value after the KMS key is created.
	//  For a list of AWS-Regions in which multi-Region keys are supported, see [Multi-Region keys in](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the **.
	//   If you change the value of the “MultiRegion“ property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
	//   For a multi-Region key, set to this property to “true“. For a single-Region key, omit this property or set it to “false“. The default value is “false“.
	//   *Multi-Region keys* are an 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 [Multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the *Developer Guide*.
	//  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.
	//  To create a replica of this primary key in a different AWS-Region , create an [AWS::KMS::ReplicaKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-replicakey.html) resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key.
	MultiRegion pulumi.BoolPtrInput
	// The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is “AWS_KMS“, which means that KMS creates the key material.
	//  To [create a KMS key with no key material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html) (for imported key material), set this value to “EXTERNAL“. For more information about importing key material into KMS, see [Importing Key Material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) in the *Developer Guide*.
	//  You can ignore “ENABLED“ when Origin is “EXTERNAL“. When a KMS key with Origin “EXTERNAL“ is created, the key state is “PENDING_IMPORT“ and “ENABLED“ is “false“. After you import the key material, “ENABLED“ updated to “true“. The KMS key can then be used for Cryptographic Operations.
	//    CFN doesn't support creating an “Origin“ parameter of the “AWS_CLOUDHSM“ or “EXTERNAL_KEY_STORE“ values.
	Origin KeyOriginPtrInput
	// Specifies the number of days in the waiting period before 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.
	//  When you remove a KMS key from a CloudFormation stack, KMS schedules the KMS key for deletion and starts the mandatory waiting period. The “PendingWindowInDays“ property determines the length of waiting period. During the waiting period, the key state of KMS key is “Pending Deletion“ or “Pending Replica Deletion“, which prevents the KMS key from being used in cryptographic operations. When the waiting period expires, KMS permanently deletes the KMS key.
	//   KMS will not delete a [multi-Region primary key](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) that has replica keys. If you remove a multi-Region primary key from a CloudFormation stack, its key state changes to “PendingReplicaDeletion“ 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 “PendingDeletion“ and the waiting period specified by “PendingWindowInDays“ begins. When this waiting period expires, KMS deletes the primary key. For details, see [Deleting multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html) in the *Developer Guide*.
	//  You cannot use a CloudFormation template to cancel deletion of the KMS key after you remove it from the stack, regardless of the waiting period. If you specify a KMS key in your template, even one with the same name, CloudFormation creates a new KMS key. To cancel deletion of a KMS key, use the KMS console or the [CancelKeyDeletion](https://docs.aws.amazon.com/kms/latest/APIReference/API_CancelKeyDeletion.html) operation.
	//  For information about the “Pending Deletion“ and “Pending Replica Deletion“ key states, see [Key state: Effect on your KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the *Developer Guide*. For more information about deleting KMS keys, see the [ScheduleKeyDeletion](https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html) operation in the *API Reference* and [Deleting KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) in the *Developer Guide*.
	PendingWindowInDays  pulumi.IntPtrInput
	RotationPeriodInDays pulumi.IntPtrInput
	// Assigns one or more tags to the replica key.
	//   Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see [ABAC for](https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) in the *Developer Guide*.
	//   For information about tags in KMS, see [Tagging keys](https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html) in the *Developer Guide*. For information about tags in CloudFormation, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
	Tags aws.TagArrayInput
}

The set of arguments for constructing a Key resource.

func (KeyArgs) ElementType

func (KeyArgs) ElementType() reflect.Type

type KeyInput

type KeyInput interface {
	pulumi.Input

	ToKeyOutput() KeyOutput
	ToKeyOutputWithContext(ctx context.Context) KeyOutput
}

type KeyOrigin added in v0.70.0

type KeyOrigin string

The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is “AWS_KMS“, which means that KMS creates the key material.

To [create a KMS key with no key material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html) (for imported key material), set this value to ``EXTERNAL``. For more information about importing key material into KMS, see [Importing Key Material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) in the *Developer Guide*.
You can ignore ``ENABLED`` when Origin is ``EXTERNAL``. When a KMS key with Origin ``EXTERNAL`` is created, the key state is ``PENDING_IMPORT`` and ``ENABLED`` is ``false``. After you import the key material, ``ENABLED`` updated to ``true``. The KMS key can then be used for Cryptographic Operations.
  CFN doesn't support creating an ``Origin`` parameter of the ``AWS_CLOUDHSM`` or ``EXTERNAL_KEY_STORE`` values.

func (KeyOrigin) ElementType added in v0.70.0

func (KeyOrigin) ElementType() reflect.Type

func (KeyOrigin) ToKeyOriginOutput added in v0.70.0

func (e KeyOrigin) ToKeyOriginOutput() KeyOriginOutput

func (KeyOrigin) ToKeyOriginOutputWithContext added in v0.70.0

func (e KeyOrigin) ToKeyOriginOutputWithContext(ctx context.Context) KeyOriginOutput

func (KeyOrigin) ToKeyOriginPtrOutput added in v0.70.0

func (e KeyOrigin) ToKeyOriginPtrOutput() KeyOriginPtrOutput

func (KeyOrigin) ToKeyOriginPtrOutputWithContext added in v0.70.0

func (e KeyOrigin) ToKeyOriginPtrOutputWithContext(ctx context.Context) KeyOriginPtrOutput

func (KeyOrigin) ToStringOutput added in v0.70.0

func (e KeyOrigin) ToStringOutput() pulumi.StringOutput

func (KeyOrigin) ToStringOutputWithContext added in v0.70.0

func (e KeyOrigin) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput

func (KeyOrigin) ToStringPtrOutput added in v0.70.0

func (e KeyOrigin) ToStringPtrOutput() pulumi.StringPtrOutput

func (KeyOrigin) ToStringPtrOutputWithContext added in v0.70.0

func (e KeyOrigin) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type KeyOriginInput added in v0.70.0

type KeyOriginInput interface {
	pulumi.Input

	ToKeyOriginOutput() KeyOriginOutput
	ToKeyOriginOutputWithContext(context.Context) KeyOriginOutput
}

KeyOriginInput is an input type that accepts values of the KeyOrigin enum A concrete instance of `KeyOriginInput` can be one of the following:

KeyOriginAwsKms
KeyOriginExternal

type KeyOriginOutput added in v0.70.0

type KeyOriginOutput struct{ *pulumi.OutputState }

func (KeyOriginOutput) ElementType added in v0.70.0

func (KeyOriginOutput) ElementType() reflect.Type

func (KeyOriginOutput) ToKeyOriginOutput added in v0.70.0

func (o KeyOriginOutput) ToKeyOriginOutput() KeyOriginOutput

func (KeyOriginOutput) ToKeyOriginOutputWithContext added in v0.70.0

func (o KeyOriginOutput) ToKeyOriginOutputWithContext(ctx context.Context) KeyOriginOutput

func (KeyOriginOutput) ToKeyOriginPtrOutput added in v0.70.0

func (o KeyOriginOutput) ToKeyOriginPtrOutput() KeyOriginPtrOutput

func (KeyOriginOutput) ToKeyOriginPtrOutputWithContext added in v0.70.0

func (o KeyOriginOutput) ToKeyOriginPtrOutputWithContext(ctx context.Context) KeyOriginPtrOutput

func (KeyOriginOutput) ToStringOutput added in v0.70.0

func (o KeyOriginOutput) ToStringOutput() pulumi.StringOutput

func (KeyOriginOutput) ToStringOutputWithContext added in v0.70.0

func (o KeyOriginOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput

func (KeyOriginOutput) ToStringPtrOutput added in v0.70.0

func (o KeyOriginOutput) ToStringPtrOutput() pulumi.StringPtrOutput

func (KeyOriginOutput) ToStringPtrOutputWithContext added in v0.70.0

func (o KeyOriginOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type KeyOriginPtrInput added in v0.70.0

type KeyOriginPtrInput interface {
	pulumi.Input

	ToKeyOriginPtrOutput() KeyOriginPtrOutput
	ToKeyOriginPtrOutputWithContext(context.Context) KeyOriginPtrOutput
}

func KeyOriginPtr added in v0.70.0

func KeyOriginPtr(v string) KeyOriginPtrInput

type KeyOriginPtrOutput added in v0.70.0

type KeyOriginPtrOutput struct{ *pulumi.OutputState }

func (KeyOriginPtrOutput) Elem added in v0.70.0

func (KeyOriginPtrOutput) ElementType added in v0.70.0

func (KeyOriginPtrOutput) ElementType() reflect.Type

func (KeyOriginPtrOutput) ToKeyOriginPtrOutput added in v0.70.0

func (o KeyOriginPtrOutput) ToKeyOriginPtrOutput() KeyOriginPtrOutput

func (KeyOriginPtrOutput) ToKeyOriginPtrOutputWithContext added in v0.70.0

func (o KeyOriginPtrOutput) ToKeyOriginPtrOutputWithContext(ctx context.Context) KeyOriginPtrOutput

func (KeyOriginPtrOutput) ToStringPtrOutput added in v0.70.0

func (o KeyOriginPtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput

func (KeyOriginPtrOutput) ToStringPtrOutputWithContext added in v0.70.0

func (o KeyOriginPtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type KeyOutput

type KeyOutput struct{ *pulumi.OutputState }

func (KeyOutput) Arn added in v0.17.0

func (o KeyOutput) Arn() pulumi.StringOutput

func (KeyOutput) BypassPolicyLockoutSafetyCheck added in v0.73.0

func (o KeyOutput) BypassPolicyLockoutSafetyCheck() pulumi.BoolPtrOutput

Skips ("bypasses") the key policy lockout safety check. The default value is false.

 Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately.
For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key) in the *Developer Guide*.
 Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent [PutKeyPolicy](https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html) request on the KMS key.

func (KeyOutput) Description added in v0.17.0

func (o KeyOutput) Description() pulumi.StringPtrOutput

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.

func (KeyOutput) ElementType

func (KeyOutput) ElementType() reflect.Type

func (KeyOutput) EnableKeyRotation added in v0.17.0

func (o KeyOutput) EnableKeyRotation() pulumi.BoolPtrOutput

Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.

 KMS supports automatic rotation only for symmetric encryption KMS keys (``KeySpec`` = ``SYMMETRIC_DEFAULT``). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with Origin ``EXTERNAL``, omit the ``EnableKeyRotation`` property or set it to ``false``.
To enable automatic key rotation of the key material for a multi-Region KMS key, set ``EnableKeyRotation`` to ``true`` on the primary key (created by using ``AWS::KMS::Key``). KMS copies the rotation status to all replica keys. For details, see [Rotating multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate) in the *Developer Guide*.
When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see [Rotating KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) in the *Developer Guide*.

func (KeyOutput) Enabled added in v0.17.0

func (o KeyOutput) Enabled() pulumi.BoolPtrOutput

Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.

When ``Enabled`` is ``true``, the *key state* of the KMS key is ``Enabled``. When ``Enabled`` is ``false``, the key state of the KMS key is ``Disabled``. The default value is ``true``.
The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the [EnableKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html), [DisableKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html), or [ScheduleKeyDeletion](https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html) operations.
For information about the key states of a KMS key, see [Key state: Effect on your KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the *Developer Guide*.

func (KeyOutput) KeyId added in v0.17.0

func (o KeyOutput) KeyId() pulumi.StringOutput

func (KeyOutput) KeyPolicy added in v0.17.0

func (o KeyOutput) KeyPolicy() pulumi.AnyOutput

The key policy to attach to the KMS key.

If you provide a key policy, it must meet the following criteria:
 +  The key policy must allow the caller to make a subsequent [PutKeyPolicy](https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html) request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) in the *Developer Guide*. (To omit this condition, set ``BypassPolicyLockoutSafetyCheck`` to true.)
 +  Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see [Changes that I make are not always immediately visible](https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) in the *User Guide*.

If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) in the *Developer Guide*.
A key policy document can include only the following characters:
 +  Printable ASCII characters
 +  Printable characters in the Basic Latin and Latin-1 Supplement character set
 +  The tab (``\u0009``), line feed (``\u000A``), and carriage return (``\u000D``) special characters

 *Minimum*: ``1``
 *Maximum*: ``32768``

Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::Key` for more information about the expected schema for this property.

func (KeyOutput) KeySpec added in v0.17.0

func (o KeyOutput) KeySpec() KeySpecPtrOutput

Specifies the type of KMS key to create. The default value, “SYMMETRIC_DEFAULT“, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions, “SYMMETRIC_DEFAULT“ creates a 128-bit symmetric key that uses SM4 encryption. You can't change the “KeySpec“ value after the KMS key is created. For help choosing a key spec for your KMS key, see [Choosing a KMS key type](https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html) in the *Developer Guide*.

The ``KeySpec`` property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see [condition keys](https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms) in the *Developer Guide*.
 If you change the value of the ``KeySpec`` property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
   [services that are integrated with](https://docs.aws.amazon.com/kms/features/#AWS_Service_Integration) use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see [Identifying asymmetric KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html) in the *Developer Guide*.
  KMS supports the following key specs for KMS keys:
 +  Symmetric encryption key (default)
 +   ``SYMMETRIC_DEFAULT`` (AES-256-GCM)

 +  HMAC keys (symmetric)
 +   ``HMAC_224``
 +   ``HMAC_256``
 +   ``HMAC_384``
 +   ``HMAC_512``

 +  Asymmetric RSA key pairs
 +   ``RSA_2048``
 +   ``RSA_3072``
 +   ``RSA_4096``

 +  Asymmetric NIST-recommended elliptic curve key pairs
 +   ``ECC_NIST_P256`` (secp256r1)
 +   ``ECC_NIST_P384`` (secp384r1)
 +   ``ECC_NIST_P521`` (secp521r1)

 +  Other asymmetric elliptic curve key pairs
 +   ``ECC_SECG_P256K1`` (secp256k1), commonly used for cryptocurrencies.

 +  SM2 key pairs (China Regions only)
 +   ``SM2``

func (KeyOutput) KeyUsage added in v0.17.0

func (o KeyOutput) KeyUsage() KeyUsagePtrOutput

Determines the [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. The default value is “ENCRYPT_DECRYPT“. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change the “KeyUsage“ value after the KMS key is created.

If you change the value of the ``KeyUsage`` property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
Select only one valid value.
+  For symmetric encryption KMS keys, omit the property or specify ``ENCRYPT_DECRYPT``.
+  For asymmetric KMS keys with RSA key material, specify ``ENCRYPT_DECRYPT`` or ``SIGN_VERIFY``.
+  For asymmetric KMS keys with ECC key material, specify ``SIGN_VERIFY``.
+  For asymmetric KMS keys with SM2 (China Regions only) key material, specify ``ENCRYPT_DECRYPT`` or ``SIGN_VERIFY``.
+  For HMAC KMS keys, specify ``GENERATE_VERIFY_MAC``.

func (KeyOutput) MultiRegion added in v0.17.0

func (o KeyOutput) MultiRegion() pulumi.BoolPtrOutput

Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the “MultiRegion“ value after the KMS key is created.

For a list of AWS-Regions in which multi-Region keys are supported, see [Multi-Region keys in](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the **.
 If you change the value of the ``MultiRegion`` property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
 For a multi-Region key, set to this property to ``true``. For a single-Region key, omit this property or set it to ``false``. The default value is ``false``.
 *Multi-Region keys* are an 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 [Multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the *Developer Guide*.
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.
To create a replica of this primary key in a different AWS-Region , create an [AWS::KMS::ReplicaKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-replicakey.html) resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key.

func (KeyOutput) Origin added in v0.70.0

func (o KeyOutput) Origin() KeyOriginPtrOutput

The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is “AWS_KMS“, which means that KMS creates the key material.

To [create a KMS key with no key material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html) (for imported key material), set this value to ``EXTERNAL``. For more information about importing key material into KMS, see [Importing Key Material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) in the *Developer Guide*.
You can ignore ``ENABLED`` when Origin is ``EXTERNAL``. When a KMS key with Origin ``EXTERNAL`` is created, the key state is ``PENDING_IMPORT`` and ``ENABLED`` is ``false``. After you import the key material, ``ENABLED`` updated to ``true``. The KMS key can then be used for Cryptographic Operations.
  CFN doesn't support creating an ``Origin`` parameter of the ``AWS_CLOUDHSM`` or ``EXTERNAL_KEY_STORE`` values.

func (KeyOutput) PendingWindowInDays added in v0.17.0

func (o KeyOutput) PendingWindowInDays() pulumi.IntPtrOutput

Specifies the number of days in the waiting period before 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.

When you remove a KMS key from a CloudFormation stack, KMS schedules the KMS key for deletion and starts the mandatory waiting period. The ``PendingWindowInDays`` property determines the length of waiting period. During the waiting period, the key state of KMS key is ``Pending Deletion`` or ``Pending Replica Deletion``, which prevents the KMS key from being used in cryptographic operations. When the waiting period expires, KMS permanently deletes the KMS key.
 KMS will not delete a [multi-Region primary key](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) that has replica keys. If you remove a multi-Region primary key from a CloudFormation stack, its key state changes to ``PendingReplicaDeletion`` 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 ``PendingDeletion`` and the waiting period specified by ``PendingWindowInDays`` begins. When this waiting period expires, KMS deletes the primary key. For details, see [Deleting multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html) in the *Developer Guide*.
You cannot use a CloudFormation template to cancel deletion of the KMS key after you remove it from the stack, regardless of the waiting period. If you specify a KMS key in your template, even one with the same name, CloudFormation creates a new KMS key. To cancel deletion of a KMS key, use the KMS console or the [CancelKeyDeletion](https://docs.aws.amazon.com/kms/latest/APIReference/API_CancelKeyDeletion.html) operation.
For information about the ``Pending Deletion`` and ``Pending Replica Deletion`` key states, see [Key state: Effect on your KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the *Developer Guide*. For more information about deleting KMS keys, see the [ScheduleKeyDeletion](https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html) operation in the *API Reference* and [Deleting KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) in the *Developer Guide*.

func (KeyOutput) RotationPeriodInDays added in v0.103.0

func (o KeyOutput) RotationPeriodInDays() pulumi.IntPtrOutput

func (KeyOutput) Tags added in v0.17.0

func (o KeyOutput) Tags() aws.TagArrayOutput

Assigns one or more tags to the replica key.

Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see [ABAC for](https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) in the *Developer Guide*.
For information about tags in KMS, see [Tagging keys](https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html) in the *Developer Guide*. For information about tags in CloudFormation, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

func (KeyOutput) ToKeyOutput

func (o KeyOutput) ToKeyOutput() KeyOutput

func (KeyOutput) ToKeyOutputWithContext

func (o KeyOutput) ToKeyOutputWithContext(ctx context.Context) KeyOutput

type KeySpec added in v0.2.0

type KeySpec string

Specifies the type of KMS key to create. The default value, “SYMMETRIC_DEFAULT“, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions, “SYMMETRIC_DEFAULT“ creates a 128-bit symmetric key that uses SM4 encryption. You can't change the “KeySpec“ value after the KMS key is created. For help choosing a key spec for your KMS key, see [Choosing a KMS key type](https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html) in the *Developer Guide*.

The ``KeySpec`` property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see [condition keys](https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms) in the *Developer Guide*.
 If you change the value of the ``KeySpec`` property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
   [services that are integrated with](https://docs.aws.amazon.com/kms/features/#AWS_Service_Integration) use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see [Identifying asymmetric KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html) in the *Developer Guide*.
  KMS supports the following key specs for KMS keys:
 +  Symmetric encryption key (default)
 +   ``SYMMETRIC_DEFAULT`` (AES-256-GCM)

 +  HMAC keys (symmetric)
 +   ``HMAC_224``
 +   ``HMAC_256``
 +   ``HMAC_384``
 +   ``HMAC_512``

 +  Asymmetric RSA key pairs
 +   ``RSA_2048``
 +   ``RSA_3072``
 +   ``RSA_4096``

 +  Asymmetric NIST-recommended elliptic curve key pairs
 +   ``ECC_NIST_P256`` (secp256r1)
 +   ``ECC_NIST_P384`` (secp384r1)
 +   ``ECC_NIST_P521`` (secp521r1)

 +  Other asymmetric elliptic curve key pairs
 +   ``ECC_SECG_P256K1`` (secp256k1), commonly used for cryptocurrencies.

 +  SM2 key pairs (China Regions only)
 +   ``SM2``

func (KeySpec) ElementType added in v0.2.0

func (KeySpec) ElementType() reflect.Type

func (KeySpec) ToKeySpecOutput added in v0.2.0

func (e KeySpec) ToKeySpecOutput() KeySpecOutput

func (KeySpec) ToKeySpecOutputWithContext added in v0.2.0

func (e KeySpec) ToKeySpecOutputWithContext(ctx context.Context) KeySpecOutput

func (KeySpec) ToKeySpecPtrOutput added in v0.2.0

func (e KeySpec) ToKeySpecPtrOutput() KeySpecPtrOutput

func (KeySpec) ToKeySpecPtrOutputWithContext added in v0.2.0

func (e KeySpec) ToKeySpecPtrOutputWithContext(ctx context.Context) KeySpecPtrOutput

func (KeySpec) ToStringOutput added in v0.2.0

func (e KeySpec) ToStringOutput() pulumi.StringOutput

func (KeySpec) ToStringOutputWithContext added in v0.2.0

func (e KeySpec) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput

func (KeySpec) ToStringPtrOutput added in v0.2.0

func (e KeySpec) ToStringPtrOutput() pulumi.StringPtrOutput

func (KeySpec) ToStringPtrOutputWithContext added in v0.2.0

func (e KeySpec) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type KeySpecInput added in v0.2.0

type KeySpecInput interface {
	pulumi.Input

	ToKeySpecOutput() KeySpecOutput
	ToKeySpecOutputWithContext(context.Context) KeySpecOutput
}

KeySpecInput is an input type that accepts values of the KeySpec enum A concrete instance of `KeySpecInput` can be one of the following:

KeySpecSymmetricDefault
KeySpecRsa2048
KeySpecRsa3072
KeySpecRsa4096
KeySpecEccNistP256
KeySpecEccNistP384
KeySpecEccNistP521
KeySpecEccSecgP256k1
KeySpecHmac224
KeySpecHmac256
KeySpecHmac384
KeySpecHmac512
KeySpecSm2

type KeySpecOutput added in v0.2.0

type KeySpecOutput struct{ *pulumi.OutputState }

func (KeySpecOutput) ElementType added in v0.2.0

func (KeySpecOutput) ElementType() reflect.Type

func (KeySpecOutput) ToKeySpecOutput added in v0.2.0

func (o KeySpecOutput) ToKeySpecOutput() KeySpecOutput

func (KeySpecOutput) ToKeySpecOutputWithContext added in v0.2.0

func (o KeySpecOutput) ToKeySpecOutputWithContext(ctx context.Context) KeySpecOutput

func (KeySpecOutput) ToKeySpecPtrOutput added in v0.2.0

func (o KeySpecOutput) ToKeySpecPtrOutput() KeySpecPtrOutput

func (KeySpecOutput) ToKeySpecPtrOutputWithContext added in v0.2.0

func (o KeySpecOutput) ToKeySpecPtrOutputWithContext(ctx context.Context) KeySpecPtrOutput

func (KeySpecOutput) ToStringOutput added in v0.2.0

func (o KeySpecOutput) ToStringOutput() pulumi.StringOutput

func (KeySpecOutput) ToStringOutputWithContext added in v0.2.0

func (o KeySpecOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput

func (KeySpecOutput) ToStringPtrOutput added in v0.2.0

func (o KeySpecOutput) ToStringPtrOutput() pulumi.StringPtrOutput

func (KeySpecOutput) ToStringPtrOutputWithContext added in v0.2.0

func (o KeySpecOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type KeySpecPtrInput added in v0.2.0

type KeySpecPtrInput interface {
	pulumi.Input

	ToKeySpecPtrOutput() KeySpecPtrOutput
	ToKeySpecPtrOutputWithContext(context.Context) KeySpecPtrOutput
}

func KeySpecPtr added in v0.2.0

func KeySpecPtr(v string) KeySpecPtrInput

type KeySpecPtrOutput added in v0.2.0

type KeySpecPtrOutput struct{ *pulumi.OutputState }

func (KeySpecPtrOutput) Elem added in v0.2.0

func (KeySpecPtrOutput) ElementType added in v0.2.0

func (KeySpecPtrOutput) ElementType() reflect.Type

func (KeySpecPtrOutput) ToKeySpecPtrOutput added in v0.2.0

func (o KeySpecPtrOutput) ToKeySpecPtrOutput() KeySpecPtrOutput

func (KeySpecPtrOutput) ToKeySpecPtrOutputWithContext added in v0.2.0

func (o KeySpecPtrOutput) ToKeySpecPtrOutputWithContext(ctx context.Context) KeySpecPtrOutput

func (KeySpecPtrOutput) ToStringPtrOutput added in v0.2.0

func (o KeySpecPtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput

func (KeySpecPtrOutput) ToStringPtrOutputWithContext added in v0.2.0

func (o KeySpecPtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type KeyState

type KeyState struct {
}

func (KeyState) ElementType

func (KeyState) ElementType() reflect.Type

type KeyTag

type KeyTag struct {
	Key   string `pulumi:"key"`
	Value string `pulumi:"value"`
}

A key-value pair. A tag consists of a tag key and a tag value. Tag keys and tag values are both required, but tag values can be empty (null) strings.

Do not include confidential or sensitive information in this field. This field may be displayed in plaintext in CloudTrail logs and other output.
For information about the rules that apply to tag keys and tag values, see [User-Defined Tag Restrictions](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html) in the *Billing and Cost Management User Guide*.

type KeyUsage added in v0.2.0

type KeyUsage string

Determines the [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. The default value is “ENCRYPT_DECRYPT“. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change the “KeyUsage“ value after the KMS key is created.

If you change the value of the ``KeyUsage`` property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
Select only one valid value.
+  For symmetric encryption KMS keys, omit the property or specify ``ENCRYPT_DECRYPT``.
+  For asymmetric KMS keys with RSA key material, specify ``ENCRYPT_DECRYPT`` or ``SIGN_VERIFY``.
+  For asymmetric KMS keys with ECC key material, specify ``SIGN_VERIFY``.
+  For asymmetric KMS keys with SM2 (China Regions only) key material, specify ``ENCRYPT_DECRYPT`` or ``SIGN_VERIFY``.
+  For HMAC KMS keys, specify ``GENERATE_VERIFY_MAC``.

func (KeyUsage) ElementType added in v0.2.0

func (KeyUsage) ElementType() reflect.Type

func (KeyUsage) ToKeyUsageOutput added in v0.2.0

func (e KeyUsage) ToKeyUsageOutput() KeyUsageOutput

func (KeyUsage) ToKeyUsageOutputWithContext added in v0.2.0

func (e KeyUsage) ToKeyUsageOutputWithContext(ctx context.Context) KeyUsageOutput

func (KeyUsage) ToKeyUsagePtrOutput added in v0.2.0

func (e KeyUsage) ToKeyUsagePtrOutput() KeyUsagePtrOutput

func (KeyUsage) ToKeyUsagePtrOutputWithContext added in v0.2.0

func (e KeyUsage) ToKeyUsagePtrOutputWithContext(ctx context.Context) KeyUsagePtrOutput

func (KeyUsage) ToStringOutput added in v0.2.0

func (e KeyUsage) ToStringOutput() pulumi.StringOutput

func (KeyUsage) ToStringOutputWithContext added in v0.2.0

func (e KeyUsage) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput

func (KeyUsage) ToStringPtrOutput added in v0.2.0

func (e KeyUsage) ToStringPtrOutput() pulumi.StringPtrOutput

func (KeyUsage) ToStringPtrOutputWithContext added in v0.2.0

func (e KeyUsage) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type KeyUsageInput added in v0.2.0

type KeyUsageInput interface {
	pulumi.Input

	ToKeyUsageOutput() KeyUsageOutput
	ToKeyUsageOutputWithContext(context.Context) KeyUsageOutput
}

KeyUsageInput is an input type that accepts values of the KeyUsage enum A concrete instance of `KeyUsageInput` can be one of the following:

KeyUsageEncryptDecrypt
KeyUsageSignVerify
KeyUsageGenerateVerifyMac

type KeyUsageOutput added in v0.2.0

type KeyUsageOutput struct{ *pulumi.OutputState }

func (KeyUsageOutput) ElementType added in v0.2.0

func (KeyUsageOutput) ElementType() reflect.Type

func (KeyUsageOutput) ToKeyUsageOutput added in v0.2.0

func (o KeyUsageOutput) ToKeyUsageOutput() KeyUsageOutput

func (KeyUsageOutput) ToKeyUsageOutputWithContext added in v0.2.0

func (o KeyUsageOutput) ToKeyUsageOutputWithContext(ctx context.Context) KeyUsageOutput

func (KeyUsageOutput) ToKeyUsagePtrOutput added in v0.2.0

func (o KeyUsageOutput) ToKeyUsagePtrOutput() KeyUsagePtrOutput

func (KeyUsageOutput) ToKeyUsagePtrOutputWithContext added in v0.2.0

func (o KeyUsageOutput) ToKeyUsagePtrOutputWithContext(ctx context.Context) KeyUsagePtrOutput

func (KeyUsageOutput) ToStringOutput added in v0.2.0

func (o KeyUsageOutput) ToStringOutput() pulumi.StringOutput

func (KeyUsageOutput) ToStringOutputWithContext added in v0.2.0

func (o KeyUsageOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput

func (KeyUsageOutput) ToStringPtrOutput added in v0.2.0

func (o KeyUsageOutput) ToStringPtrOutput() pulumi.StringPtrOutput

func (KeyUsageOutput) ToStringPtrOutputWithContext added in v0.2.0

func (o KeyUsageOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type KeyUsagePtrInput added in v0.2.0

type KeyUsagePtrInput interface {
	pulumi.Input

	ToKeyUsagePtrOutput() KeyUsagePtrOutput
	ToKeyUsagePtrOutputWithContext(context.Context) KeyUsagePtrOutput
}

func KeyUsagePtr added in v0.2.0

func KeyUsagePtr(v string) KeyUsagePtrInput

type KeyUsagePtrOutput added in v0.2.0

type KeyUsagePtrOutput struct{ *pulumi.OutputState }

func (KeyUsagePtrOutput) Elem added in v0.2.0

func (KeyUsagePtrOutput) ElementType added in v0.2.0

func (KeyUsagePtrOutput) ElementType() reflect.Type

func (KeyUsagePtrOutput) ToKeyUsagePtrOutput added in v0.2.0

func (o KeyUsagePtrOutput) ToKeyUsagePtrOutput() KeyUsagePtrOutput

func (KeyUsagePtrOutput) ToKeyUsagePtrOutputWithContext added in v0.2.0

func (o KeyUsagePtrOutput) ToKeyUsagePtrOutputWithContext(ctx context.Context) KeyUsagePtrOutput

func (KeyUsagePtrOutput) ToStringPtrOutput added in v0.2.0

func (o KeyUsagePtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput

func (KeyUsagePtrOutput) ToStringPtrOutputWithContext added in v0.2.0

func (o KeyUsagePtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type LookupAliasArgs added in v0.12.0

type LookupAliasArgs struct {
	// Specifies the alias name. This value must begin with “alias/“ followed by a name, such as “alias/ExampleAlias“.
	//   If you change the value of the “AliasName“ property, the existing alias is deleted and a new alias is created for the specified KMS key. This change can disrupt applications that use the alias. It can also allow or deny access to a KMS key affected by attribute-based access control (ABAC).
	//   The alias must be string of 1-256 characters. It can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). The alias name cannot begin with “alias/aws/“. The “alias/aws/“ prefix is reserved for [](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).
	AliasName string `pulumi:"aliasName"`
}

type LookupAliasOutputArgs added in v0.12.0

type LookupAliasOutputArgs struct {
	// Specifies the alias name. This value must begin with “alias/“ followed by a name, such as “alias/ExampleAlias“.
	//   If you change the value of the “AliasName“ property, the existing alias is deleted and a new alias is created for the specified KMS key. This change can disrupt applications that use the alias. It can also allow or deny access to a KMS key affected by attribute-based access control (ABAC).
	//   The alias must be string of 1-256 characters. It can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). The alias name cannot begin with “alias/aws/“. The “alias/aws/“ prefix is reserved for [](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).
	AliasName pulumi.StringInput `pulumi:"aliasName"`
}

func (LookupAliasOutputArgs) ElementType added in v0.12.0

func (LookupAliasOutputArgs) ElementType() reflect.Type

type LookupAliasResult added in v0.12.0

type LookupAliasResult struct {
	// Associates the alias with the specified [](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk). The KMS key must be in the same AWS-account and Region.
	//  A valid key ID is required. If you supply a null or empty string value, this operation returns an error.
	//  For help finding the key ID and ARN, see [Finding the key ID and ARN](https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn) in the *Developer Guide*.
	//  Specify the key ID or the key ARN of the KMS key.
	//  For example:
	//   +  Key ID: “1234abcd-12ab-34cd-56ef-1234567890ab“
	//   +  Key ARN: “arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab“
	//
	//  To get the key ID and key ARN for a KMS key, use [ListKeys](https://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeys.html) or [DescribeKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html).
	TargetKeyId *string `pulumi:"targetKeyId"`
}

func LookupAlias added in v0.12.0

func LookupAlias(ctx *pulumi.Context, args *LookupAliasArgs, opts ...pulumi.InvokeOption) (*LookupAliasResult, error)

The “AWS::KMS::Alias“ resource specifies a display name for a [KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys). You can use an alias to identify a KMS key in the KMS console, in the [DescribeKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html) operation, and in [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations), such as [Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) and [GenerateDataKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKey.html).

Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see [ABAC for](https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) in the *Developer Guide*.
Using an alias to refer to a KMS key can help you simplify key management. For example, an alias in your code can be associated with different KMS keys i

type LookupAliasResultOutput added in v0.12.0

type LookupAliasResultOutput struct{ *pulumi.OutputState }

func LookupAliasOutput added in v0.12.0

func LookupAliasOutput(ctx *pulumi.Context, args LookupAliasOutputArgs, opts ...pulumi.InvokeOption) LookupAliasResultOutput

func (LookupAliasResultOutput) ElementType added in v0.12.0

func (LookupAliasResultOutput) ElementType() reflect.Type

func (LookupAliasResultOutput) TargetKeyId added in v0.12.0

Associates the alias with the specified [](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk). The KMS key must be in the same AWS-account and Region.

A valid key ID is required. If you supply a null or empty string value, this operation returns an error.
For help finding the key ID and ARN, see [Finding the key ID and ARN](https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn) in the *Developer Guide*.
Specify the key ID or the key ARN of the KMS key.
For example:
 +  Key ID: ``1234abcd-12ab-34cd-56ef-1234567890ab``
 +  Key ARN: ``arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab``

To get the key ID and key ARN for a KMS key, use [ListKeys](https://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeys.html) or [DescribeKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html).

func (LookupAliasResultOutput) ToLookupAliasResultOutput added in v0.12.0

func (o LookupAliasResultOutput) ToLookupAliasResultOutput() LookupAliasResultOutput

func (LookupAliasResultOutput) ToLookupAliasResultOutputWithContext added in v0.12.0

func (o LookupAliasResultOutput) ToLookupAliasResultOutputWithContext(ctx context.Context) LookupAliasResultOutput

type LookupKeyArgs added in v0.12.0

type LookupKeyArgs struct {
	KeyId string `pulumi:"keyId"`
}

type LookupKeyOutputArgs added in v0.12.0

type LookupKeyOutputArgs struct {
	KeyId pulumi.StringInput `pulumi:"keyId"`
}

func (LookupKeyOutputArgs) ElementType added in v0.12.0

func (LookupKeyOutputArgs) ElementType() reflect.Type

type LookupKeyResult added in v0.12.0

type LookupKeyResult struct {
	Arn *string `pulumi:"arn"`
	// 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.
	Description *string `pulumi:"description"`
	// Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.
	//   KMS supports automatic rotation only for symmetric encryption KMS keys (“KeySpec“ = “SYMMETRIC_DEFAULT“). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with Origin “EXTERNAL“, omit the “EnableKeyRotation“ property or set it to “false“.
	//  To enable automatic key rotation of the key material for a multi-Region KMS key, set “EnableKeyRotation“ to “true“ on the primary key (created by using “AWS::KMS::Key“). KMS copies the rotation status to all replica keys. For details, see [Rotating multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate) in the *Developer Guide*.
	//  When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see [Rotating KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) in the *Developer Guide*.
	EnableKeyRotation *bool `pulumi:"enableKeyRotation"`
	// Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.
	//  When “Enabled“ is “true“, the *key state* of the KMS key is “Enabled“. When “Enabled“ is “false“, the key state of the KMS key is “Disabled“. The default value is “true“.
	//  The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the [EnableKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html), [DisableKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html), or [ScheduleKeyDeletion](https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html) operations.
	//  For information about the key states of a KMS key, see [Key state: Effect on your KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the *Developer Guide*.
	Enabled *bool   `pulumi:"enabled"`
	KeyId   *string `pulumi:"keyId"`
	// The key policy to attach to the KMS key.
	//  If you provide a key policy, it must meet the following criteria:
	//   +  The key policy must allow the caller to make a subsequent [PutKeyPolicy](https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html) request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) in the *Developer Guide*. (To omit this condition, set “BypassPolicyLockoutSafetyCheck“ to true.)
	//   +  Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see [Changes that I make are not always immediately visible](https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) in the *User Guide*.
	//
	//  If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) in the *Developer Guide*.
	//  A key policy document can include only the following characters:
	//   +  Printable ASCII characters
	//   +  Printable characters in the Basic Latin and Latin-1 Supplement character set
	//   +  The tab (“\u0009“), line feed (“\u000A“), and carriage return (“\u000D“) special characters
	//
	//   *Minimum*: “1“
	//   *Maximum*: “32768“
	//
	// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::Key` for more information about the expected schema for this property.
	KeyPolicy interface{} `pulumi:"keyPolicy"`
	// Specifies the type of KMS key to create. The default value, “SYMMETRIC_DEFAULT“, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions, “SYMMETRIC_DEFAULT“ creates a 128-bit symmetric key that uses SM4 encryption. You can't change the “KeySpec“ value after the KMS key is created. For help choosing a key spec for your KMS key, see [Choosing a KMS key type](https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html) in the *Developer Guide*.
	//  The “KeySpec“ property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see [condition keys](https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms) in the *Developer Guide*.
	//   If you change the value of the “KeySpec“ property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
	//     [services that are integrated with](https://docs.aws.amazon.com/kms/features/#AWS_Service_Integration) use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see [Identifying asymmetric KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html) in the *Developer Guide*.
	//    KMS supports the following key specs for KMS keys:
	//   +  Symmetric encryption key (default)
	//   +   “SYMMETRIC_DEFAULT“ (AES-256-GCM)
	//
	//   +  HMAC keys (symmetric)
	//   +   “HMAC_224“
	//   +   “HMAC_256“
	//   +   “HMAC_384“
	//   +   “HMAC_512“
	//
	//   +  Asymmetric RSA key pairs
	//   +   “RSA_2048“
	//   +   “RSA_3072“
	//   +   “RSA_4096“
	//
	//   +  Asymmetric NIST-recommended elliptic curve key pairs
	//   +   “ECC_NIST_P256“ (secp256r1)
	//   +   “ECC_NIST_P384“ (secp384r1)
	//   +   “ECC_NIST_P521“ (secp521r1)
	//
	//   +  Other asymmetric elliptic curve key pairs
	//   +   “ECC_SECG_P256K1“ (secp256k1), commonly used for cryptocurrencies.
	//
	//   +  SM2 key pairs (China Regions only)
	//   +   “SM2“
	KeySpec *KeySpec `pulumi:"keySpec"`
	// Determines the [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. The default value is “ENCRYPT_DECRYPT“. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change the “KeyUsage“ value after the KMS key is created.
	//   If you change the value of the “KeyUsage“ property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
	//   Select only one valid value.
	//   +  For symmetric encryption KMS keys, omit the property or specify “ENCRYPT_DECRYPT“.
	//   +  For asymmetric KMS keys with RSA key material, specify “ENCRYPT_DECRYPT“ or “SIGN_VERIFY“.
	//   +  For asymmetric KMS keys with ECC key material, specify “SIGN_VERIFY“.
	//   +  For asymmetric KMS keys with SM2 (China Regions only) key material, specify “ENCRYPT_DECRYPT“ or “SIGN_VERIFY“.
	//   +  For HMAC KMS keys, specify “GENERATE_VERIFY_MAC“.
	KeyUsage *KeyUsage `pulumi:"keyUsage"`
	// Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the “MultiRegion“ value after the KMS key is created.
	//  For a list of AWS-Regions in which multi-Region keys are supported, see [Multi-Region keys in](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the **.
	//   If you change the value of the “MultiRegion“ property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
	//   For a multi-Region key, set to this property to “true“. For a single-Region key, omit this property or set it to “false“. The default value is “false“.
	//   *Multi-Region keys* are an 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 [Multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the *Developer Guide*.
	//  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.
	//  To create a replica of this primary key in a different AWS-Region , create an [AWS::KMS::ReplicaKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-replicakey.html) resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key.
	MultiRegion *bool `pulumi:"multiRegion"`
	// The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is “AWS_KMS“, which means that KMS creates the key material.
	//  To [create a KMS key with no key material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html) (for imported key material), set this value to “EXTERNAL“. For more information about importing key material into KMS, see [Importing Key Material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) in the *Developer Guide*.
	//  You can ignore “ENABLED“ when Origin is “EXTERNAL“. When a KMS key with Origin “EXTERNAL“ is created, the key state is “PENDING_IMPORT“ and “ENABLED“ is “false“. After you import the key material, “ENABLED“ updated to “true“. The KMS key can then be used for Cryptographic Operations.
	//    CFN doesn't support creating an “Origin“ parameter of the “AWS_CLOUDHSM“ or “EXTERNAL_KEY_STORE“ values.
	Origin *KeyOrigin `pulumi:"origin"`
	// Assigns one or more tags to the replica key.
	//   Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see [ABAC for](https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) in the *Developer Guide*.
	//   For information about tags in KMS, see [Tagging keys](https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html) in the *Developer Guide*. For information about tags in CloudFormation, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
	Tags []aws.Tag `pulumi:"tags"`
}

func LookupKey added in v0.12.0

func LookupKey(ctx *pulumi.Context, args *LookupKeyArgs, opts ...pulumi.InvokeOption) (*LookupKeyResult, error)

The “AWS::KMS::Key“ resource specifies an [KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys) in KMSlong. 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 “AWS::KMS::Key“ to create [multi-Region primary keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-primary-key) of all supported types. To replicate a multi-Region key, use the “AWS::KMS::ReplicaKey“ resource.

 If you change the value of the ``KeySpec``, ``KeyUsage``, ``Origin``, or ``MultiRegion`` properties of an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing any of its immutable property values.
   KMS replaced the term *customer master key (CMK)* with ** and *KMS key*. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.
 You can use symmetric encryption KMS keys to encrypt and decrypt small amounts of data, but they are more commonly used to generate data keys and data key pairs. You can also use a symmetric encryption KMS key to encrypt data stored in AWS services that are [integrated with](https://docs.aws.amazon.com//kms/features/#AWS_Service_Integration). For more information, see [Symmetric encryption KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks) in the *Developer Guide*.
You can use asymmetric KMS keys to encrypt and decrypt data or sign messages and verify signatures. To create an asymmetric key, you must specify an asymmetric ``KeySpec`` value and a ``KeyUsage`` value. For details, see [Asymmetric keys in](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) in the *Developer Guide*.
You can use HMAC KMS keys (which are also symmetric keys) to generate and verify hash-based message authentication codes. To create an HMAC key, you must specify an HMAC ``KeySpec`` value and a ``KeyUsage`` value of ``GENERATE_VERIFY_MAC``. For details, see [HMAC keys in](https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html) in the *Developer Guide*.
You can also create symmetric encryption, asymmetric, and HMAC multi-Region primary keys. To create a multi-Region primary key, set the ``MultiRegion`` property to ``true``. For information about multi-Region keys, see [Multi-Region keys in](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the *Developer Guide*.
You cannot use the ``AWS::KMS::Key`` resource to specify a KMS key with [imported key material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) or a KMS key in a [custom key store](https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
 *Regions*
 KMS CloudFormation resources are available in all Regions in which KMS and CFN are supported. You can use the ``AWS::KMS::Key`` resource to create and manage all KMS key types that are supported in a Region.

type LookupKeyResultOutput added in v0.12.0

type LookupKeyResultOutput struct{ *pulumi.OutputState }

func LookupKeyOutput added in v0.12.0

func LookupKeyOutput(ctx *pulumi.Context, args LookupKeyOutputArgs, opts ...pulumi.InvokeOption) LookupKeyResultOutput

func (LookupKeyResultOutput) Arn added in v0.12.0

func (LookupKeyResultOutput) Description added in v0.12.0

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.

func (LookupKeyResultOutput) ElementType added in v0.12.0

func (LookupKeyResultOutput) ElementType() reflect.Type

func (LookupKeyResultOutput) EnableKeyRotation added in v0.12.0

func (o LookupKeyResultOutput) EnableKeyRotation() pulumi.BoolPtrOutput

Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.

 KMS supports automatic rotation only for symmetric encryption KMS keys (``KeySpec`` = ``SYMMETRIC_DEFAULT``). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with Origin ``EXTERNAL``, omit the ``EnableKeyRotation`` property or set it to ``false``.
To enable automatic key rotation of the key material for a multi-Region KMS key, set ``EnableKeyRotation`` to ``true`` on the primary key (created by using ``AWS::KMS::Key``). KMS copies the rotation status to all replica keys. For details, see [Rotating multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate) in the *Developer Guide*.
When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see [Rotating KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) in the *Developer Guide*.

func (LookupKeyResultOutput) Enabled added in v0.12.0

Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.

When ``Enabled`` is ``true``, the *key state* of the KMS key is ``Enabled``. When ``Enabled`` is ``false``, the key state of the KMS key is ``Disabled``. The default value is ``true``.
The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the [EnableKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html), [DisableKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html), or [ScheduleKeyDeletion](https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html) operations.
For information about the key states of a KMS key, see [Key state: Effect on your KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the *Developer Guide*.

func (LookupKeyResultOutput) KeyId added in v0.12.0

func (LookupKeyResultOutput) KeyPolicy added in v0.12.0

func (o LookupKeyResultOutput) KeyPolicy() pulumi.AnyOutput

The key policy to attach to the KMS key.

If you provide a key policy, it must meet the following criteria:
 +  The key policy must allow the caller to make a subsequent [PutKeyPolicy](https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html) request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) in the *Developer Guide*. (To omit this condition, set ``BypassPolicyLockoutSafetyCheck`` to true.)
 +  Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see [Changes that I make are not always immediately visible](https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) in the *User Guide*.

If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For more information, see [Default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) in the *Developer Guide*.
A key policy document can include only the following characters:
 +  Printable ASCII characters
 +  Printable characters in the Basic Latin and Latin-1 Supplement character set
 +  The tab (``\u0009``), line feed (``\u000A``), and carriage return (``\u000D``) special characters

 *Minimum*: ``1``
 *Maximum*: ``32768``

Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::Key` for more information about the expected schema for this property.

func (LookupKeyResultOutput) KeySpec added in v0.12.0

Specifies the type of KMS key to create. The default value, “SYMMETRIC_DEFAULT“, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions, “SYMMETRIC_DEFAULT“ creates a 128-bit symmetric key that uses SM4 encryption. You can't change the “KeySpec“ value after the KMS key is created. For help choosing a key spec for your KMS key, see [Choosing a KMS key type](https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html) in the *Developer Guide*.

The ``KeySpec`` property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see [condition keys](https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms) in the *Developer Guide*.
 If you change the value of the ``KeySpec`` property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
   [services that are integrated with](https://docs.aws.amazon.com/kms/features/#AWS_Service_Integration) use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see [Identifying asymmetric KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html) in the *Developer Guide*.
  KMS supports the following key specs for KMS keys:
 +  Symmetric encryption key (default)
 +   ``SYMMETRIC_DEFAULT`` (AES-256-GCM)

 +  HMAC keys (symmetric)
 +   ``HMAC_224``
 +   ``HMAC_256``
 +   ``HMAC_384``
 +   ``HMAC_512``

 +  Asymmetric RSA key pairs
 +   ``RSA_2048``
 +   ``RSA_3072``
 +   ``RSA_4096``

 +  Asymmetric NIST-recommended elliptic curve key pairs
 +   ``ECC_NIST_P256`` (secp256r1)
 +   ``ECC_NIST_P384`` (secp384r1)
 +   ``ECC_NIST_P521`` (secp521r1)

 +  Other asymmetric elliptic curve key pairs
 +   ``ECC_SECG_P256K1`` (secp256k1), commonly used for cryptocurrencies.

 +  SM2 key pairs (China Regions only)
 +   ``SM2``

func (LookupKeyResultOutput) KeyUsage added in v0.12.0

Determines the [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. The default value is “ENCRYPT_DECRYPT“. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change the “KeyUsage“ value after the KMS key is created.

If you change the value of the ``KeyUsage`` property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
Select only one valid value.
+  For symmetric encryption KMS keys, omit the property or specify ``ENCRYPT_DECRYPT``.
+  For asymmetric KMS keys with RSA key material, specify ``ENCRYPT_DECRYPT`` or ``SIGN_VERIFY``.
+  For asymmetric KMS keys with ECC key material, specify ``SIGN_VERIFY``.
+  For asymmetric KMS keys with SM2 (China Regions only) key material, specify ``ENCRYPT_DECRYPT`` or ``SIGN_VERIFY``.
+  For HMAC KMS keys, specify ``GENERATE_VERIFY_MAC``.

func (LookupKeyResultOutput) MultiRegion added in v0.12.0

func (o LookupKeyResultOutput) MultiRegion() pulumi.BoolPtrOutput

Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the “MultiRegion“ value after the KMS key is created.

For a list of AWS-Regions in which multi-Region keys are supported, see [Multi-Region keys in](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the **.
 If you change the value of the ``MultiRegion`` property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
 For a multi-Region key, set to this property to ``true``. For a single-Region key, omit this property or set it to ``false``. The default value is ``false``.
 *Multi-Region keys* are an 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 [Multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the *Developer Guide*.
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.
To create a replica of this primary key in a different AWS-Region , create an [AWS::KMS::ReplicaKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-replicakey.html) resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key.

func (LookupKeyResultOutput) Origin added in v0.70.0

The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is “AWS_KMS“, which means that KMS creates the key material.

To [create a KMS key with no key material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html) (for imported key material), set this value to ``EXTERNAL``. For more information about importing key material into KMS, see [Importing Key Material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) in the *Developer Guide*.
You can ignore ``ENABLED`` when Origin is ``EXTERNAL``. When a KMS key with Origin ``EXTERNAL`` is created, the key state is ``PENDING_IMPORT`` and ``ENABLED`` is ``false``. After you import the key material, ``ENABLED`` updated to ``true``. The KMS key can then be used for Cryptographic Operations.
  CFN doesn't support creating an ``Origin`` parameter of the ``AWS_CLOUDHSM`` or ``EXTERNAL_KEY_STORE`` values.

func (LookupKeyResultOutput) Tags added in v0.12.0

Assigns one or more tags to the replica key.

Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see [ABAC for](https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) in the *Developer Guide*.
For information about tags in KMS, see [Tagging keys](https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html) in the *Developer Guide*. For information about tags in CloudFormation, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

func (LookupKeyResultOutput) ToLookupKeyResultOutput added in v0.12.0

func (o LookupKeyResultOutput) ToLookupKeyResultOutput() LookupKeyResultOutput

func (LookupKeyResultOutput) ToLookupKeyResultOutputWithContext added in v0.12.0

func (o LookupKeyResultOutput) ToLookupKeyResultOutputWithContext(ctx context.Context) LookupKeyResultOutput

type LookupReplicaKeyArgs added in v0.12.0

type LookupReplicaKeyArgs struct {
	KeyId string `pulumi:"keyId"`
}

type LookupReplicaKeyOutputArgs added in v0.12.0

type LookupReplicaKeyOutputArgs struct {
	KeyId pulumi.StringInput `pulumi:"keyId"`
}

func (LookupReplicaKeyOutputArgs) ElementType added in v0.12.0

func (LookupReplicaKeyOutputArgs) ElementType() reflect.Type

type LookupReplicaKeyResult added in v0.12.0

type LookupReplicaKeyResult struct {
	Arn *string `pulumi:"arn"`
	// A description of the AWS KMS key. Use a description that helps you to distinguish this AWS KMS key from others in the account, such as its intended use.
	Description *string `pulumi:"description"`
	// Specifies whether the AWS KMS key is enabled. Disabled AWS KMS keys cannot be used in cryptographic operations.
	Enabled *bool   `pulumi:"enabled"`
	KeyId   *string `pulumi:"keyId"`
	// The key policy that authorizes use of the AWS KMS key. The key policy must observe the following rules.
	//
	// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::ReplicaKey` for more information about the expected schema for this property.
	KeyPolicy interface{} `pulumi:"keyPolicy"`
	// An array of key-value pairs to apply to this resource.
	Tags []aws.Tag `pulumi:"tags"`
}

func LookupReplicaKey added in v0.12.0

func LookupReplicaKey(ctx *pulumi.Context, args *LookupReplicaKeyArgs, opts ...pulumi.InvokeOption) (*LookupReplicaKeyResult, error)

The AWS::KMS::ReplicaKey resource specifies a multi-region replica AWS KMS key in AWS Key Management Service (AWS KMS).

type LookupReplicaKeyResultOutput added in v0.12.0

type LookupReplicaKeyResultOutput struct{ *pulumi.OutputState }

func LookupReplicaKeyOutput added in v0.12.0

func (LookupReplicaKeyResultOutput) Arn added in v0.12.0

func (LookupReplicaKeyResultOutput) Description added in v0.12.0

A description of the AWS KMS key. Use a description that helps you to distinguish this AWS KMS key from others in the account, such as its intended use.

func (LookupReplicaKeyResultOutput) ElementType added in v0.12.0

func (LookupReplicaKeyResultOutput) Enabled added in v0.12.0

Specifies whether the AWS KMS key is enabled. Disabled AWS KMS keys cannot be used in cryptographic operations.

func (LookupReplicaKeyResultOutput) KeyId added in v0.12.0

func (LookupReplicaKeyResultOutput) KeyPolicy added in v0.12.0

The key policy that authorizes use of the AWS KMS key. The key policy must observe the following rules.

Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::ReplicaKey` for more information about the expected schema for this property.

func (LookupReplicaKeyResultOutput) Tags added in v0.12.0

An array of key-value pairs to apply to this resource.

func (LookupReplicaKeyResultOutput) ToLookupReplicaKeyResultOutput added in v0.12.0

func (o LookupReplicaKeyResultOutput) ToLookupReplicaKeyResultOutput() LookupReplicaKeyResultOutput

func (LookupReplicaKeyResultOutput) ToLookupReplicaKeyResultOutputWithContext added in v0.12.0

func (o LookupReplicaKeyResultOutput) ToLookupReplicaKeyResultOutputWithContext(ctx context.Context) LookupReplicaKeyResultOutput

type ReplicaKey

type ReplicaKey struct {
	pulumi.CustomResourceState

	Arn pulumi.StringOutput `pulumi:"arn"`
	// A description of the AWS KMS key. Use a description that helps you to distinguish this AWS KMS key from others in the account, such as its intended use.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Specifies whether the AWS KMS key is enabled. Disabled AWS KMS keys cannot be used in cryptographic operations.
	Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
	KeyId   pulumi.StringOutput  `pulumi:"keyId"`
	// The key policy that authorizes use of the AWS KMS key. The key policy must observe the following rules.
	//
	// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::ReplicaKey` for more information about the expected schema for this property.
	KeyPolicy pulumi.AnyOutput `pulumi:"keyPolicy"`
	// Specifies the number of days in the waiting period before AWS KMS deletes an AWS KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.
	PendingWindowInDays pulumi.IntPtrOutput `pulumi:"pendingWindowInDays"`
	// Identifies the primary AWS KMS key to create a replica of. Specify the Amazon Resource Name (ARN) of the AWS KMS key. You cannot specify an alias or key ID. For help finding the ARN, see Finding the Key ID and ARN in the AWS Key Management Service Developer Guide.
	PrimaryKeyArn pulumi.StringOutput `pulumi:"primaryKeyArn"`
	// An array of key-value pairs to apply to this resource.
	Tags aws.TagArrayOutput `pulumi:"tags"`
}

The AWS::KMS::ReplicaKey resource specifies a multi-region replica AWS KMS key in AWS Key Management Service (AWS KMS).

func GetReplicaKey

func GetReplicaKey(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ReplicaKeyState, opts ...pulumi.ResourceOption) (*ReplicaKey, error)

GetReplicaKey gets an existing ReplicaKey resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewReplicaKey

func NewReplicaKey(ctx *pulumi.Context,
	name string, args *ReplicaKeyArgs, opts ...pulumi.ResourceOption) (*ReplicaKey, error)

NewReplicaKey registers a new resource with the given unique name, arguments, and options.

func (*ReplicaKey) ElementType

func (*ReplicaKey) ElementType() reflect.Type

func (*ReplicaKey) ToReplicaKeyOutput

func (i *ReplicaKey) ToReplicaKeyOutput() ReplicaKeyOutput

func (*ReplicaKey) ToReplicaKeyOutputWithContext

func (i *ReplicaKey) ToReplicaKeyOutputWithContext(ctx context.Context) ReplicaKeyOutput

type ReplicaKeyArgs

type ReplicaKeyArgs struct {
	// A description of the AWS KMS key. Use a description that helps you to distinguish this AWS KMS key from others in the account, such as its intended use.
	Description pulumi.StringPtrInput
	// Specifies whether the AWS KMS key is enabled. Disabled AWS KMS keys cannot be used in cryptographic operations.
	Enabled pulumi.BoolPtrInput
	// The key policy that authorizes use of the AWS KMS key. The key policy must observe the following rules.
	//
	// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::ReplicaKey` for more information about the expected schema for this property.
	KeyPolicy pulumi.Input
	// Specifies the number of days in the waiting period before AWS KMS deletes an AWS KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.
	PendingWindowInDays pulumi.IntPtrInput
	// Identifies the primary AWS KMS key to create a replica of. Specify the Amazon Resource Name (ARN) of the AWS KMS key. You cannot specify an alias or key ID. For help finding the ARN, see Finding the Key ID and ARN in the AWS Key Management Service Developer Guide.
	PrimaryKeyArn pulumi.StringInput
	// An array of key-value pairs to apply to this resource.
	Tags aws.TagArrayInput
}

The set of arguments for constructing a ReplicaKey resource.

func (ReplicaKeyArgs) ElementType

func (ReplicaKeyArgs) ElementType() reflect.Type

type ReplicaKeyInput

type ReplicaKeyInput interface {
	pulumi.Input

	ToReplicaKeyOutput() ReplicaKeyOutput
	ToReplicaKeyOutputWithContext(ctx context.Context) ReplicaKeyOutput
}

type ReplicaKeyOutput

type ReplicaKeyOutput struct{ *pulumi.OutputState }

func (ReplicaKeyOutput) Arn added in v0.17.0

func (ReplicaKeyOutput) Description added in v0.17.0

func (o ReplicaKeyOutput) Description() pulumi.StringPtrOutput

A description of the AWS KMS key. Use a description that helps you to distinguish this AWS KMS key from others in the account, such as its intended use.

func (ReplicaKeyOutput) ElementType

func (ReplicaKeyOutput) ElementType() reflect.Type

func (ReplicaKeyOutput) Enabled added in v0.17.0

Specifies whether the AWS KMS key is enabled. Disabled AWS KMS keys cannot be used in cryptographic operations.

func (ReplicaKeyOutput) KeyId added in v0.17.0

func (ReplicaKeyOutput) KeyPolicy added in v0.17.0

func (o ReplicaKeyOutput) KeyPolicy() pulumi.AnyOutput

The key policy that authorizes use of the AWS KMS key. The key policy must observe the following rules.

Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::ReplicaKey` for more information about the expected schema for this property.

func (ReplicaKeyOutput) PendingWindowInDays added in v0.17.0

func (o ReplicaKeyOutput) PendingWindowInDays() pulumi.IntPtrOutput

Specifies the number of days in the waiting period before AWS KMS deletes an AWS KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.

func (ReplicaKeyOutput) PrimaryKeyArn added in v0.17.0

func (o ReplicaKeyOutput) PrimaryKeyArn() pulumi.StringOutput

Identifies the primary AWS KMS key to create a replica of. Specify the Amazon Resource Name (ARN) of the AWS KMS key. You cannot specify an alias or key ID. For help finding the ARN, see Finding the Key ID and ARN in the AWS Key Management Service Developer Guide.

func (ReplicaKeyOutput) Tags added in v0.17.0

An array of key-value pairs to apply to this resource.

func (ReplicaKeyOutput) ToReplicaKeyOutput

func (o ReplicaKeyOutput) ToReplicaKeyOutput() ReplicaKeyOutput

func (ReplicaKeyOutput) ToReplicaKeyOutputWithContext

func (o ReplicaKeyOutput) ToReplicaKeyOutputWithContext(ctx context.Context) ReplicaKeyOutput

type ReplicaKeyState

type ReplicaKeyState struct {
}

func (ReplicaKeyState) ElementType

func (ReplicaKeyState) ElementType() reflect.Type

type ReplicaKeyTag

type ReplicaKeyTag struct {
	// The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
	Key string `pulumi:"key"`
	// The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
	Value string `pulumi:"value"`
}

A key-value pair to associate with a resource.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL