IoT.Client.attach_policy(**kwargs)¶Attaches the specified policy to the specified principal (certificate or other credential).
Requires permission to access the AttachPolicy action.
See also: AWS API Documentation
Request Syntax
response = client.attach_policy(
policyName='string',
target='string'
)
[REQUIRED]
The name of the policy to attach.
[REQUIRED]
The identity to which the policy is attached. For example, a thing group or a certificate.
None
Exceptions
IoT.Client.exceptions.ResourceNotFoundExceptionIoT.Client.exceptions.InvalidRequestExceptionIoT.Client.exceptions.ThrottlingExceptionIoT.Client.exceptions.UnauthorizedExceptionIoT.Client.exceptions.ServiceUnavailableExceptionIoT.Client.exceptions.InternalFailureExceptionIoT.Client.exceptions.LimitExceededException