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\NetAppFiles\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\NetAppFiles\EncryptVolumesRequest;
|
---|
21 | use Google\Service\NetAppFiles\KmsConfig;
|
---|
22 | use Google\Service\NetAppFiles\ListKmsConfigsResponse;
|
---|
23 | use Google\Service\NetAppFiles\Operation;
|
---|
24 | use Google\Service\NetAppFiles\VerifyKmsConfigRequest;
|
---|
25 | use Google\Service\NetAppFiles\VerifyKmsConfigResponse;
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * The "kmsConfigs" collection of methods.
|
---|
29 | * Typical usage is:
|
---|
30 | * <code>
|
---|
31 | * $netappService = new Google\Service\NetAppFiles(...);
|
---|
32 | * $kmsConfigs = $netappService->projects_locations_kmsConfigs;
|
---|
33 | * </code>
|
---|
34 | */
|
---|
35 | class ProjectsLocationsKmsConfigs extends \Google\Service\Resource
|
---|
36 | {
|
---|
37 | /**
|
---|
38 | * Creates a new KMS config. (kmsConfigs.create)
|
---|
39 | *
|
---|
40 | * @param string $parent Required. Value for parent.
|
---|
41 | * @param KmsConfig $postBody
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | *
|
---|
44 | * @opt_param string kmsConfigId Required. Id of the requesting KmsConfig. Must
|
---|
45 | * be unique within the parent resource. Must contain only letters, numbers and
|
---|
46 | * hyphen, with the first character a letter, the last a letter or a number, and
|
---|
47 | * a 63 character maximum.
|
---|
48 | * @return Operation
|
---|
49 | * @throws \Google\Service\Exception
|
---|
50 | */
|
---|
51 | public function create($parent, KmsConfig $postBody, $optParams = [])
|
---|
52 | {
|
---|
53 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
54 | $params = array_merge($params, $optParams);
|
---|
55 | return $this->call('create', [$params], Operation::class);
|
---|
56 | }
|
---|
57 | /**
|
---|
58 | * Warning! This operation will permanently delete the Kms config.
|
---|
59 | * (kmsConfigs.delete)
|
---|
60 | *
|
---|
61 | * @param string $name Required. Name of the KmsConfig.
|
---|
62 | * @param array $optParams Optional parameters.
|
---|
63 | * @return Operation
|
---|
64 | * @throws \Google\Service\Exception
|
---|
65 | */
|
---|
66 | public function delete($name, $optParams = [])
|
---|
67 | {
|
---|
68 | $params = ['name' => $name];
|
---|
69 | $params = array_merge($params, $optParams);
|
---|
70 | return $this->call('delete', [$params], Operation::class);
|
---|
71 | }
|
---|
72 | /**
|
---|
73 | * Encrypt the existing volumes without CMEK encryption with the desired the KMS
|
---|
74 | * config for the whole region. (kmsConfigs.encrypt)
|
---|
75 | *
|
---|
76 | * @param string $name Required. Name of the KmsConfig.
|
---|
77 | * @param EncryptVolumesRequest $postBody
|
---|
78 | * @param array $optParams Optional parameters.
|
---|
79 | * @return Operation
|
---|
80 | * @throws \Google\Service\Exception
|
---|
81 | */
|
---|
82 | public function encrypt($name, EncryptVolumesRequest $postBody, $optParams = [])
|
---|
83 | {
|
---|
84 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
85 | $params = array_merge($params, $optParams);
|
---|
86 | return $this->call('encrypt', [$params], Operation::class);
|
---|
87 | }
|
---|
88 | /**
|
---|
89 | * Returns the description of the specified KMS config by kms_config_id.
|
---|
90 | * (kmsConfigs.get)
|
---|
91 | *
|
---|
92 | * @param string $name Required. Name of the KmsConfig
|
---|
93 | * @param array $optParams Optional parameters.
|
---|
94 | * @return KmsConfig
|
---|
95 | * @throws \Google\Service\Exception
|
---|
96 | */
|
---|
97 | public function get($name, $optParams = [])
|
---|
98 | {
|
---|
99 | $params = ['name' => $name];
|
---|
100 | $params = array_merge($params, $optParams);
|
---|
101 | return $this->call('get', [$params], KmsConfig::class);
|
---|
102 | }
|
---|
103 | /**
|
---|
104 | * Returns descriptions of all KMS configs owned by the caller.
|
---|
105 | * (kmsConfigs.listProjectsLocationsKmsConfigs)
|
---|
106 | *
|
---|
107 | * @param string $parent Required. Parent value
|
---|
108 | * @param array $optParams Optional parameters.
|
---|
109 | *
|
---|
110 | * @opt_param string filter List filter.
|
---|
111 | * @opt_param string orderBy Sort results. Supported values are "name", "name
|
---|
112 | * desc" or "" (unsorted).
|
---|
113 | * @opt_param int pageSize The maximum number of items to return.
|
---|
114 | * @opt_param string pageToken The next_page_token value to use if there are
|
---|
115 | * additional results to retrieve for this list request.
|
---|
116 | * @return ListKmsConfigsResponse
|
---|
117 | * @throws \Google\Service\Exception
|
---|
118 | */
|
---|
119 | public function listProjectsLocationsKmsConfigs($parent, $optParams = [])
|
---|
120 | {
|
---|
121 | $params = ['parent' => $parent];
|
---|
122 | $params = array_merge($params, $optParams);
|
---|
123 | return $this->call('list', [$params], ListKmsConfigsResponse::class);
|
---|
124 | }
|
---|
125 | /**
|
---|
126 | * Updates the Kms config properties with the full spec (kmsConfigs.patch)
|
---|
127 | *
|
---|
128 | * @param string $name Identifier. Name of the KmsConfig.
|
---|
129 | * @param KmsConfig $postBody
|
---|
130 | * @param array $optParams Optional parameters.
|
---|
131 | *
|
---|
132 | * @opt_param string updateMask Required. Field mask is used to specify the
|
---|
133 | * fields to be overwritten in the KmsConfig resource by the update. The fields
|
---|
134 | * specified in the update_mask are relative to the resource, not the full
|
---|
135 | * request. A field will be overwritten if it is in the mask. If the user does
|
---|
136 | * not provide a mask then all fields will be overwritten.
|
---|
137 | * @return Operation
|
---|
138 | * @throws \Google\Service\Exception
|
---|
139 | */
|
---|
140 | public function patch($name, KmsConfig $postBody, $optParams = [])
|
---|
141 | {
|
---|
142 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
143 | $params = array_merge($params, $optParams);
|
---|
144 | return $this->call('patch', [$params], Operation::class);
|
---|
145 | }
|
---|
146 | /**
|
---|
147 | * Verifies KMS config reachability. (kmsConfigs.verify)
|
---|
148 | *
|
---|
149 | * @param string $name Required. Name of the KMS Config to be verified.
|
---|
150 | * @param VerifyKmsConfigRequest $postBody
|
---|
151 | * @param array $optParams Optional parameters.
|
---|
152 | * @return VerifyKmsConfigResponse
|
---|
153 | * @throws \Google\Service\Exception
|
---|
154 | */
|
---|
155 | public function verify($name, VerifyKmsConfigRequest $postBody, $optParams = [])
|
---|
156 | {
|
---|
157 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
158 | $params = array_merge($params, $optParams);
|
---|
159 | return $this->call('verify', [$params], VerifyKmsConfigResponse::class);
|
---|
160 | }
|
---|
161 | }
|
---|
162 |
|
---|
163 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
164 | class_alias(ProjectsLocationsKmsConfigs::class, 'Google_Service_NetAppFiles_Resource_ProjectsLocationsKmsConfigs');
|
---|