1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 | *
|
---|
11 | * Unless required by applicable law or agreed to in writing, software
|
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\CloudComposer\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudComposer\ListWorkloadsResponse;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * The "workloads" collection of methods.
|
---|
24 | * Typical usage is:
|
---|
25 | * <code>
|
---|
26 | * $composerService = new Google\Service\CloudComposer(...);
|
---|
27 | * $workloads = $composerService->projects_locations_environments_workloads;
|
---|
28 | * </code>
|
---|
29 | */
|
---|
30 | class ProjectsLocationsEnvironmentsWorkloads extends \Google\Service\Resource
|
---|
31 | {
|
---|
32 | /**
|
---|
33 | * Lists workloads in a Cloud Composer environment. Workload is a unit that runs
|
---|
34 | * a single Composer component. This method is supported for Cloud Composer
|
---|
35 | * environments in versions composer-3.*.*-airflow-*.*.* and newer.
|
---|
36 | * (workloads.listProjectsLocationsEnvironmentsWorkloads)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. The environment name to get workloads for, in
|
---|
39 | * the form:
|
---|
40 | * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param string filter Optional. The list filter. Currently only supports
|
---|
44 | * equality on the type field. The value of a field specified in the filter
|
---|
45 | * expression must be one ComposerWorkloadType enum option. It's possible to get
|
---|
46 | * multiple types using "OR" operator, e.g.: "type=SCHEDULER OR
|
---|
47 | * type=CELERY_WORKER". If not specified, all items are returned.
|
---|
48 | * @opt_param int pageSize Optional. The maximum number of environments to
|
---|
49 | * return.
|
---|
50 | * @opt_param string pageToken Optional. The next_page_token value returned from
|
---|
51 | * a previous List request, if any.
|
---|
52 | * @return ListWorkloadsResponse
|
---|
53 | * @throws \Google\Service\Exception
|
---|
54 | */
|
---|
55 | public function listProjectsLocationsEnvironmentsWorkloads($parent, $optParams = [])
|
---|
56 | {
|
---|
57 | $params = ['parent' => $parent];
|
---|
58 | $params = array_merge($params, $optParams);
|
---|
59 | return $this->call('list', [$params], ListWorkloadsResponse::class);
|
---|
60 | }
|
---|
61 | }
|
---|
62 |
|
---|
63 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
64 | class_alias(ProjectsLocationsEnvironmentsWorkloads::class, 'Google_Service_CloudComposer_Resource_ProjectsLocationsEnvironmentsWorkloads');
|
---|