Show / Hide Table of Contents

Class Key

A kms key can help user to protect data security in the transmission process. For information about Alikms Key and how to use it, see What is Resource Alikms Key.

NOTE: Available in v1.85.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var key = new AliCloud.Kms.Key("key", new AliCloud.Kms.KeyArgs
    {
        Description = "Hello KMS",
        KeyState = "Enabled",
        PendingWindowInDays = "7",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Key
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.Kms
Assembly: Pulumi.AliCloud.dll
Syntax
public class Key : CustomResource

Constructors

View Source

Key(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 Source

Arn

The Alicloud Resource Name (ARN) of the key.

  • creation_date -The date and time when the CMK was created. The time is displayed in UTC.
  • creator -The creator of the CMK.
  • delete_date -The scheduled date to delete CMK. The time is displayed in UTC. This value is returned only when the KeyState value is PendingDeletion.
Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

AutomaticRotation

Specifies whether to enable automatic key rotation. Default:"Disabled".

Declaration
public Output<string> AutomaticRotation { get; }
Property Value
Type Description
Output<System.String>
View Source

CreationDate

Declaration
public Output<string> CreationDate { get; }
Property Value
Type Description
Output<System.String>
View Source

Creator

Declaration
public Output<string> Creator { get; }
Property Value
Type Description
Output<System.String>
View Source

DeleteDate

Declaration
public Output<string> DeleteDate { get; }
Property Value
Type Description
Output<System.String>
View Source

DeletionWindowInDays

Field 'deletion_window_in_days' has been deprecated from provider version 1.85.0. New field 'pending_window_in_days' instead.

Declaration
public Output<int?> DeletionWindowInDays { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Description

The description of the key as viewed in Alicloud console.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

IsEnabled

Field 'is_enabled' has been deprecated from provider version 1.85.0. New field 'key_state' instead.

Declaration
public Output<bool?> IsEnabled { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

KeySpec

The type of the CMK.

Declaration
public Output<string> KeySpec { get; }
Property Value
Type Description
Output<System.String>
View Source

KeyStatus

The status of CMK. Defaults to Enabled.

Declaration
public Output<string> KeyStatus { get; }
Property Value
Type Description
Output<System.String>
View Source

KeyUsage

Specifies the usage of CMK. Currently, default to 'ENCRYPT/DECRYPT', indicating that CMK is used for encryption and decryption.

Declaration
public Output<string> KeyUsage { get; }
Property Value
Type Description
Output<System.String>
View Source

LastRotationDate

The date and time the last rotation was performed. The time is displayed in UTC.

Declaration
public Output<string> LastRotationDate { get; }
Property Value
Type Description
Output<System.String>
View Source

MaterialExpireTime

The time and date the key material for the CMK expires. The time is displayed in UTC. If the value is empty, the key material for the CMK does not expire.

Declaration
public Output<string> MaterialExpireTime { get; }
Property Value
Type Description
Output<System.String>
View Source

NextRotationDate

The time the next rotation is scheduled for execution.

Declaration
public Output<string> NextRotationDate { get; }
Property Value
Type Description
Output<System.String>
View Source

Origin

The source of the key material for the CMK. Defaults to "Aliyun_KMS".

Declaration
public Output<string> Origin { get; }
Property Value
Type Description
Output<System.String>
View Source

PendingWindowInDays

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?> PendingWindowInDays { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

PrimaryKeyVersion

The ID of the current primary key version of the symmetric CMK.

Declaration
public Output<string> PrimaryKeyVersion { get; }
Property Value
Type Description
Output<System.String>
View Source

ProtectionLevel

The protection level of the CMK. Defaults to "SOFTWARE".

Declaration
public Output<string> ProtectionLevel { get; }
Property Value
Type Description
Output<System.String>
View Source

RotationInterval

The period of automatic key rotation. Unit: seconds.

Declaration
public Output<string> RotationInterval { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.