Updated on 2024-10-25 GMT+08:00

Deleting a Stream

Initialize a DIS SDK client instance named dic. For details, see Initializing a DIS SDK Client Instance.

Use the DIS SDK to delete a specified DIS stream.

1
2
3
4
//Specify the name of the stream to be deleted.
String streamName = "myStream";
DeleteStreamRequest deleteStreamRequest = new DeleteStreamRequest();
deleteStreamRequest.setStreamName(streamName);

After configuring DeleteStreamRequest, you can delete a stream by invoking deleteStream.

1
dic.deleteStream(deleteStreamRequest);