import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CreateEventSubscriptionMessage, CreateEventSubscriptionResult } from "../models/models_0"; import type { RedshiftClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RedshiftClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateEventSubscriptionCommand}. */ export interface CreateEventSubscriptionCommandInput extends CreateEventSubscriptionMessage { } /** * @public * * The output of {@link CreateEventSubscriptionCommand}. */ export interface CreateEventSubscriptionCommandOutput extends CreateEventSubscriptionResult, __MetadataBearer { } declare const CreateEventSubscriptionCommand_base: { new (input: CreateEventSubscriptionCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CreateEventSubscriptionCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Creates an Amazon Redshift event notification subscription. This action requires an ARN * (Amazon Resource Name) of an Amazon SNS topic created by either the Amazon Redshift console, * the Amazon SNS console, or the Amazon SNS API. To obtain an ARN with Amazon SNS, you * must create a topic in Amazon SNS and subscribe to the topic. The ARN is displayed in * the SNS console.

*

You can specify the source type, and lists of Amazon Redshift source IDs, event * categories, and event severities. Notifications will be sent for all events you want * that match those criteria. For example, you can specify source type = cluster, source ID * = my-cluster-1 and mycluster2, event categories = Availability, Backup, and severity = * ERROR. The subscription will only send notifications for those ERROR events in the * Availability and Backup categories for the specified clusters.

*

If you specify both the source type and source IDs, such as source type = cluster * and source identifier = my-cluster-1, notifications will be sent for all the cluster * events for my-cluster-1. If you specify a source type but do not specify a source * identifier, you will receive notice of the events for the objects of that type in your * Amazon Web Services account. If you do not specify either the SourceType nor the SourceIdentifier, you * will be notified of events generated from all Amazon Redshift sources belonging to your Amazon Web Services account. You must specify a source type if you specify a source ID.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { RedshiftClient, CreateEventSubscriptionCommand } from "@aws-sdk/client-redshift"; // ES Modules import * // const { RedshiftClient, CreateEventSubscriptionCommand } = require("@aws-sdk/client-redshift"); // CommonJS import * // import type { RedshiftClientConfig } from "@aws-sdk/client-redshift"; * const config = {}; // type is RedshiftClientConfig * const client = new RedshiftClient(config); * const input = { // CreateEventSubscriptionMessage * SubscriptionName: "STRING_VALUE", // required * SnsTopicArn: "STRING_VALUE", // required * SourceType: "STRING_VALUE", * SourceIds: [ // SourceIdsList * "STRING_VALUE", * ], * EventCategories: [ // EventCategoriesList * "STRING_VALUE", * ], * Severity: "STRING_VALUE", * Enabled: true || false, * Tags: [ // TagList * { // Tag * Key: "STRING_VALUE", * Value: "STRING_VALUE", * }, * ], * }; * const command = new CreateEventSubscriptionCommand(input); * const response = await client.send(command); * // { // CreateEventSubscriptionResult * // EventSubscription: { // EventSubscription * // CustomerAwsId: "STRING_VALUE", * // CustSubscriptionId: "STRING_VALUE", * // SnsTopicArn: "STRING_VALUE", * // Status: "STRING_VALUE", * // SubscriptionCreationTime: new Date("TIMESTAMP"), * // SourceType: "STRING_VALUE", * // SourceIdsList: [ // SourceIdsList * // "STRING_VALUE", * // ], * // EventCategoriesList: [ // EventCategoriesList * // "STRING_VALUE", * // ], * // Severity: "STRING_VALUE", * // Enabled: true || false, * // Tags: [ // TagList * // { // Tag * // Key: "STRING_VALUE", * // Value: "STRING_VALUE", * // }, * // ], * // }, * // }; * * ``` * * @param CreateEventSubscriptionCommandInput - {@link CreateEventSubscriptionCommandInput} * @returns {@link CreateEventSubscriptionCommandOutput} * @see {@link CreateEventSubscriptionCommandInput} for command's `input` shape. * @see {@link CreateEventSubscriptionCommandOutput} for command's `response` shape. * @see {@link RedshiftClientResolvedConfig | config} for RedshiftClient's `config` shape. * * @throws {@link EventSubscriptionQuotaExceededFault} (client fault) *

The request would exceed the allowed number of event subscriptions for this * account. * For information about increasing your quota, go to Limits in Amazon Redshift * in the Amazon Redshift Cluster Management Guide. *

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

The tag is invalid.

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

Amazon SNS has responded that there is a problem with the specified Amazon SNS * topic.

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

You do not have permission to publish to the specified Amazon SNS topic.

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

An Amazon SNS topic with the specified Amazon Resource Name (ARN) does not * exist.

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

The specified Amazon Redshift event source could not be found.

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

There is already an existing event notification subscription with the specified * name.

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

The value specified for the event category was not one of the allowed values, or it * specified a category that does not apply to the specified source type. The allowed * values are Configuration, Management, Monitoring, and Security.

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

An Amazon Redshift event with the specified event ID does not exist.

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

The value specified for the event severity was not one of the allowed values, or it * specified a severity that does not apply to the specified source type. The allowed * values are ERROR and INFO.

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

You have exceeded the number of tags allowed.

* * @throws {@link RedshiftServiceException} *

Base exception class for all service exceptions from Redshift service.

* * * @public */ export declare class CreateEventSubscriptionCommand extends CreateEventSubscriptionCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateEventSubscriptionMessage; output: CreateEventSubscriptionResult; }; sdk: { input: CreateEventSubscriptionCommandInput; output: CreateEventSubscriptionCommandOutput; }; }; }