SDK for PHP 3.x

Client: Aws\PinpointSMSVoice\PinpointSMSVoiceClient
Service ID: sms-voice
Version: 2018-09-05

This page describes the parameters and results for the operations of the Amazon Pinpoint SMS and Voice Service (2018-09-05), and shows how to use the Aws\PinpointSMSVoice\PinpointSMSVoiceClient object to call the described operations. This documentation is specific to the 2018-09-05 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

CreateConfigurationSet ( array $params = [] )
Create a new configuration set.
CreateConfigurationSetEventDestination ( array $params = [] )
Create a new event destination in a configuration set.
DeleteConfigurationSet ( array $params = [] )
Deletes an existing configuration set.
DeleteConfigurationSetEventDestination ( array $params = [] )
Deletes an event destination in a configuration set.
GetConfigurationSetEventDestinations ( array $params = [] )
Obtain information about an event destination, including the types of events it reports, the Amazon Resource Name (ARN) of the destination, and the name of the event destination.
ListConfigurationSets ( array $params = [] )
List all of the configuration sets associated with your Amazon Pinpoint account in the current region.
SendVoiceMessage ( array $params = [] )
Create a new voice message and send it to a recipient's phone number.
UpdateConfigurationSetEventDestination ( array $params = [] )
Update an event destination in a configuration set.

Operations

CreateConfigurationSet

$result = $client->createConfigurationSet([/* ... */]);
$promise = $client->createConfigurationSetAsync([/* ... */]);

Create a new configuration set. After you create the configuration set, you can add one or more event destinations to it.

Parameter Syntax

$result = $client->createConfigurationSet([
    'ConfigurationSetName' => '<string>',
]);

Parameter Details

Members
ConfigurationSetName
Type: string
The name that you want to give the configuration set.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

TooManyRequestsException:
You've issued too many requests to the resource. Wait a few minutes, and then try again.
BadRequestException:
The input you provided is invalid.
LimitExceededException:
There are too many instances of the specified resource type.
InternalServiceErrorException:
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.
AlreadyExistsException:
The resource specified in your request already exists.

CreateConfigurationSetEventDestination

$result = $client->createConfigurationSetEventDestination([/* ... */]);
$promise = $client->createConfigurationSetEventDestinationAsync([/* ... */]);

Create a new event destination in a configuration set.

Parameter Syntax

$result = $client->createConfigurationSetEventDestination([
    'ConfigurationSetName' => '<string>', // REQUIRED
    'EventDestination' => [
        'CloudWatchLogsDestination' => [
            'IamRoleArn' => '<string>',
            'LogGroupArn' => '<string>',
        ],
        'Enabled' => true || false,
        'KinesisFirehoseDestination' => [
            'DeliveryStreamArn' => '<string>',
            'IamRoleArn' => '<string>',
        ],
        'MatchingEventTypes' => ['<string>', ...],
        'SnsDestination' => [
            'TopicArn' => '<string>',
        ],
    ],
    'EventDestinationName' => '<string>',
]);

Parameter Details

Members
ConfigurationSetName
Required: Yes
Type: string
EventDestination
Type: EventDestinationDefinition structure
An object that defines a single event destination.
EventDestinationName
Type: string
A name that identifies the event destination.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

BadRequestException:
The input you provided is invalid.
LimitExceededException:
There are too many instances of the specified resource type.
InternalServiceErrorException:
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.
NotFoundException:
The resource you attempted to access doesn't exist.
TooManyRequestsException:
You've issued too many requests to the resource. Wait a few minutes, and then try again.
AlreadyExistsException:
The resource specified in your request already exists.

DeleteConfigurationSet

$result = $client->deleteConfigurationSet([/* ... */]);
$promise = $client->deleteConfigurationSetAsync([/* ... */]);

Deletes an existing configuration set.

Parameter Syntax

$result = $client->deleteConfigurationSet([
    'ConfigurationSetName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ConfigurationSetName
Required: Yes
Type: string

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

NotFoundException:
The resource you attempted to access doesn't exist.
TooManyRequestsException:
You've issued too many requests to the resource. Wait a few minutes, and then try again.
BadRequestException:
The input you provided is invalid.
InternalServiceErrorException:
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.

DeleteConfigurationSetEventDestination

$result = $client->deleteConfigurationSetEventDestination([/* ... */]);
$promise = $client->deleteConfigurationSetEventDestinationAsync([/* ... */]);

Deletes an event destination in a configuration set.

Parameter Syntax

$result = $client->deleteConfigurationSetEventDestination([
    'ConfigurationSetName' => '<string>', // REQUIRED
    'EventDestinationName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ConfigurationSetName
Required: Yes
Type: string
EventDestinationName
Required: Yes
Type: string

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

NotFoundException:
The resource you attempted to access doesn't exist.
TooManyRequestsException:
You've issued too many requests to the resource. Wait a few minutes, and then try again.
BadRequestException:
The input you provided is invalid.
InternalServiceErrorException:
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.

GetConfigurationSetEventDestinations

$result = $client->getConfigurationSetEventDestinations([/* ... */]);
$promise = $client->getConfigurationSetEventDestinationsAsync([/* ... */]);

Obtain information about an event destination, including the types of events it reports, the Amazon Resource Name (ARN) of the destination, and the name of the event destination.

Parameter Syntax

$result = $client->getConfigurationSetEventDestinations([
    'ConfigurationSetName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ConfigurationSetName
Required: Yes
Type: string

Result Syntax

[
    'EventDestinations' => [
        [
            'CloudWatchLogsDestination' => [
                'IamRoleArn' => '<string>',
                'LogGroupArn' => '<string>',
            ],
            'Enabled' => true || false,
            'KinesisFirehoseDestination' => [
                'DeliveryStreamArn' => '<string>',
                'IamRoleArn' => '<string>',
            ],
            'MatchingEventTypes' => ['<string>', ...],
            'Name' => '<string>',
            'SnsDestination' => [
                'TopicArn' => '<string>',
            ],
        ],
        // ...
    ],
]

Result Details

Members
EventDestinations
Type: Array of EventDestination structures
An array of EventDestination objects. Each EventDestination object includes ARNs and other information that define an event destination.

Errors

NotFoundException:
The resource you attempted to access doesn't exist.
TooManyRequestsException:
You've issued too many requests to the resource. Wait a few minutes, and then try again.
BadRequestException:
The input you provided is invalid.
InternalServiceErrorException:
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.

ListConfigurationSets

$result = $client->listConfigurationSets([/* ... */]);
$promise = $client->listConfigurationSetsAsync([/* ... */]);

List all of the configuration sets associated with your Amazon Pinpoint account in the current region.

Parameter Syntax

$result = $client->listConfigurationSets([
    'NextToken' => '<string>',
    'PageSize' => '<string>',
]);

Parameter Details

Members
NextToken
Type: string
PageSize
Type: string

Result Syntax

[
    'ConfigurationSets' => ['<string>', ...],
    'NextToken' => '<string>',
]

Result Details

Members
ConfigurationSets
Type: Array of strings
An object that contains a list of configuration sets for your account in the current region.
NextToken
Type: string
A token returned from a previous call to ListConfigurationSets to indicate the position in the list of configuration sets.

Errors

TooManyRequestsException:
You've issued too many requests to the resource. Wait a few minutes, and then try again.
BadRequestException:
The input you provided is invalid.
InternalServiceErrorException:
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.

SendVoiceMessage

$result = $client->sendVoiceMessage([/* ... */]);
$promise = $client->sendVoiceMessageAsync([/* ... */]);

Create a new voice message and send it to a recipient's phone number.

Parameter Syntax

$result = $client->sendVoiceMessage([
    'CallerId' => '<string>',
    'ConfigurationSetName' => '<string>',
    'Content' => [
        'CallInstructionsMessage' => [
            'Text' => '<string>',
        ],
        'PlainTextMessage' => [
            'LanguageCode' => '<string>',
            'Text' => '<string>',
            'VoiceId' => '<string>',
        ],
        'SSMLMessage' => [
            'LanguageCode' => '<string>',
            'Text' => '<string>',
            'VoiceId' => '<string>',
        ],
    ],
    'DestinationPhoneNumber' => '<string>',
    'OriginationPhoneNumber' => '<string>',
]);

Parameter Details

Members
CallerId
Type: string
The phone number that appears on recipients' devices when they receive the message.
ConfigurationSetName
Type: string
The name of the configuration set that you want to use to send the message.
Content
Type: VoiceMessageContent structure
An object that contains a voice message and information about the recipient that you want to send it to.
DestinationPhoneNumber
Type: string
The phone number that you want to send the voice message to.
OriginationPhoneNumber
Type: string
The phone number that Amazon Pinpoint should use to send the voice message. This isn't necessarily the phone number that appears on recipients' devices when they receive the message, because you can specify a CallerId parameter in the request.

Result Syntax

[
    'MessageId' => '<string>',
]

Result Details

Members
MessageId
Type: string
A unique identifier for the voice message.

Errors

TooManyRequestsException:
You've issued too many requests to the resource. Wait a few minutes, and then try again.
BadRequestException:
The input you provided is invalid.
InternalServiceErrorException:
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.

UpdateConfigurationSetEventDestination

$result = $client->updateConfigurationSetEventDestination([/* ... */]);
$promise = $client->updateConfigurationSetEventDestinationAsync([/* ... */]);

Update an event destination in a configuration set. An event destination is a location that you publish information about your voice calls to. For example, you can log an event to an Amazon CloudWatch destination when a call fails.

Parameter Syntax

$result = $client->updateConfigurationSetEventDestination([
    'ConfigurationSetName' => '<string>', // REQUIRED
    'EventDestination' => [
        'CloudWatchLogsDestination' => [
            'IamRoleArn' => '<string>',
            'LogGroupArn' => '<string>',
        ],
        'Enabled' => true || false,
        'KinesisFirehoseDestination' => [
            'DeliveryStreamArn' => '<string>',
            'IamRoleArn' => '<string>',
        ],
        'MatchingEventTypes' => ['<string>', ...],
        'SnsDestination' => [
            'TopicArn' => '<string>',
        ],
    ],
    'EventDestinationName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ConfigurationSetName
Required: Yes
Type: string
EventDestination
Type: EventDestinationDefinition structure
An object that defines a single event destination.
EventDestinationName
Required: Yes
Type: string

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

NotFoundException:
The resource you attempted to access doesn't exist.
TooManyRequestsException:
You've issued too many requests to the resource. Wait a few minutes, and then try again.
BadRequestException:
The input you provided is invalid.
InternalServiceErrorException:
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.

Shapes

AlreadyExistsException

Description
The resource specified in your request already exists.
Members
Message
Type: string

BadRequestException

Description
The input you provided is invalid.
Members
Message
Type: string

CallInstructionsMessageType

Description
An object that defines a message that contains text formatted using Amazon Pinpoint Voice Instructions markup.
Members
Text
Type: string
The language to use when delivering the message. For a complete list of supported languages, see the Amazon Polly Developer Guide.

CloudWatchLogsDestination

Description
An object that contains information about an event destination that sends data to Amazon CloudWatch Logs.
Members
IamRoleArn
Type: string
The Amazon Resource Name (ARN) of an Amazon Identity and Access Management (IAM) role that is able to write event data to an Amazon CloudWatch destination.
LogGroupArn
Type: string
The name of the Amazon CloudWatch Log Group that you want to record events in.

EventDestination

Description
An object that defines an event destination.
Members
CloudWatchLogsDestination
Type: CloudWatchLogsDestination structure
An object that contains information about an event destination that sends data to Amazon CloudWatch Logs.
Enabled
Type: boolean
Indicates whether or not the event destination is enabled. If the event destination is enabled, then Amazon Pinpoint sends response data to the specified event destination.
KinesisFirehoseDestination
Type: KinesisFirehoseDestination structure
An object that contains information about an event destination that sends data to Amazon Kinesis Data Firehose.
MatchingEventTypes
Type: Array of strings
An array of EventDestination objects. Each EventDestination object includes ARNs and other information that define an event destination.
Name
Type: string
A name that identifies the event destination configuration.
SnsDestination
Type: SnsDestination structure
An object that contains information about an event destination that sends data to Amazon SNS.

EventDestinationDefinition

Description
An object that defines a single event destination.
Members
CloudWatchLogsDestination
Type: CloudWatchLogsDestination structure
An object that contains information about an event destination that sends data to Amazon CloudWatch Logs.
Enabled
Type: boolean
Indicates whether or not the event destination is enabled. If the event destination is enabled, then Amazon Pinpoint sends response data to the specified event destination.
KinesisFirehoseDestination
Type: KinesisFirehoseDestination structure
An object that contains information about an event destination that sends data to Amazon Kinesis Data Firehose.
MatchingEventTypes
Type: Array of strings
An array of EventDestination objects. Each EventDestination object includes ARNs and other information that define an event destination.
SnsDestination
Type: SnsDestination structure
An object that contains information about an event destination that sends data to Amazon SNS.

InternalServiceErrorException

Description
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.
Members
Message
Type: string

KinesisFirehoseDestination

Description
An object that contains information about an event destination that sends data to Amazon Kinesis Data Firehose.
Members
DeliveryStreamArn
Type: string
The Amazon Resource Name (ARN) of an IAM role that can write data to an Amazon Kinesis Data Firehose stream.
IamRoleArn
Type: string
The Amazon Resource Name (ARN) of the Amazon Kinesis Data Firehose destination that you want to use in the event destination.

LimitExceededException

Description
There are too many instances of the specified resource type.
Members
Message
Type: string

NotFoundException

Description
The resource you attempted to access doesn't exist.
Members
Message
Type: string

PlainTextMessageType

Description
An object that defines a message that contains unformatted text.
Members
LanguageCode
Type: string
The language to use when delivering the message. For a complete list of supported languages, see the Amazon Polly Developer Guide.
Text
Type: string
The plain (not SSML-formatted) text to deliver to the recipient.
VoiceId
Type: string
The name of the voice that you want to use to deliver the message. For a complete list of supported voices, see the Amazon Polly Developer Guide.

SSMLMessageType

Description
An object that defines a message that contains SSML-formatted text.
Members
LanguageCode
Type: string
The language to use when delivering the message. For a complete list of supported languages, see the Amazon Polly Developer Guide.
Text
Type: string
The SSML-formatted text to deliver to the recipient.
VoiceId
Type: string
The name of the voice that you want to use to deliver the message. For a complete list of supported voices, see the Amazon Polly Developer Guide.

SnsDestination

Description
An object that contains information about an event destination that sends data to Amazon SNS.
Members
TopicArn
Type: string
The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.

TooManyRequestsException

Description
You've issued too many requests to the resource. Wait a few minutes, and then try again.
Members
Message
Type: string

VoiceMessageContent

Description
An object that contains a voice message and information about the recipient that you want to send it to.
Members
CallInstructionsMessage
Type: CallInstructionsMessageType structure
An object that defines a message that contains text formatted using Amazon Pinpoint Voice Instructions markup.
PlainTextMessage
Type: PlainTextMessageType structure
An object that defines a message that contains unformatted text.
SSMLMessage
Type: SSMLMessageType structure
An object that defines a message that contains SSML-formatted text.