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 |
Retrieves the specified inline policy document that is embedded in the specified IAM group.
Policies returned by this operation are URL-encoded compliant with
RFC 3986. You can use a URL
decoding method to convert the policy back to plain JSON text. For
example, if you use Java, you can use the decode
method of the
java.net.URLDecoder
utility class in the Java SDK. Other languages and
SDKs provide similar functionality.
An IAM group can also have managed policies attached to it. To retrieve a managed policy document that is attached to a group, 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.
Synopsis
- data GetGroupPolicy = GetGroupPolicy' {
- groupName :: Text
- policyName :: Text
- newGetGroupPolicy :: Text -> Text -> GetGroupPolicy
- getGroupPolicy_groupName :: Lens' GetGroupPolicy Text
- getGroupPolicy_policyName :: Lens' GetGroupPolicy Text
- data GetGroupPolicyResponse = GetGroupPolicyResponse' {
- httpStatus :: Int
- groupName :: Text
- policyName :: Text
- policyDocument :: Text
- newGetGroupPolicyResponse :: Int -> Text -> Text -> Text -> GetGroupPolicyResponse
- getGroupPolicyResponse_httpStatus :: Lens' GetGroupPolicyResponse Int
- getGroupPolicyResponse_groupName :: Lens' GetGroupPolicyResponse Text
- getGroupPolicyResponse_policyName :: Lens' GetGroupPolicyResponse Text
- getGroupPolicyResponse_policyDocument :: Lens' GetGroupPolicyResponse Text
Creating a Request
data GetGroupPolicy Source #
See: newGetGroupPolicy
smart constructor.
GetGroupPolicy' | |
|
Instances
Create a value of GetGroupPolicy
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:groupName:GetGroupPolicy'
, getGroupPolicy_groupName
- The name of the group the policy is associated with.
This parameter allows (through 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: _+=,.@-
$sel:policyName:GetGroupPolicy'
, getGroupPolicy_policyName
- The name of the policy document to get.
This parameter allows (through 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: _+=,.@-
Request Lenses
getGroupPolicy_groupName :: Lens' GetGroupPolicy Text Source #
The name of the group the policy is associated with.
This parameter allows (through 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: _+=,.@-
getGroupPolicy_policyName :: Lens' GetGroupPolicy Text Source #
The name of the policy document to get.
This parameter allows (through 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
data GetGroupPolicyResponse Source #
Contains the response to a successful GetGroupPolicy request.
See: newGetGroupPolicyResponse
smart constructor.
GetGroupPolicyResponse' | |
|
Instances
newGetGroupPolicyResponse Source #
:: Int | |
-> Text | |
-> Text | |
-> Text | |
-> GetGroupPolicyResponse |
Create a value of GetGroupPolicyResponse
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:httpStatus:GetGroupPolicyResponse'
, getGroupPolicyResponse_httpStatus
- The response's http status code.
$sel:groupName:GetGroupPolicy'
, getGroupPolicyResponse_groupName
- The group the policy is associated with.
$sel:policyName:GetGroupPolicy'
, getGroupPolicyResponse_policyName
- The name of the policy.
$sel:policyDocument:GetGroupPolicyResponse'
, getGroupPolicyResponse_policyDocument
- The policy document.
IAM stores policies in JSON format. However, resources that were created using CloudFormation templates can be formatted in YAML. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.
Response Lenses
getGroupPolicyResponse_httpStatus :: Lens' GetGroupPolicyResponse Int Source #
The response's http status code.
getGroupPolicyResponse_groupName :: Lens' GetGroupPolicyResponse Text Source #
The group the policy is associated with.
getGroupPolicyResponse_policyName :: Lens' GetGroupPolicyResponse Text Source #
The name of the policy.
getGroupPolicyResponse_policyDocument :: Lens' GetGroupPolicyResponse Text Source #
The policy document.
IAM stores policies in JSON format. However, resources that were created using CloudFormation templates can be formatted in YAML. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.