AWS IoT 1-Click Projects Service
Projects API Reference (API Version 2018-05-14)

AssociateDeviceWithPlacement

Associates a physical device with a placement.

Request Syntax

PUT /projects/projectName/placements/placementName/devices/deviceTemplateName HTTP/1.1 Content-type: application/json { "deviceId": "string" }

URI Request Parameters

The request requires the following URI parameters.

deviceTemplateName

The device template name to associate with the device ID.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_-]+$

placementName

The name of the placement in which to associate the device.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_-]+$

projectName

The name of the project containing the placement in which to associate the device.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[0-9A-Za-z_-]+$

Request Body

The request accepts the following data in JSON format.

deviceId

The ID of the physical device to be associated with the given placement in the project. Note that a mandatory 4 character prefix is required for all deviceId values.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Required: Yes

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalFailureException

HTTP Status Code: 500

InvalidRequestException

HTTP Status Code: 400

ResourceConflictException

HTTP Status Code: 409

ResourceNotFoundException

HTTP Status Code: 404

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: