getPolicy (original) (raw)

lambda/aws.sdk.kotlin.services.lambda/LambdaClient/getPolicy

abstract suspend fun getPolicy(input: GetPolicyRequest): GetPolicyResponse

Returns the resource-based IAM policy for a function, version, or alias.

Samples


fun main() { 
   //sampleStart 
   // The following example returns the resource based policy for version 1 of a Lambda function named my
// function.
val resp = lambdaClient.getPolicy {
    functionName = "my-function"
    qualifier = "1"
} 
   //sampleEnd
}

© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.Generated by dokka