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 |
|
---|
18 | namespace Google\Service\Apigee\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Apigee\GoogleCloudApigeeV1Instance;
|
---|
21 | use Google\Service\Apigee\GoogleCloudApigeeV1ListInstancesResponse;
|
---|
22 | use Google\Service\Apigee\GoogleCloudApigeeV1ReportInstanceStatusRequest;
|
---|
23 | use Google\Service\Apigee\GoogleCloudApigeeV1ReportInstanceStatusResponse;
|
---|
24 | use Google\Service\Apigee\GoogleLongrunningOperation;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "instances" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
31 | * $instances = $apigeeService->organizations_instances;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class OrganizationsInstances extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Creates an Apigee runtime instance. The instance is accessible from the
|
---|
38 | * authorized network configured on the organization. **Note:** Not supported
|
---|
39 | * for Apigee hybrid. (instances.create)
|
---|
40 | *
|
---|
41 | * @param string $parent Required. Name of the organization. Use the following
|
---|
42 | * structure in your request: `organizations/{org}`.
|
---|
43 | * @param GoogleCloudApigeeV1Instance $postBody
|
---|
44 | * @param array $optParams Optional parameters.
|
---|
45 | * @return GoogleLongrunningOperation
|
---|
46 | * @throws \Google\Service\Exception
|
---|
47 | */
|
---|
48 | public function create($parent, GoogleCloudApigeeV1Instance $postBody, $optParams = [])
|
---|
49 | {
|
---|
50 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
51 | $params = array_merge($params, $optParams);
|
---|
52 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
53 | }
|
---|
54 | /**
|
---|
55 | * Deletes an Apigee runtime instance. The instance stops serving requests and
|
---|
56 | * the runtime data is deleted. **Note:** Not supported for Apigee hybrid.
|
---|
57 | * (instances.delete)
|
---|
58 | *
|
---|
59 | * @param string $name Required. Name of the instance. Use the following
|
---|
60 | * structure in your request: `organizations/{org}/instances/{instance}`.
|
---|
61 | * @param array $optParams Optional parameters.
|
---|
62 | * @return GoogleLongrunningOperation
|
---|
63 | * @throws \Google\Service\Exception
|
---|
64 | */
|
---|
65 | public function delete($name, $optParams = [])
|
---|
66 | {
|
---|
67 | $params = ['name' => $name];
|
---|
68 | $params = array_merge($params, $optParams);
|
---|
69 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
70 | }
|
---|
71 | /**
|
---|
72 | * Gets the details for an Apigee runtime instance. **Note:** Not supported for
|
---|
73 | * Apigee hybrid. (instances.get)
|
---|
74 | *
|
---|
75 | * @param string $name Required. Name of the instance. Use the following
|
---|
76 | * structure in your request: `organizations/{org}/instances/{instance}`.
|
---|
77 | * @param array $optParams Optional parameters.
|
---|
78 | * @return GoogleCloudApigeeV1Instance
|
---|
79 | * @throws \Google\Service\Exception
|
---|
80 | */
|
---|
81 | public function get($name, $optParams = [])
|
---|
82 | {
|
---|
83 | $params = ['name' => $name];
|
---|
84 | $params = array_merge($params, $optParams);
|
---|
85 | return $this->call('get', [$params], GoogleCloudApigeeV1Instance::class);
|
---|
86 | }
|
---|
87 | /**
|
---|
88 | * Lists all Apigee runtime instances for the organization. **Note:** Not
|
---|
89 | * supported for Apigee hybrid. (instances.listOrganizationsInstances)
|
---|
90 | *
|
---|
91 | * @param string $parent Required. Name of the organization. Use the following
|
---|
92 | * structure in your request: `organizations/{org}`.
|
---|
93 | * @param array $optParams Optional parameters.
|
---|
94 | *
|
---|
95 | * @opt_param int pageSize Maximum number of instances to return. Defaults to
|
---|
96 | * 25.
|
---|
97 | * @opt_param string pageToken Page token, returned from a previous
|
---|
98 | * ListInstances call, that you can use to retrieve the next page of content.
|
---|
99 | * @return GoogleCloudApigeeV1ListInstancesResponse
|
---|
100 | * @throws \Google\Service\Exception
|
---|
101 | */
|
---|
102 | public function listOrganizationsInstances($parent, $optParams = [])
|
---|
103 | {
|
---|
104 | $params = ['parent' => $parent];
|
---|
105 | $params = array_merge($params, $optParams);
|
---|
106 | return $this->call('list', [$params], GoogleCloudApigeeV1ListInstancesResponse::class);
|
---|
107 | }
|
---|
108 | /**
|
---|
109 | * Updates an Apigee runtime instance. You can update the fields described in
|
---|
110 | * NodeConfig. No other fields will be updated. **Note:** Not supported for
|
---|
111 | * Apigee hybrid. (instances.patch)
|
---|
112 | *
|
---|
113 | * @param string $name Required. Name of the instance. Use the following
|
---|
114 | * structure in your request: `organizations/{org}/instances/{instance}`.
|
---|
115 | * @param GoogleCloudApigeeV1Instance $postBody
|
---|
116 | * @param array $optParams Optional parameters.
|
---|
117 | *
|
---|
118 | * @opt_param string updateMask List of fields to be updated.
|
---|
119 | * @return GoogleLongrunningOperation
|
---|
120 | * @throws \Google\Service\Exception
|
---|
121 | */
|
---|
122 | public function patch($name, GoogleCloudApigeeV1Instance $postBody, $optParams = [])
|
---|
123 | {
|
---|
124 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
125 | $params = array_merge($params, $optParams);
|
---|
126 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
127 | }
|
---|
128 | /**
|
---|
129 | * Reports the latest status for a runtime instance. (instances.reportStatus)
|
---|
130 | *
|
---|
131 | * @param string $instance The name of the instance reporting this status. For
|
---|
132 | * SaaS the request will be rejected if no instance exists under this name.
|
---|
133 | * Format is organizations/{org}/instances/{instance}
|
---|
134 | * @param GoogleCloudApigeeV1ReportInstanceStatusRequest $postBody
|
---|
135 | * @param array $optParams Optional parameters.
|
---|
136 | * @return GoogleCloudApigeeV1ReportInstanceStatusResponse
|
---|
137 | * @throws \Google\Service\Exception
|
---|
138 | */
|
---|
139 | public function reportStatus($instance, GoogleCloudApigeeV1ReportInstanceStatusRequest $postBody, $optParams = [])
|
---|
140 | {
|
---|
141 | $params = ['instance' => $instance, 'postBody' => $postBody];
|
---|
142 | $params = array_merge($params, $optParams);
|
---|
143 | return $this->call('reportStatus', [$params], GoogleCloudApigeeV1ReportInstanceStatusResponse::class);
|
---|
144 | }
|
---|
145 | }
|
---|
146 |
|
---|
147 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
148 | class_alias(OrganizationsInstances::class, 'Google_Service_Apigee_Resource_OrganizationsInstances');
|
---|