@@ -109,34 +109,15 @@ def get_transport_class(
109109
110110
111111class IcebergCatalogServiceClient (metaclass = IcebergCatalogServiceClientMeta ):
112- """Iceberg Catalog Service API: this implements the open-source Iceberg
113- REST Catalog API. See the API definition here:
114- https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml
115-
116- The API is defined as OpenAPI 3.1.1 spec.
117-
118- Currently we only support the following methods:
119-
120- - GetConfig/GetIcebergCatalogConfig
121- - ListIcebergNamespaces
122- - CheckIcebergNamespaceExists
123- - GetIcebergNamespace
124- - CreateIcebergNamespace (only supports single level)
125- - DeleteIcebergNamespace
126- - UpdateIcebergNamespace properties
127- - ListTableIdentifiers
128- - CreateIcebergTable
129- - DeleteIcebergTable
130- - GetIcebergTable
131- - UpdateIcebergTable (CommitTable)
132- - LoadIcebergTableCredentials
133- - RegisterTable
134-
135- Users are required to provided the ``X-Goog-User-Project`` header
136- with the project id or number which can be different from the bucket
137- project id. That project will be charged for the API calls and the
138- calling user must have access to that project. The caller must have
139- ``serviceusage.services.use`` permission on the project.
112+ """Lakehouse runtime catalog supports the following catalog
113+ management methods:
114+
115+ - GetIcebergCatalog
116+ - ListIcebergCatalogs
117+ - DeleteIcebergCatalog
118+ - UpdateIcebergCatalog
119+ - CreateIcebergCatalog
120+ - FailoverIcebergCatalog
140121 """
141122
142123 @staticmethod
@@ -274,6 +255,47 @@ def parse_catalog_path(path: str) -> Dict[str, str]:
274255 m = re .match (r"^projects/(?P<project>.+?)/catalogs/(?P<catalog>.+?)$" , path )
275256 return m .groupdict () if m else {}
276257
258+ @staticmethod
259+ def secret_path (
260+ project : str ,
261+ secret : str ,
262+ ) -> str :
263+ """Returns a fully-qualified secret string."""
264+ return "projects/{project}/secrets/{secret}" .format (
265+ project = project ,
266+ secret = secret ,
267+ )
268+
269+ @staticmethod
270+ def parse_secret_path (path : str ) -> Dict [str , str ]:
271+ """Parses a secret path into its component segments."""
272+ m = re .match (r"^projects/(?P<project>.+?)/secrets/(?P<secret>.+?)$" , path )
273+ return m .groupdict () if m else {}
274+
275+ @staticmethod
276+ def service_path (
277+ project : str ,
278+ location : str ,
279+ namespace : str ,
280+ service : str ,
281+ ) -> str :
282+ """Returns a fully-qualified service string."""
283+ return "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}" .format (
284+ project = project ,
285+ location = location ,
286+ namespace = namespace ,
287+ service = service ,
288+ )
289+
290+ @staticmethod
291+ def parse_service_path (path : str ) -> Dict [str , str ]:
292+ """Parses a service path into its component segments."""
293+ m = re .match (
294+ r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/namespaces/(?P<namespace>.+?)/services/(?P<service>.+?)$" ,
295+ path ,
296+ )
297+ return m .groupdict () if m else {}
298+
277299 @staticmethod
278300 def common_billing_account_path (
279301 billing_account : str ,
@@ -1021,7 +1043,7 @@ def sample_update_iceberg_catalog():
10211043
10221044 # Initialize request argument(s)
10231045 iceberg_catalog = biglake_v1.IcebergCatalog()
1024- iceberg_catalog.catalog_type = "CATALOG_TYPE_GCS_BUCKET "
1046+ iceberg_catalog.catalog_type = "CATALOG_TYPE_FEDERATED "
10251047
10261048 request = biglake_v1.UpdateIcebergCatalogRequest(
10271049 iceberg_catalog=iceberg_catalog,
@@ -1120,12 +1142,12 @@ def create_iceberg_catalog(
11201142 parent : Optional [str ] = None ,
11211143 iceberg_catalog : Optional [iceberg_rest_catalog .IcebergCatalog ] = None ,
11221144 iceberg_catalog_id : Optional [str ] = None ,
1145+ primary_location : Optional [str ] = None ,
11231146 retry : OptionalRetry = gapic_v1 .method .DEFAULT ,
11241147 timeout : Union [float , object ] = gapic_v1 .method .DEFAULT ,
11251148 metadata : Sequence [Tuple [str , Union [str , bytes ]]] = (),
11261149 ) -> iceberg_rest_catalog .IcebergCatalog :
1127- r"""Creates the Iceberg REST Catalog. Currently only supports Google
1128- Cloud Storage Bucket catalogs. Google Cloud Storage Bucket
1150+ r"""Creates the Iceberg REST Catalog. Google Cloud Storage Bucket
11291151 catalog id is the bucket for which the catalog is created (e.g.
11301152 ``my-catalog`` for ``gs://my-catalog``).
11311153
@@ -1149,7 +1171,7 @@ def sample_create_iceberg_catalog():
11491171
11501172 # Initialize request argument(s)
11511173 iceberg_catalog = biglake_v1.IcebergCatalog()
1152- iceberg_catalog.catalog_type = "CATALOG_TYPE_GCS_BUCKET "
1174+ iceberg_catalog.catalog_type = "CATALOG_TYPE_FEDERATED "
11531175
11541176 request = biglake_v1.CreateIcebergCatalogRequest(
11551177 parent="parent_value",
@@ -1189,6 +1211,27 @@ def sample_create_iceberg_catalog():
11891211 This corresponds to the ``iceberg_catalog_id`` field
11901212 on the ``request`` instance; if ``request`` is provided, this
11911213 should not be set.
1214+ primary_location (str):
1215+ Optional. The primary location where the catalog
1216+ metadata will be stored.
1217+
1218+ For Google Cloud Storage bucket catalogs and BigLake
1219+ catalogs, if this is not specified, then the region is
1220+ inferred from the bucket's region (``default_location``
1221+ bucket for BigLake catalogs). If specified, the region
1222+ must be in jurisdiction (near the ``default_location``
1223+ bucket's region and the ``restricted_locations``
1224+ buckets' regions for BigLake catalogs).
1225+
1226+ For federated catalogs, this must be specified and be a
1227+ Lakehouse-supported location
1228+ (https://docs.cloud.google.com/lakehouse/docs/locations).
1229+ It should be close to the remote catalog's location for
1230+ the best performance and cost.
1231+
1232+ This corresponds to the ``primary_location`` field
1233+ on the ``request`` instance; if ``request`` is provided, this
1234+ should not be set.
11921235 retry (google.api_core.retry.Retry): Designation of what errors, if any,
11931236 should be retried.
11941237 timeout (float): The timeout for this request.
@@ -1204,7 +1247,12 @@ def sample_create_iceberg_catalog():
12041247 # Create or coerce a protobuf request object.
12051248 # - Quick check: If we got a request object, we should *not* have
12061249 # gotten any keyword arguments that map to the request.
1207- flattened_params = [parent , iceberg_catalog , iceberg_catalog_id ]
1250+ flattened_params = [
1251+ parent ,
1252+ iceberg_catalog ,
1253+ iceberg_catalog_id ,
1254+ primary_location ,
1255+ ]
12081256 has_flattened_params = (
12091257 len ([param for param in flattened_params if param is not None ]) > 0
12101258 )
@@ -1226,6 +1274,8 @@ def sample_create_iceberg_catalog():
12261274 request .iceberg_catalog = iceberg_catalog
12271275 if iceberg_catalog_id is not None :
12281276 request .iceberg_catalog_id = iceberg_catalog_id
1277+ if primary_location is not None :
1278+ request .primary_location = primary_location
12291279
12301280 # Wrap the RPC method; this adds retry and timeout information,
12311281 # and friendly error handling.
0 commit comments