attach_principal_policy

IoT.Client.attach_principal_policy(**kwargs)

Attaches the specified policy to the specified principal (certificate or other credential).

Note: This action is deprecated and works as expected for backward compatibility, but we won't add enhancements. Use AttachPolicy instead.

Requires permission to access the AttachPrincipalPolicy action.

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.attach_principal_policy(
    policyName='string',
    principal='string'
)
Parameters
  • policyName (string) --

    [REQUIRED]

    The policy name.

  • principal (string) --

    [REQUIRED]

    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.

Returns

None

Exceptions

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