Deleting a Stream

Initialize a DIS client as instructed in Initializing a DIS SDK Client Instance.

Use the DIS SDK to delete a specified DIS stream.

//Stream to be deleted.
String streamName = "XXX";
var request = new DescribeStreamRequest { StreamName = streamName };

After configuring DescribeStreamRequest, you can delete the stream by invoking deleteStream.

   ResponseResult response = dic.DeleteStream(request);
            Console.WriteLine(response);

Viewing Execution Results

Press Ctrl+F5. If information similar to the following is displayed on the console, the stream is created successfully:

{ResponseResult{status_code='204 NO CONTENT', content='', errorCode='', message=''}}
Table 1 Description of response parameter ResponseResult

Parameter

Type

Description

content

String

Response body.

errorCode

String

Error code.

message

String

Error response body.

status_code

String

Status code.