github.com/aavshr/aws-sdk-go@v1.41.3/service/kms/errors.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package kms 4 5 import ( 6 "github.com/aavshr/aws-sdk-go/private/protocol" 7 ) 8 9 const ( 10 11 // ErrCodeAlreadyExistsException for service response error code 12 // "AlreadyExistsException". 13 // 14 // The request was rejected because it attempted to create a resource that already 15 // exists. 16 ErrCodeAlreadyExistsException = "AlreadyExistsException" 17 18 // ErrCodeCloudHsmClusterInUseException for service response error code 19 // "CloudHsmClusterInUseException". 20 // 21 // The request was rejected because the specified CloudHSM cluster is already 22 // associated with a custom key store or it shares a backup history with a cluster 23 // that is associated with a custom key store. Each custom key store must be 24 // associated with a different CloudHSM cluster. 25 // 26 // Clusters that share a backup history have the same cluster certificate. To 27 // view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) 28 // operation. 29 ErrCodeCloudHsmClusterInUseException = "CloudHsmClusterInUseException" 30 31 // ErrCodeCloudHsmClusterInvalidConfigurationException for service response error code 32 // "CloudHsmClusterInvalidConfigurationException". 33 // 34 // The request was rejected because the associated CloudHSM cluster did not 35 // meet the configuration requirements for a custom key store. 36 // 37 // * The cluster must be configured with private subnets in at least two 38 // different Availability Zones in the Region. 39 // 40 // * The security group for the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html) 41 // (cloudhsm-cluster-<cluster-id>-sg) must include inbound rules and outbound 42 // rules that allow TCP traffic on ports 2223-2225. The Source in the inbound 43 // rules and the Destination in the outbound rules must match the security 44 // group ID. These rules are set by default when you create the cluster. 45 // Do not delete or change them. To get information about a particular security 46 // group, use the DescribeSecurityGroups (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html) 47 // operation. 48 // 49 // * The cluster must contain at least as many HSMs as the operation requires. 50 // To add HSMs, use the CloudHSM CreateHsm (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) 51 // operation. For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey 52 // operations, the CloudHSM cluster must have at least two active HSMs, each 53 // in a different Availability Zone. For the ConnectCustomKeyStore operation, 54 // the CloudHSM must contain at least one active HSM. 55 // 56 // For information about the requirements for an CloudHSM cluster that is associated 57 // with a custom key store, see Assemble the Prerequisites (https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore) 58 // in the Key Management Service Developer Guide. For information about creating 59 // a private subnet for an CloudHSM cluster, see Create a Private Subnet (https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) 60 // in the CloudHSM User Guide. For information about cluster security groups, 61 // see Configure a Default Security Group (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html) 62 // in the CloudHSM User Guide . 63 ErrCodeCloudHsmClusterInvalidConfigurationException = "CloudHsmClusterInvalidConfigurationException" 64 65 // ErrCodeCloudHsmClusterNotActiveException for service response error code 66 // "CloudHsmClusterNotActiveException". 67 // 68 // The request was rejected because the CloudHSM cluster that is associated 69 // with the custom key store is not active. Initialize and activate the cluster 70 // and try the command again. For detailed instructions, see Getting Started 71 // (https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html) 72 // in the CloudHSM User Guide. 73 ErrCodeCloudHsmClusterNotActiveException = "CloudHsmClusterNotActiveException" 74 75 // ErrCodeCloudHsmClusterNotFoundException for service response error code 76 // "CloudHsmClusterNotFoundException". 77 // 78 // The request was rejected because KMS cannot find the CloudHSM cluster with 79 // the specified cluster ID. Retry the request with a different cluster ID. 80 ErrCodeCloudHsmClusterNotFoundException = "CloudHsmClusterNotFoundException" 81 82 // ErrCodeCloudHsmClusterNotRelatedException for service response error code 83 // "CloudHsmClusterNotRelatedException". 84 // 85 // The request was rejected because the specified CloudHSM cluster has a different 86 // cluster certificate than the original cluster. You cannot use the operation 87 // to specify an unrelated cluster. 88 // 89 // Specify a cluster that shares a backup history with the original cluster. 90 // This includes clusters that were created from a backup of the current cluster, 91 // and clusters that were created from the same backup that produced the current 92 // cluster. 93 // 94 // Clusters that share a backup history have the same cluster certificate. To 95 // view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) 96 // operation. 97 ErrCodeCloudHsmClusterNotRelatedException = "CloudHsmClusterNotRelatedException" 98 99 // ErrCodeCustomKeyStoreHasCMKsException for service response error code 100 // "CustomKeyStoreHasCMKsException". 101 // 102 // The request was rejected because the custom key store contains KMS keys. 103 // After verifying that you do not need to use the KMS keys, use the ScheduleKeyDeletion 104 // operation to delete the KMS keys. After they are deleted, you can delete 105 // the custom key store. 106 ErrCodeCustomKeyStoreHasCMKsException = "CustomKeyStoreHasCMKsException" 107 108 // ErrCodeCustomKeyStoreInvalidStateException for service response error code 109 // "CustomKeyStoreInvalidStateException". 110 // 111 // The request was rejected because of the ConnectionState of the custom key 112 // store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores 113 // operation. 114 // 115 // This exception is thrown under the following conditions: 116 // 117 // * You requested the CreateKey or GenerateRandom operation in a custom 118 // key store that is not connected. These operations are valid only when 119 // the custom key store ConnectionState is CONNECTED. 120 // 121 // * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation 122 // on a custom key store that is not disconnected. This operation is valid 123 // only when the custom key store ConnectionState is DISCONNECTED. 124 // 125 // * You requested the ConnectCustomKeyStore operation on a custom key store 126 // with a ConnectionState of DISCONNECTING or FAILED. This operation is valid 127 // for all other ConnectionState values. 128 ErrCodeCustomKeyStoreInvalidStateException = "CustomKeyStoreInvalidStateException" 129 130 // ErrCodeCustomKeyStoreNameInUseException for service response error code 131 // "CustomKeyStoreNameInUseException". 132 // 133 // The request was rejected because the specified custom key store name is already 134 // assigned to another custom key store in the account. Try again with a custom 135 // key store name that is unique in the account. 136 ErrCodeCustomKeyStoreNameInUseException = "CustomKeyStoreNameInUseException" 137 138 // ErrCodeCustomKeyStoreNotFoundException for service response error code 139 // "CustomKeyStoreNotFoundException". 140 // 141 // The request was rejected because KMS cannot find a custom key store with 142 // the specified key store name or ID. 143 ErrCodeCustomKeyStoreNotFoundException = "CustomKeyStoreNotFoundException" 144 145 // ErrCodeDependencyTimeoutException for service response error code 146 // "DependencyTimeoutException". 147 // 148 // The system timed out while trying to fulfill the request. The request can 149 // be retried. 150 ErrCodeDependencyTimeoutException = "DependencyTimeoutException" 151 152 // ErrCodeDisabledException for service response error code 153 // "DisabledException". 154 // 155 // The request was rejected because the specified KMS key is not enabled. 156 ErrCodeDisabledException = "DisabledException" 157 158 // ErrCodeExpiredImportTokenException for service response error code 159 // "ExpiredImportTokenException". 160 // 161 // The request was rejected because the specified import token is expired. Use 162 // GetParametersForImport to get a new import token and public key, use the 163 // new public key to encrypt the key material, and then try the request again. 164 ErrCodeExpiredImportTokenException = "ExpiredImportTokenException" 165 166 // ErrCodeIncorrectKeyException for service response error code 167 // "IncorrectKeyException". 168 // 169 // The request was rejected because the specified KMS key cannot decrypt the 170 // data. The KeyId in a Decrypt request and the SourceKeyId in a ReEncrypt request 171 // must identify the same KMS key that was used to encrypt the ciphertext. 172 ErrCodeIncorrectKeyException = "IncorrectKeyException" 173 174 // ErrCodeIncorrectKeyMaterialException for service response error code 175 // "IncorrectKeyMaterialException". 176 // 177 // The request was rejected because the key material in the request is, expired, 178 // invalid, or is not the same key material that was previously imported into 179 // this KMS key. 180 ErrCodeIncorrectKeyMaterialException = "IncorrectKeyMaterialException" 181 182 // ErrCodeIncorrectTrustAnchorException for service response error code 183 // "IncorrectTrustAnchorException". 184 // 185 // The request was rejected because the trust anchor certificate in the request 186 // is not the trust anchor certificate for the specified CloudHSM cluster. 187 // 188 // When you initialize the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr), 189 // you create the trust anchor certificate and save it in the customerCA.crt 190 // file. 191 ErrCodeIncorrectTrustAnchorException = "IncorrectTrustAnchorException" 192 193 // ErrCodeInternalException for service response error code 194 // "KMSInternalException". 195 // 196 // The request was rejected because an internal exception occurred. The request 197 // can be retried. 198 ErrCodeInternalException = "KMSInternalException" 199 200 // ErrCodeInvalidAliasNameException for service response error code 201 // "InvalidAliasNameException". 202 // 203 // The request was rejected because the specified alias name is not valid. 204 ErrCodeInvalidAliasNameException = "InvalidAliasNameException" 205 206 // ErrCodeInvalidArnException for service response error code 207 // "InvalidArnException". 208 // 209 // The request was rejected because a specified ARN, or an ARN in a key policy, 210 // is not valid. 211 ErrCodeInvalidArnException = "InvalidArnException" 212 213 // ErrCodeInvalidCiphertextException for service response error code 214 // "InvalidCiphertextException". 215 // 216 // From the Decrypt or ReEncrypt operation, the request was rejected because 217 // the specified ciphertext, or additional authenticated data incorporated into 218 // the ciphertext, such as the encryption context, is corrupted, missing, or 219 // otherwise invalid. 220 // 221 // From the ImportKeyMaterial operation, the request was rejected because KMS 222 // could not decrypt the encrypted (wrapped) key material. 223 ErrCodeInvalidCiphertextException = "InvalidCiphertextException" 224 225 // ErrCodeInvalidGrantIdException for service response error code 226 // "InvalidGrantIdException". 227 // 228 // The request was rejected because the specified GrantId is not valid. 229 ErrCodeInvalidGrantIdException = "InvalidGrantIdException" 230 231 // ErrCodeInvalidGrantTokenException for service response error code 232 // "InvalidGrantTokenException". 233 // 234 // The request was rejected because the specified grant token is not valid. 235 ErrCodeInvalidGrantTokenException = "InvalidGrantTokenException" 236 237 // ErrCodeInvalidImportTokenException for service response error code 238 // "InvalidImportTokenException". 239 // 240 // The request was rejected because the provided import token is invalid or 241 // is associated with a different KMS key. 242 ErrCodeInvalidImportTokenException = "InvalidImportTokenException" 243 244 // ErrCodeInvalidKeyUsageException for service response error code 245 // "InvalidKeyUsageException". 246 // 247 // The request was rejected for one of the following reasons: 248 // 249 // * The KeyUsage value of the KMS key is incompatible with the API operation. 250 // 251 // * The encryption algorithm or signing algorithm specified for the operation 252 // is incompatible with the type of key material in the KMS key (KeySpec). 253 // 254 // For encrypting, decrypting, re-encrypting, and generating data keys, the 255 // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage 256 // must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey 257 // operation. 258 // 259 // To find the encryption or signing algorithms supported for a particular KMS 260 // key, use the DescribeKey operation. 261 ErrCodeInvalidKeyUsageException = "InvalidKeyUsageException" 262 263 // ErrCodeInvalidMarkerException for service response error code 264 // "InvalidMarkerException". 265 // 266 // The request was rejected because the marker that specifies where pagination 267 // should next begin is not valid. 268 ErrCodeInvalidMarkerException = "InvalidMarkerException" 269 270 // ErrCodeInvalidStateException for service response error code 271 // "KMSInvalidStateException". 272 // 273 // The request was rejected because the state of the specified resource is not 274 // valid for this request. 275 // 276 // For more information about how key state affects the use of a KMS key, see 277 // Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) 278 // in the Key Management Service Developer Guide . 279 ErrCodeInvalidStateException = "KMSInvalidStateException" 280 281 // ErrCodeKMSInvalidSignatureException for service response error code 282 // "KMSInvalidSignatureException". 283 // 284 // The request was rejected because the signature verification failed. Signature 285 // verification fails when it cannot confirm that signature was produced by 286 // signing the specified message with the specified KMS key and signing algorithm. 287 ErrCodeKMSInvalidSignatureException = "KMSInvalidSignatureException" 288 289 // ErrCodeKeyUnavailableException for service response error code 290 // "KeyUnavailableException". 291 // 292 // The request was rejected because the specified KMS key was not available. 293 // You can retry the request. 294 ErrCodeKeyUnavailableException = "KeyUnavailableException" 295 296 // ErrCodeLimitExceededException for service response error code 297 // "LimitExceededException". 298 // 299 // The request was rejected because a quota was exceeded. For more information, 300 // see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html) 301 // in the Key Management Service Developer Guide. 302 ErrCodeLimitExceededException = "LimitExceededException" 303 304 // ErrCodeMalformedPolicyDocumentException for service response error code 305 // "MalformedPolicyDocumentException". 306 // 307 // The request was rejected because the specified policy is not syntactically 308 // or semantically correct. 309 ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException" 310 311 // ErrCodeNotFoundException for service response error code 312 // "NotFoundException". 313 // 314 // The request was rejected because the specified entity or resource could not 315 // be found. 316 ErrCodeNotFoundException = "NotFoundException" 317 318 // ErrCodeTagException for service response error code 319 // "TagException". 320 // 321 // The request was rejected because one or more tags are not valid. 322 ErrCodeTagException = "TagException" 323 324 // ErrCodeUnsupportedOperationException for service response error code 325 // "UnsupportedOperationException". 326 // 327 // The request was rejected because a specified parameter is not supported or 328 // a specified resource is not valid for this operation. 329 ErrCodeUnsupportedOperationException = "UnsupportedOperationException" 330 ) 331 332 var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ 333 "AlreadyExistsException": newErrorAlreadyExistsException, 334 "CloudHsmClusterInUseException": newErrorCloudHsmClusterInUseException, 335 "CloudHsmClusterInvalidConfigurationException": newErrorCloudHsmClusterInvalidConfigurationException, 336 "CloudHsmClusterNotActiveException": newErrorCloudHsmClusterNotActiveException, 337 "CloudHsmClusterNotFoundException": newErrorCloudHsmClusterNotFoundException, 338 "CloudHsmClusterNotRelatedException": newErrorCloudHsmClusterNotRelatedException, 339 "CustomKeyStoreHasCMKsException": newErrorCustomKeyStoreHasCMKsException, 340 "CustomKeyStoreInvalidStateException": newErrorCustomKeyStoreInvalidStateException, 341 "CustomKeyStoreNameInUseException": newErrorCustomKeyStoreNameInUseException, 342 "CustomKeyStoreNotFoundException": newErrorCustomKeyStoreNotFoundException, 343 "DependencyTimeoutException": newErrorDependencyTimeoutException, 344 "DisabledException": newErrorDisabledException, 345 "ExpiredImportTokenException": newErrorExpiredImportTokenException, 346 "IncorrectKeyException": newErrorIncorrectKeyException, 347 "IncorrectKeyMaterialException": newErrorIncorrectKeyMaterialException, 348 "IncorrectTrustAnchorException": newErrorIncorrectTrustAnchorException, 349 "KMSInternalException": newErrorInternalException, 350 "InvalidAliasNameException": newErrorInvalidAliasNameException, 351 "InvalidArnException": newErrorInvalidArnException, 352 "InvalidCiphertextException": newErrorInvalidCiphertextException, 353 "InvalidGrantIdException": newErrorInvalidGrantIdException, 354 "InvalidGrantTokenException": newErrorInvalidGrantTokenException, 355 "InvalidImportTokenException": newErrorInvalidImportTokenException, 356 "InvalidKeyUsageException": newErrorInvalidKeyUsageException, 357 "InvalidMarkerException": newErrorInvalidMarkerException, 358 "KMSInvalidStateException": newErrorInvalidStateException, 359 "KMSInvalidSignatureException": newErrorKMSInvalidSignatureException, 360 "KeyUnavailableException": newErrorKeyUnavailableException, 361 "LimitExceededException": newErrorLimitExceededException, 362 "MalformedPolicyDocumentException": newErrorMalformedPolicyDocumentException, 363 "NotFoundException": newErrorNotFoundException, 364 "TagException": newErrorTagException, 365 "UnsupportedOperationException": newErrorUnsupportedOperationException, 366 }