getPolicy

inline suspend fun LambdaClient.getPolicy(crossinline block: GetPolicyRequest.Builder.() -> Unit): GetPolicyResponse

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

Samples

// 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"
}