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.DeletePolicyVersion

Description

Deletes the specified version from the specified managed policy.

You cannot delete the default version from a policy using this operation. To delete the default version from a policy, use DeletePolicy. To find out which version of a policy is marked as the default version, use ListPolicyVersions.

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

Synopsis

Creating a Request

data DeletePolicyVersion Source #

See: newDeletePolicyVersion smart constructor.

Constructors

DeletePolicyVersion' 

Fields

  • policyArn :: Text

    The Amazon Resource Name (ARN) of the IAM policy from which you want to delete a version.

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

  • versionId :: Text

    The policy version to delete.

    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.

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

Instances

Instances details
Eq DeletePolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

Read DeletePolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

Show DeletePolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

Generic DeletePolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

Associated Types

type Rep DeletePolicyVersion :: Type -> Type #

NFData DeletePolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

Methods

rnf :: DeletePolicyVersion -> () #

Hashable DeletePolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

AWSRequest DeletePolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

Associated Types

type AWSResponse DeletePolicyVersion #

ToHeaders DeletePolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

ToPath DeletePolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

ToQuery DeletePolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

type Rep DeletePolicyVersion Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

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

Defined in Amazonka.IAM.DeletePolicyVersion

newDeletePolicyVersion Source #

Create a value of DeletePolicyVersion 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:DeletePolicyVersion', deletePolicyVersion_policyArn - The Amazon Resource Name (ARN) of the IAM policy from which you want to delete a version.

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

$sel:versionId:DeletePolicyVersion', deletePolicyVersion_versionId - The policy version to delete.

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.

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

Request Lenses

deletePolicyVersion_policyArn :: Lens' DeletePolicyVersion Text Source #

The Amazon Resource Name (ARN) of the IAM policy from which you want to delete a version.

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

deletePolicyVersion_versionId :: Lens' DeletePolicyVersion Text Source #

The policy version to delete.

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.

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

Destructuring the Response

data DeletePolicyVersionResponse Source #

See: newDeletePolicyVersionResponse smart constructor.

Instances

Instances details
Eq DeletePolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

Read DeletePolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

Show DeletePolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

Generic DeletePolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

Associated Types

type Rep DeletePolicyVersionResponse :: Type -> Type #

NFData DeletePolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

type Rep DeletePolicyVersionResponse Source # 
Instance details

Defined in Amazonka.IAM.DeletePolicyVersion

type Rep DeletePolicyVersionResponse = D1 ('MetaData "DeletePolicyVersionResponse" "Amazonka.IAM.DeletePolicyVersion" "libZSservicesZSamazonka-iamZSamazonka-iam" 'False) (C1 ('MetaCons "DeletePolicyVersionResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newDeletePolicyVersionResponse :: DeletePolicyVersionResponse Source #

Create a value of DeletePolicyVersionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.