CARVIEW |
Select Language
HTTP/1.1 302 Moved Temporarily
Content-Type: text/html; charset=iso-8859-1
Content-Length: 314
Connection: keep-alive
Date: Thu, 24 Jul 2025 07:04:17 GMT
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';
Location: https://sdk.amazonaws.com/kotlin/api/latest/lambda/aws.sdk.kotlin.services.lambda/-lambda-client/add-layer-version-permission.html
X-Cache: Miss from cloudfront
Via: 1.1 81fa86241716226c2f03c8c7fb5cae8e.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: BOM78-P5
X-Amz-Cf-Id: QxGyZMEfX-V6pl3iggX9w47eZu-lUi44gFKf1xXXCBbMXIu9dftthg==
HTTP/1.1 200 OK
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Date: Thu, 24 Jul 2025 07:04:20 GMT
Last-Modified: Wed, 23 Jul 2025 22:39:34 GMT
ETag: W/"4dfed6e6a4ea9d316019847f46c7bbf2"
x-amz-server-side-encryption: AES256
Server: AmazonS3
Via: 1.1 b64967530af1eaf55ba68a4d7e642cee.cloudfront.net (CloudFront), 1.1 3a5f2dcbd587f3abe6a0835fa433edfa.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: SCzodppESPspE_oAVdqG2xdxBHPIduvyvZYZUT2iT7Uy4zm6qqGreQ==
addLayerVersionPermission
AWS SDK for Kotlin
add
1.5.2
Platform filter
addLayerVersionPermission
abstract suspend fun addLayerVersionPermission(input: AddLayerVersionPermissionRequest): AddLayerVersionPermissionResponse
Adds permissions to the resource-based policy of a version of an Lambda layer. Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all accounts in an organization, or all Amazon Web Services accounts.
To revoke permission, call RemoveLayerVersionPermission with the statement ID that you specified when you added it.
Samples
fun main() {
//sampleStart
// The following example grants permission for the account 223456789012 to use version 1 of a layer
// named my layer.
val resp = lambdaClient.addLayerVersionPermission {
layerName = "my-layer"
versionNumber = 1
statementId = "xaccount"
action = "lambda:GetLayerVersion"
principal = "223456789012"
}
//sampleEnd
}