|
5 | 5 | namespace Platformsh\Client\Model; |
6 | 6 |
|
7 | 7 | use Cocur\Slugify\Slugify; |
| 8 | +use GuzzleHttp\Psr7\Request; |
8 | 9 | use Platformsh\Client\Exception\EnvironmentStateException; |
9 | 10 | use Platformsh\Client\Exception\OperationUnavailableException; |
10 | 11 | use Platformsh\Client\Model\Activities\HasActivitiesInterface; |
@@ -660,6 +661,30 @@ public function getSourceOperations(): array |
660 | 661 | return SourceOperation::getCollection($this->getLink('#source-operations'), 0, [], $this->client); |
661 | 662 | } |
662 | 663 |
|
| 664 | + /** |
| 665 | + * Lists environment settings. |
| 666 | + */ |
| 667 | + public function getSettings(): Settings |
| 668 | + { |
| 669 | + $url = $this->getUri() . '/settings'; |
| 670 | + $request = new Request('GET', $url); |
| 671 | + $data = self::send($request, $this->client); |
| 672 | + |
| 673 | + return new Settings($data, $url, $this->client); |
| 674 | + } |
| 675 | + |
| 676 | + /** |
| 677 | + * Lists environment autoscaling settings. |
| 678 | + */ |
| 679 | + public function getAutoscalingSettings(): AutoscalingSettings |
| 680 | + { |
| 681 | + $url = $this->getUri() . '/autoscaling/settings'; |
| 682 | + $request = new Request('GET', $url); |
| 683 | + $data = self::send($request, $this->client); |
| 684 | + |
| 685 | + return new AutoscalingSettings($data, $url, $this->client); |
| 686 | + } |
| 687 | + |
663 | 688 | /** |
664 | 689 | * Runs a source operation. |
665 | 690 | * |
|
0 commit comments