@aws-sdk/client-iot
Version:
AWS SDK for JavaScript Iot Client for Node.js, Browser and React Native
111 lines (110 loc) • 4.96 kB
TypeScript
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient";
import { CreateTopicRuleDestinationRequest, CreateTopicRuleDestinationResponse } from "../models/models_0";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link CreateTopicRuleDestinationCommand}.
*/
export interface CreateTopicRuleDestinationCommandInput extends CreateTopicRuleDestinationRequest {
}
/**
* @public
*
* The output of {@link CreateTopicRuleDestinationCommand}.
*/
export interface CreateTopicRuleDestinationCommandOutput extends CreateTopicRuleDestinationResponse, __MetadataBearer {
}
declare const CreateTopicRuleDestinationCommand_base: {
new (input: CreateTopicRuleDestinationCommandInput): import("@smithy/smithy-client").CommandImpl<CreateTopicRuleDestinationCommandInput, CreateTopicRuleDestinationCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (__0_0: CreateTopicRuleDestinationCommandInput): import("@smithy/smithy-client").CommandImpl<CreateTopicRuleDestinationCommandInput, CreateTopicRuleDestinationCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <p>Creates a topic rule destination. The destination must be confirmed prior to use.</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">CreateTopicRuleDestination</a> action.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { IoTClient, CreateTopicRuleDestinationCommand } from "@aws-sdk/client-iot"; // ES Modules import
* // const { IoTClient, CreateTopicRuleDestinationCommand } = require("@aws-sdk/client-iot"); // CommonJS import
* const client = new IoTClient(config);
* const input = { // CreateTopicRuleDestinationRequest
* destinationConfiguration: { // TopicRuleDestinationConfiguration
* httpUrlConfiguration: { // HttpUrlDestinationConfiguration
* confirmationUrl: "STRING_VALUE", // required
* },
* vpcConfiguration: { // VpcDestinationConfiguration
* subnetIds: [ // SubnetIdList // required
* "STRING_VALUE",
* ],
* securityGroups: [ // SecurityGroupList
* "STRING_VALUE",
* ],
* vpcId: "STRING_VALUE", // required
* roleArn: "STRING_VALUE", // required
* },
* },
* };
* const command = new CreateTopicRuleDestinationCommand(input);
* const response = await client.send(command);
* // { // CreateTopicRuleDestinationResponse
* // topicRuleDestination: { // TopicRuleDestination
* // arn: "STRING_VALUE",
* // status: "ENABLED" || "IN_PROGRESS" || "DISABLED" || "ERROR" || "DELETING",
* // createdAt: new Date("TIMESTAMP"),
* // lastUpdatedAt: new Date("TIMESTAMP"),
* // statusReason: "STRING_VALUE",
* // httpUrlProperties: { // HttpUrlDestinationProperties
* // confirmationUrl: "STRING_VALUE",
* // },
* // vpcProperties: { // VpcDestinationProperties
* // subnetIds: [ // SubnetIdList
* // "STRING_VALUE",
* // ],
* // securityGroups: [ // SecurityGroupList
* // "STRING_VALUE",
* // ],
* // vpcId: "STRING_VALUE",
* // roleArn: "STRING_VALUE",
* // },
* // },
* // };
*
* ```
*
* @param CreateTopicRuleDestinationCommandInput - {@link CreateTopicRuleDestinationCommandInput}
* @returns {@link CreateTopicRuleDestinationCommandOutput}
* @see {@link CreateTopicRuleDestinationCommandInput} for command's `input` shape.
* @see {@link CreateTopicRuleDestinationCommandOutput} for command's `response` shape.
* @see {@link IoTClientResolvedConfig | config} for IoTClient's `config` shape.
*
* @throws {@link ConflictingResourceUpdateException} (client fault)
* <p>A conflicting resource update exception. This exception is thrown when two pending
* updates cause a conflict.</p>
*
* @throws {@link InternalException} (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 ServiceUnavailableException} (server fault)
* <p>The service is temporarily unavailable.</p>
*
* @throws {@link IoTServiceException}
* <p>Base exception class for all service exceptions from IoT service.</p>
*
* @public
*/
export declare class CreateTopicRuleDestinationCommand extends CreateTopicRuleDestinationCommand_base {
}