public function createPipeline(
        $pipelineName,
        $sourceBucket,
        $targetBucket,
        $options = array()
    ) {
        list($config, $description, $pipelineConfig) = $this->parseOptions(
            $options,
            'config',
            'description',
            'pipelineConfig'
        );

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

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

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

        $body = array(
            'pipelineName' => $pipelineName,
            'sourceBucket' => $sourceBucket,
            'targetBucket' => $targetBucket,
        );
        if ($description !== null) {
            $body['description'] = $description;
        } else {
            $body['description'] = '';
        }
        if ($pipelineConfig !== null) {
            $body['config'] = $pipelineConfig;
        } else {
            $body['config'] = array('capacity' => 20);
        }

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