Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

attach_thing_principal

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