diff --git a/src/Model/Deployment/EnvironmentDeployment.php b/src/Model/Deployment/EnvironmentDeployment.php index 2078be9..991c65e 100644 --- a/src/Model/Deployment/EnvironmentDeployment.php +++ b/src/Model/Deployment/EnvironmentDeployment.php @@ -100,16 +100,23 @@ public function getRuntimeOperations(): array * The operation name. * @param string $service * The name of the service or application to run the operation on. + * @param array $parameters + * Parameters to pass to the operation, as key-value pairs. * *@see RuntimeOperation * @see AppBase::getRuntimeOperations() * @see AppBase::getRuntimeOperation() */ - public function execRuntimeOperation(string $name, string $service): \Platformsh\Client\Model\Result + public function execRuntimeOperation(string $name, string $service, array $parameters = []): \Platformsh\Client\Model\Result { - return $this->runOperation('operations', 'post', [ + $body = [ 'operation' => $name, 'service' => $service, - ]); + ]; + if ($parameters) { + $body['parameters'] = (object) $parameters; + } + + return $this->runOperation('operations', 'post', $body); } }