@aws-sdk/client-iot
Version:
AWS SDK for JavaScript Iot Client for Node.js, Browser and React Native
111 lines (110 loc) • 4.52 kB
TypeScript
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient";
import { CreateThingGroupRequest, CreateThingGroupResponse } from "../models/models_0";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link CreateThingGroupCommand}.
*/
export interface CreateThingGroupCommandInput extends CreateThingGroupRequest {
}
/**
* @public
*
* The output of {@link CreateThingGroupCommand}.
*/
export interface CreateThingGroupCommandOutput extends CreateThingGroupResponse, __MetadataBearer {
}
declare const CreateThingGroupCommand_base: {
new (input: CreateThingGroupCommandInput): import("@smithy/smithy-client").CommandImpl<CreateThingGroupCommandInput, CreateThingGroupCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (input: CreateThingGroupCommandInput): import("@smithy/smithy-client").CommandImpl<CreateThingGroupCommandInput, CreateThingGroupCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <p>Create a thing group.</p>
* <note>
* <p>This is a control plane operation. See <a href="https://docs.aws.amazon.com/iot/latest/developerguide/iot-authorization.html">Authorization</a> for
* information about authorizing control plane actions.</p>
* <p>If the <code>ThingGroup</code> that you create has the exact same attributes as an existing
* <code>ThingGroup</code>, you will get a 200 success response.
* </p>
* </note>
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">CreateThingGroup</a> action.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { IoTClient, CreateThingGroupCommand } from "@aws-sdk/client-iot"; // ES Modules import
* // const { IoTClient, CreateThingGroupCommand } = require("@aws-sdk/client-iot"); // CommonJS import
* const client = new IoTClient(config);
* const input = { // CreateThingGroupRequest
* thingGroupName: "STRING_VALUE", // required
* parentGroupName: "STRING_VALUE",
* thingGroupProperties: { // ThingGroupProperties
* thingGroupDescription: "STRING_VALUE",
* attributePayload: { // AttributePayload
* attributes: { // Attributes
* "<keys>": "STRING_VALUE",
* },
* merge: true || false,
* },
* },
* tags: [ // TagList
* { // Tag
* Key: "STRING_VALUE", // required
* Value: "STRING_VALUE",
* },
* ],
* };
* const command = new CreateThingGroupCommand(input);
* const response = await client.send(command);
* // { // CreateThingGroupResponse
* // thingGroupName: "STRING_VALUE",
* // thingGroupArn: "STRING_VALUE",
* // thingGroupId: "STRING_VALUE",
* // };
*
* ```
*
* @param CreateThingGroupCommandInput - {@link CreateThingGroupCommandInput}
* @returns {@link CreateThingGroupCommandOutput}
* @see {@link CreateThingGroupCommandInput} for command's `input` shape.
* @see {@link CreateThingGroupCommandOutput} for command's `response` shape.
* @see {@link IoTClientResolvedConfig | config} for IoTClient's `config` shape.
*
* @throws {@link InternalFailureException} (server fault)
* <p>An unexpected error has occurred.</p>
*
* @throws {@link InvalidRequestException} (client fault)
* <p>The request is not valid.</p>
*
* @throws {@link ResourceAlreadyExistsException} (client fault)
* <p>The resource already exists.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The rate exceeds the limit.</p>
*
* @throws {@link IoTServiceException}
* <p>Base exception class for all service exceptions from IoT service.</p>
*
*
* @public
*/
export declare class CreateThingGroupCommand extends CreateThingGroupCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: CreateThingGroupRequest;
output: CreateThingGroupResponse;
};
sdk: {
input: CreateThingGroupCommandInput;
output: CreateThingGroupCommandOutput;
};
};
}