source: vendor/google/apiclient-services/src/SQLAdmin/Resource/ProjectsInstances.php

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

Upload project files

  • Property mode set to 100644
File size: 7.0 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\SQLAdmin\Resource;
19
20use Google\Service\SQLAdmin\Operation;
21use Google\Service\SQLAdmin\PerformDiskShrinkContext;
22use Google\Service\SQLAdmin\SqlInstancesGetDiskShrinkConfigResponse;
23use Google\Service\SQLAdmin\SqlInstancesGetLatestRecoveryTimeResponse;
24use Google\Service\SQLAdmin\SqlInstancesRescheduleMaintenanceRequestBody;
25use Google\Service\SQLAdmin\SqlInstancesResetReplicaSizeRequest;
26use Google\Service\SQLAdmin\SqlInstancesStartExternalSyncRequest;
27use Google\Service\SQLAdmin\SqlInstancesVerifyExternalSyncSettingsRequest;
28use Google\Service\SQLAdmin\SqlInstancesVerifyExternalSyncSettingsResponse;
29
30/**
31 * The "instances" collection of methods.
32 * Typical usage is:
33 * <code>
34 * $sqladminService = new Google\Service\SQLAdmin(...);
35 * $instances = $sqladminService->projects_instances;
36 * </code>
37 */
38class ProjectsInstances extends \Google\Service\Resource
39{
40 /**
41 * Get Disk Shrink Config for a given instance. (instances.getDiskShrinkConfig)
42 *
43 * @param string $project Project ID of the project that contains the instance.
44 * @param string $instance Cloud SQL instance ID. This does not include the
45 * project ID.
46 * @param array $optParams Optional parameters.
47 * @return SqlInstancesGetDiskShrinkConfigResponse
48 * @throws \Google\Service\Exception
49 */
50 public function getDiskShrinkConfig($project, $instance, $optParams = [])
51 {
52 $params = ['project' => $project, 'instance' => $instance];
53 $params = array_merge($params, $optParams);
54 return $this->call('getDiskShrinkConfig', [$params], SqlInstancesGetDiskShrinkConfigResponse::class);
55 }
56 /**
57 * Get Latest Recovery Time for a given instance.
58 * (instances.getLatestRecoveryTime)
59 *
60 * @param string $project Project ID of the project that contains the instance.
61 * @param string $instance Cloud SQL instance ID. This does not include the
62 * project ID.
63 * @param array $optParams Optional parameters.
64 * @return SqlInstancesGetLatestRecoveryTimeResponse
65 * @throws \Google\Service\Exception
66 */
67 public function getLatestRecoveryTime($project, $instance, $optParams = [])
68 {
69 $params = ['project' => $project, 'instance' => $instance];
70 $params = array_merge($params, $optParams);
71 return $this->call('getLatestRecoveryTime', [$params], SqlInstancesGetLatestRecoveryTimeResponse::class);
72 }
73 /**
74 * Perform Disk Shrink on primary instance. (instances.performDiskShrink)
75 *
76 * @param string $project Project ID of the project that contains the instance.
77 * @param string $instance Cloud SQL instance ID. This does not include the
78 * project ID.
79 * @param PerformDiskShrinkContext $postBody
80 * @param array $optParams Optional parameters.
81 * @return Operation
82 * @throws \Google\Service\Exception
83 */
84 public function performDiskShrink($project, $instance, PerformDiskShrinkContext $postBody, $optParams = [])
85 {
86 $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody];
87 $params = array_merge($params, $optParams);
88 return $this->call('performDiskShrink', [$params], Operation::class);
89 }
90 /**
91 * Reschedules the maintenance on the given instance.
92 * (instances.rescheduleMaintenance)
93 *
94 * @param string $project ID of the project that contains the instance.
95 * @param string $instance Cloud SQL instance ID. This does not include the
96 * project ID.
97 * @param SqlInstancesRescheduleMaintenanceRequestBody $postBody
98 * @param array $optParams Optional parameters.
99 * @return Operation
100 * @throws \Google\Service\Exception
101 */
102 public function rescheduleMaintenance($project, $instance, SqlInstancesRescheduleMaintenanceRequestBody $postBody, $optParams = [])
103 {
104 $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody];
105 $params = array_merge($params, $optParams);
106 return $this->call('rescheduleMaintenance', [$params], Operation::class);
107 }
108 /**
109 * Reset Replica Size to primary instance disk size.
110 * (instances.resetReplicaSize)
111 *
112 * @param string $project ID of the project that contains the read replica.
113 * @param string $instance Cloud SQL read replica instance name.
114 * @param SqlInstancesResetReplicaSizeRequest $postBody
115 * @param array $optParams Optional parameters.
116 * @return Operation
117 * @throws \Google\Service\Exception
118 */
119 public function resetReplicaSize($project, $instance, SqlInstancesResetReplicaSizeRequest $postBody, $optParams = [])
120 {
121 $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody];
122 $params = array_merge($params, $optParams);
123 return $this->call('resetReplicaSize', [$params], Operation::class);
124 }
125 /**
126 * Start External primary instance migration. (instances.startExternalSync)
127 *
128 * @param string $project ID of the project that contains the instance.
129 * @param string $instance Cloud SQL instance ID. This does not include the
130 * project ID.
131 * @param SqlInstancesStartExternalSyncRequest $postBody
132 * @param array $optParams Optional parameters.
133 * @return Operation
134 * @throws \Google\Service\Exception
135 */
136 public function startExternalSync($project, $instance, SqlInstancesStartExternalSyncRequest $postBody, $optParams = [])
137 {
138 $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody];
139 $params = array_merge($params, $optParams);
140 return $this->call('startExternalSync', [$params], Operation::class);
141 }
142 /**
143 * Verify External primary instance external sync settings.
144 * (instances.verifyExternalSyncSettings)
145 *
146 * @param string $project Project ID of the project that contains the instance.
147 * @param string $instance Cloud SQL instance ID. This does not include the
148 * project ID.
149 * @param SqlInstancesVerifyExternalSyncSettingsRequest $postBody
150 * @param array $optParams Optional parameters.
151 * @return SqlInstancesVerifyExternalSyncSettingsResponse
152 * @throws \Google\Service\Exception
153 */
154 public function verifyExternalSyncSettings($project, $instance, SqlInstancesVerifyExternalSyncSettingsRequest $postBody, $optParams = [])
155 {
156 $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody];
157 $params = array_merge($params, $optParams);
158 return $this->call('verifyExternalSyncSettings', [$params], SqlInstancesVerifyExternalSyncSettingsResponse::class);
159 }
160}
161
162// Adding a class alias for backwards compatibility with the previous class name.
163class_alias(ProjectsInstances::class, 'Google_Service_SQLAdmin_Resource_ProjectsInstances');
Note: See TracBrowser for help on using the repository browser.