source: vendor/google/apiclient-services/src/DeploymentManager/Resource/Resources.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload new project files

  • Property mode set to 100644
File size: 6.0 KB
Line 
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
18namespace Google\Service\DeploymentManager\Resource;
19
20use Google\Service\DeploymentManager\DeploymentmanagerResource;
21use Google\Service\DeploymentManager\ResourcesListResponse;
22
23/**
24 * The "resources" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $deploymentmanagerService = new Google\Service\DeploymentManager(...);
28 * $resources = $deploymentmanagerService->resources;
29 * </code>
30 */
31class Resources extends \Google\Service\Resource
32{
33 /**
34 * Gets information about a single resource. (resources.get)
35 *
36 * @param string $project The project ID for this request.
37 * @param string $deployment The name of the deployment for this request.
38 * @param string $resource The name of the resource for this request.
39 * @param array $optParams Optional parameters.
40 *
41 * @opt_param bool header.bypassBillingFilter
42 * @return DeploymentmanagerResource
43 * @throws \Google\Service\Exception
44 */
45 public function get($project, $deployment, $resource, $optParams = [])
46 {
47 $params = ['project' => $project, 'deployment' => $deployment, 'resource' => $resource];
48 $params = array_merge($params, $optParams);
49 return $this->call('get', [$params], DeploymentmanagerResource::class);
50 }
51 /**
52 * Lists all resources in a given deployment. (resources.listResources)
53 *
54 * @param string $project The project ID for this request.
55 * @param string $deployment The name of the deployment for this request.
56 * @param array $optParams Optional parameters.
57 *
58 * @opt_param string filter A filter expression that filters resources listed in
59 * the response. Most Compute resources support two types of filter expressions:
60 * expressions that support regular expressions and expressions that follow API
61 * improvement proposal AIP-160. These two types of filter expressions cannot be
62 * mixed in one request. If you want to use AIP-160, your expression must
63 * specify the field name, an operator, and the value that you want to use for
64 * filtering. The value must be a string, a number, or a boolean. The operator
65 * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
66 * are filtering Compute Engine instances, you can exclude instances named
67 * `example-instance` by specifying `name != example-instance`. The `:*`
68 * comparison can be used to test whether a key has been defined. For example,
69 * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
70 * also filter nested fields. For example, you could specify
71 * `scheduling.automaticRestart = false` to include instances only if they are
72 * not scheduled for automatic restarts. You can use filtering on nested fields
73 * to filter based on resource labels. To filter on multiple expressions,
74 * provide each separate expression within parentheses. For example: ```
75 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
76 * default, each expression is an `AND` expression. However, you can include
77 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
78 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
79 * (scheduling.automaticRestart = true) ``` If you want to use a regular
80 * expression, use the `eq` (equal) or `ne` (not equal) operator against a
81 * single un-parenthesized expression with or without quotes or against multiple
82 * parenthesized expressions. Examples: `fieldname eq unquoted literal`
83 * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
84 * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
85 * interpreted as a regular expression using Google RE2 library syntax. The
86 * literal value must match the entire field. For example, to filter for
87 * instances that do not end with name "instance", you would use `name ne
88 * .*instance`. You cannot combine constraints on multiple fields using regular
89 * expressions.
90 * @opt_param string maxResults The maximum number of results per page that
91 * should be returned. If the number of available results is larger than
92 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
93 * get the next page of results in subsequent list requests. Acceptable values
94 * are `0` to `500`, inclusive. (Default: `500`)
95 * @opt_param string orderBy Sorts list results by a certain order. By default,
96 * results are returned in alphanumerical order based on the resource name. You
97 * can also sort results in descending order based on the creation timestamp
98 * using `orderBy="creationTimestamp desc"`. This sorts results based on the
99 * `creationTimestamp` field in reverse chronological order (newest result
100 * first). Use this to sort resources like operations so that the newest
101 * operation is returned first. Currently, only sorting by `name` or
102 * `creationTimestamp desc` is supported.
103 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
104 * the `nextPageToken` returned by a previous list request to get the next page
105 * of results.
106 * @return ResourcesListResponse
107 * @throws \Google\Service\Exception
108 */
109 public function listResources($project, $deployment, $optParams = [])
110 {
111 $params = ['project' => $project, 'deployment' => $deployment];
112 $params = array_merge($params, $optParams);
113 return $this->call('list', [$params], ResourcesListResponse::class);
114 }
115}
116
117// Adding a class alias for backwards compatibility with the previous class name.
118class_alias(Resources::class, 'Google_Service_DeploymentManager_Resource_Resources');
Note: See TracBrowser for help on using the repository browser.