clients/client-chime-sdk-voice/README.md
AWS SDK for JavaScript ChimeSDKVoice Client for Node.js, Browser and React Native.
<p>The Amazon Chime SDK telephony APIs in this section enable developers to create PSTN calling solutions that use Amazon Chime SDK Voice Connectors, and Amazon Chime SDK SIP media applications. Developers can also order and manage phone numbers, create and manage Voice Connectors and SIP media applications, and run voice analytics.</p>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-chime-sdk-voiceyarn add @aws-sdk/client-chime-sdk-voicepnpm add @aws-sdk/client-chime-sdk-voiceThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the ChimeSDKVoiceClient and
the commands you need, for example ListPhoneNumbersCommand:
// ES5 example
const { ChimeSDKVoiceClient, ListPhoneNumbersCommand } = require("@aws-sdk/client-chime-sdk-voice");
// ES6+ example
import { ChimeSDKVoiceClient, ListPhoneNumbersCommand } from "@aws-sdk/client-chime-sdk-voice";
To send a request:
send operation on the client, providing the command object as input.const client = new ChimeSDKVoiceClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListPhoneNumbersCommand(params);
We recommend using the await operator to wait for the promise returned by send operation as follows:
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
You can also use Promise chaining.
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
The aggregated client class is exported from the same package, but without the "Client" suffix.
ChimeSDKVoice extends ChimeSDKVoiceClient and additionally supports all operations, waiters, and paginators as methods.
This style may be familiar to you from the AWS SDK for JavaScript v2.
If you are bundling the AWS SDK, we recommend using only the bare-bones client (ChimeSDKVoiceClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { ChimeSDKVoice } from "@aws-sdk/client-chime-sdk-voice";
const client = new ChimeSDKVoice({ region: "REGION" });
// async/await.
try {
const data = await client.listPhoneNumbers(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listPhoneNumbers(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listPhoneNumbers(params, (err, data) => {
// process err and data.
});
When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
See also docs/ERROR_HANDLING.
Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
aws-sdk-js
on AWS Developer Blog.aws-sdk-js.To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-chime-sdk-voice package is updated.
To contribute to client you can check our generate clients scripts.
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Command API Reference / Input / Output
</details> <details> <summary> AssociatePhoneNumbersWithVoiceConnectorGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> BatchDeletePhoneNumber </summary>Command API Reference / Input / Output
</details> <details> <summary> BatchUpdatePhoneNumber </summary>Command API Reference / Input / Output
</details> <details> <summary> CreatePhoneNumberOrder </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateProxySession </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateSipMediaApplication </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateSipMediaApplicationCall </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateSipRule </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateVoiceConnector </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateVoiceConnectorGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateVoiceProfile </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateVoiceProfileDomain </summary>Command API Reference / Input / Output
</details> <details> <summary> DeletePhoneNumber </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteProxySession </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteSipMediaApplication </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteSipRule </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVoiceConnector </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVoiceConnectorEmergencyCallingConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVoiceConnectorExternalSystemsConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVoiceConnectorGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVoiceConnectorOrigination </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVoiceConnectorProxy </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVoiceConnectorStreamingConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVoiceConnectorTermination </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVoiceConnectorTerminationCredentials </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVoiceProfile </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVoiceProfileDomain </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociatePhoneNumbersFromVoiceConnector </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociatePhoneNumbersFromVoiceConnectorGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> GetGlobalSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> GetPhoneNumber </summary>Command API Reference / Input / Output
</details> <details> <summary> GetPhoneNumberOrder </summary>Command API Reference / Input / Output
</details> <details> <summary> GetPhoneNumberSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> GetProxySession </summary>Command API Reference / Input / Output
</details> <details> <summary> GetSipMediaApplication </summary>Command API Reference / Input / Output
</details> <details> <summary> GetSipMediaApplicationAlexaSkillConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> GetSipMediaApplicationLoggingConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> GetSipRule </summary>Command API Reference / Input / Output
</details> <details> <summary> GetSpeakerSearchTask </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceConnector </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceConnectorEmergencyCallingConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceConnectorExternalSystemsConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceConnectorGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceConnectorLoggingConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceConnectorOrigination </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceConnectorProxy </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceConnectorStreamingConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceConnectorTermination </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceConnectorTerminationHealth </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceProfile </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceProfileDomain </summary>Command API Reference / Input / Output
</details> <details> <summary> GetVoiceToneAnalysisTask </summary>Command API Reference / Input / Output
</details> <details> <summary> ListAvailableVoiceConnectorRegions </summary>Command API Reference / Input / Output
</details> <details> <summary> ListPhoneNumberOrders </summary>Command API Reference / Input / Output
</details> <details> <summary> ListPhoneNumbers </summary>Command API Reference / Input / Output
</details> <details> <summary> ListProxySessions </summary>Command API Reference / Input / Output
</details> <details> <summary> ListSipMediaApplications </summary>Command API Reference / Input / Output
</details> <details> <summary> ListSipRules </summary>Command API Reference / Input / Output
</details> <details> <summary> ListSupportedPhoneNumberCountries </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> ListVoiceConnectorGroups </summary>Command API Reference / Input / Output
</details> <details> <summary> ListVoiceConnectors </summary>Command API Reference / Input / Output
</details> <details> <summary> ListVoiceConnectorTerminationCredentials </summary>Command API Reference / Input / Output
</details> <details> <summary> ListVoiceProfileDomains </summary>Command API Reference / Input / Output
</details> <details> <summary> ListVoiceProfiles </summary>Command API Reference / Input / Output
</details> <details> <summary> PutSipMediaApplicationAlexaSkillConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> PutSipMediaApplicationLoggingConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> PutVoiceConnectorEmergencyCallingConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> PutVoiceConnectorExternalSystemsConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> PutVoiceConnectorLoggingConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> PutVoiceConnectorOrigination </summary>Command API Reference / Input / Output
</details> <details> <summary> PutVoiceConnectorProxy </summary>Command API Reference / Input / Output
</details> <details> <summary> PutVoiceConnectorStreamingConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> PutVoiceConnectorTermination </summary>Command API Reference / Input / Output
</details> <details> <summary> PutVoiceConnectorTerminationCredentials </summary>Command API Reference / Input / Output
</details> <details> <summary> RestorePhoneNumber </summary>Command API Reference / Input / Output
</details> <details> <summary> SearchAvailablePhoneNumbers </summary>Command API Reference / Input / Output
</details> <details> <summary> StartSpeakerSearchTask </summary>Command API Reference / Input / Output
</details> <details> <summary> StartVoiceToneAnalysisTask </summary>Command API Reference / Input / Output
</details> <details> <summary> StopSpeakerSearchTask </summary>Command API Reference / Input / Output
</details> <details> <summary> StopVoiceToneAnalysisTask </summary>Command API Reference / Input / Output
</details> <details> <summary> TagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UntagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateGlobalSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdatePhoneNumber </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdatePhoneNumberSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateProxySession </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateSipMediaApplication </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateSipMediaApplicationCall </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateSipRule </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateVoiceConnector </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateVoiceConnectorGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateVoiceProfile </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateVoiceProfileDomain </summary> </details> <details> <summary> ValidateE911Address </summary> </details>