Copyright | (c) 2013-2017 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 |
Language | Haskell2010 |
Retrieves the specified inline policy document that is embedded with the specified IAM role.
An IAM role can also have managed policies attached to it. To retrieve a managed policy document that is attached to a role, use GetPolicy
to determine the policy's default version, then use GetPolicyVersion
to retrieve the policy document.
For more information about policies, see Managed Policies and Inline Policies in the IAM User Guide .
For more information about roles, see Using Roles to Delegate Permissions and Federate Identities .
- getRolePolicy :: Text -> Text -> GetRolePolicy
- data GetRolePolicy
- grpRoleName :: Lens' GetRolePolicy Text
- grpPolicyName :: Lens' GetRolePolicy Text
- getRolePolicyResponse :: Int -> Text -> Text -> Text -> GetRolePolicyResponse
- data GetRolePolicyResponse
- grprsResponseStatus :: Lens' GetRolePolicyResponse Int
- grprsRoleName :: Lens' GetRolePolicyResponse Text
- grprsPolicyName :: Lens' GetRolePolicyResponse Text
- grprsPolicyDocument :: Lens' GetRolePolicyResponse Text
Creating a Request
Creates a value of GetRolePolicy
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
grpRoleName
- The name of the role associated with the policy. This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-grpPolicyName
- The name of the policy document to get. This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-+
data GetRolePolicy Source #
See: getRolePolicy
smart constructor.
Request Lenses
grpRoleName :: Lens' GetRolePolicy Text Source #
The name of the role associated with the policy. This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
grpPolicyName :: Lens' GetRolePolicy Text Source #
The name of the policy document to get. This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-+
Destructuring the Response
getRolePolicyResponse Source #
:: Int | |
-> Text | |
-> Text | |
-> Text | |
-> GetRolePolicyResponse |
Creates a value of GetRolePolicyResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
grprsResponseStatus
- -- | The response status code.grprsRoleName
- The role the policy is associated with.grprsPolicyName
- The name of the policy.grprsPolicyDocument
- The policy document.
data GetRolePolicyResponse Source #
Contains the response to a successful GetRolePolicy
request.
See: getRolePolicyResponse
smart constructor.
Response Lenses
grprsResponseStatus :: Lens' GetRolePolicyResponse Int Source #
- - | The response status code.
grprsRoleName :: Lens' GetRolePolicyResponse Text Source #
The role the policy is associated with.
grprsPolicyName :: Lens' GetRolePolicyResponse Text Source #
The name of the policy.
grprsPolicyDocument :: Lens' GetRolePolicyResponse Text Source #
The policy document.