Package com.pulumi.aws.kms
Class ReplicaExternalKey
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.kms.ReplicaExternalKey
-
public class ReplicaExternalKey extends com.pulumi.resources.CustomResourceManages a KMS multi-Region replica key that uses external key material. See the [AWS KMS Developer Guide](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-import.html) for more information on importing key material into multi-Region keys. ## Example Usage
## Import Using `pulumi import`, import KMS multi-Region replica keys using the `id`. For example: ```sh $ pulumi import aws:kms/replicaExternalKey:ReplicaExternalKey example 1234abcd-12ab-34cd-56ef-1234567890ab ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.kms.ExternalKey; import com.pulumi.aws.kms.ExternalKeyArgs; import com.pulumi.aws.kms.ReplicaExternalKey; import com.pulumi.aws.kms.ReplicaExternalKeyArgs; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var primary = new ExternalKey("primary", ExternalKeyArgs.builder() .description("Multi-Region primary key") .deletionWindowInDays(30) .multiRegion(true) .enabled(true) .keyMaterialBase64("...") .build()); var replica = new ReplicaExternalKey("replica", ReplicaExternalKeyArgs.builder() .description("Multi-Region replica key") .deletionWindowInDays(7) .primaryKeyArn(primary.arn()) .keyMaterialBase64("...") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description ReplicaExternalKey(java.lang.String name)ReplicaExternalKey(java.lang.String name, ReplicaExternalKeyArgs args)ReplicaExternalKey(java.lang.String name, ReplicaExternalKeyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>bypassPolicyLockoutSafetyCheck()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>deletionWindowInDays()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()com.pulumi.core.Output<java.lang.Boolean>enabled()com.pulumi.core.Output<java.lang.String>expirationModel()static ReplicaExternalKeyget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ReplicaExternalKeyState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>keyId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>keyMaterialBase64()com.pulumi.core.Output<java.lang.String>keyState()com.pulumi.core.Output<java.lang.String>keyUsage()com.pulumi.core.Output<java.lang.String>policy()com.pulumi.core.Output<java.lang.String>primaryKeyArn()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.util.Optional<java.lang.String>>validTo()
-
-
-
Constructor Detail
-
ReplicaExternalKey
public ReplicaExternalKey(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
ReplicaExternalKey
public ReplicaExternalKey(java.lang.String name, ReplicaExternalKeyArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
ReplicaExternalKey
public ReplicaExternalKey(java.lang.String name, ReplicaExternalKeyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
-
bypassPolicyLockoutSafetyCheck
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> bypassPolicyLockoutSafetyCheck()
- Returns:
- Whether to bypass the key policy lockout safety check. 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, refer to the scenario in the [Default Key Policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) section in the _AWS KMS Developer Guide_. The default value is `false`.
-
deletionWindowInDays
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> deletionWindowInDays()
- Returns:
- Waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between `7` and `30`, inclusive. If you do not specify a value, it defaults to `30`.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- Description of the KMS key.
-
enabled
public com.pulumi.core.Output<java.lang.Boolean> enabled()
- Returns:
- Whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be `false`. Imported keys default to `true` unless expired.
-
expirationModel
public com.pulumi.core.Output<java.lang.String> expirationModel()
- Returns:
- Whether the key material expires. Empty when pending key material import, otherwise `KEY_MATERIAL_EXPIRES` or `KEY_MATERIAL_DOES_NOT_EXPIRE`.
-
keyId
public com.pulumi.core.Output<java.lang.String> keyId()
- Returns:
- Key ID of the replica key. Related multi-Region keys have the same key ID.
-
keyMaterialBase64
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> keyMaterialBase64()
- Returns:
- Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be [reimported](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material), but you cannot import different key material.
-
keyState
public com.pulumi.core.Output<java.lang.String> keyState()
- Returns:
- State of the replica key.
-
keyUsage
public com.pulumi.core.Output<java.lang.String> keyUsage()
- Returns:
- [Cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. This is a shared property of multi-Region keys.
-
policy
public com.pulumi.core.Output<java.lang.String> policy()
- Returns:
- Key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the [default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) to the KMS key.
-
primaryKeyArn
public com.pulumi.core.Output<java.lang.String> primaryKeyArn()
- Returns:
- ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Map of tags to assign to the replica key. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
validTo
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> validTo()
- Returns:
- Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`)
-
get
public static ReplicaExternalKey get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ReplicaExternalKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-