source: vendor/google/apiclient-services/src/SQLAdmin/Resource/Connect.php@ f9c482b

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

Upload new project files

  • Property mode set to 100644
File size: 2.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\SQLAdmin\Resource;
19
20use Google\Service\SQLAdmin\ConnectSettings;
21use Google\Service\SQLAdmin\GenerateEphemeralCertRequest;
22use Google\Service\SQLAdmin\GenerateEphemeralCertResponse;
23
24/**
25 * The "connect" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $sqladminService = new Google\Service\SQLAdmin(...);
29 * $connect = $sqladminService->connect;
30 * </code>
31 */
32class Connect extends \Google\Service\Resource
33{
34 /**
35 * Generates a short-lived X509 certificate containing the provided public key
36 * and signed by a private key specific to the target instance. Users may use
37 * the certificate to authenticate as themselves when connecting to the
38 * database. (connect.generateEphemeralCert)
39 *
40 * @param string $project Project ID of the project that contains the instance.
41 * @param string $instance Cloud SQL instance ID. This does not include the
42 * project ID.
43 * @param GenerateEphemeralCertRequest $postBody
44 * @param array $optParams Optional parameters.
45 * @return GenerateEphemeralCertResponse
46 * @throws \Google\Service\Exception
47 */
48 public function generateEphemeralCert($project, $instance, GenerateEphemeralCertRequest $postBody, $optParams = [])
49 {
50 $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('generateEphemeralCert', [$params], GenerateEphemeralCertResponse::class);
53 }
54 /**
55 * Retrieves connect settings about a Cloud SQL instance. (connect.get)
56 *
57 * @param string $project Project ID of the project that contains the instance.
58 * @param string $instance Cloud SQL instance ID. This does not include the
59 * project ID.
60 * @param array $optParams Optional parameters.
61 *
62 * @opt_param string readTime Optional. Optional snapshot read timestamp to
63 * trade freshness for performance.
64 * @return ConnectSettings
65 * @throws \Google\Service\Exception
66 */
67 public function get($project, $instance, $optParams = [])
68 {
69 $params = ['project' => $project, 'instance' => $instance];
70 $params = array_merge($params, $optParams);
71 return $this->call('get', [$params], ConnectSettings::class);
72 }
73}
74
75// Adding a class alias for backwards compatibility with the previous class name.
76class_alias(Connect::class, 'Google_Service_SQLAdmin_Resource_Connect');
Note: See TracBrowser for help on using the repository browser.