RequestSenderIdCommand

Request a new sender ID that doesn't require registration.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { PinpointSMSVoiceV2Client, RequestSenderIdCommand } from "@aws-sdk/client-pinpoint-sms-voice-v2"; // ES Modules import
// const { PinpointSMSVoiceV2Client, RequestSenderIdCommand } = require("@aws-sdk/client-pinpoint-sms-voice-v2"); // CommonJS import
const client = new PinpointSMSVoiceV2Client(config);
const input = { // RequestSenderIdRequest
  SenderId: "STRING_VALUE", // required
  IsoCountryCode: "STRING_VALUE", // required
  MessageTypes: [ // MessageTypeList
    "STRING_VALUE",
  ],
  DeletionProtectionEnabled: true || false,
  Tags: [ // TagList
    { // Tag
      Key: "STRING_VALUE", // required
      Value: "STRING_VALUE", // required
    },
  ],
  ClientToken: "STRING_VALUE",
};
const command = new RequestSenderIdCommand(input);
const response = await client.send(command);
// { // RequestSenderIdResult
//   SenderIdArn: "STRING_VALUE", // required
//   SenderId: "STRING_VALUE", // required
//   IsoCountryCode: "STRING_VALUE", // required
//   MessageTypes: [ // MessageTypeList // required
//     "STRING_VALUE",
//   ],
//   MonthlyLeasingPrice: "STRING_VALUE", // required
//   DeletionProtectionEnabled: true || false, // required
//   Registered: true || false, // required
//   Tags: [ // TagList
//     { // Tag
//       Key: "STRING_VALUE", // required
//       Value: "STRING_VALUE", // required
//     },
//   ],
// };

RequestSenderIdCommand Input

See RequestSenderIdCommandInput for more details

Parameter
Type
Description
IsoCountryCode
Required
string | undefined

The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.

SenderId
Required
string | undefined

The sender ID string to request.

ClientToken
string | undefined

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.

DeletionProtectionEnabled
boolean | undefined

By default this is set to false. When set to true the sender ID can't be deleted.

MessageTypes
MessageType[] | undefined

The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.

Tags
Tag[] | undefined

An array of tags (key and value pairs) to associate with the sender ID.

RequestSenderIdCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
DeletionProtectionEnabled
Required
boolean | undefined

By default this is set to false. When set to true the sender ID can't be deleted.

IsoCountryCode
Required
string | undefined

The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.

MessageTypes
Required
MessageType[] | undefined

The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.

MonthlyLeasingPrice
Required
string | undefined

The monthly price, in US dollars, to lease the sender ID.

Registered
Required
boolean | undefined

True if the sender ID is registered.

SenderId
Required
string | undefined

The sender ID that was requested.

SenderIdArn
Required
string | undefined

The Amazon Resource Name (ARN) associated with the SenderId.

Tags
Tag[] | undefined

An array of tags (key and value pairs) to associate with the sender ID.

Throws

Name
Fault
Details
AccessDeniedException
client

The request was denied because you don't have sufficient permissions to access the resource.

ConflictException
client

Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time or it could be that the requested action isn't valid for the current state or configuration of the resource.

InternalServerException
server

The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.

ServiceQuotaExceededException
client

The request would cause a service quota to be exceeded.

ThrottlingException
client

An error that occurred because too many requests were sent during a certain amount of time.

ValidationException
client

A validation exception for a field.

PinpointSMSVoiceV2ServiceException
Base exception class for all service exceptions from PinpointSMSVoiceV2 service.