18 lines
484 B
Python
18 lines
484 B
Python
import json
|
|
|
|
from moto.core.responses import BaseResponse
|
|
from .models import codepipeline_backends
|
|
|
|
|
|
class CodePipelineResponse(BaseResponse):
|
|
@property
|
|
def codepipeline_backend(self):
|
|
return codepipeline_backends[self.region]
|
|
|
|
def create_pipeline(self):
|
|
pipeline, tags = self.codepipeline_backend.create_pipeline(
|
|
self._get_param("pipeline"), self._get_param("tags")
|
|
)
|
|
|
|
return json.dumps({"pipeline": pipeline, "tags": tags})
|