Google Cloud IAM C++ Client 2.13.0
A C++ Client Library for Google Cloud IAM
Loading...
Searching...
No Matches
policies_client.h
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Generated by the Codegen C++ plugin.
16// If you make any local changes, they will be lost.
17// source: google/iam/v2/policy.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V2_POLICIES_CLIENT_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V2_POLICIES_CLIENT_H
21
22#include "google/cloud/iam/v2/policies_connection.h"
23#include "google/cloud/future.h"
24#include "google/cloud/options.h"
25#include "google/cloud/polling_policy.h"
26#include "google/cloud/status_or.h"
27#include "google/cloud/version.h"
28#include <google/longrunning/operations.grpc.pb.h>
29#include <map>
30#include <memory>
31
32namespace google {
33namespace cloud {
34namespace iam_v2 {
35GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
36
37///
38/// An interface for managing Identity and Access Management (IAM) policies.
39///
40/// @par Equality
41///
42/// Instances of this class created via copy-construction or copy-assignment
43/// always compare equal. Instances created with equal
44/// `std::shared_ptr<*Connection>` objects compare equal. Objects that compare
45/// equal share the same underlying resources.
46///
47/// @par Performance
48///
49/// Creating a new instance of this class is a relatively expensive operation,
50/// new objects establish new connections to the service. In contrast,
51/// copy-construction, move-construction, and the corresponding assignment
52/// operations are relatively efficient as the copies share all underlying
53/// resources.
54///
55/// @par Thread Safety
56///
57/// Concurrent access to different instances of this class, even if they compare
58/// equal, is guaranteed to work. Two or more threads operating on the same
59/// instance of this class is not guaranteed to work. Since copy-construction
60/// and move-construction is a relatively efficient operation, consider using
61/// such a copy when using this class from multiple threads.
62///
63class PoliciesClient {
64 public:
65 explicit PoliciesClient(std::shared_ptr<PoliciesConnection> connection,
66 Options opts = {});
68
69 ///@{
70 /// @name Copy and move support
71 PoliciesClient(PoliciesClient const&) = default;
72 PoliciesClient& operator=(PoliciesClient const&) = default;
73 PoliciesClient(PoliciesClient&&) = default;
75 ///@}
76
77 ///@{
78 /// @name Equality
79 friend bool operator==(PoliciesClient const& a, PoliciesClient const& b) {
80 return a.connection_ == b.connection_;
81 }
82 friend bool operator!=(PoliciesClient const& a, PoliciesClient const& b) {
83 return !(a == b);
84 }
85 ///@}
86
87 // clang-format off
88 ///
89 /// Retrieves the policies of the specified kind that are attached to a
90 /// resource.
91 ///
92 /// The response lists only policy metadata. In particular, policy rules are
93 /// omitted.
94 ///
95 /// @param parent Required. The resource that the policy is attached to, along with the kind of policy
96 /// to list. Format:
97 /// `policies/{attachment_point}/denypolicies`
98 /// @n
99 /// The attachment point is identified by its URL-encoded full resource name,
100 /// which means that the forward-slash character, `/`, must be written as
101 /// `%2F`. For example,
102 /// `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
103 /// @n
104 /// For organizations and folders, use the numeric ID in the full resource
105 /// name. For projects, you can use the alphanumeric or the numeric ID.
106 /// @param opts Optional. Override the class-level options, such as retry and
107 /// backoff policies.
108 /// @return a [StreamRange](@ref google::cloud::StreamRange)
109 /// to iterate of the results. See the documentation of this type for
110 /// details. In brief, this class has `begin()` and `end()` member
111 /// functions returning a iterator class meeting the
112 /// [input iterator requirements]. The value type for this iterator is a
113 /// [`StatusOr`] as the iteration may fail even after some values are
114 /// retrieved successfully, for example, if there is a network disconnect.
115 /// An empty set of results does not indicate an error, it indicates
116 /// that there are no resources meeting the request criteria.
117 /// On a successful iteration the `StatusOr<T>` contains elements of type
118 /// [google.iam.v2.Policy], or rather,
119 /// the C++ class generated by Protobuf from that type. Please consult the
120 /// Protobuf documentation for details on the [Protobuf mapping rules].
121 ///
122 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
123 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
124 /// [Long Running Operation]: https://google.aip.dev/151
125 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
126 /// [`future`]: @ref google::cloud::future
127 /// [`StatusOr`]: @ref google::cloud::StatusOr
128 /// [`Status`]: @ref google::cloud::Status
129 /// [google.iam.v2.ListPoliciesRequest]: @googleapis_reference_link{google/iam/v2/policy.proto#L176}
130 /// [google.iam.v2.Policy]: @googleapis_reference_link{google/iam/v2/policy.proto#L107}
131 ///
132 // clang-format on
133 StreamRange<google::iam::v2::Policy> ListPolicies(std::string const& parent,
134 Options opts = {});
135
136 // clang-format off
137 ///
138 /// Retrieves the policies of the specified kind that are attached to a
139 /// resource.
140 ///
141 /// The response lists only policy metadata. In particular, policy rules are
142 /// omitted.
143 ///
144 /// @param request Unary RPCs, such as the one wrapped by this
145 /// function, receive a single `request` proto message which includes all
146 /// the inputs for the RPC. In this case, the proto message is a
147 /// [google.iam.v2.ListPoliciesRequest].
148 /// Proto messages are converted to C++ classes by Protobuf, using the
149 /// [Protobuf mapping rules].
150 /// @param opts Optional. Override the class-level options, such as retry and
151 /// backoff policies.
152 /// @return a [StreamRange](@ref google::cloud::StreamRange)
153 /// to iterate of the results. See the documentation of this type for
154 /// details. In brief, this class has `begin()` and `end()` member
155 /// functions returning a iterator class meeting the
156 /// [input iterator requirements]. The value type for this iterator is a
157 /// [`StatusOr`] as the iteration may fail even after some values are
158 /// retrieved successfully, for example, if there is a network disconnect.
159 /// An empty set of results does not indicate an error, it indicates
160 /// that there are no resources meeting the request criteria.
161 /// On a successful iteration the `StatusOr<T>` contains elements of type
162 /// [google.iam.v2.Policy], or rather,
163 /// the C++ class generated by Protobuf from that type. Please consult the
164 /// Protobuf documentation for details on the [Protobuf mapping rules].
165 ///
166 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
167 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
168 /// [Long Running Operation]: https://google.aip.dev/151
169 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
170 /// [`future`]: @ref google::cloud::future
171 /// [`StatusOr`]: @ref google::cloud::StatusOr
172 /// [`Status`]: @ref google::cloud::Status
173 /// [google.iam.v2.ListPoliciesRequest]: @googleapis_reference_link{google/iam/v2/policy.proto#L176}
174 /// [google.iam.v2.Policy]: @googleapis_reference_link{google/iam/v2/policy.proto#L107}
175 ///
176 // clang-format on
177 StreamRange<google::iam::v2::Policy> ListPolicies(
178 google::iam::v2::ListPoliciesRequest request, Options opts = {});
179
180 // clang-format off
181 ///
182 /// Gets a policy.
183 ///
184 /// @param name Required. The resource name of the policy to retrieve. Format:
185 /// `policies/{attachment_point}/denypolicies/{policy_id}`
186 /// @n
187 /// Use the URL-encoded full resource name, which means that the forward-slash
188 /// character, `/`, must be written as `%2F`. For example,
189 /// `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
190 /// @n
191 /// For organizations and folders, use the numeric ID in the full resource
192 /// name. For projects, you can use the alphanumeric or the numeric ID.
193 /// @param opts Optional. Override the class-level options, such as retry and
194 /// backoff policies.
195 /// @return the result of the RPC. The response message type
196 /// ([google.iam.v2.Policy])
197 /// is mapped to a C++ class using the [Protobuf mapping rules].
198 /// If the request fails, the [`StatusOr`] contains the error details.
199 ///
200 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
201 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
202 /// [Long Running Operation]: https://google.aip.dev/151
203 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
204 /// [`future`]: @ref google::cloud::future
205 /// [`StatusOr`]: @ref google::cloud::StatusOr
206 /// [`Status`]: @ref google::cloud::Status
207 /// [google.iam.v2.GetPolicyRequest]: @googleapis_reference_link{google/iam/v2/policy.proto#L211}
208 /// [google.iam.v2.Policy]: @googleapis_reference_link{google/iam/v2/policy.proto#L107}
209 ///
210 // clang-format on
211 StatusOr<google::iam::v2::Policy> GetPolicy(std::string const& name,
212 Options opts = {});
213
214 // clang-format off
215 ///
216 /// Gets a policy.
217 ///
218 /// @param request Unary RPCs, such as the one wrapped by this
219 /// function, receive a single `request` proto message which includes all
220 /// the inputs for the RPC. In this case, the proto message is a
221 /// [google.iam.v2.GetPolicyRequest].
222 /// Proto messages are converted to C++ classes by Protobuf, using the
223 /// [Protobuf mapping rules].
224 /// @param opts Optional. Override the class-level options, such as retry and
225 /// backoff policies.
226 /// @return the result of the RPC. The response message type
227 /// ([google.iam.v2.Policy])
228 /// is mapped to a C++ class using the [Protobuf mapping rules].
229 /// If the request fails, the [`StatusOr`] contains the error details.
230 ///
231 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
232 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
233 /// [Long Running Operation]: https://google.aip.dev/151
234 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
235 /// [`future`]: @ref google::cloud::future
236 /// [`StatusOr`]: @ref google::cloud::StatusOr
237 /// [`Status`]: @ref google::cloud::Status
238 /// [google.iam.v2.GetPolicyRequest]: @googleapis_reference_link{google/iam/v2/policy.proto#L211}
239 /// [google.iam.v2.Policy]: @googleapis_reference_link{google/iam/v2/policy.proto#L107}
240 ///
241 // clang-format on
242 StatusOr<google::iam::v2::Policy> GetPolicy(
243 google::iam::v2::GetPolicyRequest const& request, Options opts = {});
244
245 // clang-format off
246 ///
247 /// Creates a policy.
248 ///
249 /// @param parent Required. The resource that the policy is attached to, along with the kind of policy
250 /// to create. Format: `policies/{attachment_point}/denypolicies`
251 /// @n
252 /// The attachment point is identified by its URL-encoded full resource name,
253 /// which means that the forward-slash character, `/`, must be written as
254 /// `%2F`. For example,
255 /// `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
256 /// @n
257 /// For organizations and folders, use the numeric ID in the full resource
258 /// name. For projects, you can use the alphanumeric or the numeric ID.
259 /// @param policy Required. The policy to create.
260 /// @param policy_id The ID to use for this policy, which will become the final component of
261 /// the policy's resource name. The ID must contain 3 to 63 characters. It can
262 /// contain lowercase letters and numbers, as well as dashes (`-`) and periods
263 /// (`.`). The first character must be a lowercase letter.
264 /// @param opts Optional. Override the class-level options, such as retry and
265 /// backoff policies.
266 /// @return A [`future`] that becomes satisfied when the LRO
267 /// ([Long Running Operation]) completes or the polling policy in effect
268 /// for this call is exhausted. The future is satisfied with an error if
269 /// the LRO completes with an error or the polling policy is exhausted.
270 /// In this case the [`StatusOr`] returned by the future contains the
271 /// error. If the LRO completes successfully the value of the future
272 /// contains the LRO's result. For this RPC the result is a
273 /// [google.iam.v2.Policy] proto message.
274 /// The C++ class representing this message is created by Protobuf, using
275 /// the [Protobuf mapping rules].
276 ///
277 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
278 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
279 /// [Long Running Operation]: https://google.aip.dev/151
280 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
281 /// [`future`]: @ref google::cloud::future
282 /// [`StatusOr`]: @ref google::cloud::StatusOr
283 /// [`Status`]: @ref google::cloud::Status
284 /// [google.iam.v2.CreatePolicyRequest]: @googleapis_reference_link{google/iam/v2/policy.proto#L226}
285 /// [google.iam.v2.Policy]: @googleapis_reference_link{google/iam/v2/policy.proto#L107}
286 ///
287 // clang-format on
288 future<StatusOr<google::iam::v2::Policy>> CreatePolicy(
289 std::string const& parent, google::iam::v2::Policy const& policy,
290 std::string const& policy_id, Options opts = {});
291
292 // clang-format off
293 ///
294 /// Creates a policy.
295 ///
296 /// @param request Unary RPCs, such as the one wrapped by this
297 /// function, receive a single `request` proto message which includes all
298 /// the inputs for the RPC. In this case, the proto message is a
299 /// [google.iam.v2.CreatePolicyRequest].
300 /// Proto messages are converted to C++ classes by Protobuf, using the
301 /// [Protobuf mapping rules].
302 /// @param opts Optional. Override the class-level options, such as retry and
303 /// backoff policies.
304 /// @return A [`future`] that becomes satisfied when the LRO
305 /// ([Long Running Operation]) completes or the polling policy in effect
306 /// for this call is exhausted. The future is satisfied with an error if
307 /// the LRO completes with an error or the polling policy is exhausted.
308 /// In this case the [`StatusOr`] returned by the future contains the
309 /// error. If the LRO completes successfully the value of the future
310 /// contains the LRO's result. For this RPC the result is a
311 /// [google.iam.v2.Policy] proto message.
312 /// The C++ class representing this message is created by Protobuf, using
313 /// the [Protobuf mapping rules].
314 ///
315 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
316 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
317 /// [Long Running Operation]: https://google.aip.dev/151
318 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
319 /// [`future`]: @ref google::cloud::future
320 /// [`StatusOr`]: @ref google::cloud::StatusOr
321 /// [`Status`]: @ref google::cloud::Status
322 /// [google.iam.v2.CreatePolicyRequest]: @googleapis_reference_link{google/iam/v2/policy.proto#L226}
323 /// [google.iam.v2.Policy]: @googleapis_reference_link{google/iam/v2/policy.proto#L107}
324 ///
325 // clang-format on
326 future<StatusOr<google::iam::v2::Policy>> CreatePolicy(
327 google::iam::v2::CreatePolicyRequest const& request, Options opts = {});
328
329 // clang-format off
330 ///
331 /// Updates the specified policy.
332 ///
333 /// You can update only the rules and the display name for the policy.
334 ///
335 /// To update a policy, you should use a read-modify-write loop:
336 ///
337 /// 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
338 /// 2. Modify the policy as needed.
339 /// 3. Use `UpdatePolicy` to write the updated policy.
340 ///
341 /// This pattern helps prevent conflicts between concurrent updates.
342 ///
343 /// @param request Unary RPCs, such as the one wrapped by this
344 /// function, receive a single `request` proto message which includes all
345 /// the inputs for the RPC. In this case, the proto message is a
346 /// [google.iam.v2.UpdatePolicyRequest].
347 /// Proto messages are converted to C++ classes by Protobuf, using the
348 /// [Protobuf mapping rules].
349 /// @param opts Optional. Override the class-level options, such as retry and
350 /// backoff policies.
351 /// @return A [`future`] that becomes satisfied when the LRO
352 /// ([Long Running Operation]) completes or the polling policy in effect
353 /// for this call is exhausted. The future is satisfied with an error if
354 /// the LRO completes with an error or the polling policy is exhausted.
355 /// In this case the [`StatusOr`] returned by the future contains the
356 /// error. If the LRO completes successfully the value of the future
357 /// contains the LRO's result. For this RPC the result is a
358 /// [google.iam.v2.Policy] proto message.
359 /// The C++ class representing this message is created by Protobuf, using
360 /// the [Protobuf mapping rules].
361 ///
362 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
363 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
364 /// [Long Running Operation]: https://google.aip.dev/151
365 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
366 /// [`future`]: @ref google::cloud::future
367 /// [`StatusOr`]: @ref google::cloud::StatusOr
368 /// [`Status`]: @ref google::cloud::Status
369 /// [google.iam.v2.Policies.GetPolicy]: @googleapis_reference_link{google/iam/v2/policy.proto#L51}
370 /// [google.iam.v2.Policy]: @googleapis_reference_link{google/iam/v2/policy.proto#L107}
371 /// [google.iam.v2.UpdatePolicyRequest]: @googleapis_reference_link{google/iam/v2/policy.proto#L251}
372 ///
373 // clang-format on
374 future<StatusOr<google::iam::v2::Policy>> UpdatePolicy(
375 google::iam::v2::UpdatePolicyRequest const& request, Options opts = {});
376
377 // clang-format off
378 ///
379 /// Deletes a policy. This action is permanent.
380 ///
381 /// @param name Required. The resource name of the policy to delete. Format:
382 /// `policies/{attachment_point}/denypolicies/{policy_id}`
383 /// @n
384 /// Use the URL-encoded full resource name, which means that the forward-slash
385 /// character, `/`, must be written as `%2F`. For example,
386 /// `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
387 /// @n
388 /// For organizations and folders, use the numeric ID in the full resource
389 /// name. For projects, you can use the alphanumeric or the numeric ID.
390 /// @param opts Optional. Override the class-level options, such as retry and
391 /// backoff policies.
392 /// @return A [`future`] that becomes satisfied when the LRO
393 /// ([Long Running Operation]) completes or the polling policy in effect
394 /// for this call is exhausted. The future is satisfied with an error if
395 /// the LRO completes with an error or the polling policy is exhausted.
396 /// In this case the [`StatusOr`] returned by the future contains the
397 /// error. If the LRO completes successfully the value of the future
398 /// contains the LRO's result. For this RPC the result is a
399 /// [google.iam.v2.Policy] proto message.
400 /// The C++ class representing this message is created by Protobuf, using
401 /// the [Protobuf mapping rules].
402 ///
403 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
404 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
405 /// [Long Running Operation]: https://google.aip.dev/151
406 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
407 /// [`future`]: @ref google::cloud::future
408 /// [`StatusOr`]: @ref google::cloud::StatusOr
409 /// [`Status`]: @ref google::cloud::Status
410 /// [google.iam.v2.DeletePolicyRequest]: @googleapis_reference_link{google/iam/v2/policy.proto#L261}
411 /// [google.iam.v2.Policy]: @googleapis_reference_link{google/iam/v2/policy.proto#L107}
412 ///
413 // clang-format on
414 future<StatusOr<google::iam::v2::Policy>> DeletePolicy(
415 std::string const& name, Options opts = {});
416
417 // clang-format off
418 ///
419 /// Deletes a policy. This action is permanent.
420 ///
421 /// @param request Unary RPCs, such as the one wrapped by this
422 /// function, receive a single `request` proto message which includes all
423 /// the inputs for the RPC. In this case, the proto message is a
424 /// [google.iam.v2.DeletePolicyRequest].
425 /// Proto messages are converted to C++ classes by Protobuf, using the
426 /// [Protobuf mapping rules].
427 /// @param opts Optional. Override the class-level options, such as retry and
428 /// backoff policies.
429 /// @return A [`future`] that becomes satisfied when the LRO
430 /// ([Long Running Operation]) completes or the polling policy in effect
431 /// for this call is exhausted. The future is satisfied with an error if
432 /// the LRO completes with an error or the polling policy is exhausted.
433 /// In this case the [`StatusOr`] returned by the future contains the
434 /// error. If the LRO completes successfully the value of the future
435 /// contains the LRO's result. For this RPC the result is a
436 /// [google.iam.v2.Policy] proto message.
437 /// The C++ class representing this message is created by Protobuf, using
438 /// the [Protobuf mapping rules].
439 ///
440 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
441 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
442 /// [Long Running Operation]: https://google.aip.dev/151
443 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
444 /// [`future`]: @ref google::cloud::future
445 /// [`StatusOr`]: @ref google::cloud::StatusOr
446 /// [`Status`]: @ref google::cloud::Status
447 /// [google.iam.v2.DeletePolicyRequest]: @googleapis_reference_link{google/iam/v2/policy.proto#L261}
448 /// [google.iam.v2.Policy]: @googleapis_reference_link{google/iam/v2/policy.proto#L107}
449 ///
450 // clang-format on
451 future<StatusOr<google::iam::v2::Policy>> DeletePolicy(
452 google::iam::v2::DeletePolicyRequest const& request, Options opts = {});
453
454 private:
455 std::shared_ptr<PoliciesConnection> connection_;
456 Options options_;
457};
458
459GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
460} // namespace iam_v2
461} // namespace cloud
462} // namespace google
463
464#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V2_POLICIES_CLIENT_H
friend friend class future
An interface for managing Identity and Access Management (IAM) policies.
Definition: policies_client.h:63
PoliciesClient & operator=(PoliciesClient const &)=default
future< StatusOr< google::iam::v2::Policy > > CreatePolicy(std::string const &parent, google::iam::v2::Policy const &policy, std::string const &policy_id, Options opts={})
Creates a policy.
future< StatusOr< google::iam::v2::Policy > > UpdatePolicy(google::iam::v2::UpdatePolicyRequest const &request, Options opts={})
Updates the specified policy.
friend bool operator!=(PoliciesClient const &a, PoliciesClient const &b)
Definition: policies_client.h:82
friend bool operator==(PoliciesClient const &a, PoliciesClient const &b)
Definition: policies_client.h:79
StreamRange< google::iam::v2::Policy > ListPolicies(std::string const &parent, Options opts={})
Retrieves the policies of the specified kind that are attached to a resource.
future< StatusOr< google::iam::v2::Policy > > DeletePolicy(google::iam::v2::DeletePolicyRequest const &request, Options opts={})
Deletes a policy.
PoliciesClient(PoliciesClient const &)=default
PoliciesClient & operator=(PoliciesClient &&)=default
PoliciesClient(std::shared_ptr< PoliciesConnection > connection, Options opts={})
future< StatusOr< google::iam::v2::Policy > > CreatePolicy(google::iam::v2::CreatePolicyRequest const &request, Options opts={})
Creates a policy.
future< StatusOr< google::iam::v2::Policy > > DeletePolicy(std::string const &name, Options opts={})
Deletes a policy.
StatusOr< google::iam::v2::Policy > GetPolicy(google::iam::v2::GetPolicyRequest const &request, Options opts={})
Gets a policy.
PoliciesClient(PoliciesClient &&)=default
StreamRange< google::iam::v2::Policy > ListPolicies(google::iam::v2::ListPoliciesRequest request, Options opts={})
Retrieves the policies of the specified kind that are attached to a resource.
StatusOr< google::iam::v2::Policy > GetPolicy(std::string const &name, Options opts={})
Gets a policy.
The PoliciesConnection object for PoliciesClient.
Definition: policies_connection.h:63
Definition: policies_client.h:34