Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.65.1 (#717)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 441524537

Source-Link: googleapis/googleapis@2a27391

Source-Link: googleapis/googleapis-gen@ab6756a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9

feat: AuditConfig for IAM v1
fix(deps): require grpc-google-iam-v1 >=0.12.4
  • Loading branch information
gcf-owl-bot[bot] authored Apr 14, 2022
1 parent e54899c commit 7642eba
Show file tree
Hide file tree
Showing 38 changed files with 4,021 additions and 626 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -371,7 +371,6 @@ async def create_database(
is [Database][google.spanner.admin.database.v1.Database], if
successful.
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -611,7 +610,6 @@ async def update_database_ddl(
[UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
The operation has no response.
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -770,7 +768,6 @@ async def drop_database(
``expire_time``. Note: Cloud Spanner might continue to accept
requests for a few seconds after the database has been deleted.
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -865,7 +862,6 @@ async def get_database_ddl(
schema updates, those may be queried using the
[Operations][google.longrunning.Operations] API.
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -980,17 +976,17 @@ async def set_iam_policy(
permission on
[resource][google.iam.v1.SetIamPolicyRequest.resource].
.. code-block:: python
from google.cloud import spanner_admin_database_v1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_set_iam_policy():
# Create a client
client = spanner_admin_database_v1.DatabaseAdminClient()
# Initialize request argument(s)
request = spanner_admin_database_v1.SetIamPolicyRequest(
request = iam_policy_pb2.SetIamPolicyRequest(
resource="resource_value",
)
Expand Down Expand Up @@ -1021,21 +1017,26 @@ def sample_set_iam_policy():
Returns:
google.iam.v1.policy_pb2.Policy:
Defines an Identity and Access Management (IAM) policy. It is used to
specify access control policies for Cloud Platform
resources.
An Identity and Access Management (IAM) policy, which specifies access
controls for Google Cloud resources.
A Policy is a collection of bindings. A binding binds
one or more members to a single role. Members can be
user accounts, service accounts, Google groups, and
domains (such as G Suite). A role is a named list of
permissions (defined by IAM or configured by users).
A binding can optionally specify a condition, which
is a logic expression that further constrains the
role binding based on attributes about the request
and/or target resource.
**JSON Example**
one or more members, or principals, to a single role.
Principals can be user accounts, service accounts,
Google groups, and domains (such as G Suite). A role
is a named list of permissions; each role can be an
IAM predefined role or a user-created custom role.
For some types of Google Cloud resources, a binding
can also specify a condition, which is a logical
expression that allows access to a resource only if
the expression evaluates to true. A condition can add
constraints based on attributes of the request, the
resource, or both. To learn which resources support
conditions in their IAM policies, see the [IAM
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
**JSON example:**
{
"bindings": [
Expand All @@ -1050,17 +1051,17 @@ def sample_set_iam_policy():
}, { "role":
"roles/resourcemanager.organizationViewer",
"members": ["user:eve@example.com"],
"members": [ "user:eve@example.com" ],
"condition": { "title": "expirable access",
"description": "Does not grant access after
Sep 2020", "expression": "request.time <
timestamp('2020-10-01T00:00:00.000Z')", } }
]
], "etag": "BwWWja0YfJA=", "version": 3
}
**YAML Example**
**YAML example:**
bindings: - members: - user:\ mike@example.com -
group:\ admins@example.com - domain:google.com -
Expand All @@ -1071,11 +1072,12 @@ def sample_set_iam_policy():
condition: title: expirable access description:
Does not grant access after Sep 2020 expression:
request.time <
timestamp('2020-10-01T00:00:00.000Z')
timestamp('2020-10-01T00:00:00.000Z') etag:
BwWWja0YfJA= version: 3
For a description of IAM and its features, see the
[IAM developer's
guide](\ https://cloud.google.com/iam/docs).
[IAM
documentation](\ https://cloud.google.com/iam/docs/).
"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -1142,17 +1144,17 @@ async def get_iam_policy(
permission on
[resource][google.iam.v1.GetIamPolicyRequest.resource].
.. code-block:: python
from google.cloud import spanner_admin_database_v1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_get_iam_policy():
# Create a client
client = spanner_admin_database_v1.DatabaseAdminClient()
# Initialize request argument(s)
request = spanner_admin_database_v1.GetIamPolicyRequest(
request = iam_policy_pb2.GetIamPolicyRequest(
resource="resource_value",
)
Expand Down Expand Up @@ -1183,21 +1185,26 @@ def sample_get_iam_policy():
Returns:
google.iam.v1.policy_pb2.Policy:
Defines an Identity and Access Management (IAM) policy. It is used to
specify access control policies for Cloud Platform
resources.
An Identity and Access Management (IAM) policy, which specifies access
controls for Google Cloud resources.
A Policy is a collection of bindings. A binding binds
one or more members to a single role. Members can be
user accounts, service accounts, Google groups, and
domains (such as G Suite). A role is a named list of
permissions (defined by IAM or configured by users).
A binding can optionally specify a condition, which
is a logic expression that further constrains the
role binding based on attributes about the request
and/or target resource.
**JSON Example**
one or more members, or principals, to a single role.
Principals can be user accounts, service accounts,
Google groups, and domains (such as G Suite). A role
is a named list of permissions; each role can be an
IAM predefined role or a user-created custom role.
For some types of Google Cloud resources, a binding
can also specify a condition, which is a logical
expression that allows access to a resource only if
the expression evaluates to true. A condition can add
constraints based on attributes of the request, the
resource, or both. To learn which resources support
conditions in their IAM policies, see the [IAM
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
**JSON example:**
{
"bindings": [
Expand All @@ -1212,17 +1219,17 @@ def sample_get_iam_policy():
}, { "role":
"roles/resourcemanager.organizationViewer",
"members": ["user:eve@example.com"],
"members": [ "user:eve@example.com" ],
"condition": { "title": "expirable access",
"description": "Does not grant access after
Sep 2020", "expression": "request.time <
timestamp('2020-10-01T00:00:00.000Z')", } }
]
], "etag": "BwWWja0YfJA=", "version": 3
}
**YAML Example**
**YAML example:**
bindings: - members: - user:\ mike@example.com -
group:\ admins@example.com - domain:google.com -
Expand All @@ -1233,11 +1240,12 @@ def sample_get_iam_policy():
condition: title: expirable access description:
Does not grant access after Sep 2020 expression:
request.time <
timestamp('2020-10-01T00:00:00.000Z')
timestamp('2020-10-01T00:00:00.000Z') etag:
BwWWja0YfJA= version: 3
For a description of IAM and its features, see the
[IAM developer's
guide](\ https://cloud.google.com/iam/docs).
[IAM
documentation](\ https://cloud.google.com/iam/docs/).
"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -1315,17 +1323,17 @@ async def test_iam_permissions(
in a NOT_FOUND error if the user has ``spanner.backups.list``
permission on the containing instance.
.. code-block:: python
from google.cloud import spanner_admin_database_v1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_test_iam_permissions():
# Create a client
client = spanner_admin_database_v1.DatabaseAdminClient()
# Initialize request argument(s)
request = spanner_admin_database_v1.TestIamPermissionsRequest(
request = iam_policy_pb2.TestIamPermissionsRequest(
resource="resource_value",
permissions=['permissions_value_1', 'permissions_value_2'],
)
Expand Down Expand Up @@ -1438,7 +1446,6 @@ async def create_backup(
backup creation per database. Backup creation of different
databases can run concurrently.
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -1588,7 +1595,6 @@ async def copy_backup(
copying and delete the backup. Concurrent CopyBackup requests
can run on the same source backup.
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -1741,7 +1747,6 @@ async def get_backup(
r"""Gets metadata on a pending or completed
[Backup][google.spanner.admin.database.v1.Backup].
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -1847,7 +1852,6 @@ async def update_backup(
r"""Updates a pending or completed
[Backup][google.spanner.admin.database.v1.Backup].
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -1971,7 +1975,6 @@ async def delete_backup(
r"""Deletes a pending or completed
[Backup][google.spanner.admin.database.v1.Backup].
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -2068,7 +2071,6 @@ async def list_backups(
ordered by ``create_time`` in descending order, starting from
the most recent ``create_time``.
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -2207,7 +2209,6 @@ async def restore_database(
without waiting for the optimize operation associated with the
first restore to complete.
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -2356,7 +2357,6 @@ async def list_database_operations(
completed/failed/canceled within the last 7 days, and pending
operations.
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down Expand Up @@ -2487,7 +2487,6 @@ async def list_backup_operations(
``operation.metadata.value.progress.start_time`` in descending
order starting from the most recently started operation.
.. code-block:: python
from google.cloud import spanner_admin_database_v1
Expand Down
Loading

0 comments on commit 7642eba

Please sign in to comment.