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\SQLAdmin\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\SQLAdmin\SslCert;
|
---|
21 | use Google\Service\SQLAdmin\SslCertsCreateEphemeralRequest;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "createEphemeral" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $sqladminService = new Google\Service\SQLAdmin(...);
|
---|
28 | * $createEphemeral = $sqladminService->createEphemeral;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class ProjectsInstancesCreateEphemeral extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Generates a short-lived X509 certificate containing the provided public key
|
---|
35 | * and signed by a private key specific to the target instance. Users may use
|
---|
36 | * the certificate to authenticate as themselves when connecting to the
|
---|
37 | * database. (createEphemeral.create)
|
---|
38 | *
|
---|
39 | * @param string $project Project ID of the Cloud SQL project.
|
---|
40 | * @param string $instance Cloud SQL instance ID. This does not include the
|
---|
41 | * project ID.
|
---|
42 | * @param SslCertsCreateEphemeralRequest $postBody
|
---|
43 | * @param array $optParams Optional parameters.
|
---|
44 | * @return SslCert
|
---|
45 | */
|
---|
46 | public function create($project, $instance, SslCertsCreateEphemeralRequest $postBody, $optParams = [])
|
---|
47 | {
|
---|
48 | $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody];
|
---|
49 | $params = array_merge($params, $optParams);
|
---|
50 | return $this->call('create', [$params], SslCert::class);
|
---|
51 | }
|
---|
52 | }
|
---|
53 |
|
---|
54 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
55 | class_alias(ProjectsInstancesCreateEphemeral::class, 'Google_Service_SQLAdmin_Resource_ProjectsInstancesCreateEphemeral');
|
---|