* $sqladminService = new Google\Service\SQLAdmin(...); * $instances = $sqladminService->projects_instances; * */ class ProjectsInstances extends \Google\Service\Resource { /** * Get Disk Shrink Config for a given instance. (instances.getDiskShrinkConfig) * * @param string $project Project ID of the project that contains the instance. * @param string $instance Cloud SQL instance ID. This does not include the * project ID. * @param array $optParams Optional parameters. * @return SqlInstancesGetDiskShrinkConfigResponse * @throws \Google\Service\Exception */ public function getDiskShrinkConfig($project, $instance, $optParams = []) { $params = ['project' => $project, 'instance' => $instance]; $params = array_merge($params, $optParams); return $this->call('getDiskShrinkConfig', [$params], SqlInstancesGetDiskShrinkConfigResponse::class); } /** * Get Latest Recovery Time for a given instance. * (instances.getLatestRecoveryTime) * * @param string $project Project ID of the project that contains the instance. * @param string $instance Cloud SQL instance ID. This does not include the * project ID. * @param array $optParams Optional parameters. * @return SqlInstancesGetLatestRecoveryTimeResponse * @throws \Google\Service\Exception */ public function getLatestRecoveryTime($project, $instance, $optParams = []) { $params = ['project' => $project, 'instance' => $instance]; $params = array_merge($params, $optParams); return $this->call('getLatestRecoveryTime', [$params], SqlInstancesGetLatestRecoveryTimeResponse::class); } /** * Perform Disk Shrink on primary instance. (instances.performDiskShrink) * * @param string $project Project ID of the project that contains the instance. * @param string $instance Cloud SQL instance ID. This does not include the * project ID. * @param PerformDiskShrinkContext $postBody * @param array $optParams Optional parameters. * @return Operation * @throws \Google\Service\Exception */ public function performDiskShrink($project, $instance, PerformDiskShrinkContext $postBody, $optParams = []) { $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('performDiskShrink', [$params], Operation::class); } /** * Reschedules the maintenance on the given instance. * (instances.rescheduleMaintenance) * * @param string $project ID of the project that contains the instance. * @param string $instance Cloud SQL instance ID. This does not include the * project ID. * @param SqlInstancesRescheduleMaintenanceRequestBody $postBody * @param array $optParams Optional parameters. * @return Operation * @throws \Google\Service\Exception */ public function rescheduleMaintenance($project, $instance, SqlInstancesRescheduleMaintenanceRequestBody $postBody, $optParams = []) { $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('rescheduleMaintenance', [$params], Operation::class); } /** * Reset Replica Size to primary instance disk size. * (instances.resetReplicaSize) * * @param string $project ID of the project that contains the read replica. * @param string $instance Cloud SQL read replica instance name. * @param SqlInstancesResetReplicaSizeRequest $postBody * @param array $optParams Optional parameters. * @return Operation * @throws \Google\Service\Exception */ public function resetReplicaSize($project, $instance, SqlInstancesResetReplicaSizeRequest $postBody, $optParams = []) { $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('resetReplicaSize', [$params], Operation::class); } /** * Start External primary instance migration. (instances.startExternalSync) * * @param string $project ID of the project that contains the instance. * @param string $instance Cloud SQL instance ID. This does not include the * project ID. * @param SqlInstancesStartExternalSyncRequest $postBody * @param array $optParams Optional parameters. * @return Operation * @throws \Google\Service\Exception */ public function startExternalSync($project, $instance, SqlInstancesStartExternalSyncRequest $postBody, $optParams = []) { $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('startExternalSync', [$params], Operation::class); } /** * Verify External primary instance external sync settings. * (instances.verifyExternalSyncSettings) * * @param string $project Project ID of the project that contains the instance. * @param string $instance Cloud SQL instance ID. This does not include the * project ID. * @param SqlInstancesVerifyExternalSyncSettingsRequest $postBody * @param array $optParams Optional parameters. * @return SqlInstancesVerifyExternalSyncSettingsResponse * @throws \Google\Service\Exception */ public function verifyExternalSyncSettings($project, $instance, SqlInstancesVerifyExternalSyncSettingsRequest $postBody, $optParams = []) { $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('verifyExternalSyncSettings', [$params], SqlInstancesVerifyExternalSyncSettingsResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsInstances::class, 'Google_Service_SQLAdmin_Resource_ProjectsInstances');