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.
The request was rejected for one of the following reasons:
The KeyUsage
value of the KMS key is incompatible with the API operation.
The encryption algorithm or signing algorithm specified for the operation is incompatible
with the type of key material in the KMS key (KeySpec
).
For encrypting, decrypting, re-encrypting, and generating data keys, the KeyUsage
must be ENCRYPT_DECRYPT
. For signing and verifying messages, the KeyUsage
must be SIGN_VERIFY
. For generating and verifying message authentication codes
(MACs), the KeyUsage
must be GENERATE_VERIFY_MAC
. For deriving key agreement
secrets, the KeyUsage
must be KEY_AGREEMENT
. To find the KeyUsage
of a KMS key, use the DescribeKey operation.
To find the encryption or signing algorithms supported for a particular KMS key, use the DescribeKey operation.
Namespace: Amazon.KeyManagementService.Model
Assembly: AWSSDK.KeyManagementService.dll
Version: 3.x.y.z
public class InvalidKeyUsageException : AmazonKeyManagementServiceException ISerializable
The InvalidKeyUsageException type exposes the following members
Name | Description | |
---|---|---|
![]() |
InvalidKeyUsageException(string) |
Constructs a new InvalidKeyUsageException with the specified error message. |
![]() |
InvalidKeyUsageException(string, Exception) |
Construct instance of InvalidKeyUsageException |
![]() |
InvalidKeyUsageException(Exception) |
Construct instance of InvalidKeyUsageException |
![]() |
InvalidKeyUsageException(string, Exception, ErrorType, string, string, HttpStatusCode) |
Construct instance of InvalidKeyUsageException |
![]() |
InvalidKeyUsageException(string, ErrorType, string, string, HttpStatusCode) |
Construct instance of InvalidKeyUsageException |
Name | Type | Description | |
---|---|---|---|
![]() |
Data | System.Collections.IDictionary | Inherited from System.Exception. |
![]() |
ErrorCode | System.String | Inherited from Amazon.Runtime.AmazonServiceException. |
![]() |
ErrorType | Amazon.Runtime.ErrorType | Inherited from Amazon.Runtime.AmazonServiceException. |
![]() |
HelpLink | System.String | Inherited from System.Exception. |
![]() |
HResult | System.Int32 | Inherited from System.Exception. |
![]() |
InnerException | System.Exception | Inherited from System.Exception. |
![]() |
Message | System.String | Inherited from System.Exception. |
![]() |
RequestId | System.String | Inherited from Amazon.Runtime.AmazonServiceException. |
![]() |
Retryable | Amazon.Runtime.RetryableDetails | Inherited from Amazon.Runtime.AmazonServiceException. |
![]() |
Source | System.String | Inherited from System.Exception. |
![]() |
StackTrace | System.String | Inherited from System.Exception. |
![]() |
StatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonServiceException. |
![]() |
TargetSite | System.Reflection.MethodBase | Inherited from System.Exception. |
Name | Description | |
---|---|---|
![]() |
GetObjectData(SerializationInfo, StreamingContext) |
Sets the System.Runtime.Serialization.SerializationInfo with information about the exception. |
.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