public function createStream($domain, $options = array())
    {
        list($config,
            $app,
            $publish,
            $scene,
            $recording,
            $notification,
            $thumbnail,
            $thumbnails,
            $watermarks,
            $destinationPushUrl
        ) = $this->parseOptions(
            $options,
            'config',
            'app',
            'publish',
            'scene',
            'recording',
            'notification',
            'thumbnail',
            'thumbnails',
            'watermarks',
            'destinationPushUrl');

        if (empty($domain)) {
            throw new BceClientException("The parameter domain "
                . "should NOT be null or empty string");
        }

        $body = array();

        if ($app !== null) {
            $body['app'] = $app;
        }
        if ($publish !== null) {
            $body['publish'] = $publish;
        }
        if ($scene !== null) {
            $body['scene'] = $scene;
        }
        if ($recording !== null) {
            $body['recording'] = $recording;
        }
        if ($notification !== null) {
            $body['notification'] = $notification;
        }
        if ($thumbnail !== null) {
            $body['thumbnail'] = $thumbnail;
        }
        if ($thumbnails !== null) {
            $body['thumbnails'] = $thumbnails;
        }
        if ($watermarks !== null) {
            $body['watermarks'] = $watermarks;
        }
        if ($destinationPushUrl !== null) {
            $body['destinationPushUrl'] = $destinationPushUrl;
        }

        return $this->sendRequest(
            HttpMethod::POST,
            array(
                'config' => $config,
                'body' => json_encode($body),
            ),
            "/domain/$domain/stream"
        );
    }