detach_policy

detach_policy(**kwargs)

Detaches a policy from the specified target.

Note

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 DetachPolicy action.

See also: AWS API Documentation

Request Syntax

response = client.detach_policy(
    policyName='string',
    target='string'
)
Parameters
  • policyName (string) --

    [REQUIRED]

    The policy to detach.

  • target (string) --

    [REQUIRED]

    The target from which the policy will be detached.

Returns

None

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.LimitExceededException