Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Returns the resource-based IAM policy for a function, version, or alias.
Synopsis
- data GetPolicy = GetPolicy' {
- qualifier :: Maybe Text
- functionName :: Text
- newGetPolicy :: Text -> GetPolicy
- getPolicy_qualifier :: Lens' GetPolicy (Maybe Text)
- getPolicy_functionName :: Lens' GetPolicy Text
- data GetPolicyResponse = GetPolicyResponse' {
- policy :: Maybe Text
- revisionId :: Maybe Text
- httpStatus :: Int
- newGetPolicyResponse :: Int -> GetPolicyResponse
- getPolicyResponse_policy :: Lens' GetPolicyResponse (Maybe Text)
- getPolicyResponse_revisionId :: Lens' GetPolicyResponse (Maybe Text)
- getPolicyResponse_httpStatus :: Lens' GetPolicyResponse Int
Creating a Request
See: newGetPolicy
smart constructor.
GetPolicy' | |
|
Instances
Create a value of GetPolicy
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:qualifier:GetPolicy'
, getPolicy_qualifier
- Specify a version or alias to get the policy for that resource.
$sel:functionName:GetPolicy'
, getPolicy_functionName
- The name of the Lambda function, version, or alias.
Name formats
- Function name -
my-function
(name-only),my-function:v1
(with alias). - Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function
. - Partial ARN -
123456789012:function:my-function
.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
Request Lenses
getPolicy_qualifier :: Lens' GetPolicy (Maybe Text) Source #
Specify a version or alias to get the policy for that resource.
getPolicy_functionName :: Lens' GetPolicy Text Source #
The name of the Lambda function, version, or alias.
Name formats
- Function name -
my-function
(name-only),my-function:v1
(with alias). - Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function
. - Partial ARN -
123456789012:function:my-function
.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
Destructuring the Response
data GetPolicyResponse Source #
See: newGetPolicyResponse
smart constructor.
GetPolicyResponse' | |
|
Instances
Create a value of GetPolicyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:policy:GetPolicyResponse'
, getPolicyResponse_policy
- The resource-based policy.
$sel:revisionId:GetPolicyResponse'
, getPolicyResponse_revisionId
- A unique identifier for the current revision of the policy.
$sel:httpStatus:GetPolicyResponse'
, getPolicyResponse_httpStatus
- The response's http status code.
Response Lenses
getPolicyResponse_policy :: Lens' GetPolicyResponse (Maybe Text) Source #
The resource-based policy.
getPolicyResponse_revisionId :: Lens' GetPolicyResponse (Maybe Text) Source #
A unique identifier for the current revision of the policy.
getPolicyResponse_httpStatus :: Lens' GetPolicyResponse Int Source #
The response's http status code.