|
22 | 22 | CreateJobDefinitionSecretsResponse, |
23 | 23 | JobDefinition, |
24 | 24 | JobRun, |
| 25 | + JobsLimits, |
25 | 26 | ListJobDefinitionSecretsResponse, |
26 | 27 | ListJobDefinitionsResponse, |
27 | 28 | ListJobRunsResponse, |
|
38 | 39 | unmarshal_JobDefinition, |
39 | 40 | unmarshal_JobRun, |
40 | 41 | unmarshal_CreateJobDefinitionSecretsResponse, |
| 42 | + unmarshal_JobsLimits, |
41 | 43 | unmarshal_ListJobDefinitionSecretsResponse, |
42 | 44 | unmarshal_ListJobDefinitionsResponse, |
43 | 45 | unmarshal_ListJobRunsResponse, |
@@ -802,3 +804,31 @@ async def list_jobs_resources( |
802 | 804 |
|
803 | 805 | self._throw_on_error(res) |
804 | 806 | return unmarshal_ListJobsResourcesResponse(res.json()) |
| 807 | + |
| 808 | + async def get_jobs_limits( |
| 809 | + self, |
| 810 | + *, |
| 811 | + region: Optional[Region] = None, |
| 812 | + ) -> JobsLimits: |
| 813 | + """ |
| 814 | + Get jobs limits for the console. |
| 815 | + :param region: Region to target. If none is passed will use default region from the config. |
| 816 | + :return: :class:`JobsLimits <JobsLimits>` |
| 817 | +
|
| 818 | + Usage: |
| 819 | + :: |
| 820 | +
|
| 821 | + result = await api.get_jobs_limits() |
| 822 | + """ |
| 823 | + |
| 824 | + param_region = validate_path_param( |
| 825 | + "region", region or self.client.default_region |
| 826 | + ) |
| 827 | + |
| 828 | + res = self._request( |
| 829 | + "GET", |
| 830 | + f"/serverless-jobs/v1alpha1/regions/{param_region}/jobs-limits", |
| 831 | + ) |
| 832 | + |
| 833 | + self._throw_on_error(res) |
| 834 | + return unmarshal_JobsLimits(res.json()) |
0 commit comments