CARVIEW |
Select Language
HTTP/1.1 302 Moved Temporarily
Content-Type: text/html; charset=iso-8859-1
Content-Length: 287
Connection: keep-alive
Date: Wed, 30 Jul 2025 15:45:57 GMT
Location: https://sdk.amazonaws.com/kotlin/api/latest/kms/aws.sdk.kotlin.services.kms/-kms-client/enable-key.html
Server: Server
Cache-Control: max-age=600
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=47304000; includeSubDomains
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Security-Policy: upgrade-insecure-requests; script-src 'self' 'unsafe-inline' *.awsstatic.com *.cdn.uis.awsstatic.com *.cdn.console.awsstatic.com d2c.aws.amazon.com a0.awsstatic.com *.feedback.console.aws.dev insights.docs.aws.com wss://insights.docs.aws.com/prod; object-src 'none';
X-Cache: Miss from cloudfront
Via: 1.1 4d72934ee8dc6e546ce338ca9bb0d62e.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: BOM78-P5
X-Amz-Cf-Id: zCsoKrRGe-16xFjCTrlCj8sQ-qvMMj1sDLa26k3yhdLoWXhq5k3VxQ==
HTTP/1.1 200 OK
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Content-Security-Policy: upgrade-insecure-requests; script-src 'self' 'unsafe-inline' *.awsstatic.com *.cdn.uis.awsstatic.com *.cdn.console.awsstatic.com docs.aws.amazon.com https://*.shortbread.aws.dev; img-src 'self' https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/; frame-src 'self' https://aws.demdex.net https://dpm.demdex.net; connect-src 'self' https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/ https://d2c.aws.amazon.com https://vs.aws.amazon.com https://*.shortbread.aws.dev; object-src 'none'; frame-ancestors 'self'; base-uri 'none'
Strict-Transport-Security: max-age=31536000
Date: Wed, 30 Jul 2025 15:46:00 GMT
Last-Modified: Wed, 30 Jul 2025 00:54:43 GMT
X-Frame-Options: SAMEORIGIN
x-amz-server-side-encryption: AES256
Content-Encoding: gzip
Server: AmazonS3
Cache-Control: no-store, no-cache, must-revalidate
Via: 1.1 1b1bef0e3ba5fb60100bf0604c62143e.cloudfront.net (CloudFront), 1.1 3a5f2dcbd587f3abe6a0835fa433edfa.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: TLV50-C1
X-XSS-Protection: 1; mode=block
ETag: W/"7ebf5ca4fc85ce15138dd53605698486"
Vary: Accept-Encoding
X-Cache: Miss from cloudfront
X-Amz-Cf-Pop: BOM78-P1
X-Amz-Cf-Id: THXKcMPnWzsQZWb8unoKz8QHL5xQiBf_zG_UY5OR3l8W6oK9X2F1VA==
enableKey
AWS SDK for Kotlin
enable
1.5.6
Platform filter
enableKey
Sets the key state of a KMS key to enabled. This allows you to use the KMS key for cryptographic operations.
The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.
Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.
Required permissions: kms:EnableKey (key policy)
Related operations: DisableKey
Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.
Samples
fun main() {
//sampleStart
// The following example enables the specified KMS key.
kmsClient.enableKey {
keyId = "1234abcd-12ab-34cd-56ef-1234567890ab"
}
//sampleEnd
}