UNPKG

@aws-sdk/client-iot

Version:

AWS SDK for JavaScript Iot Client for Node.js, Browser and React Native

102 lines (101 loc) 4.13 kB
import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient"; import { CreateCustomMetricRequest, CreateCustomMetricResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateCustomMetricCommand}. */ export interface CreateCustomMetricCommandInput extends CreateCustomMetricRequest { } /** * @public * * The output of {@link CreateCustomMetricCommand}. */ export interface CreateCustomMetricCommandOutput extends CreateCustomMetricResponse, __MetadataBearer { } declare const CreateCustomMetricCommand_base: { new (input: CreateCustomMetricCommandInput): import("@smithy/smithy-client").CommandImpl<CreateCustomMetricCommandInput, CreateCustomMetricCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>; new (input: CreateCustomMetricCommandInput): import("@smithy/smithy-client").CommandImpl<CreateCustomMetricCommandInput, CreateCustomMetricCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** * <p> Use this API to define a * Custom * Metric * published by your devices to Device Defender. </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">CreateCustomMetric</a> action.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { IoTClient, CreateCustomMetricCommand } from "@aws-sdk/client-iot"; // ES Modules import * // const { IoTClient, CreateCustomMetricCommand } = require("@aws-sdk/client-iot"); // CommonJS import * const client = new IoTClient(config); * const input = { // CreateCustomMetricRequest * metricName: "STRING_VALUE", // required * displayName: "STRING_VALUE", * metricType: "string-list" || "ip-address-list" || "number-list" || "number", // required * tags: [ // TagList * { // Tag * Key: "STRING_VALUE", // required * Value: "STRING_VALUE", * }, * ], * clientRequestToken: "STRING_VALUE", // required * }; * const command = new CreateCustomMetricCommand(input); * const response = await client.send(command); * // { // CreateCustomMetricResponse * // metricName: "STRING_VALUE", * // metricArn: "STRING_VALUE", * // }; * * ``` * * @param CreateCustomMetricCommandInput - {@link CreateCustomMetricCommandInput} * @returns {@link CreateCustomMetricCommandOutput} * @see {@link CreateCustomMetricCommandInput} for command's `input` shape. * @see {@link CreateCustomMetricCommandOutput} 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 CreateCustomMetricCommand extends CreateCustomMetricCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateCustomMetricRequest; output: CreateCustomMetricResponse; }; sdk: { input: CreateCustomMetricCommandInput; output: CreateCustomMetricCommandOutput; }; }; }