@aws-sdk/client-iot
Version:
AWS SDK for JavaScript Iot Client for Node.js, Browser and React Native
102 lines (101 loc) • 4.21 kB
TypeScript
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient";
import { CreateDimensionRequest, CreateDimensionResponse } from "../models/models_0";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link CreateDimensionCommand}.
*/
export interface CreateDimensionCommandInput extends CreateDimensionRequest {
}
/**
* @public
*
* The output of {@link CreateDimensionCommand}.
*/
export interface CreateDimensionCommandOutput extends CreateDimensionResponse, __MetadataBearer {
}
declare const CreateDimensionCommand_base: {
new (input: CreateDimensionCommandInput): import("@smithy/smithy-client").CommandImpl<CreateDimensionCommandInput, CreateDimensionCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (input: CreateDimensionCommandInput): import("@smithy/smithy-client").CommandImpl<CreateDimensionCommandInput, CreateDimensionCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <p>Create a dimension that you can use to limit the scope of a metric used in a security profile for IoT Device Defender.
* For example, using a <code>TOPIC_FILTER</code> dimension, you can narrow down the scope of the metric only to MQTT topics whose name match the pattern specified in the dimension.</p>
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">CreateDimension</a> action.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { IoTClient, CreateDimensionCommand } from "@aws-sdk/client-iot"; // ES Modules import
* // const { IoTClient, CreateDimensionCommand } = require("@aws-sdk/client-iot"); // CommonJS import
* const client = new IoTClient(config);
* const input = { // CreateDimensionRequest
* name: "STRING_VALUE", // required
* type: "TOPIC_FILTER", // required
* stringValues: [ // DimensionStringValues // required
* "STRING_VALUE",
* ],
* tags: [ // TagList
* { // Tag
* Key: "STRING_VALUE", // required
* Value: "STRING_VALUE",
* },
* ],
* clientRequestToken: "STRING_VALUE", // required
* };
* const command = new CreateDimensionCommand(input);
* const response = await client.send(command);
* // { // CreateDimensionResponse
* // name: "STRING_VALUE",
* // arn: "STRING_VALUE",
* // };
*
* ```
*
* @param CreateDimensionCommandInput - {@link CreateDimensionCommandInput}
* @returns {@link CreateDimensionCommandOutput}
* @see {@link CreateDimensionCommandInput} for command's `input` shape.
* @see {@link CreateDimensionCommandOutput} 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 LimitExceededException} (client fault)
* <p>A limit has been exceeded.</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 CreateDimensionCommand extends CreateDimensionCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: CreateDimensionRequest;
output: CreateDimensionResponse;
};
sdk: {
input: CreateDimensionCommandInput;
output: CreateDimensionCommandOutput;
};
};
}