Class TensorboardServiceClient (3.32.0)

GitHub RepositoryProduct ReferenceREST DocumentationRPC Documentation

Service Description: TensorboardService

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   TensorboardName name = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
   Tensorboard response = tensorboardServiceClient.getTensorboard(name);
 }
 

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

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

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 TensorboardServiceSettings 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
 TensorboardServiceSettings tensorboardServiceSettings =
     TensorboardServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 TensorboardServiceClient tensorboardServiceClient =
     TensorboardServiceClient.create(tensorboardServiceSettings);
 

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
 TensorboardServiceSettings tensorboardServiceSettings =
     TensorboardServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 TensorboardServiceClient tensorboardServiceClient =
     TensorboardServiceClient.create(tensorboardServiceSettings);
 

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

Inheritance

java.lang.Object > TensorboardServiceClient

Static Methods

create()

public static final TensorboardServiceClient create()

Constructs an instance of TensorboardServiceClient with default settings.

Returns
TypeDescription
TensorboardServiceClient
Exceptions
TypeDescription
IOException

create(TensorboardServiceSettings settings)

public static final TensorboardServiceClient create(TensorboardServiceSettings settings)

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

Parameter
NameDescription
settingsTensorboardServiceSettings
Returns
TypeDescription
TensorboardServiceClient
Exceptions
TypeDescription
IOException

create(TensorboardServiceStub stub)

public static final TensorboardServiceClient create(TensorboardServiceStub stub)

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

Parameter
NameDescription
stubTensorboardServiceStub
Returns
TypeDescription
TensorboardServiceClient

Constructors

TensorboardServiceClient(TensorboardServiceSettings settings)

protected TensorboardServiceClient(TensorboardServiceSettings settings)

Constructs an instance of TensorboardServiceClient, 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
NameDescription
settingsTensorboardServiceSettings

TensorboardServiceClient(TensorboardServiceStub stub)

protected TensorboardServiceClient(TensorboardServiceStub stub)
Parameter
NameDescription
stubTensorboardServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

batchCreateTensorboardRuns(BatchCreateTensorboardRunsRequest request)

public final BatchCreateTensorboardRunsResponse batchCreateTensorboardRuns(BatchCreateTensorboardRunsRequest request)

Batch create TensorboardRuns.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   BatchCreateTensorboardRunsRequest request =
       BatchCreateTensorboardRunsRequest.newBuilder()
           .setParent(
               TensorboardExperimentName.of(
                       "[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
                   .toString())
           .addAllRequests(new ArrayList<CreateTensorboardRunRequest>())
           .build();
   BatchCreateTensorboardRunsResponse response =
       tensorboardServiceClient.batchCreateTensorboardRuns(request);
 }
 
Parameter
NameDescription
requestBatchCreateTensorboardRunsRequest

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

Returns
TypeDescription
BatchCreateTensorboardRunsResponse

batchCreateTensorboardRuns(TensorboardExperimentName parent, List<CreateTensorboardRunRequest> requests)

public final BatchCreateTensorboardRunsResponse batchCreateTensorboardRuns(TensorboardExperimentName parent, List<CreateTensorboardRunRequest> requests)

Batch create TensorboardRuns.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   TensorboardExperimentName parent =
       TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]");
   List<CreateTensorboardRunRequest> requests = new ArrayList<>();
   BatchCreateTensorboardRunsResponse response =
       tensorboardServiceClient.batchCreateTensorboardRuns(parent, requests);
 }
 
Parameters
NameDescription
parentTensorboardExperimentName

Required. The resource name of the TensorboardExperiment to create the TensorboardRuns in. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment} The parent field in the CreateTensorboardRunRequest messages must match this field.

requestsList<CreateTensorboardRunRequest>

Required. The request message specifying the TensorboardRuns to create. A maximum of 1000 TensorboardRuns can be created in a batch.

Returns
TypeDescription
BatchCreateTensorboardRunsResponse

batchCreateTensorboardRuns(String parent, List<CreateTensorboardRunRequest> requests)

public final BatchCreateTensorboardRunsResponse batchCreateTensorboardRuns(String parent, List<CreateTensorboardRunRequest> requests)

Batch create TensorboardRuns.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   String parent =
       TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
           .toString();
   List<CreateTensorboardRunRequest> requests = new ArrayList<>();
   BatchCreateTensorboardRunsResponse response =
       tensorboardServiceClient.batchCreateTensorboardRuns(parent, requests);
 }
 
Parameters
NameDescription
parentString

Required. The resource name of the TensorboardExperiment to create the TensorboardRuns in. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment} The parent field in the CreateTensorboardRunRequest messages must match this field.

requestsList<CreateTensorboardRunRequest>

Required. The request message specifying the TensorboardRuns to create. A maximum of 1000 TensorboardRuns can be created in a batch.

Returns
TypeDescription
BatchCreateTensorboardRunsResponse

batchCreateTensorboardRunsCallable()

public final UnaryCallable<BatchCreateTensorboardRunsRequest,BatchCreateTensorboardRunsResponse> batchCreateTensorboardRunsCallable()

Batch create TensorboardRuns.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   BatchCreateTensorboardRunsRequest request =
       BatchCreateTensorboardRunsRequest.newBuilder()
           .setParent(
               TensorboardExperimentName.of(
                       "[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
                   .toString())
           .addAllRequests(new ArrayList<CreateTensorboardRunRequest>())
           .build();
   ApiFuture<BatchCreateTensorboardRunsResponse> future =
       tensorboardServiceClient.batchCreateTensorboardRunsCallable().futureCall(request);
   // Do something.
   BatchCreateTensorboardRunsResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<BatchCreateTensorboardRunsRequest,BatchCreateTensorboardRunsResponse>

batchCreateTensorboardTimeSeries(BatchCreateTensorboardTimeSeriesRequest request)

public final BatchCreateTensorboardTimeSeriesResponse batchCreateTensorboardTimeSeries(BatchCreateTensorboardTimeSeriesRequest request)

Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   BatchCreateTensorboardTimeSeriesRequest request =
       BatchCreateTensorboardTimeSeriesRequest.newBuilder()
           .setParent(
               TensorboardExperimentName.of(
                       "[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
                   .toString())
           .addAllRequests(new ArrayList<CreateTensorboardTimeSeriesRequest>())
           .build();
   BatchCreateTensorboardTimeSeriesResponse response =
       tensorboardServiceClient.batchCreateTensorboardTimeSeries(request);
 }
 
Parameter
NameDescription
requestBatchCreateTensorboardTimeSeriesRequest

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

Returns
TypeDescription
BatchCreateTensorboardTimeSeriesResponse

batchCreateTensorboardTimeSeries(TensorboardExperimentName parent, List<CreateTensorboardTimeSeriesRequest> requests)

public final BatchCreateTensorboardTimeSeriesResponse batchCreateTensorboardTimeSeries(TensorboardExperimentName parent, List<CreateTensorboardTimeSeriesRequest> requests)

Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   TensorboardExperimentName parent =
       TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]");
   List<CreateTensorboardTimeSeriesRequest> requests = new ArrayList<>();
   BatchCreateTensorboardTimeSeriesResponse response =
       tensorboardServiceClient.batchCreateTensorboardTimeSeries(parent, requests);
 }
 
Parameters
NameDescription
parentTensorboardExperimentName

Required. The resource name of the TensorboardExperiment to create the TensorboardTimeSeries in. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment} The TensorboardRuns referenced by the parent fields in the CreateTensorboardTimeSeriesRequest messages must be sub resources of this TensorboardExperiment.

requestsList<CreateTensorboardTimeSeriesRequest>

Required. The request message specifying the TensorboardTimeSeries to create. A maximum of 1000 TensorboardTimeSeries can be created in a batch.

Returns
TypeDescription
BatchCreateTensorboardTimeSeriesResponse

batchCreateTensorboardTimeSeries(String parent, List<CreateTensorboardTimeSeriesRequest> requests)

public final BatchCreateTensorboardTimeSeriesResponse batchCreateTensorboardTimeSeries(String parent, List<CreateTensorboardTimeSeriesRequest> requests)

Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   String parent =
       TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
           .toString();
   List<CreateTensorboardTimeSeriesRequest> requests = new ArrayList<>();
   BatchCreateTensorboardTimeSeriesResponse response =
       tensorboardServiceClient.batchCreateTensorboardTimeSeries(parent, requests);
 }
 
Parameters
NameDescription
parentString

Required. The resource name of the TensorboardExperiment to create the TensorboardTimeSeries in. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment} The TensorboardRuns referenced by the parent fields in the CreateTensorboardTimeSeriesRequest messages must be sub resources of this TensorboardExperiment.

requestsList<CreateTensorboardTimeSeriesRequest>

Required. The request message specifying the TensorboardTimeSeries to create. A maximum of 1000 TensorboardTimeSeries can be created in a batch.

Returns
TypeDescription
BatchCreateTensorboardTimeSeriesResponse

batchCreateTensorboardTimeSeriesCallable()

public final UnaryCallable<BatchCreateTensorboardTimeSeriesRequest,BatchCreateTensorboardTimeSeriesResponse> batchCreateTensorboardTimeSeriesCallable()

Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   BatchCreateTensorboardTimeSeriesRequest request =
       BatchCreateTensorboardTimeSeriesRequest.newBuilder()
           .setParent(
               TensorboardExperimentName.of(
                       "[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
                   .toString())
           .addAllRequests(new ArrayList<CreateTensorboardTimeSeriesRequest>())
           .build();
   ApiFuture<BatchCreateTensorboardTimeSeriesResponse> future =
       tensorboardServiceClient.batchCreateTensorboardTimeSeriesCallable().futureCall(request);
   // Do something.
   BatchCreateTensorboardTimeSeriesResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<BatchCreateTensorboardTimeSeriesRequest,BatchCreateTensorboardTimeSeriesResponse>

batchReadTensorboardTimeSeriesData(BatchReadTensorboardTimeSeriesDataRequest request)

public final BatchReadTensorboardTimeSeriesDataResponse batchReadTensorboardTimeSeriesData(BatchReadTensorboardTimeSeriesDataRequest request)

Reads multiple TensorboardTimeSeries' data. The data point number limit is 1000 for scalars, 100 for tensors and blob references. If the number of data points stored is less than the limit, all data is returned. Otherwise, the number limit of data points is randomly selected from this time series and returned.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   BatchReadTensorboardTimeSeriesDataRequest request =
       BatchReadTensorboardTimeSeriesDataRequest.newBuilder()
           .setTensorboard(
               TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
           .addAllTimeSeries(new ArrayList<String>())
           .build();
   BatchReadTensorboardTimeSeriesDataResponse response =
       tensorboardServiceClient.batchReadTensorboardTimeSeriesData(request);
 }
 
Parameter
NameDescription
requestBatchReadTensorboardTimeSeriesDataRequest

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

Returns
TypeDescription
BatchReadTensorboardTimeSeriesDataResponse

batchReadTensorboardTimeSeriesData(TensorboardName tensorboard)

public final BatchReadTensorboardTimeSeriesDataResponse batchReadTensorboardTimeSeriesData(TensorboardName tensorboard)

Reads multiple TensorboardTimeSeries' data. The data point number limit is 1000 for scalars, 100 for tensors and blob references. If the number of data points stored is less than the limit, all data is returned. Otherwise, the number limit of data points is randomly selected from this time series and returned.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   TensorboardName tensorboard = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
   BatchReadTensorboardTimeSeriesDataResponse response =
       tensorboardServiceClient.batchReadTensorboardTimeSeriesData(tensorboard);
 }
 
Parameter
NameDescription
tensorboardTensorboardName

Required. The resource name of the Tensorboard containing TensorboardTimeSeries to read data from. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}. The TensorboardTimeSeries referenced by time_series must be sub resources of this Tensorboard.

Returns
TypeDescription
BatchReadTensorboardTimeSeriesDataResponse

batchReadTensorboardTimeSeriesData(String tensorboard)

public final BatchReadTensorboardTimeSeriesDataResponse batchReadTensorboardTimeSeriesData(String tensorboard)

Reads multiple TensorboardTimeSeries' data. The data point number limit is 1000 for scalars, 100 for tensors and blob references. If the number of data points stored is less than the limit, all data is returned. Otherwise, the number limit of data points is randomly selected from this time series and returned.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   String tensorboard =
       TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString();
   BatchReadTensorboardTimeSeriesDataResponse response =
       tensorboardServiceClient.batchReadTensorboardTimeSeriesData(tensorboard);
 }
 
Parameter
NameDescription
tensorboardString

Required. The resource name of the Tensorboard containing TensorboardTimeSeries to read data from. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}. The TensorboardTimeSeries referenced by time_series must be sub resources of this Tensorboard.

Returns
TypeDescription
BatchReadTensorboardTimeSeriesDataResponse

batchReadTensorboardTimeSeriesDataCallable()

public final UnaryCallable<BatchReadTensorboardTimeSeriesDataRequest,BatchReadTensorboardTimeSeriesDataResponse> batchReadTensorboardTimeSeriesDataCallable()

Reads multiple TensorboardTimeSeries' data. The data point number limit is 1000 for scalars, 100 for tensors and blob references. If the number of data points stored is less than the limit, all data is returned. Otherwise, the number limit of data points is randomly selected from this time series and returned.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   BatchReadTensorboardTimeSeriesDataRequest request =
       BatchReadTensorboardTimeSeriesDataRequest.newBuilder()
           .setTensorboard(
               TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
           .addAllTimeSeries(new ArrayList<String>())
           .build();
   ApiFuture<BatchReadTensorboardTimeSeriesDataResponse> future =
       tensorboardServiceClient.batchReadTensorboardTimeSeriesDataCallable().futureCall(request);
   // Do something.
   BatchReadTensorboardTimeSeriesDataResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<BatchReadTensorboardTimeSeriesDataRequest,BatchReadTensorboardTimeSeriesDataResponse>

close()

public final void close()

createTensorboardAsync(CreateTensorboardRequest request)

public final OperationFuture<Tensorboard,CreateTensorboardOperationMetadata> createTensorboardAsync(CreateTensorboardRequest request)

Creates a Tensorboard.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   CreateTensorboardRequest request =
       CreateTensorboardRequest.newBuilder()
           .setParent(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
           .setTensorboard(Tensorboard.newBuilder().build())
           .build();
   Tensorboard response = tensorboardServiceClient.createTensorboardAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateTensorboardRequest

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

Returns
TypeDescription
OperationFuture<Tensorboard,CreateTensorboardOperationMetadata>

createTensorboardAsync(TensorboardName parent, Tensorboard tensorboard)

public final OperationFuture<Tensorboard,CreateTensorboardOperationMetadata> createTensorboardAsync(TensorboardName parent, Tensorboard tensorboard)

Creates a Tensorboard.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   TensorboardName parent = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
   Tensorboard tensorboard = Tensorboard.newBuilder().build();
   Tensorboard response =
       tensorboardServiceClient.createTensorboardAsync(parent, tensorboard).get();
 }
 
Parameters
NameDescription
parentTensorboardName

Required. The resource name of the Location to create the Tensorboard in. Format: projects/{project}/locations/{location}

tensorboardTensorboard

Required. The Tensorboard to create.

Returns
TypeDescription
OperationFuture<Tensorboard,CreateTensorboardOperationMetadata>

createTensorboardAsync(String parent, Tensorboard tensorboard)

public final OperationFuture<Tensorboard,CreateTensorboardOperationMetadata> createTensorboardAsync(String parent, Tensorboard tensorboard)

Creates a Tensorboard.

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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
   String parent = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString();
   Tensorboard tensorboard = Tensorboard.newBuilder().build();
   Tensorboard response =
       tensorboardServiceClient.createTensorboardAsync(parent, tensorboard).get();
 }
 
Parameters
NameDescription
parentString

Required. The resource name of the Location to create the Tensorboard in. Format: projects/{project}/locations/{location}

tensorboardTensorboard

Required. The Tensorboard to create.

Returns
TypeDescription
OperationFuture<Tensorboard,CreateTensorboardOperationMetadata>

createTensorboardCallable()

public final UnaryCallable<CreateTensorboardRequest,Operation> createTensorboardCallable()

Creates a Tensorboard.

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 (TensorboardServiceClient