IoT / Client / attach_thing_principal

attach_thing_principal#

IoT.Client.attach_thing_principal(**kwargs)#

Attaches the specified principal to the specified thing. A principal can be X.509 certificates, Amazon Cognito identities or federated identities.

Requires permission to access the AttachThingPrincipal action.

See also: AWS API Documentation

Request Syntax

response = client.attach_thing_principal(
    thingName='string',
    principal='string'
)
Parameters:
  • thingName (string) –

    [REQUIRED]

    The name of the thing.

  • principal (string) –

    [REQUIRED]

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

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

    The output from the AttachThingPrincipal operation.

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