import { _MessageAttributeValue } from "./_MessageAttributeValue"; import { NodeHttpOptions as __HttpOptions__ } from "@aws-sdk/types"; import * as __aws_sdk_types from "@aws-sdk/types"; /** *

Input for Publish action.

*/ export interface PublishInput { /** *

The topic you want to publish to.

If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters.

*/ TopicArn?: string; /** *

If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters.

*/ TargetArn?: string; /** *

The phone number to which you want to deliver an SMS message. Use E.164 format.

If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn parameters.

*/ PhoneNumber?: string; /** *

The message you want to send.

The Message parameter is always a string. If you set MessageStructure to json, you must string-encode the Message parameter.

If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure parameter to json and use a JSON object for the Message parameter.

Constraints:

JSON-specific constraints:

*/ Message: string; /** *

Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints.

Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.

*/ Subject?: string; /** *

Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must:

You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http").

For information about sending different messages for each protocol using the AWS Management Console, go to Create Different Messages for Each Protocol in the Amazon Simple Notification Service Getting Started Guide.

Valid value: json

*/ MessageStructure?: string; /** *

Message attributes for Publish action.

*/ MessageAttributes?: { [key: string]: _MessageAttributeValue; } | Iterable<[string, _MessageAttributeValue]>; /** * The maximum number of times this operation should be retried. If set, this value will override the `maxRetries` configuration set on the client for this command. */ $maxRetries?: number; /** * An object that may be queried to determine if the underlying operation has been aborted. * * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal */ $abortSignal?: __aws_sdk_types.AbortSignal; /** * Per-request HTTP configuration options. If set, any options specified will override the corresponding HTTP option set on the client for this command. */ $httpOptions?: __HttpOptions__; }