Class IcebergCatalogServiceClient (0.62.0)

GitHub RepositoryProduct Reference

Service Description: Iceberg Catalog Service API: this implements the open-source Iceberg REST Catalog API. See the API definition here: https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml

The API is defined as OpenAPI 3.1.1 spec.

Currently we only support the following methods: - GetConfig/GetIcebergCatalogConfig - ListIcebergNamespaces - CheckIcebergNamespaceExists - GetIcebergNamespace - CreateIcebergNamespace (only supports single level) - DeleteIcebergNamespace - UpdateIcebergNamespace properties - ListTableIdentifiers - CreateIcebergTable - DeleteIcebergTable - GetIcebergTable - UpdateIcebergTable (CommitTable) - LoadIcebergTableCredentials - RegisterTable

Users are required to provided the X-Goog-User-Project header with the project id or number which can be different from the bucket project id. That project will be charged for the API calls and the calling user must have access to that project. The caller must have serviceusage.services.use permission on the project.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   CatalogName name = CatalogName.of("[PROJECT]", "[CATALOG]");
   IcebergCatalog response = icebergCatalogServiceClient.getIcebergCatalog(name);
 }
 

Note: close() needs to be called on the IcebergCatalogServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

GetIcebergCatalog

Returns the Iceberg REST Catalog configuration options.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIcebergCatalog(GetIcebergCatalogRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getIcebergCatalog(CatalogName name)

  • getIcebergCatalog(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIcebergCatalogCallable()

ListIcebergCatalogs

Lists the Iceberg REST Catalogs.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listIcebergCatalogs(ListIcebergCatalogsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listIcebergCatalogs(ProjectName parent)

  • listIcebergCatalogs(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listIcebergCatalogsPagedCallable()

  • listIcebergCatalogsCallable()

UpdateIcebergCatalog

Update the Iceberg REST Catalog configuration options.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateIcebergCatalog(UpdateIcebergCatalogRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateIcebergCatalog(IcebergCatalog icebergCatalog, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateIcebergCatalogCallable()

CreateIcebergCatalog

Creates the Iceberg REST Catalog. Currently only supports Google Cloud Storage Bucket catalogs. Google Cloud Storage Bucket catalog id is the bucket for which the catalog is created (e.g. my-catalog for gs://my-catalog).

If the bucket does not exist, of the caller does not have bucket metadata permissions, the catalog will not be created.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createIcebergCatalog(CreateIcebergCatalogRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createIcebergCatalog(ProjectName parent, IcebergCatalog icebergCatalog, String icebergCatalogId)

  • createIcebergCatalog(String parent, IcebergCatalog icebergCatalog, String icebergCatalogId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createIcebergCatalogCallable()

FailoverIcebergCatalog

Failover the catalog to a new primary replica region.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • failoverIcebergCatalog(FailoverIcebergCatalogRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • failoverIcebergCatalog(String name, String primaryReplica)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • failoverIcebergCatalogCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of IcebergCatalogServiceSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 IcebergCatalogServiceSettings icebergCatalogServiceSettings =
     IcebergCatalogServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create(icebergCatalogServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 IcebergCatalogServiceSettings icebergCatalogServiceSettings =
     IcebergCatalogServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create(icebergCatalogServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 IcebergCatalogServiceSettings icebergCatalogServiceSettings =
     IcebergCatalogServiceSettings.newHttpJsonBuilder().build();
 IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create(icebergCatalogServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > IcebergCatalogServiceClient

Static Methods

create()

public static final IcebergCatalogServiceClient create()

Constructs an instance of IcebergCatalogServiceClient with default settings.

Returns
Type Description
IcebergCatalogServiceClient
Exceptions
Type Description
IOException

create(IcebergCatalogServiceSettings settings)

public static final IcebergCatalogServiceClient create(IcebergCatalogServiceSettings settings)

Constructs an instance of IcebergCatalogServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings IcebergCatalogServiceSettings
Returns
Type Description
IcebergCatalogServiceClient
Exceptions
Type Description
IOException

create(IcebergCatalogServiceStub stub)

public static final IcebergCatalogServiceClient create(IcebergCatalogServiceStub stub)

Constructs an instance of IcebergCatalogServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(IcebergCatalogServiceSettings).

Parameter
Name Description
stub IcebergCatalogServiceStub
Returns
Type Description
IcebergCatalogServiceClient

Constructors

IcebergCatalogServiceClient(IcebergCatalogServiceSettings settings)

protected IcebergCatalogServiceClient(IcebergCatalogServiceSettings settings)

Constructs an instance of IcebergCatalogServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings IcebergCatalogServiceSettings

IcebergCatalogServiceClient(IcebergCatalogServiceStub stub)

protected IcebergCatalogServiceClient(IcebergCatalogServiceStub stub)
Parameter
Name Description
stub IcebergCatalogServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createIcebergCatalog(CreateIcebergCatalogRequest request)

public final IcebergCatalog createIcebergCatalog(CreateIcebergCatalogRequest request)

Creates the Iceberg REST Catalog. Currently only supports Google Cloud Storage Bucket catalogs. Google Cloud Storage Bucket catalog id is the bucket for which the catalog is created (e.g. my-catalog for gs://my-catalog).

If the bucket does not exist, of the caller does not have bucket metadata permissions, the catalog will not be created.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   CreateIcebergCatalogRequest request =
       CreateIcebergCatalogRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setIcebergCatalogId("icebergCatalogId504062865")
           .setIcebergCatalog(IcebergCatalog.newBuilder().build())
           .build();
   IcebergCatalog response = icebergCatalogServiceClient.createIcebergCatalog(request);
 }
 
Parameter
Name Description
request CreateIcebergCatalogRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
IcebergCatalog

createIcebergCatalog(ProjectName parent, IcebergCatalog icebergCatalog, String icebergCatalogId)

public final IcebergCatalog createIcebergCatalog(ProjectName parent, IcebergCatalog icebergCatalog, String icebergCatalogId)

Creates the Iceberg REST Catalog. Currently only supports Google Cloud Storage Bucket catalogs. Google Cloud Storage Bucket catalog id is the bucket for which the catalog is created (e.g. my-catalog for gs://my-catalog).

If the bucket does not exist, of the caller does not have bucket metadata permissions, the catalog will not be created.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   IcebergCatalog icebergCatalog = IcebergCatalog.newBuilder().build();
   String icebergCatalogId = "icebergCatalogId504062865";
   IcebergCatalog response =
       icebergCatalogServiceClient.createIcebergCatalog(
           parent, icebergCatalog, icebergCatalogId);
 }
 
Parameters
Name Description
parent ProjectName

Required. The parent resource where this catalog will be created. Format: projects/{project_id}

icebergCatalog IcebergCatalog

Required. The catalog to create. The required fields for creation are: - catalog_type. Optionally: credential_mode can be provided, if Credential Vending is desired.

icebergCatalogId String

Required. The name of the catalog.

Returns
Type Description
IcebergCatalog

createIcebergCatalog(String parent, IcebergCatalog icebergCatalog, String icebergCatalogId)

public final IcebergCatalog createIcebergCatalog(String parent, IcebergCatalog icebergCatalog, String icebergCatalogId)

Creates the Iceberg REST Catalog. Currently only supports Google Cloud Storage Bucket catalogs. Google Cloud Storage Bucket catalog id is the bucket for which the catalog is created (e.g. my-catalog for gs://my-catalog).

If the bucket does not exist, of the caller does not have bucket metadata permissions, the catalog will not be created.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   String parent = ProjectName.of("[PROJECT]").toString();
   IcebergCatalog icebergCatalog = IcebergCatalog.newBuilder().build();
   String icebergCatalogId = "icebergCatalogId504062865";
   IcebergCatalog response =
       icebergCatalogServiceClient.createIcebergCatalog(
           parent, icebergCatalog, icebergCatalogId);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where this catalog will be created. Format: projects/{project_id}

icebergCatalog IcebergCatalog

Required. The catalog to create. The required fields for creation are: - catalog_type. Optionally: credential_mode can be provided, if Credential Vending is desired.

icebergCatalogId String

Required. The name of the catalog.

Returns
Type Description
IcebergCatalog

createIcebergCatalogCallable()

public final UnaryCallable<CreateIcebergCatalogRequest,IcebergCatalog> createIcebergCatalogCallable()

Creates the Iceberg REST Catalog. Currently only supports Google Cloud Storage Bucket catalogs. Google Cloud Storage Bucket catalog id is the bucket for which the catalog is created (e.g. my-catalog for gs://my-catalog).

If the bucket does not exist, of the caller does not have bucket metadata permissions, the catalog will not be created.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   CreateIcebergCatalogRequest request =
       CreateIcebergCatalogRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setIcebergCatalogId("icebergCatalogId504062865")
           .setIcebergCatalog(IcebergCatalog.newBuilder().build())
           .build();
   ApiFuture<IcebergCatalog> future =
       icebergCatalogServiceClient.createIcebergCatalogCallable().futureCall(request);
   // Do something.
   IcebergCatalog response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateIcebergCatalogRequest,IcebergCatalog>

failoverIcebergCatalog(FailoverIcebergCatalogRequest request)

public final FailoverIcebergCatalogResponse failoverIcebergCatalog(FailoverIcebergCatalogRequest request)

Failover the catalog to a new primary replica region.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   FailoverIcebergCatalogRequest request =
       FailoverIcebergCatalogRequest.newBuilder()
           .setName("name3373707")
           .setPrimaryReplica("primaryReplica-389090218")
           .setValidateOnly(true)
           .setConditionalFailoverReplicationTime(Timestamp.newBuilder().build())
           .build();
   FailoverIcebergCatalogResponse response =
       icebergCatalogServiceClient.failoverIcebergCatalog(request);
 }
 
Parameter
Name Description
request FailoverIcebergCatalogRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
FailoverIcebergCatalogResponse

failoverIcebergCatalog(String name, String primaryReplica)

public final FailoverIcebergCatalogResponse failoverIcebergCatalog(String name, String primaryReplica)

Failover the catalog to a new primary replica region.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   String name = "name3373707";
   String primaryReplica = "primaryReplica-389090218";
   FailoverIcebergCatalogResponse response =
       icebergCatalogServiceClient.failoverIcebergCatalog(name, primaryReplica);
 }
 
Parameters
Name Description
name String

Required. The name of the catalog in the form "projects/{project_id}/catalogs/{catalog_id}"

primaryReplica String

Required. The region being assigned as the new primary replica region. For example "us-east1". This must be one of the replica regions in the catalog's list of replicas marked as a "secondary".

Returns
Type Description
FailoverIcebergCatalogResponse

failoverIcebergCatalogCallable()

public final UnaryCallable<FailoverIcebergCatalogRequest,FailoverIcebergCatalogResponse> failoverIcebergCatalogCallable()

Failover the catalog to a new primary replica region.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   FailoverIcebergCatalogRequest request =
       FailoverIcebergCatalogRequest.newBuilder()
           .setName("name3373707")
           .setPrimaryReplica("primaryReplica-389090218")
           .setValidateOnly(true)
           .setConditionalFailoverReplicationTime(Timestamp.newBuilder().build())
           .build();
   ApiFuture<FailoverIcebergCatalogResponse> future =
       icebergCatalogServiceClient.failoverIcebergCatalogCallable().futureCall(request);
   // Do something.
   FailoverIcebergCatalogResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<FailoverIcebergCatalogRequest,FailoverIcebergCatalogResponse>

getIcebergCatalog(CatalogName name)

public final IcebergCatalog getIcebergCatalog(CatalogName name)

Returns the Iceberg REST Catalog configuration options.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   CatalogName name = CatalogName.of("[PROJECT]", "[CATALOG]");
   IcebergCatalog response = icebergCatalogServiceClient.getIcebergCatalog(name);
 }
 
Parameter
Name Description
name CatalogName

Required. The catalog to get.

Returns
Type Description
IcebergCatalog

getIcebergCatalog(GetIcebergCatalogRequest request)

public final IcebergCatalog getIcebergCatalog(GetIcebergCatalogRequest request)

Returns the Iceberg REST Catalog configuration options.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   GetIcebergCatalogRequest request =
       GetIcebergCatalogRequest.newBuilder()
           .setName(CatalogName.of("[PROJECT]", "[CATALOG]").toString())
           .build();
   IcebergCatalog response = icebergCatalogServiceClient.getIcebergCatalog(request);
 }
 
Parameter
Name Description
request GetIcebergCatalogRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
IcebergCatalog

getIcebergCatalog(String name)

public final IcebergCatalog getIcebergCatalog(String name)

Returns the Iceberg REST Catalog configuration options.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   String name = CatalogName.of("[PROJECT]", "[CATALOG]").toString();
   IcebergCatalog response = icebergCatalogServiceClient.getIcebergCatalog(name);
 }
 
Parameter
Name Description
name String

Required. The catalog to get.

Returns
Type Description
IcebergCatalog

getIcebergCatalogCallable()

public final UnaryCallable<GetIcebergCatalogRequest,IcebergCatalog> getIcebergCatalogCallable()

Returns the Iceberg REST Catalog configuration options.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   GetIcebergCatalogRequest request =
       GetIcebergCatalogRequest.newBuilder()
           .setName(CatalogName.of("[PROJECT]", "[CATALOG]").toString())
           .build();
   ApiFuture<IcebergCatalog> future =
       icebergCatalogServiceClient.getIcebergCatalogCallable().futureCall(request);
   // Do something.
   IcebergCatalog response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetIcebergCatalogRequest,IcebergCatalog>

getSettings()

public final IcebergCatalogServiceSettings getSettings()
Returns
Type Description
IcebergCatalogServiceSettings

getStub()

public IcebergCatalogServiceStub getStub()
Returns
Type Description
IcebergCatalogServiceStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listIcebergCatalogs(ListIcebergCatalogsRequest request)

public final IcebergCatalogServiceClient.ListIcebergCatalogsPagedResponse listIcebergCatalogs(ListIcebergCatalogsRequest request)

Lists the Iceberg REST Catalogs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   ListIcebergCatalogsRequest request =
       ListIcebergCatalogsRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (IcebergCatalog element :
       icebergCatalogServiceClient.listIcebergCatalogs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListIcebergCatalogsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
IcebergCatalogServiceClient.ListIcebergCatalogsPagedResponse

listIcebergCatalogs(ProjectName parent)

public final IcebergCatalogServiceClient.ListIcebergCatalogsPagedResponse listIcebergCatalogs(ProjectName parent)

Lists the Iceberg REST Catalogs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   for (IcebergCatalog element :
       icebergCatalogServiceClient.listIcebergCatalogs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent ProjectName

Required. The parent resource where this catalog will be created. Format: projects/{project_id}

Returns
Type Description
IcebergCatalogServiceClient.ListIcebergCatalogsPagedResponse

listIcebergCatalogs(String parent)

public final IcebergCatalogServiceClient.ListIcebergCatalogsPagedResponse listIcebergCatalogs(String parent)

Lists the Iceberg REST Catalogs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   String parent = ProjectName.of("[PROJECT]").toString();
   for (IcebergCatalog element :
       icebergCatalogServiceClient.listIcebergCatalogs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent resource where this catalog will be created. Format: projects/{project_id}

Returns
Type Description
IcebergCatalogServiceClient.ListIcebergCatalogsPagedResponse

listIcebergCatalogsCallable()

public final UnaryCallable<ListIcebergCatalogsRequest,ListIcebergCatalogsResponse> listIcebergCatalogsCallable()

Lists the Iceberg REST Catalogs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   ListIcebergCatalogsRequest request =
       ListIcebergCatalogsRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListIcebergCatalogsResponse response =
         icebergCatalogServiceClient.listIcebergCatalogsCallable().call(request);
     for (IcebergCatalog element : response.getIcebergCatalogsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListIcebergCatalogsRequest,ListIcebergCatalogsResponse>

listIcebergCatalogsPagedCallable()

public final UnaryCallable<ListIcebergCatalogsRequest,IcebergCatalogServiceClient.ListIcebergCatalogsPagedResponse> listIcebergCatalogsPagedCallable()

Lists the Iceberg REST Catalogs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   ListIcebergCatalogsRequest request =
       ListIcebergCatalogsRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<IcebergCatalog> future =
       icebergCatalogServiceClient.listIcebergCatalogsPagedCallable().futureCall(request);
   // Do something.
   for (IcebergCatalog element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListIcebergCatalogsRequest,ListIcebergCatalogsPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateIcebergCatalog(IcebergCatalog icebergCatalog, FieldMask updateMask)

public final IcebergCatalog updateIcebergCatalog(IcebergCatalog icebergCatalog, FieldMask updateMask)

Update the Iceberg REST Catalog configuration options.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   IcebergCatalog icebergCatalog = IcebergCatalog.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   IcebergCatalog response =
       icebergCatalogServiceClient.updateIcebergCatalog(icebergCatalog, updateMask);
 }
 
Parameters
Name Description
icebergCatalog IcebergCatalog

Required. The catalog to update.

updateMask FieldMask

Optional. The list of fields to update.

Returns
Type Description
IcebergCatalog

updateIcebergCatalog(UpdateIcebergCatalogRequest request)

public final IcebergCatalog updateIcebergCatalog(UpdateIcebergCatalogRequest request)

Update the Iceberg REST Catalog configuration options.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   UpdateIcebergCatalogRequest request =
       UpdateIcebergCatalogRequest.newBuilder()
           .setIcebergCatalog(IcebergCatalog.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   IcebergCatalog response = icebergCatalogServiceClient.updateIcebergCatalog(request);
 }
 
Parameter
Name Description
request UpdateIcebergCatalogRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
IcebergCatalog

updateIcebergCatalogCallable()

public final UnaryCallable<UpdateIcebergCatalogRequest,IcebergCatalog> updateIcebergCatalogCallable()

Update the Iceberg REST Catalog configuration options.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IcebergCatalogServiceClient icebergCatalogServiceClient =
     IcebergCatalogServiceClient.create()) {
   UpdateIcebergCatalogRequest request =
       UpdateIcebergCatalogRequest.newBuilder()
           .setIcebergCatalog(IcebergCatalog.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<IcebergCatalog> future =
       icebergCatalogServiceClient.updateIcebergCatalogCallable().futureCall(request);
   // Do something.
   IcebergCatalog response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateIcebergCatalogRequest,IcebergCatalog>