google_cloud_identity_accesscontextmanager_v1/client.rs
1// Copyright 2025 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// Code generated by sidekick. DO NOT EDIT.
16#![allow(rustdoc::redundant_explicit_links)]
17#![allow(rustdoc::broken_intra_doc_links)]
18
19/// Implements a client for the Access Context Manager API.
20///
21/// # Example
22/// ```
23/// # tokio_test::block_on(async {
24/// # use google_cloud_identity_accesscontextmanager_v1::client::AccessContextManager;
25/// let client = AccessContextManager::builder().build().await?;
26/// // use `client` to make requests to the Access Context Manager API.
27/// # gax::client_builder::Result::<()>::Ok(()) });
28/// ```
29///
30/// # Service Description
31///
32/// API for setting [access levels]
33/// [google.identity.accesscontextmanager.v1.AccessLevel] and [service
34/// perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter]
35/// for Google Cloud projects. Each organization has one [access policy]
36/// [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the
37/// [access levels] [google.identity.accesscontextmanager.v1.AccessLevel]
38/// and [service perimeters]
39/// [google.identity.accesscontextmanager.v1.ServicePerimeter]. This
40/// [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is
41/// applicable to all resources in the organization.
42/// AccessPolicies
43///
44/// # Configuration
45///
46/// To configure `AccessContextManager` use the `with_*` methods in the type returned
47/// by [builder()][AccessContextManager::builder]. The default configuration should
48/// work for most applications. Common configuration changes include
49///
50/// * [with_endpoint()]: by default this client uses the global default endpoint
51/// (`https://accesscontextmanager.googleapis.com`). Applications using regional
52/// endpoints or running in restricted networks (e.g. a network configured
53// with [Private Google Access with VPC Service Controls]) may want to
54/// override this default.
55/// * [with_credentials()]: by default this client uses
56/// [Application Default Credentials]. Applications using custom
57/// authentication may need to override this default.
58///
59/// [with_endpoint()]: super::builder::access_context_manager::ClientBuilder::with_endpoint
60/// [with_credentials()]: super::builder::access_context_manager::ClientBuilder::credentials
61/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
62/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
63///
64/// # Pooling and Cloning
65///
66/// `AccessContextManager` holds a connection pool internally, it is advised to
67/// create one and the reuse it. You do not need to wrap `AccessContextManager` in
68/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
69/// already uses an `Arc` internally.
70#[derive(Clone, Debug)]
71pub struct AccessContextManager {
72 inner: std::sync::Arc<dyn super::stub::dynamic::AccessContextManager>,
73}
74
75impl AccessContextManager {
76 /// Returns a builder for [AccessContextManager].
77 ///
78 /// ```
79 /// # tokio_test::block_on(async {
80 /// # use google_cloud_identity_accesscontextmanager_v1::client::AccessContextManager;
81 /// let client = AccessContextManager::builder().build().await?;
82 /// # gax::client_builder::Result::<()>::Ok(()) });
83 /// ```
84 pub fn builder() -> super::builder::access_context_manager::ClientBuilder {
85 gax::client_builder::internal::new_builder(
86 super::builder::access_context_manager::client::Factory,
87 )
88 }
89
90 /// Creates a new client from the provided stub.
91 ///
92 /// The most common case for calling this function is in tests mocking the
93 /// client's behavior.
94 pub fn from_stub<T>(stub: T) -> Self
95 where
96 T: super::stub::AccessContextManager + 'static,
97 {
98 Self {
99 inner: std::sync::Arc::new(stub),
100 }
101 }
102
103 pub(crate) async fn new(
104 config: gaxi::options::ClientConfig,
105 ) -> gax::client_builder::Result<Self> {
106 let inner = Self::build_inner(config).await?;
107 Ok(Self { inner })
108 }
109
110 async fn build_inner(
111 conf: gaxi::options::ClientConfig,
112 ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::AccessContextManager>>
113 {
114 if gaxi::options::tracing_enabled(&conf) {
115 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
116 }
117 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
118 }
119
120 async fn build_transport(
121 conf: gaxi::options::ClientConfig,
122 ) -> gax::client_builder::Result<impl super::stub::AccessContextManager> {
123 super::transport::AccessContextManager::new(conf).await
124 }
125
126 async fn build_with_tracing(
127 conf: gaxi::options::ClientConfig,
128 ) -> gax::client_builder::Result<impl super::stub::AccessContextManager> {
129 Self::build_transport(conf)
130 .await
131 .map(super::tracing::AccessContextManager::new)
132 }
133
134 /// Lists all [access policies]
135 /// [google.identity.accesscontextmanager.v1.AccessPolicy] in an
136 /// organization.
137 pub fn list_access_policies(
138 &self,
139 ) -> super::builder::access_context_manager::ListAccessPolicies {
140 super::builder::access_context_manager::ListAccessPolicies::new(self.inner.clone())
141 }
142
143 /// Returns an [access policy]
144 /// [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name.
145 pub fn get_access_policy(&self) -> super::builder::access_context_manager::GetAccessPolicy {
146 super::builder::access_context_manager::GetAccessPolicy::new(self.inner.clone())
147 }
148
149 /// Creates an access policy. This method fails if the organization already has
150 /// an access policy. The long-running operation has a successful status
151 /// after the access policy propagates to long-lasting storage.
152 /// Syntactic and basic semantic errors are returned in `metadata` as a
153 /// BadRequest proto.
154 ///
155 /// # Long running operations
156 ///
157 /// This method is used to start, and/or poll a [long-running Operation].
158 /// The [Working with long-running operations] chapter in the [user guide]
159 /// covers these operations in detail.
160 ///
161 /// [long-running operation]: https://google.aip.dev/151
162 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
163 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
164 pub fn create_access_policy(
165 &self,
166 ) -> super::builder::access_context_manager::CreateAccessPolicy {
167 super::builder::access_context_manager::CreateAccessPolicy::new(self.inner.clone())
168 }
169
170 /// Updates an [access policy]
171 /// [google.identity.accesscontextmanager.v1.AccessPolicy]. The
172 /// long-running operation from this RPC has a successful status after the
173 /// changes to the [access policy]
174 /// [google.identity.accesscontextmanager.v1.AccessPolicy] propagate
175 /// to long-lasting storage.
176 ///
177 /// # Long running operations
178 ///
179 /// This method is used to start, and/or poll a [long-running Operation].
180 /// The [Working with long-running operations] chapter in the [user guide]
181 /// covers these operations in detail.
182 ///
183 /// [long-running operation]: https://google.aip.dev/151
184 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
185 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
186 pub fn update_access_policy(
187 &self,
188 ) -> super::builder::access_context_manager::UpdateAccessPolicy {
189 super::builder::access_context_manager::UpdateAccessPolicy::new(self.inner.clone())
190 }
191
192 /// Deletes an [access policy]
193 /// [google.identity.accesscontextmanager.v1.AccessPolicy] based on the
194 /// resource name. The long-running operation has a successful status after the
195 /// [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy]
196 /// is removed from long-lasting storage.
197 ///
198 /// # Long running operations
199 ///
200 /// This method is used to start, and/or poll a [long-running Operation].
201 /// The [Working with long-running operations] chapter in the [user guide]
202 /// covers these operations in detail.
203 ///
204 /// [long-running operation]: https://google.aip.dev/151
205 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
206 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
207 pub fn delete_access_policy(
208 &self,
209 ) -> super::builder::access_context_manager::DeleteAccessPolicy {
210 super::builder::access_context_manager::DeleteAccessPolicy::new(self.inner.clone())
211 }
212
213 /// Lists all [access levels]
214 /// [google.identity.accesscontextmanager.v1.AccessLevel] for an access
215 /// policy.
216 pub fn list_access_levels(&self) -> super::builder::access_context_manager::ListAccessLevels {
217 super::builder::access_context_manager::ListAccessLevels::new(self.inner.clone())
218 }
219
220 /// Gets an [access level]
221 /// [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource
222 /// name.
223 pub fn get_access_level(&self) -> super::builder::access_context_manager::GetAccessLevel {
224 super::builder::access_context_manager::GetAccessLevel::new(self.inner.clone())
225 }
226
227 /// Creates an [access level]
228 /// [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running
229 /// operation from this RPC has a successful status after the [access
230 /// level] [google.identity.accesscontextmanager.v1.AccessLevel]
231 /// propagates to long-lasting storage. If [access levels]
232 /// [google.identity.accesscontextmanager.v1.AccessLevel] contain
233 /// errors, an error response is returned for the first error encountered.
234 ///
235 /// # Long running operations
236 ///
237 /// This method is used to start, and/or poll a [long-running Operation].
238 /// The [Working with long-running operations] chapter in the [user guide]
239 /// covers these operations in detail.
240 ///
241 /// [long-running operation]: https://google.aip.dev/151
242 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
243 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
244 pub fn create_access_level(&self) -> super::builder::access_context_manager::CreateAccessLevel {
245 super::builder::access_context_manager::CreateAccessLevel::new(self.inner.clone())
246 }
247
248 /// Updates an [access level]
249 /// [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running
250 /// operation from this RPC has a successful status after the changes to
251 /// the [access level]
252 /// [google.identity.accesscontextmanager.v1.AccessLevel] propagate
253 /// to long-lasting storage. If [access levels]
254 /// [google.identity.accesscontextmanager.v1.AccessLevel] contain
255 /// errors, an error response is returned for the first error encountered.
256 ///
257 /// # Long running operations
258 ///
259 /// This method is used to start, and/or poll a [long-running Operation].
260 /// The [Working with long-running operations] chapter in the [user guide]
261 /// covers these operations in detail.
262 ///
263 /// [long-running operation]: https://google.aip.dev/151
264 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
265 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
266 pub fn update_access_level(&self) -> super::builder::access_context_manager::UpdateAccessLevel {
267 super::builder::access_context_manager::UpdateAccessLevel::new(self.inner.clone())
268 }
269
270 /// Deletes an [access level]
271 /// [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource
272 /// name. The long-running operation from this RPC has a successful status
273 /// after the [access level]
274 /// [google.identity.accesscontextmanager.v1.AccessLevel] has been removed
275 /// from long-lasting storage.
276 ///
277 /// # Long running operations
278 ///
279 /// This method is used to start, and/or poll a [long-running Operation].
280 /// The [Working with long-running operations] chapter in the [user guide]
281 /// covers these operations in detail.
282 ///
283 /// [long-running operation]: https://google.aip.dev/151
284 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
285 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
286 pub fn delete_access_level(&self) -> super::builder::access_context_manager::DeleteAccessLevel {
287 super::builder::access_context_manager::DeleteAccessLevel::new(self.inner.clone())
288 }
289
290 /// Replaces all existing [access levels]
291 /// [google.identity.accesscontextmanager.v1.AccessLevel] in an [access
292 /// policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with
293 /// the [access levels]
294 /// [google.identity.accesscontextmanager.v1.AccessLevel] provided. This
295 /// is done atomically. The long-running operation from this RPC has a
296 /// successful status after all replacements propagate to long-lasting
297 /// storage. If the replacement contains errors, an error response is returned
298 /// for the first error encountered. Upon error, the replacement is cancelled,
299 /// and existing [access levels]
300 /// [google.identity.accesscontextmanager.v1.AccessLevel] are not
301 /// affected. The Operation.response field contains
302 /// ReplaceAccessLevelsResponse. Removing [access levels]
303 /// [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing
304 /// [service perimeters]
305 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an
306 /// error.
307 ///
308 /// # Long running operations
309 ///
310 /// This method is used to start, and/or poll a [long-running Operation].
311 /// The [Working with long-running operations] chapter in the [user guide]
312 /// covers these operations in detail.
313 ///
314 /// [long-running operation]: https://google.aip.dev/151
315 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
316 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
317 pub fn replace_access_levels(
318 &self,
319 ) -> super::builder::access_context_manager::ReplaceAccessLevels {
320 super::builder::access_context_manager::ReplaceAccessLevels::new(self.inner.clone())
321 }
322
323 /// Lists all [service perimeters]
324 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] for an
325 /// access policy.
326 pub fn list_service_perimeters(
327 &self,
328 ) -> super::builder::access_context_manager::ListServicePerimeters {
329 super::builder::access_context_manager::ListServicePerimeters::new(self.inner.clone())
330 }
331
332 /// Gets a [service perimeter]
333 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the
334 /// resource name.
335 pub fn get_service_perimeter(
336 &self,
337 ) -> super::builder::access_context_manager::GetServicePerimeter {
338 super::builder::access_context_manager::GetServicePerimeter::new(self.inner.clone())
339 }
340
341 /// Creates a [service perimeter]
342 /// [google.identity.accesscontextmanager.v1.ServicePerimeter]. The
343 /// long-running operation from this RPC has a successful status after the
344 /// [service perimeter]
345 /// [google.identity.accesscontextmanager.v1.ServicePerimeter]
346 /// propagates to long-lasting storage. If a [service perimeter]
347 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] contains
348 /// errors, an error response is returned for the first error encountered.
349 ///
350 /// # Long running operations
351 ///
352 /// This method is used to start, and/or poll a [long-running Operation].
353 /// The [Working with long-running operations] chapter in the [user guide]
354 /// covers these operations in detail.
355 ///
356 /// [long-running operation]: https://google.aip.dev/151
357 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
358 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
359 pub fn create_service_perimeter(
360 &self,
361 ) -> super::builder::access_context_manager::CreateServicePerimeter {
362 super::builder::access_context_manager::CreateServicePerimeter::new(self.inner.clone())
363 }
364
365 /// Updates a [service perimeter]
366 /// [google.identity.accesscontextmanager.v1.ServicePerimeter]. The
367 /// long-running operation from this RPC has a successful status after the
368 /// [service perimeter]
369 /// [google.identity.accesscontextmanager.v1.ServicePerimeter]
370 /// propagates to long-lasting storage. If a [service perimeter]
371 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] contains
372 /// errors, an error response is returned for the first error encountered.
373 ///
374 /// # Long running operations
375 ///
376 /// This method is used to start, and/or poll a [long-running Operation].
377 /// The [Working with long-running operations] chapter in the [user guide]
378 /// covers these operations in detail.
379 ///
380 /// [long-running operation]: https://google.aip.dev/151
381 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
382 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
383 pub fn update_service_perimeter(
384 &self,
385 ) -> super::builder::access_context_manager::UpdateServicePerimeter {
386 super::builder::access_context_manager::UpdateServicePerimeter::new(self.inner.clone())
387 }
388
389 /// Deletes a [service perimeter]
390 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the
391 /// resource name. The long-running operation from this RPC has a successful
392 /// status after the [service perimeter]
393 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from
394 /// long-lasting storage.
395 ///
396 /// # Long running operations
397 ///
398 /// This method is used to start, and/or poll a [long-running Operation].
399 /// The [Working with long-running operations] chapter in the [user guide]
400 /// covers these operations in detail.
401 ///
402 /// [long-running operation]: https://google.aip.dev/151
403 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
404 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
405 pub fn delete_service_perimeter(
406 &self,
407 ) -> super::builder::access_context_manager::DeleteServicePerimeter {
408 super::builder::access_context_manager::DeleteServicePerimeter::new(self.inner.clone())
409 }
410
411 /// Replace all existing [service perimeters]
412 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access
413 /// policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the
414 /// [service perimeters]
415 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This
416 /// is done atomically. The long-running operation from this RPC has a
417 /// successful status after all replacements propagate to long-lasting storage.
418 /// Replacements containing errors result in an error response for the first
419 /// error encountered. Upon an error, replacement are cancelled and existing
420 /// [service perimeters]
421 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] are not
422 /// affected. The Operation.response field contains
423 /// ReplaceServicePerimetersResponse.
424 ///
425 /// # Long running operations
426 ///
427 /// This method is used to start, and/or poll a [long-running Operation].
428 /// The [Working with long-running operations] chapter in the [user guide]
429 /// covers these operations in detail.
430 ///
431 /// [long-running operation]: https://google.aip.dev/151
432 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
433 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
434 pub fn replace_service_perimeters(
435 &self,
436 ) -> super::builder::access_context_manager::ReplaceServicePerimeters {
437 super::builder::access_context_manager::ReplaceServicePerimeters::new(self.inner.clone())
438 }
439
440 /// Commits the dry-run specification for all the [service perimeters]
441 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] in an
442 /// [access policy][google.identity.accesscontextmanager.v1.AccessPolicy].
443 /// A commit operation on a service perimeter involves copying its `spec` field
444 /// to the `status` field of the service perimeter. Only [service perimeters]
445 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] with
446 /// `use_explicit_dry_run_spec` field set to true are affected by a commit
447 /// operation. The long-running operation from this RPC has a successful
448 /// status after the dry-run specifications for all the [service perimeters]
449 /// [google.identity.accesscontextmanager.v1.ServicePerimeter] have been
450 /// committed. If a commit fails, it causes the long-running operation to
451 /// return an error response and the entire commit operation is cancelled.
452 /// When successful, the Operation.response field contains
453 /// CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are
454 /// cleared after a successful commit operation.
455 ///
456 /// [google.identity.accesscontextmanager.v1.AccessPolicy]: crate::model::AccessPolicy
457 ///
458 /// # Long running operations
459 ///
460 /// This method is used to start, and/or poll a [long-running Operation].
461 /// The [Working with long-running operations] chapter in the [user guide]
462 /// covers these operations in detail.
463 ///
464 /// [long-running operation]: https://google.aip.dev/151
465 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
466 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
467 pub fn commit_service_perimeters(
468 &self,
469 ) -> super::builder::access_context_manager::CommitServicePerimeters {
470 super::builder::access_context_manager::CommitServicePerimeters::new(self.inner.clone())
471 }
472
473 /// Lists all [GcpUserAccessBindings]
474 /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a
475 /// Google Cloud organization.
476 pub fn list_gcp_user_access_bindings(
477 &self,
478 ) -> super::builder::access_context_manager::ListGcpUserAccessBindings {
479 super::builder::access_context_manager::ListGcpUserAccessBindings::new(self.inner.clone())
480 }
481
482 /// Gets the [GcpUserAccessBinding]
483 /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with
484 /// the given name.
485 pub fn get_gcp_user_access_binding(
486 &self,
487 ) -> super::builder::access_context_manager::GetGcpUserAccessBinding {
488 super::builder::access_context_manager::GetGcpUserAccessBinding::new(self.inner.clone())
489 }
490
491 /// Creates a [GcpUserAccessBinding]
492 /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the
493 /// client specifies a [name]
494 /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name],
495 /// the server ignores it. Fails if a resource already exists with the same
496 /// [group_key]
497 /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key].
498 /// Completion of this long-running operation does not necessarily signify that
499 /// the new binding is deployed onto all affected users, which may take more
500 /// time.
501 ///
502 /// # Long running operations
503 ///
504 /// This method is used to start, and/or poll a [long-running Operation].
505 /// The [Working with long-running operations] chapter in the [user guide]
506 /// covers these operations in detail.
507 ///
508 /// [long-running operation]: https://google.aip.dev/151
509 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
510 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
511 pub fn create_gcp_user_access_binding(
512 &self,
513 ) -> super::builder::access_context_manager::CreateGcpUserAccessBinding {
514 super::builder::access_context_manager::CreateGcpUserAccessBinding::new(self.inner.clone())
515 }
516
517 /// Updates a [GcpUserAccessBinding]
518 /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding].
519 /// Completion of this long-running operation does not necessarily signify that
520 /// the changed binding is deployed onto all affected users, which may take
521 /// more time.
522 ///
523 /// # Long running operations
524 ///
525 /// This method is used to start, and/or poll a [long-running Operation].
526 /// The [Working with long-running operations] chapter in the [user guide]
527 /// covers these operations in detail.
528 ///
529 /// [long-running operation]: https://google.aip.dev/151
530 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
531 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
532 pub fn update_gcp_user_access_binding(
533 &self,
534 ) -> super::builder::access_context_manager::UpdateGcpUserAccessBinding {
535 super::builder::access_context_manager::UpdateGcpUserAccessBinding::new(self.inner.clone())
536 }
537
538 /// Deletes a [GcpUserAccessBinding]
539 /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding].
540 /// Completion of this long-running operation does not necessarily signify that
541 /// the binding deletion is deployed onto all affected users, which may take
542 /// more time.
543 ///
544 /// # Long running operations
545 ///
546 /// This method is used to start, and/or poll a [long-running Operation].
547 /// The [Working with long-running operations] chapter in the [user guide]
548 /// covers these operations in detail.
549 ///
550 /// [long-running operation]: https://google.aip.dev/151
551 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
552 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
553 pub fn delete_gcp_user_access_binding(
554 &self,
555 ) -> super::builder::access_context_manager::DeleteGcpUserAccessBinding {
556 super::builder::access_context_manager::DeleteGcpUserAccessBinding::new(self.inner.clone())
557 }
558
559 /// Sets the IAM policy for the specified Access Context Manager
560 /// [access policy][google.identity.accesscontextmanager.v1.AccessPolicy].
561 /// This method replaces the existing IAM policy on the access policy. The IAM
562 /// policy controls the set of users who can perform specific operations on the
563 /// Access Context Manager [access
564 /// policy][google.identity.accesscontextmanager.v1.AccessPolicy].
565 ///
566 /// [google.identity.accesscontextmanager.v1.AccessPolicy]: crate::model::AccessPolicy
567 pub fn set_iam_policy(&self) -> super::builder::access_context_manager::SetIamPolicy {
568 super::builder::access_context_manager::SetIamPolicy::new(self.inner.clone())
569 }
570
571 /// Gets the IAM policy for the specified Access Context Manager
572 /// [access policy][google.identity.accesscontextmanager.v1.AccessPolicy].
573 ///
574 /// [google.identity.accesscontextmanager.v1.AccessPolicy]: crate::model::AccessPolicy
575 pub fn get_iam_policy(&self) -> super::builder::access_context_manager::GetIamPolicy {
576 super::builder::access_context_manager::GetIamPolicy::new(self.inner.clone())
577 }
578
579 /// Returns the IAM permissions that the caller has on the specified Access
580 /// Context Manager resource. The resource can be an
581 /// [AccessPolicy][google.identity.accesscontextmanager.v1.AccessPolicy],
582 /// [AccessLevel][google.identity.accesscontextmanager.v1.AccessLevel], or
583 /// [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter
584 /// ]. This method does not support other resources.
585 ///
586 /// [google.identity.accesscontextmanager.v1.AccessLevel]: crate::model::AccessLevel
587 /// [google.identity.accesscontextmanager.v1.AccessPolicy]: crate::model::AccessPolicy
588 pub fn test_iam_permissions(
589 &self,
590 ) -> super::builder::access_context_manager::TestIamPermissions {
591 super::builder::access_context_manager::TestIamPermissions::new(self.inner.clone())
592 }
593
594 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
595 ///
596 /// [google.longrunning.Operations]: longrunning::client::Operations
597 pub fn get_operation(&self) -> super::builder::access_context_manager::GetOperation {
598 super::builder::access_context_manager::GetOperation::new(self.inner.clone())
599 }
600}