libZSservicesZSamazonka-iamZSamazonka-iam
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.IAM.GetPolicyVersion

Description

Retrieves information about the specified version of the specified managed policy, including the policy document.

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.

To list the available versions for a policy, use ListPolicyVersions.

This operation retrieves information about managed policies. To retrieve information about an inline policy that is embedded in a user, group, or role, use GetUserPolicy, GetGroupPolicy, or GetRolePolicy.

For more information about the types of policies, see Managed policies and inline policies in the IAM User Guide.

For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.

Synopsis

Creating a Request

data GetPolicyVersion Source #

See: newGetPolicyVersion smart constructor.

Constructors

GetPolicyVersion' 

Fields

  • policyArn :: Text

    The Amazon Resource Name (ARN) of the managed policy that you want information about.

    For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

  • versionId :: Text

    Identifies the policy version to retrieve.

    This parameter allows (through its regex pattern) a string of characters that consists of the lowercase letter 'v' followed by one or two digits, and optionally followed by a period '.' and a string of letters and digits.

Instances

Instances details
Eq GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

Read GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

Show GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

Generic GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

Associated Types

type Rep GetPolicyVersion :: Type -> Type #

NFData GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

Methods

rnf :: GetPolicyVersion -> () #

Hashable GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

AWSRequest GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

Associated Types

type AWSResponse GetPolicyVersion #

ToHeaders GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

ToPath GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

ToQuery GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

type Rep GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

type Rep GetPolicyVersion = D1 ('MetaData "GetPolicyVersion" "Amazonka.IAM.GetPolicyVersion" "libZSservicesZSamazonka-iamZSamazonka-iam" 'False) (C1 ('MetaCons "GetPolicyVersion'" 'PrefixI 'True) (S1 ('MetaSel ('Just "policyArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "versionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type AWSResponse GetPolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

newGetPolicyVersion Source #

Create a value of GetPolicyVersion 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:policyArn:GetPolicyVersion', getPolicyVersion_policyArn - The Amazon Resource Name (ARN) of the managed policy that you want information about.

For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

$sel:versionId:GetPolicyVersion', getPolicyVersion_versionId - Identifies the policy version to retrieve.

This parameter allows (through its regex pattern) a string of characters that consists of the lowercase letter 'v' followed by one or two digits, and optionally followed by a period '.' and a string of letters and digits.

Request Lenses

getPolicyVersion_policyArn :: Lens' GetPolicyVersion Text Source #

The Amazon Resource Name (ARN) of the managed policy that you want information about.

For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

getPolicyVersion_versionId :: Lens' GetPolicyVersion Text Source #

Identifies the policy version to retrieve.

This parameter allows (through its regex pattern) a string of characters that consists of the lowercase letter 'v' followed by one or two digits, and optionally followed by a period '.' and a string of letters and digits.

Destructuring the Response

data GetPolicyVersionResponse Source #

Contains the response to a successful GetPolicyVersion request.

See: newGetPolicyVersionResponse smart constructor.

Constructors

GetPolicyVersionResponse' 

Fields

Instances

Instances details
Eq GetPolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

Read GetPolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

Show GetPolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

Generic GetPolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

Associated Types

type Rep GetPolicyVersionResponse :: Type -> Type #

NFData GetPolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

type Rep GetPolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicyVersion

type Rep GetPolicyVersionResponse = D1 ('MetaData "GetPolicyVersionResponse" "Amazonka.IAM.GetPolicyVersion" "libZSservicesZSamazonka-iamZSamazonka-iam" 'False) (C1 ('MetaCons "GetPolicyVersionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "policyVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PolicyVersion)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newGetPolicyVersionResponse Source #

Create a value of GetPolicyVersionResponse 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:policyVersion:GetPolicyVersionResponse', getPolicyVersionResponse_policyVersion - A structure containing details about the policy version.

$sel:httpStatus:GetPolicyVersionResponse', getPolicyVersionResponse_httpStatus - The response's http status code.

Response Lenses

getPolicyVersionResponse_policyVersion :: Lens' GetPolicyVersionResponse (Maybe PolicyVersion) Source #

A structure containing details about the policy version.