import * as core from "@terrascript/core"; export interface KeyArgs extends core.ResourceArgs { /** * (Optional) A flag to indicate whether to bypass the key policy lockout safety check. */ bypassPolicyLockoutSafetyCheck?: boolean | core.BooleanOut; /** * (Optional) Specifies whether the key contains a symmetric key or an asymmetric key pair and the encr * yption algorithms or signing algorithms that the key supports. */ customerMasterKeySpec?: string | core.StringOut; /** * (Optional) The waiting period, specified in number of days. After the waiting period ends, AWS KMS d * eletes the KMS key. */ deletionWindowInDays?: number | core.NumberOut; /** * (Optional) The description of the key as viewed in AWS console. */ description?: string | core.StringOut; /** * (Optional) Specifies whether [key rotation](http://docs.aws.amazon.com/kms/latest/developerguide/rot * ate-keys.html) is enabled. Defaults to false. */ enableKeyRotation?: boolean | core.BooleanOut; /** * (Optional) Specifies whether the key is enabled. Defaults to `true`. */ isEnabled?: boolean | core.BooleanOut; /** * (Optional) Specifies the intended use of the key. Valid values: `ENCRYPT_DECRYPT` or `SIGN_VERIFY`. */ keyUsage?: string | core.StringOut; /** * (Optional) Indicates whether the KMS key is a multi-Region (`true`) or regional (`false`) key. Defau * lts to `false`. */ multiRegion?: boolean | core.BooleanOut; /** * (Optional) A valid policy JSON document. Although this is a key policy, not an IAM policy, an [`aws_ * iam_policy_document`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources * /iam_policy_document), in the form that designates a principal, can be used. For more information ab * out building policy documents with Terraform, see the [AWS IAM Policy Document Guide](https://learn. * hashicorp.com/terraform/aws/iam-policy). */ policy?: string | core.StringOut; /** * (Optional) A map of tags to assign to the object. If configured with a provider [`default_tags` conf * iguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-conf * iguration-block) present, tags with matching keys will overwrite those defined at the provider-level * . */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; } export class Key extends core.Resource { /** * The Amazon Resource Name (ARN) of the key. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) A flag to indicate whether to bypass the key policy lockout safety check. */ @core.attr(Boolean) public bypassPolicyLockoutSafetyCheck?: boolean | core.BooleanOut; /** * (Optional) Specifies whether the key contains a symmetric key or an asymmetric key pair and the encr * yption algorithms or signing algorithms that the key supports. */ @core.attr(String) public customerMasterKeySpec?: string | core.StringOut; /** * (Optional) The waiting period, specified in number of days. After the waiting period ends, AWS KMS d * eletes the KMS key. */ @core.attr(Number) public deletionWindowInDays?: number | core.NumberOut; /** * (Optional) The description of the key as viewed in AWS console. */ @core.attr(String, { computed: true }) public description?: string | core.StringOut; /** * (Optional) Specifies whether [key rotation](http://docs.aws.amazon.com/kms/latest/developerguide/rot * ate-keys.html) is enabled. Defaults to false. */ @core.attr(Boolean) public enableKeyRotation?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Specifies whether the key is enabled. Defaults to `true`. */ @core.attr(Boolean) public isEnabled?: boolean | core.BooleanOut; /** * The globally unique identifier for the key. */ @core.attr(String, { computed: true }) public keyId!: string | core.StringOut; /** * (Optional) Specifies the intended use of the key. Valid values: `ENCRYPT_DECRYPT` or `SIGN_VERIFY`. */ @core.attr(String) public keyUsage?: string | core.StringOut; /** * (Optional) Indicates whether the KMS key is a multi-Region (`true`) or regional (`false`) key. Defau * lts to `false`. */ @core.attr(Boolean, { computed: true }) public multiRegion?: boolean | core.BooleanOut; /** * (Optional) A valid policy JSON document. Although this is a key policy, not an IAM policy, an [`aws_ * iam_policy_document`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources * /iam_policy_document), in the form that designates a principal, can be used. For more information ab * out building policy documents with Terraform, see the [AWS IAM Policy Document Guide](https://learn. * hashicorp.com/terraform/aws/iam-policy). */ @core.attr(String, { computed: true }) public policy?: string | core.StringOut; /** * (Optional) A map of tags to assign to the object. If configured with a provider [`default_tags` conf * iguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-conf * iguration-block) present, tags with matching keys will overwrite those defined at the provider-level * . */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; constructor(name: string, args?: KeyArgs) { super(name, "aws_kms_key", args); } public override getNamespace(): string { return "aws_kms"; } }