Skip to content

Commit 0be280c

Browse files
authored
feat(datacatalog): add policy tag manager clients (#9804)
1 parent 6751237 commit 0be280c

26 files changed

+5367
-28
lines changed

datacatalog/google/cloud/datacatalog.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@
1818
from __future__ import absolute_import
1919

2020
from google.cloud.datacatalog_v1beta1 import DataCatalogClient
21+
from google.cloud.datacatalog_v1beta1 import PolicyTagManagerClient
22+
from google.cloud.datacatalog_v1beta1 import PolicyTagManagerSerializationClient
2123
from google.cloud.datacatalog_v1beta1 import enums
2224
from google.cloud.datacatalog_v1beta1 import types
2325

2426

25-
__all__ = ("enums", "types", "DataCatalogClient")
27+
__all__ = (
28+
"enums",
29+
"types",
30+
"DataCatalogClient",
31+
"PolicyTagManagerClient",
32+
"PolicyTagManagerSerializationClient",
33+
)

datacatalog/google/cloud/datacatalog_v1beta1/__init__.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,35 @@
1919
from google.cloud.datacatalog_v1beta1 import types
2020
from google.cloud.datacatalog_v1beta1.gapic import data_catalog_client
2121
from google.cloud.datacatalog_v1beta1.gapic import enums
22+
from google.cloud.datacatalog_v1beta1.gapic import policy_tag_manager_client
23+
from google.cloud.datacatalog_v1beta1.gapic import (
24+
policy_tag_manager_serialization_client,
25+
)
2226

2327

2428
class DataCatalogClient(data_catalog_client.DataCatalogClient):
2529
__doc__ = data_catalog_client.DataCatalogClient.__doc__
2630
enums = enums
2731

2832

29-
__all__ = ("enums", "types", "DataCatalogClient")
33+
class PolicyTagManagerClient(policy_tag_manager_client.PolicyTagManagerClient):
34+
__doc__ = policy_tag_manager_client.PolicyTagManagerClient.__doc__
35+
enums = enums
36+
37+
38+
class PolicyTagManagerSerializationClient(
39+
policy_tag_manager_serialization_client.PolicyTagManagerSerializationClient
40+
):
41+
__doc__ = (
42+
policy_tag_manager_serialization_client.PolicyTagManagerSerializationClient.__doc__
43+
)
44+
enums = enums
45+
46+
47+
__all__ = (
48+
"enums",
49+
"types",
50+
"DataCatalogClient",
51+
"PolicyTagManagerClient",
52+
"PolicyTagManagerSerializationClient",
53+
)

datacatalog/google/cloud/datacatalog_v1beta1/gapic/data_catalog_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ def create_entry_group(
436436
Note that this EntryGroup and its child resources may not actually be
437437
stored in the location in this name.
438438
entry_group_id (str): Required. The id of the entry group to create.
439+
The id must begin with a letter or underscore, contain only English
440+
letters, numbers and underscores, and be at most 64 characters.
439441
entry_group (Union[dict, ~google.cloud.datacatalog_v1beta1.types.EntryGroup]): The entry group to create. Defaults to an empty entry group.
440442
441443
If a dict is provided, it must be of the same form as the protobuf
@@ -1012,7 +1014,8 @@ def lookup_entry(
10121014
10131015
- ``cloud_pubsub.project_id.topic_id``
10141016
- ``pubsub.project_id.`topic.id.with.dots```
1015-
- ``bigquery.project_id.dataset_id.table_id``
1017+
- ``bigquery.table.project_id.dataset_id.table_id``
1018+
- ``bigquery.dataset.project_id.dataset_id``
10161019
- ``datacatalog.project_id.location_id.entry_group_id.entry_id``
10171020
10181021
``*_id``\ s shoud satisfy the standard SQL rules for identifiers.

datacatalog/google/cloud/datacatalog_v1beta1/gapic/enums.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,18 @@ class PrimitiveType(enum.IntEnum):
8989
STRING = 2
9090
BOOL = 3
9191
TIMESTAMP = 4
92+
93+
94+
class Taxonomy(object):
95+
class PolicyType(enum.IntEnum):
96+
"""
97+
Defines policy types where policy tag can be used for.
98+
99+
Attributes:
100+
POLICY_TYPE_UNSPECIFIED (int): Unspecified policy type.
101+
FINE_GRAINED_ACCESS_CONTROL (int): Fine grained access control policy, which enables access control on
102+
tagged resources.
103+
"""
104+
105+
POLICY_TYPE_UNSPECIFIED = 0
106+
FINE_GRAINED_ACCESS_CONTROL = 1

0 commit comments

Comments
 (0)