source: vendor/google/apiclient-services/src/Apigee/Resource/OrganizationsEnvironments.php

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

Upload project files

  • Property mode set to 100644
File size: 19.7 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\Apigee\Resource;
19
20use Google\Service\Apigee\GoogleCloudApigeeV1AddonsConfig;
21use Google\Service\Apigee\GoogleCloudApigeeV1ApiSecurityRuntimeConfig;
22use Google\Service\Apigee\GoogleCloudApigeeV1DebugMask;
23use Google\Service\Apigee\GoogleCloudApigeeV1Environment;
24use Google\Service\Apigee\GoogleCloudApigeeV1EnvironmentConfig;
25use Google\Service\Apigee\GoogleCloudApigeeV1SecurityActionsConfig;
26use Google\Service\Apigee\GoogleCloudApigeeV1Subscription;
27use Google\Service\Apigee\GoogleCloudApigeeV1TraceConfig;
28use Google\Service\Apigee\GoogleIamV1Policy;
29use Google\Service\Apigee\GoogleIamV1SetIamPolicyRequest;
30use Google\Service\Apigee\GoogleIamV1TestIamPermissionsRequest;
31use Google\Service\Apigee\GoogleIamV1TestIamPermissionsResponse;
32use Google\Service\Apigee\GoogleLongrunningOperation;
33use Google\Service\Apigee\GoogleProtobufEmpty;
34
35/**
36 * The "environments" collection of methods.
37 * Typical usage is:
38 * <code>
39 * $apigeeService = new Google\Service\Apigee(...);
40 * $environments = $apigeeService->organizations_environments;
41 * </code>
42 */
43class OrganizationsEnvironments extends \Google\Service\Resource
44{
45 /**
46 * Creates an environment in an organization. (environments.create)
47 *
48 * @param string $parent Required. Name of the organization in which the
49 * environment will be created. Use the following structure in your request:
50 * `organizations/{org}`
51 * @param GoogleCloudApigeeV1Environment $postBody
52 * @param array $optParams Optional parameters.
53 *
54 * @opt_param string name Optional. Name of the environment.
55 * @return GoogleLongrunningOperation
56 * @throws \Google\Service\Exception
57 */
58 public function create($parent, GoogleCloudApigeeV1Environment $postBody, $optParams = [])
59 {
60 $params = ['parent' => $parent, 'postBody' => $postBody];
61 $params = array_merge($params, $optParams);
62 return $this->call('create', [$params], GoogleLongrunningOperation::class);
63 }
64 /**
65 * Deletes an environment from an organization. **Warning: You must delete all
66 * key value maps and key value entries before you delete an environment.**
67 * Otherwise, if you re-create the environment the key value map entry
68 * operations will encounter encryption/decryption discrepancies.
69 * (environments.delete)
70 *
71 * @param string $name Required. Name of the environment. Use the following
72 * structure in your request: `organizations/{org}/environments/{env}`
73 * @param array $optParams Optional parameters.
74 * @return GoogleLongrunningOperation
75 * @throws \Google\Service\Exception
76 */
77 public function delete($name, $optParams = [])
78 {
79 $params = ['name' => $name];
80 $params = array_merge($params, $optParams);
81 return $this->call('delete', [$params], GoogleLongrunningOperation::class);
82 }
83 /**
84 * Gets environment details. (environments.get)
85 *
86 * @param string $name Required. Name of the environment. Use the following
87 * structure in your request: `organizations/{org}/environments/{env}`
88 * @param array $optParams Optional parameters.
89 * @return GoogleCloudApigeeV1Environment
90 * @throws \Google\Service\Exception
91 */
92 public function get($name, $optParams = [])
93 {
94 $params = ['name' => $name];
95 $params = array_merge($params, $optParams);
96 return $this->call('get', [$params], GoogleCloudApigeeV1Environment::class);
97 }
98 /**
99 * Gets the add-ons config of an environment. (environments.getAddonsConfig)
100 *
101 * @param string $name Required. Name of the add-ons config. Must be in the
102 * format of `/organizations/{org}/environments/{env}/addonsConfig`
103 * @param array $optParams Optional parameters.
104 * @return GoogleCloudApigeeV1AddonsConfig
105 * @throws \Google\Service\Exception
106 */
107 public function getAddonsConfig($name, $optParams = [])
108 {
109 $params = ['name' => $name];
110 $params = array_merge($params, $optParams);
111 return $this->call('getAddonsConfig', [$params], GoogleCloudApigeeV1AddonsConfig::class);
112 }
113 /**
114 * Gets the API Security runtime configuration for an environment. This named
115 * ApiSecurityRuntimeConfig to prevent conflicts with ApiSecurityConfig from
116 * addon config. (environments.getApiSecurityRuntimeConfig)
117 *
118 * @param string $name Required. Name of the environment API Security Runtime
119 * configuration resource. Use the following structure in your request:
120 * `organizations/{org}/environments/{env}/apiSecurityRuntimeConfig`
121 * @param array $optParams Optional parameters.
122 * @return GoogleCloudApigeeV1ApiSecurityRuntimeConfig
123 * @throws \Google\Service\Exception
124 */
125 public function getApiSecurityRuntimeConfig($name, $optParams = [])
126 {
127 $params = ['name' => $name];
128 $params = array_merge($params, $optParams);
129 return $this->call('getApiSecurityRuntimeConfig', [$params], GoogleCloudApigeeV1ApiSecurityRuntimeConfig::class);
130 }
131 /**
132 * Gets the debug mask singleton resource for an environment.
133 * (environments.getDebugmask)
134 *
135 * @param string $name Required. Name of the debug mask. Use the following
136 * structure in your request:
137 * `organizations/{org}/environments/{env}/debugmask`.
138 * @param array $optParams Optional parameters.
139 * @return GoogleCloudApigeeV1DebugMask
140 * @throws \Google\Service\Exception
141 */
142 public function getDebugmask($name, $optParams = [])
143 {
144 $params = ['name' => $name];
145 $params = array_merge($params, $optParams);
146 return $this->call('getDebugmask', [$params], GoogleCloudApigeeV1DebugMask::class);
147 }
148 /**
149 * Gets the deployed configuration for an environment.
150 * (environments.getDeployedConfig)
151 *
152 * @param string $name Required. Name of the environment deployed configuration
153 * resource. Use the following structure in your request:
154 * `organizations/{org}/environments/{env}/deployedConfig`
155 * @param array $optParams Optional parameters.
156 * @return GoogleCloudApigeeV1EnvironmentConfig
157 * @throws \Google\Service\Exception
158 */
159 public function getDeployedConfig($name, $optParams = [])
160 {
161 $params = ['name' => $name];
162 $params = array_merge($params, $optParams);
163 return $this->call('getDeployedConfig', [$params], GoogleCloudApigeeV1EnvironmentConfig::class);
164 }
165 /**
166 * Gets the IAM policy on an environment. For more information, see [Manage
167 * users, roles, and permissions using the
168 * API](https://cloud.google.com/apigee/docs/api-platform/system-
169 * administration/manage-users-roles). You must have the
170 * `apigee.environments.getIamPolicy` permission to call this API.
171 * (environments.getIamPolicy)
172 *
173 * @param string $resource REQUIRED: The resource for which the policy is being
174 * requested. See [Resource
175 * names](https://cloud.google.com/apis/design/resource_names) for the
176 * appropriate value for this field.
177 * @param array $optParams Optional parameters.
178 *
179 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
180 * version that will be used to format the policy. Valid values are 0, 1, and 3.
181 * Requests specifying an invalid value will be rejected. Requests for policies
182 * with any conditional role bindings must specify version 3. Policies with no
183 * conditional role bindings may specify any valid value or leave the field
184 * unset. The policy in the response might use the policy version that you
185 * specified, or it might use a lower policy version. For example, if you
186 * specify version 3, but the policy has no conditional role bindings, the
187 * response uses version 1. To learn which resources support conditions in their
188 * IAM policies, see the [IAM
189 * documentation](https://cloud.google.com/iam/help/conditions/resource-
190 * policies).
191 * @return GoogleIamV1Policy
192 * @throws \Google\Service\Exception
193 */
194 public function getIamPolicy($resource, $optParams = [])
195 {
196 $params = ['resource' => $resource];
197 $params = array_merge($params, $optParams);
198 return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
199 }
200 /**
201 * GetSecurityActionConfig returns the current SecurityActions configuration.
202 * (environments.getSecurityActionsConfig)
203 *
204 * @param string $name Required. The name of the SecurityActionsConfig to
205 * retrieve. This will always be:
206 * `organizations/{org}/environments/{env}/security_actions_config`
207 * @param array $optParams Optional parameters.
208 * @return GoogleCloudApigeeV1SecurityActionsConfig
209 * @throws \Google\Service\Exception
210 */
211 public function getSecurityActionsConfig($name, $optParams = [])
212 {
213 $params = ['name' => $name];
214 $params = array_merge($params, $optParams);
215 return $this->call('getSecurityActionsConfig', [$params], GoogleCloudApigeeV1SecurityActionsConfig::class);
216 }
217 /**
218 * Get distributed trace configuration in an environment.
219 * (environments.getTraceConfig)
220 *
221 * @param string $name Required. Name of the trace configuration. Use the
222 * following structure in your request:
223 * "organizations/environments/traceConfig".
224 * @param array $optParams Optional parameters.
225 * @return GoogleCloudApigeeV1TraceConfig
226 * @throws \Google\Service\Exception
227 */
228 public function getTraceConfig($name, $optParams = [])
229 {
230 $params = ['name' => $name];
231 $params = array_merge($params, $optParams);
232 return $this->call('getTraceConfig', [$params], GoogleCloudApigeeV1TraceConfig::class);
233 }
234 /**
235 * Updates properties for an Apigee environment with patch semantics using a
236 * field mask. **Note:** Not supported for Apigee hybrid.
237 * (environments.modifyEnvironment)
238 *
239 * @param string $name Required. Name of the environment. Use the following
240 * structure in your request: `organizations/{org}/environments/{environment}`.
241 * @param GoogleCloudApigeeV1Environment $postBody
242 * @param array $optParams Optional parameters.
243 *
244 * @opt_param string updateMask List of fields to be updated. Fields that can be
245 * updated: node_config.
246 * @return GoogleLongrunningOperation
247 * @throws \Google\Service\Exception
248 */
249 public function modifyEnvironment($name, GoogleCloudApigeeV1Environment $postBody, $optParams = [])
250 {
251 $params = ['name' => $name, 'postBody' => $postBody];
252 $params = array_merge($params, $optParams);
253 return $this->call('modifyEnvironment', [$params], GoogleLongrunningOperation::class);
254 }
255 /**
256 * Sets the IAM policy on an environment, if the policy already exists it will
257 * be replaced. For more information, see [Manage users, roles, and permissions
258 * using the API](https://cloud.google.com/apigee/docs/api-platform/system-
259 * administration/manage-users-roles). You must have the
260 * `apigee.environments.setIamPolicy` permission to call this API.
261 * (environments.setIamPolicy)
262 *
263 * @param string $resource REQUIRED: The resource for which the policy is being
264 * specified. See [Resource
265 * names](https://cloud.google.com/apis/design/resource_names) for the
266 * appropriate value for this field.
267 * @param GoogleIamV1SetIamPolicyRequest $postBody
268 * @param array $optParams Optional parameters.
269 * @return GoogleIamV1Policy
270 * @throws \Google\Service\Exception
271 */
272 public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
273 {
274 $params = ['resource' => $resource, 'postBody' => $postBody];
275 $params = array_merge($params, $optParams);
276 return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
277 }
278 /**
279 * Creates a subscription for the environment's Pub/Sub topic. The server will
280 * assign a random name for this subscription. The "name" and "push_config" must
281 * *not* be specified. (environments.subscribe)
282 *
283 * @param string $parent Required. Name of the environment. Use the following
284 * structure in your request: `organizations/{org}/environments/{env}`
285 * @param array $optParams Optional parameters.
286 * @return GoogleCloudApigeeV1Subscription
287 * @throws \Google\Service\Exception
288 */
289 public function subscribe($parent, $optParams = [])
290 {
291 $params = ['parent' => $parent];
292 $params = array_merge($params, $optParams);
293 return $this->call('subscribe', [$params], GoogleCloudApigeeV1Subscription::class);
294 }
295 /**
296 * Tests the permissions of a user on an environment, and returns a subset of
297 * permissions that the user has on the environment. If the environment does not
298 * exist, an empty permission set is returned (a NOT_FOUND error is not
299 * returned). (environments.testIamPermissions)
300 *
301 * @param string $resource REQUIRED: The resource for which the policy detail is
302 * being requested. See [Resource
303 * names](https://cloud.google.com/apis/design/resource_names) for the
304 * appropriate value for this field.
305 * @param GoogleIamV1TestIamPermissionsRequest $postBody
306 * @param array $optParams Optional parameters.
307 * @return GoogleIamV1TestIamPermissionsResponse
308 * @throws \Google\Service\Exception
309 */
310 public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
311 {
312 $params = ['resource' => $resource, 'postBody' => $postBody];
313 $params = array_merge($params, $optParams);
314 return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
315 }
316 /**
317 * Deletes a subscription for the environment's Pub/Sub topic.
318 * (environments.unsubscribe)
319 *
320 * @param string $parent Required. Name of the environment. Use the following
321 * structure in your request: `organizations/{org}/environments/{env}`
322 * @param GoogleCloudApigeeV1Subscription $postBody
323 * @param array $optParams Optional parameters.
324 * @return GoogleProtobufEmpty
325 * @throws \Google\Service\Exception
326 */
327 public function unsubscribe($parent, GoogleCloudApigeeV1Subscription $postBody, $optParams = [])
328 {
329 $params = ['parent' => $parent, 'postBody' => $postBody];
330 $params = array_merge($params, $optParams);
331 return $this->call('unsubscribe', [$params], GoogleProtobufEmpty::class);
332 }
333 /**
334 * Updates an existing environment. When updating properties, you must pass all
335 * existing properties to the API, even if they are not being changed. If you
336 * omit properties from the payload, the properties are removed. To get the
337 * current list of properties for the environment, use the [Get Environment
338 * API](get). **Note**: Both `PUT` and `POST` methods are supported for updating
339 * an existing environment. (environments.update)
340 *
341 * @param string $name Required. Name of the environment. Use the following
342 * structure in your request: `organizations/{org}/environments/{env}`
343 * @param GoogleCloudApigeeV1Environment $postBody
344 * @param array $optParams Optional parameters.
345 * @return GoogleCloudApigeeV1Environment
346 * @throws \Google\Service\Exception
347 */
348 public function update($name, GoogleCloudApigeeV1Environment $postBody, $optParams = [])
349 {
350 $params = ['name' => $name, 'postBody' => $postBody];
351 $params = array_merge($params, $optParams);
352 return $this->call('update', [$params], GoogleCloudApigeeV1Environment::class);
353 }
354 /**
355 * Updates the debug mask singleton resource for an environment.
356 * (environments.updateDebugmask)
357 *
358 * @param string $name Name of the debug mask.
359 * @param GoogleCloudApigeeV1DebugMask $postBody
360 * @param array $optParams Optional parameters.
361 *
362 * @opt_param bool replaceRepeatedFields Boolean flag that specifies whether to
363 * replace existing values in the debug mask when doing an update. Set to true
364 * to replace existing values. The default behavior is to append the values
365 * (false).
366 * @opt_param string updateMask Field debug mask to support partial updates.
367 * @return GoogleCloudApigeeV1DebugMask
368 * @throws \Google\Service\Exception
369 */
370 public function updateDebugmask($name, GoogleCloudApigeeV1DebugMask $postBody, $optParams = [])
371 {
372 $params = ['name' => $name, 'postBody' => $postBody];
373 $params = array_merge($params, $optParams);
374 return $this->call('updateDebugmask', [$params], GoogleCloudApigeeV1DebugMask::class);
375 }
376 /**
377 * Updates an existing environment. When updating properties, you must pass all
378 * existing properties to the API, even if they are not being changed. If you
379 * omit properties from the payload, the properties are removed. To get the
380 * current list of properties for the environment, use the [Get Environment
381 * API](get). **Note**: Both `PUT` and `POST` methods are supported for updating
382 * an existing environment. (environments.updateEnvironment)
383 *
384 * @param string $name Required. Name of the environment. Use the following
385 * structure in your request: `organizations/{org}/environments/{env}`
386 * @param GoogleCloudApigeeV1Environment $postBody
387 * @param array $optParams Optional parameters.
388 * @return GoogleCloudApigeeV1Environment
389 * @throws \Google\Service\Exception
390 */
391 public function updateEnvironment($name, GoogleCloudApigeeV1Environment $postBody, $optParams = [])
392 {
393 $params = ['name' => $name, 'postBody' => $postBody];
394 $params = array_merge($params, $optParams);
395 return $this->call('updateEnvironment', [$params], GoogleCloudApigeeV1Environment::class);
396 }
397 /**
398 * UpdateSecurityActionConfig updates the current SecurityActions configuration.
399 * This method is used to enable/disable the feature at the environment level.
400 * (environments.updateSecurityActionsConfig)
401 *
402 * @param string $name This is a singleton resource, the name will always be set
403 * by SecurityActions and any user input will be ignored. The name is always:
404 * `organizations/{org}/environments/{env}/security_actions_config`
405 * @param GoogleCloudApigeeV1SecurityActionsConfig $postBody
406 * @param array $optParams Optional parameters.
407 *
408 * @opt_param string updateMask The list of fields to update.
409 * @return GoogleCloudApigeeV1SecurityActionsConfig
410 * @throws \Google\Service\Exception
411 */
412 public function updateSecurityActionsConfig($name, GoogleCloudApigeeV1SecurityActionsConfig $postBody, $optParams = [])
413 {
414 $params = ['name' => $name, 'postBody' => $postBody];
415 $params = array_merge($params, $optParams);
416 return $this->call('updateSecurityActionsConfig', [$params], GoogleCloudApigeeV1SecurityActionsConfig::class);
417 }
418 /**
419 * Updates the trace configurations in an environment. Note that the repeated
420 * fields have replace semantics when included in the field mask and that they
421 * will be overwritten by the value of the fields in the request body.
422 * (environments.updateTraceConfig)
423 *
424 * @param string $name Required. Name of the trace configuration. Use the
425 * following structure in your request:
426 * "organizations/environments/traceConfig".
427 * @param GoogleCloudApigeeV1TraceConfig $postBody
428 * @param array $optParams Optional parameters.
429 *
430 * @opt_param string updateMask List of fields to be updated.
431 * @return GoogleCloudApigeeV1TraceConfig
432 * @throws \Google\Service\Exception
433 */
434 public function updateTraceConfig($name, GoogleCloudApigeeV1TraceConfig $postBody, $optParams = [])
435 {
436 $params = ['name' => $name, 'postBody' => $postBody];
437 $params = array_merge($params, $optParams);
438 return $this->call('updateTraceConfig', [$params], GoogleCloudApigeeV1TraceConfig::class);
439 }
440}
441
442// Adding a class alias for backwards compatibility with the previous class name.
443class_alias(OrganizationsEnvironments::class, 'Google_Service_Apigee_Resource_OrganizationsEnvironments');
Note: See TracBrowser for help on using the repository browser.