source: vendor/google/apiclient-services/src/CloudKMS/Resource/ProjectsLocationsEkmConnections.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: 9.4 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\CloudKMS\Resource;
19
20use Google\Service\CloudKMS\EkmConnection;
21use Google\Service\CloudKMS\ListEkmConnectionsResponse;
22use Google\Service\CloudKMS\Policy;
23use Google\Service\CloudKMS\SetIamPolicyRequest;
24use Google\Service\CloudKMS\TestIamPermissionsRequest;
25use Google\Service\CloudKMS\TestIamPermissionsResponse;
26use Google\Service\CloudKMS\VerifyConnectivityResponse;
27
28/**
29 * The "ekmConnections" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $cloudkmsService = new Google\Service\CloudKMS(...);
33 * $ekmConnections = $cloudkmsService->projects_locations_ekmConnections;
34 * </code>
35 */
36class ProjectsLocationsEkmConnections extends \Google\Service\Resource
37{
38 /**
39 * Creates a new EkmConnection in a given Project and Location.
40 * (ekmConnections.create)
41 *
42 * @param string $parent Required. The resource name of the location associated
43 * with the EkmConnection, in the format `projects/locations`.
44 * @param EkmConnection $postBody
45 * @param array $optParams Optional parameters.
46 *
47 * @opt_param string ekmConnectionId Required. It must be unique within a
48 * location and match the regular expression `[a-zA-Z0-9_-]{1,63}`.
49 * @return EkmConnection
50 * @throws \Google\Service\Exception
51 */
52 public function create($parent, EkmConnection $postBody, $optParams = [])
53 {
54 $params = ['parent' => $parent, 'postBody' => $postBody];
55 $params = array_merge($params, $optParams);
56 return $this->call('create', [$params], EkmConnection::class);
57 }
58 /**
59 * Returns metadata for a given EkmConnection. (ekmConnections.get)
60 *
61 * @param string $name Required. The name of the EkmConnection to get.
62 * @param array $optParams Optional parameters.
63 * @return EkmConnection
64 * @throws \Google\Service\Exception
65 */
66 public function get($name, $optParams = [])
67 {
68 $params = ['name' => $name];
69 $params = array_merge($params, $optParams);
70 return $this->call('get', [$params], EkmConnection::class);
71 }
72 /**
73 * Gets the access control policy for a resource. Returns an empty policy if the
74 * resource exists and does not have a policy set. (ekmConnections.getIamPolicy)
75 *
76 * @param string $resource REQUIRED: The resource for which the policy is being
77 * requested. See [Resource
78 * names](https://cloud.google.com/apis/design/resource_names) for the
79 * appropriate value for this field.
80 * @param array $optParams Optional parameters.
81 *
82 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
83 * version that will be used to format the policy. Valid values are 0, 1, and 3.
84 * Requests specifying an invalid value will be rejected. Requests for policies
85 * with any conditional role bindings must specify version 3. Policies with no
86 * conditional role bindings may specify any valid value or leave the field
87 * unset. The policy in the response might use the policy version that you
88 * specified, or it might use a lower policy version. For example, if you
89 * specify version 3, but the policy has no conditional role bindings, the
90 * response uses version 1. To learn which resources support conditions in their
91 * IAM policies, see the [IAM
92 * documentation](https://cloud.google.com/iam/help/conditions/resource-
93 * policies).
94 * @return Policy
95 * @throws \Google\Service\Exception
96 */
97 public function getIamPolicy($resource, $optParams = [])
98 {
99 $params = ['resource' => $resource];
100 $params = array_merge($params, $optParams);
101 return $this->call('getIamPolicy', [$params], Policy::class);
102 }
103 /**
104 * Lists EkmConnections. (ekmConnections.listProjectsLocationsEkmConnections)
105 *
106 * @param string $parent Required. The resource name of the location associated
107 * with the EkmConnections to list, in the format `projects/locations`.
108 * @param array $optParams Optional parameters.
109 *
110 * @opt_param string filter Optional. Only include resources that match the
111 * filter in the response. For more information, see [Sorting and filtering list
112 * results](https://cloud.google.com/kms/docs/sorting-and-filtering).
113 * @opt_param string orderBy Optional. Specify how the results should be sorted.
114 * If not specified, the results will be sorted in the default order. For more
115 * information, see [Sorting and filtering list
116 * results](https://cloud.google.com/kms/docs/sorting-and-filtering).
117 * @opt_param int pageSize Optional. Optional limit on the number of
118 * EkmConnections to include in the response. Further EkmConnections can
119 * subsequently be obtained by including the
120 * ListEkmConnectionsResponse.next_page_token in a subsequent request. If
121 * unspecified, the server will pick an appropriate default.
122 * @opt_param string pageToken Optional. Optional pagination token, returned
123 * earlier via ListEkmConnectionsResponse.next_page_token.
124 * @return ListEkmConnectionsResponse
125 * @throws \Google\Service\Exception
126 */
127 public function listProjectsLocationsEkmConnections($parent, $optParams = [])
128 {
129 $params = ['parent' => $parent];
130 $params = array_merge($params, $optParams);
131 return $this->call('list', [$params], ListEkmConnectionsResponse::class);
132 }
133 /**
134 * Updates an EkmConnection's metadata. (ekmConnections.patch)
135 *
136 * @param string $name Output only. The resource name for the EkmConnection in
137 * the format `projects/locations/ekmConnections`.
138 * @param EkmConnection $postBody
139 * @param array $optParams Optional parameters.
140 *
141 * @opt_param string updateMask Required. List of fields to be updated in this
142 * request.
143 * @return EkmConnection
144 * @throws \Google\Service\Exception
145 */
146 public function patch($name, EkmConnection $postBody, $optParams = [])
147 {
148 $params = ['name' => $name, 'postBody' => $postBody];
149 $params = array_merge($params, $optParams);
150 return $this->call('patch', [$params], EkmConnection::class);
151 }
152 /**
153 * Sets the access control policy on the specified resource. Replaces any
154 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
155 * `PERMISSION_DENIED` errors. (ekmConnections.setIamPolicy)
156 *
157 * @param string $resource REQUIRED: The resource for which the policy is being
158 * specified. See [Resource
159 * names](https://cloud.google.com/apis/design/resource_names) for the
160 * appropriate value for this field.
161 * @param SetIamPolicyRequest $postBody
162 * @param array $optParams Optional parameters.
163 * @return Policy
164 * @throws \Google\Service\Exception
165 */
166 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
167 {
168 $params = ['resource' => $resource, 'postBody' => $postBody];
169 $params = array_merge($params, $optParams);
170 return $this->call('setIamPolicy', [$params], Policy::class);
171 }
172 /**
173 * Returns permissions that a caller has on the specified resource. If the
174 * resource does not exist, this will return an empty set of permissions, not a
175 * `NOT_FOUND` error. Note: This operation is designed to be used for building
176 * permission-aware UIs and command-line tools, not for authorization checking.
177 * This operation may "fail open" without warning.
178 * (ekmConnections.testIamPermissions)
179 *
180 * @param string $resource REQUIRED: The resource for which the policy detail is
181 * being requested. See [Resource
182 * names](https://cloud.google.com/apis/design/resource_names) for the
183 * appropriate value for this field.
184 * @param TestIamPermissionsRequest $postBody
185 * @param array $optParams Optional parameters.
186 * @return TestIamPermissionsResponse
187 * @throws \Google\Service\Exception
188 */
189 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
190 {
191 $params = ['resource' => $resource, 'postBody' => $postBody];
192 $params = array_merge($params, $optParams);
193 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
194 }
195 /**
196 * Verifies that Cloud KMS can successfully connect to the external key manager
197 * specified by an EkmConnection. If there is an error connecting to the EKM,
198 * this method returns a FAILED_PRECONDITION status containing structured
199 * information as described at
200 * https://cloud.google.com/kms/docs/reference/ekm_errors.
201 * (ekmConnections.verifyConnectivity)
202 *
203 * @param string $name Required. The name of the EkmConnection to verify.
204 * @param array $optParams Optional parameters.
205 * @return VerifyConnectivityResponse
206 * @throws \Google\Service\Exception
207 */
208 public function verifyConnectivity($name, $optParams = [])
209 {
210 $params = ['name' => $name];
211 $params = array_merge($params, $optParams);
212 return $this->call('verifyConnectivity', [$params], VerifyConnectivityResponse::class);
213 }
214}
215
216// Adding a class alias for backwards compatibility with the previous class name.
217class_alias(ProjectsLocationsEkmConnections::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsEkmConnections');
Note: See TracBrowser for help on using the repository browser.