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