libZSservicesZSamazonka-iotZSamazonka-iot
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.IoT.DeletePolicy

Description

Deletes the specified policy.

A policy cannot be deleted if it has non-default versions or it is attached to any certificate.

To delete a policy, use the DeletePolicyVersion action to delete all non-default versions of the policy; use the DetachPolicy action to detach the policy from any certificate; and then use the DeletePolicy action to delete the policy.

When a policy is deleted using DeletePolicy, its default version is deleted with it.

Because of the distributed nature of Amazon Web Services, it can take up to five minutes after a policy is detached before it's ready to be deleted.

Requires permission to access the DeletePolicy action.

Synopsis

Creating a Request

data DeletePolicy Source #

The input for the DeletePolicy operation.

See: newDeletePolicy smart constructor.

Constructors

DeletePolicy' 

Fields

Instances

Instances details
Eq DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

Read DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

Show DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

Generic DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

Associated Types

type Rep DeletePolicy :: Type -> Type #

NFData DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

Methods

rnf :: DeletePolicy -> () #

Hashable DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

AWSRequest DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

Associated Types

type AWSResponse DeletePolicy #

ToHeaders DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

ToPath DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

ToQuery DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

type Rep DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

type Rep DeletePolicy = D1 ('MetaData "DeletePolicy" "Amazonka.IoT.DeletePolicy" "libZSservicesZSamazonka-iotZSamazonka-iot" 'False) (C1 ('MetaCons "DeletePolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "policyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type AWSResponse DeletePolicy Source # 
Instance details

Defined in Amazonka.IoT.DeletePolicy

newDeletePolicy Source #

Create a value of DeletePolicy 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:policyName:DeletePolicy', deletePolicy_policyName - The name of the policy to delete.

Request Lenses

deletePolicy_policyName :: Lens' DeletePolicy Text Source #

The name of the policy to delete.

Destructuring the Response

data DeletePolicyResponse Source #

See: newDeletePolicyResponse smart constructor.

Constructors

DeletePolicyResponse' 

newDeletePolicyResponse :: DeletePolicyResponse Source #

Create a value of DeletePolicyResponse with all optional fields omitted.

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