Skip to content

Commit

Permalink
docs: add generated snippets (#62)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-python 0.63.2

PiperOrigin-RevId: 427792504

Source-Link: googleapis/googleapis@55b9e1e

Source-Link: googleapis/googleapis-gen@bf4e86b
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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 11, 2022
1 parent c35eb29 commit 6b3895a
Show file tree
Hide file tree
Showing 31 changed files with 2,864 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,26 @@ async def set_iam_policy(
information about managing access via IAP can be found at:
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
.. code-block::
from google.cloud import iap_v1
def sample_set_iam_policy():
# Create a client
client = iap_v1.IdentityAwareProxyAdminServiceClient()
# Initialize request argument(s)
request = iap_v1.SetIamPolicyRequest(
resource="resource_value",
)
# Make the request
response = client.set_iam_policy(request=request)
# Handle the response
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
The request object. Request message for `SetIamPolicy`
Expand Down Expand Up @@ -332,6 +352,26 @@ async def get_iam_policy(
IAP can be found at:
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
.. code-block::
from google.cloud import iap_v1
def sample_get_iam_policy():
# Create a client
client = iap_v1.IdentityAwareProxyAdminServiceClient()
# Initialize request argument(s)
request = iap_v1.GetIamPolicyRequest(
resource="resource_value",
)
# Make the request
response = client.get_iam_policy(request=request)
# Handle the response
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
The request object. Request message for `GetIamPolicy`
Expand Down Expand Up @@ -440,6 +480,27 @@ async def test_iam_permissions(
via IAP can be found at:
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
.. code-block::
from google.cloud import iap_v1
def sample_test_iam_permissions():
# Create a client
client = iap_v1.IdentityAwareProxyAdminServiceClient()
# Initialize request argument(s)
request = iap_v1.TestIamPermissionsRequest(
resource="resource_value",
permissions=['permissions_value_1', 'permissions_value_2'],
)
# Make the request
response = client.test_iam_permissions(request=request)
# Handle the response
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -491,6 +552,26 @@ async def get_iap_settings(
r"""Gets the IAP settings on a particular IAP protected
resource.
.. code-block::
from google.cloud import iap_v1
def sample_get_iap_settings():
# Create a client
client = iap_v1.IdentityAwareProxyAdminServiceClient()
# Initialize request argument(s)
request = iap_v1.GetIapSettingsRequest(
name="name_value",
)
# Make the request
response = client.get_iap_settings(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.iap_v1.types.GetIapSettingsRequest, dict]):
The request object. The request sent to GetIapSettings.
Expand Down Expand Up @@ -538,6 +619,29 @@ async def update_iap_settings(
r"""Updates the IAP settings on a particular IAP protected resource.
It replaces all fields unless the ``update_mask`` is set.
.. code-block::
from google.cloud import iap_v1
def sample_update_iap_settings():
# Create a client
client = iap_v1.IdentityAwareProxyAdminServiceClient()
# Initialize request argument(s)
iap_settings = iap_v1.IapSettings()
iap_settings.name = "name_value"
request = iap_v1.UpdateIapSettingsRequest(
iap_settings=iap_settings,
)
# Make the request
response = client.update_iap_settings(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.iap_v1.types.UpdateIapSettingsRequest, dict]):
The request object. The request sent to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,27 @@ def set_iam_policy(
information about managing access via IAP can be found at:
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
.. code-block::
from google.cloud import iap_v1
def sample_set_iam_policy():
# Create a client
client = iap_v1.IdentityAwareProxyAdminServiceClient()
# Initialize request argument(s)
request = iap_v1.SetIamPolicyRequest(
resource="resource_value",
)
# Make the request
response = client.set_iam_policy(request=request)
# Handle the response
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
The request object. Request message for `SetIamPolicy`
Expand Down Expand Up @@ -513,6 +534,27 @@ def get_iam_policy(
IAP can be found at:
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
.. code-block::
from google.cloud import iap_v1
def sample_get_iam_policy():
# Create a client
client = iap_v1.IdentityAwareProxyAdminServiceClient()
# Initialize request argument(s)
request = iap_v1.GetIamPolicyRequest(
resource="resource_value",
)
# Make the request
response = client.get_iam_policy(request=request)
# Handle the response
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
The request object. Request message for `GetIamPolicy`
Expand Down Expand Up @@ -620,6 +662,28 @@ def test_iam_permissions(
via IAP can be found at:
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
.. code-block::
from google.cloud import iap_v1
def sample_test_iam_permissions():
# Create a client
client = iap_v1.IdentityAwareProxyAdminServiceClient()
# Initialize request argument(s)
request = iap_v1.TestIamPermissionsRequest(
resource="resource_value",
permissions=['permissions_value_1', 'permissions_value_2'],
)
# Make the request
response = client.test_iam_permissions(request=request)
# Handle the response
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -670,6 +734,27 @@ def get_iap_settings(
r"""Gets the IAP settings on a particular IAP protected
resource.
.. code-block::
from google.cloud import iap_v1
def sample_get_iap_settings():
# Create a client
client = iap_v1.IdentityAwareProxyAdminServiceClient()
# Initialize request argument(s)
request = iap_v1.GetIapSettingsRequest(
name="name_value",
)
# Make the request
response = client.get_iap_settings(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.iap_v1.types.GetIapSettingsRequest, dict]):
The request object. The request sent to GetIapSettings.
Expand Down Expand Up @@ -718,6 +803,30 @@ def update_iap_settings(
r"""Updates the IAP settings on a particular IAP protected resource.
It replaces all fields unless the ``update_mask`` is set.
.. code-block::
from google.cloud import iap_v1
def sample_update_iap_settings():
# Create a client
client = iap_v1.IdentityAwareProxyAdminServiceClient()
# Initialize request argument(s)
iap_settings = iap_v1.IapSettings()
iap_settings.name = "name_value"
request = iap_v1.UpdateIapSettingsRequest(
iap_settings=iap_settings,
)
# Make the request
response = client.update_iap_settings(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.iap_v1.types.UpdateIapSettingsRequest, dict]):
The request object. The request sent to
Expand Down
Loading

0 comments on commit 6b3895a

Please sign in to comment.