Skip to content

Commit 4e50278

Browse files
chore: use gapic-generator-python 0.65.1 (#568)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 441524537 Source-Link: googleapis/googleapis@2a27391 Source-Link: googleapis/googleapis-gen@ab6756a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9 fix(deps): require grpc-google-iam-v1 >=0.12.4 docs: fix type in docstring for map fields feat: AuditConfig for IAM v1
1 parent c01e629 commit 4e50278

File tree

21 files changed

+448
-229
lines changed

21 files changed

+448
-229
lines changed

google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py

Lines changed: 53 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections import OrderedDict
1717
import functools
1818
import re
19-
from typing import Dict, Optional, Sequence, Tuple, Type, Union
19+
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

2222
from google.api_core.client_options import ClientOptions
@@ -241,7 +241,7 @@ async def create_instance(
241241
parent: str = None,
242242
instance_id: str = None,
243243
instance: gba_instance.Instance = None,
244-
clusters: Dict[str, gba_instance.Cluster] = None,
244+
clusters: Mapping[str, gba_instance.Cluster] = None,
245245
retry: OptionalRetry = gapic_v1.method.DEFAULT,
246246
timeout: float = None,
247247
metadata: Sequence[Tuple[str, str]] = (),
@@ -281,7 +281,7 @@ async def create_instance(
281281
This corresponds to the ``instance`` field
282282
on the ``request`` instance; if ``request`` is provided, this
283283
should not be set.
284-
clusters (Dict[str, gba_instance.Cluster]):
284+
clusters (:class:`Mapping[str, google.cloud.bigtable_admin_v2.types.Cluster]`):
285285
Required. The clusters to be created within the
286286
instance, mapped by desired cluster ID, e.g., just
287287
``mycluster`` rather than
@@ -1872,21 +1872,26 @@ async def get_iam_policy(
18721872
18731873
Returns:
18741874
google.iam.v1.policy_pb2.Policy:
1875-
Defines an Identity and Access Management (IAM) policy. It is used to
1876-
specify access control policies for Cloud Platform
1877-
resources.
1875+
An Identity and Access Management (IAM) policy, which specifies access
1876+
controls for Google Cloud resources.
18781877
18791878
A Policy is a collection of bindings. A binding binds
1880-
one or more members to a single role. Members can be
1881-
user accounts, service accounts, Google groups, and
1882-
domains (such as G Suite). A role is a named list of
1883-
permissions (defined by IAM or configured by users).
1884-
A binding can optionally specify a condition, which
1885-
is a logic expression that further constrains the
1886-
role binding based on attributes about the request
1887-
and/or target resource.
1888-
1889-
**JSON Example**
1879+
one or more members, or principals, to a single role.
1880+
Principals can be user accounts, service accounts,
1881+
Google groups, and domains (such as G Suite). A role
1882+
is a named list of permissions; each role can be an
1883+
IAM predefined role or a user-created custom role.
1884+
1885+
For some types of Google Cloud resources, a binding
1886+
can also specify a condition, which is a logical
1887+
expression that allows access to a resource only if
1888+
the expression evaluates to true. A condition can add
1889+
constraints based on attributes of the request, the
1890+
resource, or both. To learn which resources support
1891+
conditions in their IAM policies, see the [IAM
1892+
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
1893+
1894+
**JSON example:**
18901895
18911896
{
18921897
"bindings": [
@@ -1901,17 +1906,17 @@ async def get_iam_policy(
19011906
19021907
}, { "role":
19031908
"roles/resourcemanager.organizationViewer",
1904-
"members": ["user:[email protected]"],
1909+
"members": [ "user:[email protected]" ],
19051910
"condition": { "title": "expirable access",
19061911
"description": "Does not grant access after
19071912
Sep 2020", "expression": "request.time <
19081913
timestamp('2020-10-01T00:00:00.000Z')", } }
19091914
1910-
]
1915+
], "etag": "BwWWja0YfJA=", "version": 3
19111916
19121917
}
19131918
1914-
**YAML Example**
1919+
**YAML example:**
19151920
19161921
bindings: - members: - user:\ [email protected] -
19171922
group:\ [email protected] - domain:google.com -
@@ -1922,11 +1927,12 @@ async def get_iam_policy(
19221927
condition: title: expirable access description:
19231928
Does not grant access after Sep 2020 expression:
19241929
request.time <
1925-
timestamp('2020-10-01T00:00:00.000Z')
1930+
timestamp('2020-10-01T00:00:00.000Z') etag:
1931+
BwWWja0YfJA= version: 3
19261932
19271933
For a description of IAM and its features, see the
1928-
[IAM developer's
1929-
guide](\ https://cloud.google.com/iam/docs).
1934+
[IAM
1935+
documentation](\ https://cloud.google.com/iam/docs/).
19301936
19311937
"""
19321938
# Create or coerce a protobuf request object.
@@ -2016,21 +2022,26 @@ async def set_iam_policy(
20162022
20172023
Returns:
20182024
google.iam.v1.policy_pb2.Policy:
2019-
Defines an Identity and Access Management (IAM) policy. It is used to
2020-
specify access control policies for Cloud Platform
2021-
resources.
2025+
An Identity and Access Management (IAM) policy, which specifies access
2026+
controls for Google Cloud resources.
20222027
20232028
A Policy is a collection of bindings. A binding binds
2024-
one or more members to a single role. Members can be
2025-
user accounts, service accounts, Google groups, and
2026-
domains (such as G Suite). A role is a named list of
2027-
permissions (defined by IAM or configured by users).
2028-
A binding can optionally specify a condition, which
2029-
is a logic expression that further constrains the
2030-
role binding based on attributes about the request
2031-
and/or target resource.
2032-
2033-
**JSON Example**
2029+
one or more members, or principals, to a single role.
2030+
Principals can be user accounts, service accounts,
2031+
Google groups, and domains (such as G Suite). A role
2032+
is a named list of permissions; each role can be an
2033+
IAM predefined role or a user-created custom role.
2034+
2035+
For some types of Google Cloud resources, a binding
2036+
can also specify a condition, which is a logical
2037+
expression that allows access to a resource only if
2038+
the expression evaluates to true. A condition can add
2039+
constraints based on attributes of the request, the
2040+
resource, or both. To learn which resources support
2041+
conditions in their IAM policies, see the [IAM
2042+
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
2043+
2044+
**JSON example:**
20342045
20352046
{
20362047
"bindings": [
@@ -2045,17 +2056,17 @@ async def set_iam_policy(
20452056
20462057
}, { "role":
20472058
"roles/resourcemanager.organizationViewer",
2048-
"members": ["user:[email protected]"],
2059+
"members": [ "user:[email protected]" ],
20492060
"condition": { "title": "expirable access",
20502061
"description": "Does not grant access after
20512062
Sep 2020", "expression": "request.time <
20522063
timestamp('2020-10-01T00:00:00.000Z')", } }
20532064
2054-
]
2065+
], "etag": "BwWWja0YfJA=", "version": 3
20552066
20562067
}
20572068
2058-
**YAML Example**
2069+
**YAML example:**
20592070
20602071
bindings: - members: - user:\ [email protected] -
20612072
group:\ [email protected] - domain:google.com -
@@ -2066,11 +2077,12 @@ async def set_iam_policy(
20662077
condition: title: expirable access description:
20672078
Does not grant access after Sep 2020 expression:
20682079
request.time <
2069-
timestamp('2020-10-01T00:00:00.000Z')
2080+
timestamp('2020-10-01T00:00:00.000Z') etag:
2081+
BwWWja0YfJA= version: 3
20702082
20712083
For a description of IAM and its features, see the
2072-
[IAM developer's
2073-
guide](\ https://cloud.google.com/iam/docs).
2084+
[IAM
2085+
documentation](\ https://cloud.google.com/iam/docs/).
20742086
20752087
"""
20762088
# Create or coerce a protobuf request object.

google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py

Lines changed: 53 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Optional, Sequence, Tuple, Type, Union
19+
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

2222
from google.api_core import client_options as client_options_lib
@@ -557,7 +557,7 @@ def create_instance(
557557
parent: str = None,
558558
instance_id: str = None,
559559
instance: gba_instance.Instance = None,
560-
clusters: Dict[str, gba_instance.Cluster] = None,
560+
clusters: Mapping[str, gba_instance.Cluster] = None,
561561
retry: OptionalRetry = gapic_v1.method.DEFAULT,
562562
timeout: float = None,
563563
metadata: Sequence[Tuple[str, str]] = (),
@@ -597,7 +597,7 @@ def create_instance(
597597
This corresponds to the ``instance`` field
598598
on the ``request`` instance; if ``request`` is provided, this
599599
should not be set.
600-
clusters (Dict[str, gba_instance.Cluster]):
600+
clusters (Mapping[str, google.cloud.bigtable_admin_v2.types.Cluster]):
601601
Required. The clusters to be created within the
602602
instance, mapped by desired cluster ID, e.g., just
603603
``mycluster`` rather than
@@ -2081,21 +2081,26 @@ def get_iam_policy(
20812081
20822082
Returns:
20832083
google.iam.v1.policy_pb2.Policy:
2084-
Defines an Identity and Access Management (IAM) policy. It is used to
2085-
specify access control policies for Cloud Platform
2086-
resources.
2084+
An Identity and Access Management (IAM) policy, which specifies access
2085+
controls for Google Cloud resources.
20872086
20882087
A Policy is a collection of bindings. A binding binds
2089-
one or more members to a single role. Members can be
2090-
user accounts, service accounts, Google groups, and
2091-
domains (such as G Suite). A role is a named list of
2092-
permissions (defined by IAM or configured by users).
2093-
A binding can optionally specify a condition, which
2094-
is a logic expression that further constrains the
2095-
role binding based on attributes about the request
2096-
and/or target resource.
2097-
2098-
**JSON Example**
2088+
one or more members, or principals, to a single role.
2089+
Principals can be user accounts, service accounts,
2090+
Google groups, and domains (such as G Suite). A role
2091+
is a named list of permissions; each role can be an
2092+
IAM predefined role or a user-created custom role.
2093+
2094+
For some types of Google Cloud resources, a binding
2095+
can also specify a condition, which is a logical
2096+
expression that allows access to a resource only if
2097+
the expression evaluates to true. A condition can add
2098+
constraints based on attributes of the request, the
2099+
resource, or both. To learn which resources support
2100+
conditions in their IAM policies, see the [IAM
2101+
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
2102+
2103+
**JSON example:**
20992104
21002105
{
21012106
"bindings": [
@@ -2110,17 +2115,17 @@ def get_iam_policy(
21102115
21112116
}, { "role":
21122117
"roles/resourcemanager.organizationViewer",
2113-
"members": ["user:[email protected]"],
2118+
"members": [ "user:[email protected]" ],
21142119
"condition": { "title": "expirable access",
21152120
"description": "Does not grant access after
21162121
Sep 2020", "expression": "request.time <
21172122
timestamp('2020-10-01T00:00:00.000Z')", } }
21182123
2119-
]
2124+
], "etag": "BwWWja0YfJA=", "version": 3
21202125
21212126
}
21222127
2123-
**YAML Example**
2128+
**YAML example:**
21242129
21252130
bindings: - members: - user:\ [email protected] -
21262131
group:\ [email protected] - domain:google.com -
@@ -2131,11 +2136,12 @@ def get_iam_policy(
21312136
condition: title: expirable access description:
21322137
Does not grant access after Sep 2020 expression:
21332138
request.time <
2134-
timestamp('2020-10-01T00:00:00.000Z')
2139+
timestamp('2020-10-01T00:00:00.000Z') etag:
2140+
BwWWja0YfJA= version: 3
21352141
21362142
For a description of IAM and its features, see the
2137-
[IAM developer's
2138-
guide](\ https://cloud.google.com/iam/docs).
2143+
[IAM
2144+
documentation](\ https://cloud.google.com/iam/docs/).
21392145
21402146
"""
21412147
# Create or coerce a protobuf request object.
@@ -2212,21 +2218,26 @@ def set_iam_policy(
22122218
22132219
Returns:
22142220
google.iam.v1.policy_pb2.Policy:
2215-
Defines an Identity and Access Management (IAM) policy. It is used to
2216-
specify access control policies for Cloud Platform
2217-
resources.
2221+
An Identity and Access Management (IAM) policy, which specifies access
2222+
controls for Google Cloud resources.
22182223
22192224
A Policy is a collection of bindings. A binding binds
2220-
one or more members to a single role. Members can be
2221-
user accounts, service accounts, Google groups, and
2222-
domains (such as G Suite). A role is a named list of
2223-
permissions (defined by IAM or configured by users).
2224-
A binding can optionally specify a condition, which
2225-
is a logic expression that further constrains the
2226-
role binding based on attributes about the request
2227-
and/or target resource.
2228-
2229-
**JSON Example**
2225+
one or more members, or principals, to a single role.
2226+
Principals can be user accounts, service accounts,
2227+
Google groups, and domains (such as G Suite). A role
2228+
is a named list of permissions; each role can be an
2229+
IAM predefined role or a user-created custom role.
2230+
2231+
For some types of Google Cloud resources, a binding
2232+
can also specify a condition, which is a logical
2233+
expression that allows access to a resource only if
2234+
the expression evaluates to true. A condition can add
2235+
constraints based on attributes of the request, the
2236+
resource, or both. To learn which resources support
2237+
conditions in their IAM policies, see the [IAM
2238+
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
2239+
2240+
**JSON example:**
22302241
22312242
{
22322243
"bindings": [
@@ -2241,17 +2252,17 @@ def set_iam_policy(
22412252
22422253
}, { "role":
22432254
"roles/resourcemanager.organizationViewer",
2244-
"members": ["user:[email protected]"],
2255+
"members": [ "user:[email protected]" ],
22452256
"condition": { "title": "expirable access",
22462257
"description": "Does not grant access after
22472258
Sep 2020", "expression": "request.time <
22482259
timestamp('2020-10-01T00:00:00.000Z')", } }
22492260
2250-
]
2261+
], "etag": "BwWWja0YfJA=", "version": 3
22512262
22522263
}
22532264
2254-
**YAML Example**
2265+
**YAML example:**
22552266
22562267
bindings: - members: - user:\ [email protected] -
22572268
group:\ [email protected] - domain:google.com -
@@ -2262,11 +2273,12 @@ def set_iam_policy(
22622273
condition: title: expirable access description:
22632274
Does not grant access after Sep 2020 expression:
22642275
request.time <
2265-
timestamp('2020-10-01T00:00:00.000Z')
2276+
timestamp('2020-10-01T00:00:00.000Z') etag:
2277+
BwWWja0YfJA= version: 3
22662278
22672279
For a description of IAM and its features, see the
2268-
[IAM developer's
2269-
guide](\ https://cloud.google.com/iam/docs).
2280+
[IAM
2281+
documentation](\ https://cloud.google.com/iam/docs/).
22702282
22712283
"""
22722284
# Create or coerce a protobuf request object.

google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def __init__(
9494
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
9595
be used for service account credentials.
9696
"""
97+
9798
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9899
if ":" not in host:
99100
host += ":443"
@@ -598,5 +599,9 @@ def list_hot_tablets(
598599
]:
599600
raise NotImplementedError()
600601

602+
@property
603+
def kind(self) -> str:
604+
raise NotImplementedError()
605+
601606

602607
__all__ = ("BigtableInstanceAdminTransport",)

google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,5 +862,9 @@ def list_hot_tablets(
862862
def close(self):
863863
self.grpc_channel.close()
864864

865+
@property
866+
def kind(self) -> str:
867+
return "grpc"
868+
865869

866870
__all__ = ("BigtableInstanceAdminGrpcTransport",)

0 commit comments

Comments
 (0)