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