CARVIEW |
Select Language
HTTP/1.1 302 Moved Temporarily
Content-Type: text/html; charset=iso-8859-1
Content-Length: 291
Connection: keep-alive
Date: Thu, 24 Jul 2025 23:26:07 GMT
Location: https://sdk.amazonaws.com/kotlin/api/latest/kms/aws.sdk.kotlin.services.kms/-kms-client/get-key-policy.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 994e5614874ac627778a52bc1ae1886a.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: BOM78-P10
X-Amz-Cf-Id: w7EdV9rscboOHMEvkroXLqmy8ZIE-wOkpMeCAJ_qd1iU-f3cWc4-oA==
HTTP/1.1 200 OK
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Date: Thu, 24 Jul 2025 23:26:10 GMT
Last-Modified: Thu, 24 Jul 2025 22:38:31 GMT
ETag: W/"5c6bb3ed745b8de64a8f1d198f562cb7"
x-amz-server-side-encryption: AES256
Server: AmazonS3
Via: 1.1 c66a955cf4660e85c076e8bfb1e20fa2.cloudfront.net (CloudFront), 1.1 f189097b7fd8bfa4977d0039966184f6.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: TLV50-C1
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
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
Cache-Control: no-store, no-cache, must-revalidate
Content-Encoding: gzip
Vary: Accept-Encoding
X-Cache: Miss from cloudfront
X-Amz-Cf-Pop: BOM78-P1
X-Amz-Cf-Id: OeIneIgMJYzyWmfxiZY1EKBEHqFTI_lQoyZqgJW37tIuDBRI0QPnCw==
getKeyPolicy
AWS SDK for Kotlin
get
1.5.3
Platform filter
getKeyPolicy
Gets a key policy attached to the specified KMS key.
Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.
Required permissions: kms:GetKeyPolicy (key policy)
Related operations: PutKeyPolicy
Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.
Samples
fun main() {
//sampleStart
// The following example retrieves the key policy for the specified KMS key.
val resp = kmsClient.getKeyPolicy {
keyId = "1234abcd-12ab-34cd-56ef-1234567890ab"
policyName = "default"
}
//sampleEnd
}