source: vendor/google/apiclient-services/src/Compute/Resource/SslPolicies.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

  • Property mode set to 100644
File size: 20.1 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\Compute\Resource;
19
20use Google\Service\Compute\Operation;
21use Google\Service\Compute\SslPoliciesAggregatedList;
22use Google\Service\Compute\SslPoliciesList;
23use Google\Service\Compute\SslPoliciesListAvailableFeaturesResponse;
24use Google\Service\Compute\SslPolicy;
25
26/**
27 * The "sslPolicies" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $computeService = new Google\Service\Compute(...);
31 * $sslPolicies = $computeService->sslPolicies;
32 * </code>
33 */
34class SslPolicies extends \Google\Service\Resource
35{
36 /**
37 * Retrieves the list of all SslPolicy resources, regional and global, available
38 * to the specified project. To prevent failure, Google recommends that you set
39 * the `returnPartialSuccess` parameter to `true`. (sslPolicies.aggregatedList)
40 *
41 * @param string $project Name of the project scoping this request.
42 * @param array $optParams Optional parameters.
43 *
44 * @opt_param string filter A filter expression that filters resources listed in
45 * the response. Most Compute resources support two types of filter expressions:
46 * expressions that support regular expressions and expressions that follow API
47 * improvement proposal AIP-160. These two types of filter expressions cannot be
48 * mixed in one request. If you want to use AIP-160, your expression must
49 * specify the field name, an operator, and the value that you want to use for
50 * filtering. The value must be a string, a number, or a boolean. The operator
51 * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
52 * are filtering Compute Engine instances, you can exclude instances named
53 * `example-instance` by specifying `name != example-instance`. The `:*`
54 * comparison can be used to test whether a key has been defined. For example,
55 * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
56 * also filter nested fields. For example, you could specify
57 * `scheduling.automaticRestart = false` to include instances only if they are
58 * not scheduled for automatic restarts. You can use filtering on nested fields
59 * to filter based on resource labels. To filter on multiple expressions,
60 * provide each separate expression within parentheses. For example: ```
61 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
62 * default, each expression is an `AND` expression. However, you can include
63 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
64 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
65 * (scheduling.automaticRestart = true) ``` If you want to use a regular
66 * expression, use the `eq` (equal) or `ne` (not equal) operator against a
67 * single un-parenthesized expression with or without quotes or against multiple
68 * parenthesized expressions. Examples: `fieldname eq unquoted literal`
69 * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
70 * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
71 * interpreted as a regular expression using Google RE2 library syntax. The
72 * literal value must match the entire field. For example, to filter for
73 * instances that do not end with name "instance", you would use `name ne
74 * .*instance`. You cannot combine constraints on multiple fields using regular
75 * expressions.
76 * @opt_param bool includeAllScopes Indicates whether every visible scope for
77 * each scope type (zone, region, global) should be included in the response.
78 * For new resource types added after this field, the flag has no effect as new
79 * resource types will always include every visible scope for each scope type in
80 * response. For resource types which predate this field, if this flag is
81 * omitted or false, only scopes of the scope types where the resource type is
82 * expected to be found will be included.
83 * @opt_param string maxResults The maximum number of results per page that
84 * should be returned. If the number of available results is larger than
85 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
86 * get the next page of results in subsequent list requests. Acceptable values
87 * are `0` to `500`, inclusive. (Default: `500`)
88 * @opt_param string orderBy Sorts list results by a certain order. By default,
89 * results are returned in alphanumerical order based on the resource name. You
90 * can also sort results in descending order based on the creation timestamp
91 * using `orderBy="creationTimestamp desc"`. This sorts results based on the
92 * `creationTimestamp` field in reverse chronological order (newest result
93 * first). Use this to sort resources like operations so that the newest
94 * operation is returned first. Currently, only sorting by `name` or
95 * `creationTimestamp desc` is supported.
96 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
97 * the `nextPageToken` returned by a previous list request to get the next page
98 * of results.
99 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
100 * which provides partial results in case of failure. The default value is
101 * false. For example, when partial success behavior is enabled, aggregatedList
102 * for a single zone scope either returns all resources in the zone or no
103 * resources, with an error code.
104 * @opt_param string serviceProjectNumber The Shared VPC service project id or
105 * service project number for which aggregated list request is invoked for
106 * subnetworks list-usable api.
107 * @return SslPoliciesAggregatedList
108 * @throws \Google\Service\Exception
109 */
110 public function aggregatedList($project, $optParams = [])
111 {
112 $params = ['project' => $project];
113 $params = array_merge($params, $optParams);
114 return $this->call('aggregatedList', [$params], SslPoliciesAggregatedList::class);
115 }
116 /**
117 * Deletes the specified SSL policy. The SSL policy resource can be deleted only
118 * if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.
119 * (sslPolicies.delete)
120 *
121 * @param string $project Project ID for this request.
122 * @param string $sslPolicy Name of the SSL policy to delete. The name must be
123 * 1-63 characters long, and comply with RFC1035.
124 * @param array $optParams Optional parameters.
125 *
126 * @opt_param string requestId An optional request ID to identify requests.
127 * Specify a unique request ID so that if you must retry your request, the
128 * server will know to ignore the request if it has already been completed. For
129 * example, consider a situation where you make an initial request and the
130 * request times out. If you make the request again with the same request ID,
131 * the server can check if original operation with the same request ID was
132 * received, and if so, will ignore the second request. This prevents clients
133 * from accidentally creating duplicate commitments. The request ID must be a
134 * valid UUID with the exception that zero UUID is not supported (
135 * 00000000-0000-0000-0000-000000000000).
136 * @return Operation
137 * @throws \Google\Service\Exception
138 */
139 public function delete($project, $sslPolicy, $optParams = [])
140 {
141 $params = ['project' => $project, 'sslPolicy' => $sslPolicy];
142 $params = array_merge($params, $optParams);
143 return $this->call('delete', [$params], Operation::class);
144 }
145 /**
146 * Lists all of the ordered rules present in a single specified policy.
147 * (sslPolicies.get)
148 *
149 * @param string $project Project ID for this request.
150 * @param string $sslPolicy Name of the SSL policy to update. The name must be
151 * 1-63 characters long, and comply with RFC1035.
152 * @param array $optParams Optional parameters.
153 * @return SslPolicy
154 * @throws \Google\Service\Exception
155 */
156 public function get($project, $sslPolicy, $optParams = [])
157 {
158 $params = ['project' => $project, 'sslPolicy' => $sslPolicy];
159 $params = array_merge($params, $optParams);
160 return $this->call('get', [$params], SslPolicy::class);
161 }
162 /**
163 * Returns the specified SSL policy resource. (sslPolicies.insert)
164 *
165 * @param string $project Project ID for this request.
166 * @param SslPolicy $postBody
167 * @param array $optParams Optional parameters.
168 *
169 * @opt_param string requestId An optional request ID to identify requests.
170 * Specify a unique request ID so that if you must retry your request, the
171 * server will know to ignore the request if it has already been completed. For
172 * example, consider a situation where you make an initial request and the
173 * request times out. If you make the request again with the same request ID,
174 * the server can check if original operation with the same request ID was
175 * received, and if so, will ignore the second request. This prevents clients
176 * from accidentally creating duplicate commitments. The request ID must be a
177 * valid UUID with the exception that zero UUID is not supported (
178 * 00000000-0000-0000-0000-000000000000).
179 * @return Operation
180 * @throws \Google\Service\Exception
181 */
182 public function insert($project, SslPolicy $postBody, $optParams = [])
183 {
184 $params = ['project' => $project, 'postBody' => $postBody];
185 $params = array_merge($params, $optParams);
186 return $this->call('insert', [$params], Operation::class);
187 }
188 /**
189 * Lists all the SSL policies that have been configured for the specified
190 * project. (sslPolicies.listSslPolicies)
191 *
192 * @param string $project Project ID for this request.
193 * @param array $optParams Optional parameters.
194 *
195 * @opt_param string filter A filter expression that filters resources listed in
196 * the response. Most Compute resources support two types of filter expressions:
197 * expressions that support regular expressions and expressions that follow API
198 * improvement proposal AIP-160. These two types of filter expressions cannot be
199 * mixed in one request. If you want to use AIP-160, your expression must
200 * specify the field name, an operator, and the value that you want to use for
201 * filtering. The value must be a string, a number, or a boolean. The operator
202 * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
203 * are filtering Compute Engine instances, you can exclude instances named
204 * `example-instance` by specifying `name != example-instance`. The `:*`
205 * comparison can be used to test whether a key has been defined. For example,
206 * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
207 * also filter nested fields. For example, you could specify
208 * `scheduling.automaticRestart = false` to include instances only if they are
209 * not scheduled for automatic restarts. You can use filtering on nested fields
210 * to filter based on resource labels. To filter on multiple expressions,
211 * provide each separate expression within parentheses. For example: ```
212 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
213 * default, each expression is an `AND` expression. However, you can include
214 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
215 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
216 * (scheduling.automaticRestart = true) ``` If you want to use a regular
217 * expression, use the `eq` (equal) or `ne` (not equal) operator against a
218 * single un-parenthesized expression with or without quotes or against multiple
219 * parenthesized expressions. Examples: `fieldname eq unquoted literal`
220 * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
221 * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
222 * interpreted as a regular expression using Google RE2 library syntax. The
223 * literal value must match the entire field. For example, to filter for
224 * instances that do not end with name "instance", you would use `name ne
225 * .*instance`. You cannot combine constraints on multiple fields using regular
226 * expressions.
227 * @opt_param string maxResults The maximum number of results per page that
228 * should be returned. If the number of available results is larger than
229 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
230 * get the next page of results in subsequent list requests. Acceptable values
231 * are `0` to `500`, inclusive. (Default: `500`)
232 * @opt_param string orderBy Sorts list results by a certain order. By default,
233 * results are returned in alphanumerical order based on the resource name. You
234 * can also sort results in descending order based on the creation timestamp
235 * using `orderBy="creationTimestamp desc"`. This sorts results based on the
236 * `creationTimestamp` field in reverse chronological order (newest result
237 * first). Use this to sort resources like operations so that the newest
238 * operation is returned first. Currently, only sorting by `name` or
239 * `creationTimestamp desc` is supported.
240 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
241 * the `nextPageToken` returned by a previous list request to get the next page
242 * of results.
243 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
244 * which provides partial results in case of failure. The default value is
245 * false. For example, when partial success behavior is enabled, aggregatedList
246 * for a single zone scope either returns all resources in the zone or no
247 * resources, with an error code.
248 * @return SslPoliciesList
249 * @throws \Google\Service\Exception
250 */
251 public function listSslPolicies($project, $optParams = [])
252 {
253 $params = ['project' => $project];
254 $params = array_merge($params, $optParams);
255 return $this->call('list', [$params], SslPoliciesList::class);
256 }
257 /**
258 * Lists all features that can be specified in the SSL policy when using custom
259 * profile. (sslPolicies.listAvailableFeatures)
260 *
261 * @param string $project Project ID for this request.
262 * @param array $optParams Optional parameters.
263 *
264 * @opt_param string filter A filter expression that filters resources listed in
265 * the response. Most Compute resources support two types of filter expressions:
266 * expressions that support regular expressions and expressions that follow API
267 * improvement proposal AIP-160. These two types of filter expressions cannot be
268 * mixed in one request. If you want to use AIP-160, your expression must
269 * specify the field name, an operator, and the value that you want to use for
270 * filtering. The value must be a string, a number, or a boolean. The operator
271 * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
272 * are filtering Compute Engine instances, you can exclude instances named
273 * `example-instance` by specifying `name != example-instance`. The `:*`
274 * comparison can be used to test whether a key has been defined. For example,
275 * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
276 * also filter nested fields. For example, you could specify
277 * `scheduling.automaticRestart = false` to include instances only if they are
278 * not scheduled for automatic restarts. You can use filtering on nested fields
279 * to filter based on resource labels. To filter on multiple expressions,
280 * provide each separate expression within parentheses. For example: ```
281 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
282 * default, each expression is an `AND` expression. However, you can include
283 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
284 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
285 * (scheduling.automaticRestart = true) ``` If you want to use a regular
286 * expression, use the `eq` (equal) or `ne` (not equal) operator against a
287 * single un-parenthesized expression with or without quotes or against multiple
288 * parenthesized expressions. Examples: `fieldname eq unquoted literal`
289 * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
290 * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
291 * interpreted as a regular expression using Google RE2 library syntax. The
292 * literal value must match the entire field. For example, to filter for
293 * instances that do not end with name "instance", you would use `name ne
294 * .*instance`. You cannot combine constraints on multiple fields using regular
295 * expressions.
296 * @opt_param string maxResults The maximum number of results per page that
297 * should be returned. If the number of available results is larger than
298 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
299 * get the next page of results in subsequent list requests. Acceptable values
300 * are `0` to `500`, inclusive. (Default: `500`)
301 * @opt_param string orderBy Sorts list results by a certain order. By default,
302 * results are returned in alphanumerical order based on the resource name. You
303 * can also sort results in descending order based on the creation timestamp
304 * using `orderBy="creationTimestamp desc"`. This sorts results based on the
305 * `creationTimestamp` field in reverse chronological order (newest result
306 * first). Use this to sort resources like operations so that the newest
307 * operation is returned first. Currently, only sorting by `name` or
308 * `creationTimestamp desc` is supported.
309 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
310 * the `nextPageToken` returned by a previous list request to get the next page
311 * of results.
312 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
313 * which provides partial results in case of failure. The default value is
314 * false. For example, when partial success behavior is enabled, aggregatedList
315 * for a single zone scope either returns all resources in the zone or no
316 * resources, with an error code.
317 * @return SslPoliciesListAvailableFeaturesResponse
318 * @throws \Google\Service\Exception
319 */
320 public function listAvailableFeatures($project, $optParams = [])
321 {
322 $params = ['project' => $project];
323 $params = array_merge($params, $optParams);
324 return $this->call('listAvailableFeatures', [$params], SslPoliciesListAvailableFeaturesResponse::class);
325 }
326 /**
327 * Patches the specified SSL policy with the data included in the request.
328 * (sslPolicies.patch)
329 *
330 * @param string $project Project ID for this request.
331 * @param string $sslPolicy Name of the SSL policy to update. The name must be
332 * 1-63 characters long, and comply with RFC1035.
333 * @param SslPolicy $postBody
334 * @param array $optParams Optional parameters.
335 *
336 * @opt_param string requestId An optional request ID to identify requests.
337 * Specify a unique request ID so that if you must retry your request, the
338 * server will know to ignore the request if it has already been completed. For
339 * example, consider a situation where you make an initial request and the
340 * request times out. If you make the request again with the same request ID,
341 * the server can check if original operation with the same request ID was
342 * received, and if so, will ignore the second request. This prevents clients
343 * from accidentally creating duplicate commitments. The request ID must be a
344 * valid UUID with the exception that zero UUID is not supported (
345 * 00000000-0000-0000-0000-000000000000).
346 * @return Operation
347 * @throws \Google\Service\Exception
348 */
349 public function patch($project, $sslPolicy, SslPolicy $postBody, $optParams = [])
350 {
351 $params = ['project' => $project, 'sslPolicy' => $sslPolicy, 'postBody' => $postBody];
352 $params = array_merge($params, $optParams);
353 return $this->call('patch', [$params], Operation::class);
354 }
355}
356
357// Adding a class alias for backwards compatibility with the previous class name.
358class_alias(SslPolicies::class, 'Google_Service_Compute_Resource_SslPolicies');
Note: See TracBrowser for help on using the repository browser.