CreateWorker - AWS IoT RoboRunner

CreateWorker

Creates a worker.

Models a physical worker within a fleet. You must associate the worker with a worker fleet.

Request Syntax

POST /createWorker HTTP/1.1 Content-type: application/json { "additionalInformation": "string", "clientToken": "string", "fleet": "string", "name": "string", "state": "string", "status": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

additionalInformation

JSON document that contains custom static attributes of the worker.

Type: String

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

Required: No

clientToken

Token used for detecting replayed requests. Replayed requests will not be performed multiple times.

Type: String

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

Pattern: [!-~]*

Required: No

fleet

Worker fleet Amazon Resource Name (ARN).

Type: String

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

Pattern: arn:aws:iotroborunner:[\w-]+:\w+:site/[\w-]+/worker-fleet/.*

Required: Yes

name

Human friendly name of the resource.

Type: String

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

Required: Yes

state

Worker state.

Type: String

Valid Values: ENABLED | DISABLED | BUSY | DECOMMISSIONED

Required: No

status

JSON document that contains custom status attributes of the worker.

Type: String

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

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "arn": "string", "createdAt": number, "id": "string", "site": "string", "updatedAt": number }

Response Elements

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

The following data is returned in JSON format by the service.

arn

Worker Amazon Resource Name (ARN).

Type: String

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

Pattern: arn:aws:iotroborunner:[\w-]+:\w+:site/[\w-]+/worker-fleet/[\w-]+/worker/.*

createdAt

Timestamp at which the resource was created.

Type: Timestamp

id

Worker ID.

Type: String

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

site

Site Amazon Resource Name (ARN).

Type: String

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

Pattern: arn:aws:iotroborunner:[\w-]+:\w+:site/.*

updatedAt

Timestamp at which the resource was last updated.

Type: Timestamp

Errors

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

AccessDeniedException

Exception thrown if the user does not have sufficient access to perform this action.

HTTP Status Code: 403

ConflictException

Exception thrown if the request results in a state that is not allowed by IoT RoboRunner.

HTTP Status Code: 409

InternalServerException

Exception thrown if something goes wrong within Iot RoboRunner.

HTTP Status Code: 500

ResourceNotFoundException

Exception thrown if a resource referenced in the request doesn't exist.

HTTP Status Code: 404

ServiceQuotaExceededException

Exception thrown if the user's AWS account has reached a service limit and the operation cannot proceed.

HTTP Status Code: 402

ThrottlingException

Exception thrown if the API is called too quickly.

HTTP Status Code: 429

ValidationException

Exception thrown if the API parameters do not pass validation.

HTTP Status Code: 400

See Also

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