Class Key
Provides a KMS customer master key.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var key = new Aws.Kms.Key("key", new Aws.Kms.KeyArgs
{
DeletionWindowInDays = 10,
Description = "KMS key 1",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Kms
Assembly: Pulumi.Aws.dll
Syntax
public class Key : CustomResource
Constructors
View SourceKey(String, KeyArgs, CustomResourceOptions)
Create a Key resource with the given unique name, arguments, and options.
Declaration
public Key(string name, KeyArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| KeyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
The Amazon Resource Name (ARN) of the key.
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CustomerMasterKeySpec
Specifies whether the key contains a symmetric key or an asymmetric key pair and the encryption algorithms or signing algorithms that the key supports.
Valid values: SYMMETRIC_DEFAULT, RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, or ECC_SECG_P256K1. Defaults to SYMMETRIC_DEFAULT. For help with choosing a key spec, see the AWS KMS Developer Guide.
Declaration
public Output<string> CustomerMasterKeySpec { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DeletionWindowInDays
Duration in days after which the key is deleted after destruction of the resource, must be between 7 and 30 days. Defaults to 30 days.
Declaration
public Output<int?> DeletionWindowInDays { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Description
The description of the key as viewed in AWS console.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EnableKeyRotation
Specifies whether key rotation is enabled. Defaults to false.
Declaration
public Output<bool?> EnableKeyRotation { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
IsEnabled
Specifies whether the key is enabled. Defaults to true.
Declaration
public Output<bool?> IsEnabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
KeyId
The globally unique identifier for the key.
Declaration
public Output<string> KeyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
KeyUsage
Specifies the intended use of the key. Valid values: ENCRYPT_DECRYPT or SIGN_VERIFY.
Defaults to ENCRYPT_DECRYPT.
Declaration
public Output<string> KeyUsage { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Policy
A valid policy JSON document.
Declaration
public Output<string> Policy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A map of tags to assign to the object.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Methods
View SourceGet(String, Input<String>, KeyState, CustomResourceOptions)
Get an existing Key resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Key Get(string name, Input<string> id, KeyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| KeyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Key |