Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 27c14d2

Browse filesBrowse files
docs: add generated snippets (#62)
* chore: use gapic-generator-python 0.63.2 PiperOrigin-RevId: 427792504 Source-Link: googleapis/googleapis@55b9e1e Source-Link: https://github.com/googleapis/googleapis-gen/commit/bf4e86b753f42cb0edb1fd51fbe840d7da0a1cde Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 18f725d commit 27c14d2
Copy full SHA for 27c14d2

File tree

Expand file treeCollapse file tree

31 files changed

+2864
-0
lines changed
Filter options
Expand file treeCollapse file tree

31 files changed

+2864
-0
lines changed

‎google/cloud/iap_v1/services/identity_aware_proxy_admin_service/async_client.py

Copy file name to clipboardExpand all lines: google/cloud/iap_v1/services/identity_aware_proxy_admin_service/async_client.py
+104Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,26 @@ async def set_iam_policy(
224224
information about managing access via IAP can be found at:
225225
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
226226
227+
228+
.. code-block::
229+
230+
from google.cloud import iap_v1
231+
232+
def sample_set_iam_policy():
233+
# Create a client
234+
client = iap_v1.IdentityAwareProxyAdminServiceClient()
235+
236+
# Initialize request argument(s)
237+
request = iap_v1.SetIamPolicyRequest(
238+
resource="resource_value",
239+
)
240+
241+
# Make the request
242+
response = client.set_iam_policy(request=request)
243+
244+
# Handle the response
245+
print(response)
246+
227247
Args:
228248
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
229249
The request object. Request message for `SetIamPolicy`
@@ -332,6 +352,26 @@ async def get_iam_policy(
332352
IAP can be found at:
333353
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
334354
355+
356+
.. code-block::
357+
358+
from google.cloud import iap_v1
359+
360+
def sample_get_iam_policy():
361+
# Create a client
362+
client = iap_v1.IdentityAwareProxyAdminServiceClient()
363+
364+
# Initialize request argument(s)
365+
request = iap_v1.GetIamPolicyRequest(
366+
resource="resource_value",
367+
)
368+
369+
# Make the request
370+
response = client.get_iam_policy(request=request)
371+
372+
# Handle the response
373+
print(response)
374+
335375
Args:
336376
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
337377
The request object. Request message for `GetIamPolicy`
@@ -440,6 +480,27 @@ async def test_iam_permissions(
440480
via IAP can be found at:
441481
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
442482
483+
484+
.. code-block::
485+
486+
from google.cloud import iap_v1
487+
488+
def sample_test_iam_permissions():
489+
# Create a client
490+
client = iap_v1.IdentityAwareProxyAdminServiceClient()
491+
492+
# Initialize request argument(s)
493+
request = iap_v1.TestIamPermissionsRequest(
494+
resource="resource_value",
495+
permissions=['permissions_value_1', 'permissions_value_2'],
496+
)
497+
498+
# Make the request
499+
response = client.test_iam_permissions(request=request)
500+
501+
# Handle the response
502+
print(response)
503+
443504
Args:
444505
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
445506
The request object. Request message for
@@ -491,6 +552,26 @@ async def get_iap_settings(
491552
r"""Gets the IAP settings on a particular IAP protected
492553
resource.
493554
555+
556+
.. code-block::
557+
558+
from google.cloud import iap_v1
559+
560+
def sample_get_iap_settings():
561+
# Create a client
562+
client = iap_v1.IdentityAwareProxyAdminServiceClient()
563+
564+
# Initialize request argument(s)
565+
request = iap_v1.GetIapSettingsRequest(
566+
name="name_value",
567+
)
568+
569+
# Make the request
570+
response = client.get_iap_settings(request=request)
571+
572+
# Handle the response
573+
print(response)
574+
494575
Args:
495576
request (Union[google.cloud.iap_v1.types.GetIapSettingsRequest, dict]):
496577
The request object. The request sent to GetIapSettings.
@@ -538,6 +619,29 @@ async def update_iap_settings(
538619
r"""Updates the IAP settings on a particular IAP protected resource.
539620
It replaces all fields unless the ``update_mask`` is set.
540621
622+
623+
.. code-block::
624+
625+
from google.cloud import iap_v1
626+
627+
def sample_update_iap_settings():
628+
# Create a client
629+
client = iap_v1.IdentityAwareProxyAdminServiceClient()
630+
631+
# Initialize request argument(s)
632+
iap_settings = iap_v1.IapSettings()
633+
iap_settings.name = "name_value"
634+
635+
request = iap_v1.UpdateIapSettingsRequest(
636+
iap_settings=iap_settings,
637+
)
638+
639+
# Make the request
640+
response = client.update_iap_settings(request=request)
641+
642+
# Handle the response
643+
print(response)
644+
541645
Args:
542646
request (Union[google.cloud.iap_v1.types.UpdateIapSettingsRequest, dict]):
543647
The request object. The request sent to

‎google/cloud/iap_v1/services/identity_aware_proxy_admin_service/client.py

Copy file name to clipboardExpand all lines: google/cloud/iap_v1/services/identity_aware_proxy_admin_service/client.py
+109Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,27 @@ def set_iam_policy(
406406
information about managing access via IAP can be found at:
407407
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
408408
409+
410+
411+
.. code-block::
412+
413+
from google.cloud import iap_v1
414+
415+
def sample_set_iam_policy():
416+
# Create a client
417+
client = iap_v1.IdentityAwareProxyAdminServiceClient()
418+
419+
# Initialize request argument(s)
420+
request = iap_v1.SetIamPolicyRequest(
421+
resource="resource_value",
422+
)
423+
424+
# Make the request
425+
response = client.set_iam_policy(request=request)
426+
427+
# Handle the response
428+
print(response)
429+
409430
Args:
410431
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
411432
The request object. Request message for `SetIamPolicy`
@@ -513,6 +534,27 @@ def get_iam_policy(
513534
IAP can be found at:
514535
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
515536
537+
538+
539+
.. code-block::
540+
541+
from google.cloud import iap_v1
542+
543+
def sample_get_iam_policy():
544+
# Create a client
545+
client = iap_v1.IdentityAwareProxyAdminServiceClient()
546+
547+
# Initialize request argument(s)
548+
request = iap_v1.GetIamPolicyRequest(
549+
resource="resource_value",
550+
)
551+
552+
# Make the request
553+
response = client.get_iam_policy(request=request)
554+
555+
# Handle the response
556+
print(response)
557+
516558
Args:
517559
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
518560
The request object. Request message for `GetIamPolicy`
@@ -620,6 +662,28 @@ def test_iam_permissions(
620662
via IAP can be found at:
621663
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
622664
665+
666+
667+
.. code-block::
668+
669+
from google.cloud import iap_v1
670+
671+
def sample_test_iam_permissions():
672+
# Create a client
673+
client = iap_v1.IdentityAwareProxyAdminServiceClient()
674+
675+
# Initialize request argument(s)
676+
request = iap_v1.TestIamPermissionsRequest(
677+
resource="resource_value",
678+
permissions=['permissions_value_1', 'permissions_value_2'],
679+
)
680+
681+
# Make the request
682+
response = client.test_iam_permissions(request=request)
683+
684+
# Handle the response
685+
print(response)
686+
623687
Args:
624688
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
625689
The request object. Request message for
@@ -670,6 +734,27 @@ def get_iap_settings(
670734
r"""Gets the IAP settings on a particular IAP protected
671735
resource.
672736
737+
738+
739+
.. code-block::
740+
741+
from google.cloud import iap_v1
742+
743+
def sample_get_iap_settings():
744+
# Create a client
745+
client = iap_v1.IdentityAwareProxyAdminServiceClient()
746+
747+
# Initialize request argument(s)
748+
request = iap_v1.GetIapSettingsRequest(
749+
name="name_value",
750+
)
751+
752+
# Make the request
753+
response = client.get_iap_settings(request=request)
754+
755+
# Handle the response
756+
print(response)
757+
673758
Args:
674759
request (Union[google.cloud.iap_v1.types.GetIapSettingsRequest, dict]):
675760
The request object. The request sent to GetIapSettings.
@@ -718,6 +803,30 @@ def update_iap_settings(
718803
r"""Updates the IAP settings on a particular IAP protected resource.
719804
It replaces all fields unless the ``update_mask`` is set.
720805
806+
807+
808+
.. code-block::
809+
810+
from google.cloud import iap_v1
811+
812+
def sample_update_iap_settings():
813+
# Create a client
814+
client = iap_v1.IdentityAwareProxyAdminServiceClient()
815+
816+
# Initialize request argument(s)
817+
iap_settings = iap_v1.IapSettings()
818+
iap_settings.name = "name_value"
819+
820+
request = iap_v1.UpdateIapSettingsRequest(
821+
iap_settings=iap_settings,
822+
)
823+
824+
# Make the request
825+
response = client.update_iap_settings(request=request)
826+
827+
# Handle the response
828+
print(response)
829+
721830
Args:
722831
request (Union[google.cloud.iap_v1.types.UpdateIapSettingsRequest, dict]):
723832
The request object. The request sent to

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.