AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

This is the response object from the GetKeyRotationStatus operation.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.KeyManagementService.Model.GetKeyRotationStatusResponse

Namespace: Amazon.KeyManagementService.Model
Assembly: AWSSDK.KeyManagementService.dll
Version: 3.x.y.z

Syntax

C#
public class GetKeyRotationStatusResponse : AmazonWebServiceResponse

The GetKeyRotationStatusResponse type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property KeyId System.String

Gets and sets the property KeyId.

Identifies the specified symmetric encryption KMS key.

Public Property KeyRotationEnabled System.Boolean

Gets and sets the property KeyRotationEnabled.

A Boolean value that specifies whether key rotation is enabled.

Public Property NextRotationDate System.DateTime

Gets and sets the property NextRotationDate.

The next date that KMS will automatically rotate the key material.

Public Property OnDemandRotationStartDate System.DateTime

Gets and sets the property OnDemandRotationStartDate.

Identifies the date and time that an in progress on-demand rotation was initiated.

The KMS API follows an eventual consistency model due to the distributed nature of the system. As a result, there might be a slight delay between initiating on-demand key rotation and the rotation's completion. Once the on-demand rotation is complete, use ListKeyRotations to view the details of the on-demand rotation.

Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property RotationPeriodInDays System.Int32

Gets and sets the property RotationPeriodInDays.

The number of days between each automatic rotation. The default value is 365 days.

Examples

The following example retrieves detailed information about the rotation status for a KMS key, including whether automatic key rotation is enabled for the specified KMS key, the rotation period, and the next scheduled rotation date.

To retrieve the rotation status for a KMS key


var client = new AmazonKeyManagementServiceClient();
var response = client.GetKeyRotationStatus(new GetKeyRotationStatusRequest 
{
    KeyId = "1234abcd-12ab-34cd-56ef-1234567890ab" // The identifier of the KMS key whose key material rotation status you want to retrieve. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key.
});

string keyId = response.KeyId; // Identifies the specified symmetric encryption KMS key.
bool keyRotationEnabled = response.KeyRotationEnabled; // A boolean that indicates the key material rotation status. Returns true when automatic rotation of the key material is enabled, or false when it is not.
DateTime nextRotationDate = response.NextRotationDate; // The next date that the key material will be automatically rotated.
DateTime onDemandRotationStartDate = response.OnDemandRotationStartDate; // Identifies the date and time that an in progress on-demand rotation was initiated.
int rotationPeriodInDays = response.RotationPeriodInDays; // The number of days between each automatic rotation. The default value is 365 days.

            

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5