DeleteStream
Deletes a stream and all of its shards and data.
If successful, the method initiates the deletion of the stream, changes its status to DELETING
, and returns HTTP code 200.
You can only delete a stream in the ACTIVE
status.
The stream will be in the DELETING
status until Data Streams deletes it. Streams in the DELETING
status may continue to handle data read and write operations, such as PutRecord
, PutRecords
, and GetRecords
, until their deletion is completed. To find out the status of a stream, use the DescribeStream method.
If an application attempts to access a deleted stream, a ResourceNotFoundException
is returned.
Request
The request contains data in JSON format.
{
"EnforceConsumerDeletion": boolean,
"StreamName": "string"
}
Request parameters
Parameter | Description |
---|---|
EnforceConsumerDeletion |
If this parameter is omitted or set to false and a stream has registered consumers, the stream is not deleted and a ResourceInUseException is returned.Type: Boolean Required: No |
StreamName |
The name of the stream. Type: String Size: 1 -128 characters.Possible values: [a-zA-Z][a-zA-Z0-9-]+*(?<!-)$ Required: Yes |
Response
If successful, an HTTP 200 code and empty body are returned.
Errors
Parameter | Description | HTTP code |
---|---|---|
LimitExceededException |
The request limit is exceeded. | 400 |
ResourceInUseException |
The resource is being used by another operation. | 400 |
ResourceNotFoundException |
The requested resource was not found. | 400 |
Errors that are common to all methods may occur.