Menu
AWS IoT
Developer Guide

AddThingToThingGroup

Adds a thing to a thing group.

Request syntax:

PUT /thing-groups/addThingToThingGroup Content-type: application/json { "thingGroupName": "string", "thingGroupArn": "string", "thingName": "string", "thingArn": "string" }

Request Body Parameters:

Name

Type

Req?

Description

thingGroupName

ThingGroupName

no

The name of the group to which you are adding a thing.

thingGroupArn

ThingGroupArn

no

The ARN of the group to which you are adding a thing.

thingName

ThingName

no

The name of the thing to add to a group.

thingArn

ThingArn

no

The ARN of the thing to add to a group.

Errors:

InvalidRequestException

The contents of the request were invalid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.

HTTP response code: 400

ThrottlingException

The rate exceeds the limit.

HTTP response code: 429

InternalFailureException

An unexpected error has occurred.

HTTP response code: 500

ResourceNotFoundException

The specified resource does not exist.

HTTP response code: 404

CLI

Synopsis:

aws iot add-thing-to-thing-group \ [--thing-group-name <value>] \ [--thing-group-arn <value>] \ [--thing-name <value>] \ [--thing-arn <value>] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

{ "thingGroupName": "string", "thingGroupArn": "string", "thingName": "string", "thingArn": "string" }

cli-input-json fields:

Name

Type

Description

thingGroupName

string

length max:128 min:1

pattern: [a-zA-Z0-9:_-]+

The name of the group to which you are adding a thing.

thingGroupArn

string

The ARN of the group to which you are adding a thing.

thingName

string

length max:128 min:1

pattern: [a-zA-Z0-9:_-]+

The name of the thing to add to a group.

thingArn

string

The ARN of the thing to add to a group.

Output:

None

On this page: