import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; import type { CreateRuleRequest, CreateRuleResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateRuleCommand}. */ export interface CreateRuleCommandInput extends CreateRuleRequest { } /** * @public * * The output of {@link CreateRuleCommand}. */ export interface CreateRuleCommandOutput extends CreateRuleResponse, __MetadataBearer { } declare const CreateRuleCommand_base: { new (input: CreateRuleCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CreateRuleCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Creates a rule for the specified Amazon Connect instance.

*

Use the Rules Function * language to code conditions for the rule.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ConnectClient, CreateRuleCommand } from "@aws-sdk/client-connect"; // ES Modules import * // const { ConnectClient, CreateRuleCommand } = require("@aws-sdk/client-connect"); // CommonJS import * // import type { ConnectClientConfig } from "@aws-sdk/client-connect"; * const config = {}; // type is ConnectClientConfig * const client = new ConnectClient(config); * const input = { // CreateRuleRequest * InstanceId: "STRING_VALUE", // required * Name: "STRING_VALUE", // required * TriggerEventSource: { // RuleTriggerEventSource * EventSourceName: "OnPostCallAnalysisAvailable" || "OnRealTimeCallAnalysisAvailable" || "OnRealTimeChatAnalysisAvailable" || "OnPostChatAnalysisAvailable" || "OnEmailAnalysisAvailable" || "OnZendeskTicketCreate" || "OnZendeskTicketStatusUpdate" || "OnSalesforceCaseCreate" || "OnContactEvaluationSubmit" || "OnMetricDataUpdate" || "OnCaseCreate" || "OnCaseUpdate" || "OnSlaBreach", // required * IntegrationAssociationId: "STRING_VALUE", * }, * Function: "STRING_VALUE", // required * Actions: [ // RuleActions // required * { // RuleAction * ActionType: "CREATE_TASK" || "ASSIGN_CONTACT_CATEGORY" || "GENERATE_EVENTBRIDGE_EVENT" || "SEND_NOTIFICATION" || "CREATE_CASE" || "UPDATE_CASE" || "ASSIGN_SLA" || "END_ASSOCIATED_TASKS" || "SUBMIT_AUTO_EVALUATION", // required * TaskAction: { // TaskActionDefinition * Name: "STRING_VALUE", // required * Description: "STRING_VALUE", * ContactFlowId: "STRING_VALUE", // required * References: { // ContactReferences * "": { // Reference * Value: "STRING_VALUE", * Type: "URL" || "ATTACHMENT" || "CONTACT_ANALYSIS" || "NUMBER" || "STRING" || "DATE" || "EMAIL" || "EMAIL_MESSAGE" || "EMAIL_MESSAGE_PLAIN_TEXT" || "EMAIL_MESSAGE_PLAIN_TEXT_REDACTED" || "EMAIL_MESSAGE_REDACTED", // required * Status: "AVAILABLE" || "DELETED" || "APPROVED" || "REJECTED" || "PROCESSING" || "FAILED", * Arn: "STRING_VALUE", * StatusReason: "STRING_VALUE", * }, * }, * }, * EventBridgeAction: { // EventBridgeActionDefinition * Name: "STRING_VALUE", // required * }, * AssignContactCategoryAction: {}, * SendNotificationAction: { // SendNotificationActionDefinition * DeliveryMethod: "EMAIL", // required * Subject: "STRING_VALUE", * Content: "STRING_VALUE", // required * ContentType: "PLAIN_TEXT", // required * Recipient: { // NotificationRecipientType * UserTags: { // UserTagMap * "": "STRING_VALUE", * }, * UserIds: [ // UserIdList * "STRING_VALUE", * ], * }, * Exclusion: { * UserTags: { * "": "STRING_VALUE", * }, * UserIds: [ * "STRING_VALUE", * ], * }, * }, * CreateCaseAction: { // CreateCaseActionDefinition * Fields: [ // FieldValues // required * { // FieldValue * Id: "STRING_VALUE", // required * Value: { // FieldValueUnion * BooleanValue: true || false, * DoubleValue: Number("double"), * EmptyValue: {}, * StringValue: "STRING_VALUE", * }, * }, * ], * TemplateId: "STRING_VALUE", // required * }, * UpdateCaseAction: { // UpdateCaseActionDefinition * Fields: [ // required * { * Id: "STRING_VALUE", // required * Value: { * BooleanValue: true || false, * DoubleValue: Number("double"), * EmptyValue: {}, * StringValue: "STRING_VALUE", * }, * }, * ], * }, * AssignSlaAction: { // AssignSlaActionDefinition * SlaAssignmentType: "CASES", // required * CaseSlaConfiguration: { // CaseSlaConfiguration * Name: "STRING_VALUE", // required * Type: "CaseField", // required * FieldId: "STRING_VALUE", * TargetFieldValues: [ // SlaFieldValueUnionList * { * BooleanValue: true || false, * DoubleValue: Number("double"), * EmptyValue: {}, * StringValue: "STRING_VALUE", * }, * ], * TargetSlaMinutes: Number("long"), // required * }, * }, * EndAssociatedTasksAction: {}, * SubmitAutoEvaluationAction: { // SubmitAutoEvaluationActionDefinition * EvaluationFormId: "STRING_VALUE", // required * }, * }, * ], * PublishStatus: "DRAFT" || "PUBLISHED", // required * ClientToken: "STRING_VALUE", * }; * const command = new CreateRuleCommand(input); * const response = await client.send(command); * // { // CreateRuleResponse * // RuleArn: "STRING_VALUE", // required * // RuleId: "STRING_VALUE", // required * // }; * * ``` * * @param CreateRuleCommandInput - {@link CreateRuleCommandInput} * @returns {@link CreateRuleCommandOutput} * @see {@link CreateRuleCommandInput} for command's `input` shape. * @see {@link CreateRuleCommandOutput} for command's `response` shape. * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

You do not have sufficient permissions to perform this action.

* * @throws {@link InternalServiceException} (server fault) *

Request processing failed because of an error or failure with the service.

* * @throws {@link InvalidRequestException} (client fault) *

The request is not valid.

* * @throws {@link ResourceConflictException} (client fault) *

A resource already has that name.

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource was not found.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The service quota has been exceeded.

* * @throws {@link ThrottlingException} (client fault) *

The throttling limit has been exceeded.

* * @throws {@link ConnectServiceException} *

Base exception class for all service exceptions from Connect service.

* * * @public */ export declare class CreateRuleCommand extends CreateRuleCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateRuleRequest; output: CreateRuleResponse; }; sdk: { input: CreateRuleCommandInput; output: CreateRuleCommandOutput; }; }; }