DeleteVoice
Deletes a custom voice. DescribeVoices and
GetVoice stop returning the voice immediately. You can't
restore a deleted voice.
You can delete a voice in active or failed
status. If the voice is in pending status, the request fails
with ConflictException. If no custom voice with the specified
ID exists in your account and Region, the request fails with
ResourceNotFoundException. You can delete the voice even if
you disabled its AWS KMS key or scheduled it for deletion.
This operation requires permissions to perform the
polly:DeleteVoice action.
Request Syntax
DELETE /v1/voices/VoiceId HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
- VoiceId
-
The ID of the custom voice to delete, for example,
vc-9a8fa85dd3. You can't specify the ARN of the voice.Length Constraints: Maximum length of 32.
Pattern:
^vc-[0-9a-f]+$Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Error Types.
- ConflictException
-
The request conflicts with the current state of the resource. For a custom voice, the voice isn't in the status that the operation requires. Check the status with
GetVoice, and then try again.- resourceId
-
The ID of the resource that the request conflicts with.
- resourceType
-
The type of the resource that the request conflicts with.
HTTP Status Code: 409
- ResourceNotFoundException
-
Amazon Polly can't find the specified resource. Verify that the resource exists in the AWS account and Region of the request and that its ARN or ID is spelled correctly, and then try again.
- resourceId
-
The identifier of the resource that wasn't found.
- resourceType
-
The type of the resource that wasn't found.
HTTP Status Code: 404
- ServiceFailureException
-
An unknown condition has caused a service failure.
HTTP Status Code: 500
- ThrottlingException
-
The request was denied because of request throttling.
- throttlingReasons
-
A list of reasons explaining why the request was throttled.
HTTP Status Code: 400
- ValidationException
-
The input fails to satisfy the constraints specified by the service.
- fields
-
The fields that caused the validation error.
- reason
-
The reason the request failed validation. If Amazon Polly can't use the AWS KMS key that you specified in
CreateVoice,fieldsnamesCustomerManagedEncryption.KmsKeyArnand the reason is one of the following:- kmsKeyNotFound
-
No key with the specified ARN exists.
- kmsKeyUnusable
-
The key is disabled, scheduled for deletion, or missing its key material, or it isn't a symmetric encryption key.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: