- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ResetEbsDefaultKmsKeyIdCommand
Resets the default KMS key for EBS encryption for your account in this Region to the Amazon Web Services managed KMS key for EBS.
After resetting the default KMS key to the Amazon Web Services managed KMS key, you can continue to encrypt by a customer managed KMS key by specifying it when you create the volume. For more information, see Amazon EBS encryption in the Amazon EBS User Guide.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, ResetEbsDefaultKmsKeyIdCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, ResetEbsDefaultKmsKeyIdCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const input = { // ResetEbsDefaultKmsKeyIdRequest
DryRun: true || false,
};
const command = new ResetEbsDefaultKmsKeyIdCommand(input);
const response = await client.send(command);
// { // ResetEbsDefaultKmsKeyIdResult
// KmsKeyId: "STRING_VALUE",
// };
ResetEbsDefaultKmsKeyIdCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DryRun | boolean | undefined | Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is |
ResetEbsDefaultKmsKeyIdCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
KmsKeyId | string | undefined | The Amazon Resource Name (ARN) of the default KMS key for EBS encryption by default. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EC2ServiceException | Base exception class for all service exceptions from EC2 service. |