Google Cloud Ai Platform V1 Client - Class TensorboardServiceClient (0.10.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class TensorboardServiceClient.

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:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedParent = $tensorboardServiceClient->tensorboardExperimentName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]');
    $requests = [];
    $response = $tensorboardServiceClient->batchCreateTensorboardRuns($formattedParent, $requests);
} finally {
    $tensorboardServiceClient->close();
}

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 parseName method to extract the individual identifiers contained within formatted names that are returned by the API.

Methods

locationName

Formats a string containing the fully-qualified path to represent a location resource.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
stringThe formatted location resource.

tensorboardName

Formats a string containing the fully-qualified path to represent a tensorboard resource.

Parameters
NameDescription
project string
location string
tensorboard string
Returns
TypeDescription
stringThe formatted tensorboard resource.

tensorboardExperimentName

Formats a string containing the fully-qualified path to represent a tensorboard_experiment resource.

Parameters
NameDescription
project string
location string
tensorboard string
experiment string
Returns
TypeDescription
stringThe formatted tensorboard_experiment resource.

tensorboardRunName

Formats a string containing the fully-qualified path to represent a tensorboard_run resource.

Parameters
NameDescription
project string
location string
tensorboard string
experiment string
run string
Returns
TypeDescription
stringThe formatted tensorboard_run resource.

tensorboardTimeSeriesName

Formats a string containing the fully-qualified path to represent a tensorboard_time_series resource.

Parameters
NameDescription
project string
location string
tensorboard string
experiment string
run string
timeSeries string
Returns
TypeDescription
stringThe formatted tensorboard_time_series resource.

parseName

Parses a formatted name string and returns an associative array of the components in the name.

The following name formats are supported: Template: Pattern

  • location: projects/{project}/locations/{location}
  • tensorboard: projects/{project}/locations/{location}/tensorboards/{tensorboard}
  • tensorboardExperiment: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}
  • tensorboardRun: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}
  • tensorboardTimeSeries: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.

Parameters
NameDescription
formattedName string

The formatted name string

template string

Optional name of template to match

Returns
TypeDescription
arrayAn associative array from name component IDs to component values.

getOperationsClient

Return an OperationsClient object with the same endpoint as $this.

Returns
TypeDescription
Google\ApiCore\LongRunning\OperationsClient

resumeOperation

Resume an existing long running operation that was previously started by a long running API method. If $methodName is not provided, or does not match a long running API method, then the operation can still be resumed, but the OperationResponse object will not deserialize the final response.

Parameters
NameDescription
operationName string

The name of the long running operation

methodName string

The name of the method used to start the operation

Returns
TypeDescription
Google\ApiCore\OperationResponse

__construct

Constructor.

Parameters
NameDescription
options array

Optional. Options for configuring the service API wrapper.

↳ apiEndpoint string

The address of the API remote host. May optionally include the port, formatted as "

↳ credentials string|array|FetchAuthTokenInterface|CredentialsWrapper

The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed {@see} object or {@see} object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored.

↳ credentialsConfig array

Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see {@see} .

↳ disableRetries bool

Determines whether or not retries defined by the client configuration should be disabled. Defaults to false.

↳ clientConfig string|array

Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder.

↳ transport string|TransportInterface

The transport used for executing network requests. May be either the string rest or grpc. Defaults to grpc if gRPC support is detected on the system. Advanced usage: Additionally, it is possible to pass in an already instantiated {@see} object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored.

↳ transportConfig array

Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the {@see} and {@see} methods for the supported options.

↳ clientCertSource callable

A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS.

batchCreateTensorboardRuns

Batch create TensorboardRuns.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedParent = $tensorboardServiceClient->tensorboardExperimentName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]');
    $requests = [];
    $response = $tensorboardServiceClient->batchCreateTensorboardRuns($formattedParent, $requests);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
parent string

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.

requests array<Google\Cloud\AIPlatform\V1\CreateTensorboardRunRequest>

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

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\BatchCreateTensorboardRunsResponse

batchCreateTensorboardTimeSeries

Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedParent = $tensorboardServiceClient->tensorboardExperimentName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]');
    $requests = [];
    $response = $tensorboardServiceClient->batchCreateTensorboardTimeSeries($formattedParent, $requests);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
parent string

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.

requests array<Google\Cloud\AIPlatform\V1\CreateTensorboardTimeSeriesRequest>

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

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\BatchCreateTensorboardTimeSeriesResponse

batchReadTensorboardTimeSeriesData

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 will be returned.

Otherwise, that limit number of data points will be randomly selected from this time series and returned.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedTensorboard = $tensorboardServiceClient->tensorboardName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]');
    $formattedTimeSeries = [
        $tensorboardServiceClient->tensorboardTimeSeriesName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]', '[TIME_SERIES]'),
    ];
    $response = $tensorboardServiceClient->batchReadTensorboardTimeSeriesData($formattedTensorboard, $formattedTimeSeries);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
tensorboard string

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.

timeSeries string[]

Required. The resource names of the TensorboardTimeSeries to read data from. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\BatchReadTensorboardTimeSeriesDataResponse

createTensorboard

Creates a Tensorboard.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedParent = $tensorboardServiceClient->tensorboardName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]');
    $tensorboard = new Tensorboard();
    $operationResponse = $tensorboardServiceClient->createTensorboard($formattedParent, $tensorboard);
    $operationResponse->pollUntilComplete();
    if ($operationResponse->operationSucceeded()) {
        $result = $operationResponse->getResult();
    // doSomethingWith($result)
    } else {
        $error = $operationResponse->getError();
        // handleError($error)
    }
    // Alternatively:
    // start the operation, keep the operation name, and resume later
    $operationResponse = $tensorboardServiceClient->createTensorboard($formattedParent, $tensorboard);
    $operationName = $operationResponse->getName();
    // ... do other work
    $newOperationResponse = $tensorboardServiceClient->resumeOperation($operationName, 'createTensorboard');
    while (!$newOperationResponse->isDone()) {
        // ... do other work
        $newOperationResponse->reload();
    }
    if ($newOperationResponse->operationSucceeded()) {
        $result = $newOperationResponse->getResult();
    // doSomethingWith($result)
    } else {
        $error = $newOperationResponse->getError();
        // handleError($error)
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
parent string

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

tensorboard Google\Cloud\AIPlatform\V1\Tensorboard

Required. The Tensorboard to create.

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

createTensorboardExperiment

Creates a TensorboardExperiment.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedParent = $tensorboardServiceClient->tensorboardExperimentName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]');
    $tensorboardExperimentId = 'tensorboard_experiment_id';
    $response = $tensorboardServiceClient->createTensorboardExperiment($formattedParent, $tensorboardExperimentId);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
parent string

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

tensorboardExperimentId string

Required. The ID to use for the Tensorboard experiment, which will become the final component of the Tensorboard experiment's resource name. This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/.

optionalArgs array

Optional.

↳ tensorboardExperiment TensorboardExperiment

The TensorboardExperiment to create.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\TensorboardExperiment

createTensorboardRun

Creates a TensorboardRun.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedParent = $tensorboardServiceClient->tensorboardRunName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]');
    $tensorboardRun = new TensorboardRun();
    $tensorboardRunId = 'tensorboard_run_id';
    $response = $tensorboardServiceClient->createTensorboardRun($formattedParent, $tensorboardRun, $tensorboardRunId);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
parent string

Required. The resource name of the TensorboardExperiment to create the TensorboardRun in. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

tensorboardRun Google\Cloud\AIPlatform\V1\TensorboardRun

Required. The TensorboardRun to create.

tensorboardRunId string

Required. The ID to use for the Tensorboard run, which will become the final component of the Tensorboard run's resource name. This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/.

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\TensorboardRun

createTensorboardTimeSeries

Creates a TensorboardTimeSeries.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedParent = $tensorboardServiceClient->tensorboardTimeSeriesName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]', '[TIME_SERIES]');
    $tensorboardTimeSeries = new TensorboardTimeSeries();
    $response = $tensorboardServiceClient->createTensorboardTimeSeries($formattedParent, $tensorboardTimeSeries);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
parent string

Required. The resource name of the TensorboardRun to create the TensorboardTimeSeries in. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

tensorboardTimeSeries Google\Cloud\AIPlatform\V1\TensorboardTimeSeries

Required. The TensorboardTimeSeries to create.

optionalArgs array

Optional.

↳ tensorboardTimeSeriesId string

Optional. The user specified unique ID to use for the TensorboardTimeSeries, which will become the final component of the TensorboardTimeSeries's resource name. This value should match "[a-z0-9][a-z0-9-]{0, 127}"

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\TensorboardTimeSeries

deleteTensorboard

Deletes a Tensorboard.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedName = $tensorboardServiceClient->tensorboardName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]');
    $operationResponse = $tensorboardServiceClient->deleteTensorboard($formattedName);
    $operationResponse->pollUntilComplete();
    if ($operationResponse->operationSucceeded()) {
        // operation succeeded and returns no value
    } else {
        $error = $operationResponse->getError();
        // handleError($error)
    }
    // Alternatively:
    // start the operation, keep the operation name, and resume later
    $operationResponse = $tensorboardServiceClient->deleteTensorboard($formattedName);
    $operationName = $operationResponse->getName();
    // ... do other work
    $newOperationResponse = $tensorboardServiceClient->resumeOperation($operationName, 'deleteTensorboard');
    while (!$newOperationResponse->isDone()) {
        // ... do other work
        $newOperationResponse->reload();
    }
    if ($newOperationResponse->operationSucceeded()) {
        // operation succeeded and returns no value
    } else {
        $error = $newOperationResponse->getError();
        // handleError($error)
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
name string

Required. The name of the Tensorboard to be deleted. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

deleteTensorboardExperiment

Deletes a TensorboardExperiment.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedName = $tensorboardServiceClient->tensorboardExperimentName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]');
    $operationResponse = $tensorboardServiceClient->deleteTensorboardExperiment($formattedName);
    $operationResponse->pollUntilComplete();
    if ($operationResponse->operationSucceeded()) {
        // operation succeeded and returns no value
    } else {
        $error = $operationResponse->getError();
        // handleError($error)
    }
    // Alternatively:
    // start the operation, keep the operation name, and resume later
    $operationResponse = $tensorboardServiceClient->deleteTensorboardExperiment($formattedName);
    $operationName = $operationResponse->getName();
    // ... do other work
    $newOperationResponse = $tensorboardServiceClient->resumeOperation($operationName, 'deleteTensorboardExperiment');
    while (!$newOperationResponse->isDone()) {
        // ... do other work
        $newOperationResponse->reload();
    }
    if ($newOperationResponse->operationSucceeded()) {
        // operation succeeded and returns no value
    } else {
        $error = $newOperationResponse->getError();
        // handleError($error)
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
name string

Required. The name of the TensorboardExperiment to be deleted. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

deleteTensorboardRun

Deletes a TensorboardRun.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedName = $tensorboardServiceClient->tensorboardRunName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]');
    $operationResponse = $tensorboardServiceClient->deleteTensorboardRun($formattedName);
    $operationResponse->pollUntilComplete();
    if ($operationResponse->operationSucceeded()) {
        // operation succeeded and returns no value
    } else {
        $error = $operationResponse->getError();
        // handleError($error)
    }
    // Alternatively:
    // start the operation, keep the operation name, and resume later
    $operationResponse = $tensorboardServiceClient->deleteTensorboardRun($formattedName);
    $operationName = $operationResponse->getName();
    // ... do other work
    $newOperationResponse = $tensorboardServiceClient->resumeOperation($operationName, 'deleteTensorboardRun');
    while (!$newOperationResponse->isDone()) {
        // ... do other work
        $newOperationResponse->reload();
    }
    if ($newOperationResponse->operationSucceeded()) {
        // operation succeeded and returns no value
    } else {
        $error = $newOperationResponse->getError();
        // handleError($error)
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
name string

Required. The name of the TensorboardRun to be deleted. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

deleteTensorboardTimeSeries

Deletes a TensorboardTimeSeries.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedName = $tensorboardServiceClient->tensorboardTimeSeriesName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]', '[TIME_SERIES]');
    $operationResponse = $tensorboardServiceClient->deleteTensorboardTimeSeries($formattedName);
    $operationResponse->pollUntilComplete();
    if ($operationResponse->operationSucceeded()) {
        // operation succeeded and returns no value
    } else {
        $error = $operationResponse->getError();
        // handleError($error)
    }
    // Alternatively:
    // start the operation, keep the operation name, and resume later
    $operationResponse = $tensorboardServiceClient->deleteTensorboardTimeSeries($formattedName);
    $operationName = $operationResponse->getName();
    // ... do other work
    $newOperationResponse = $tensorboardServiceClient->resumeOperation($operationName, 'deleteTensorboardTimeSeries');
    while (!$newOperationResponse->isDone()) {
        // ... do other work
        $newOperationResponse->reload();
    }
    if ($newOperationResponse->operationSucceeded()) {
        // operation succeeded and returns no value
    } else {
        $error = $newOperationResponse->getError();
        // handleError($error)
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
name string

Required. The name of the TensorboardTimeSeries to be deleted. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

exportTensorboardTimeSeriesData

Exports a TensorboardTimeSeries' data. Data is returned in paginated responses.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedTensorboardTimeSeries = $tensorboardServiceClient->tensorboardTimeSeriesName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]', '[TIME_SERIES]');
    // Iterate over pages of elements
    $pagedResponse = $tensorboardServiceClient->exportTensorboardTimeSeriesData($formattedTensorboardTimeSeries);
    foreach ($pagedResponse->iteratePages() as $page) {
        foreach ($page as $element) {
            // doSomethingWith($element);
        }
    }
    // Alternatively:
    // Iterate through all elements
    $pagedResponse = $tensorboardServiceClient->exportTensorboardTimeSeriesData($formattedTensorboardTimeSeries);
    foreach ($pagedResponse->iterateAllElements() as $element) {
        // doSomethingWith($element);
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
tensorboardTimeSeries string

Required. The resource name of the TensorboardTimeSeries to export data from. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

optionalArgs array

Optional.

↳ filter string

Exports the TensorboardTimeSeries' data that match the filter expression.

↳ pageSize int

The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.

↳ pageToken string

A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.

↳ orderBy string

Field to use to sort the TensorboardTimeSeries' data. By default, TensorboardTimeSeries' data will be returned in a pseudo random order.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse

getTensorboard

Gets a Tensorboard.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedName = $tensorboardServiceClient->tensorboardName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]');
    $response = $tensorboardServiceClient->getTensorboard($formattedName);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
name string

Required. The name of the Tensorboard resource. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\Tensorboard

getTensorboardExperiment

Gets a TensorboardExperiment.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedName = $tensorboardServiceClient->tensorboardExperimentName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]');
    $response = $tensorboardServiceClient->getTensorboardExperiment($formattedName);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
name string

Required. The name of the TensorboardExperiment resource. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\TensorboardExperiment

getTensorboardRun

Gets a TensorboardRun.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedName = $tensorboardServiceClient->tensorboardRunName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]');
    $response = $tensorboardServiceClient->getTensorboardRun($formattedName);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
name string

Required. The name of the TensorboardRun resource. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\TensorboardRun

getTensorboardTimeSeries

Gets a TensorboardTimeSeries.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedName = $tensorboardServiceClient->tensorboardTimeSeriesName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]', '[TIME_SERIES]');
    $response = $tensorboardServiceClient->getTensorboardTimeSeries($formattedName);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
name string

Required. The name of the TensorboardTimeSeries resource. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\TensorboardTimeSeries

listTensorboardExperiments

Lists TensorboardExperiments in a Location.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedParent = $tensorboardServiceClient->tensorboardName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]');
    // Iterate over pages of elements
    $pagedResponse = $tensorboardServiceClient->listTensorboardExperiments($formattedParent);
    foreach ($pagedResponse->iteratePages() as $page) {
        foreach ($page as $element) {
            // doSomethingWith($element);
        }
    }
    // Alternatively:
    // Iterate through all elements
    $pagedResponse = $tensorboardServiceClient->listTensorboardExperiments($formattedParent);
    foreach ($pagedResponse->iterateAllElements() as $element) {
        // doSomethingWith($element);
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
parent string

Required. The resource name of the Tensorboard to list TensorboardExperiments. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

optionalArgs array

Optional.

↳ filter string

Lists the TensorboardExperiments that match the filter expression.

↳ pageSize int

The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.

↳ pageToken string

A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.

↳ orderBy string

Field to use to sort the list.

↳ readMask FieldMask

Mask specifying which fields to read.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse

listTensorboardRuns

Lists TensorboardRuns in a Location.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedParent = $tensorboardServiceClient->tensorboardExperimentName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]');
    // Iterate over pages of elements
    $pagedResponse = $tensorboardServiceClient->listTensorboardRuns($formattedParent);
    foreach ($pagedResponse->iteratePages() as $page) {
        foreach ($page as $element) {
            // doSomethingWith($element);
        }
    }
    // Alternatively:
    // Iterate through all elements
    $pagedResponse = $tensorboardServiceClient->listTensorboardRuns($formattedParent);
    foreach ($pagedResponse->iterateAllElements() as $element) {
        // doSomethingWith($element);
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
parent string

Required. The resource name of the TensorboardExperiment to list TensorboardRuns. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

optionalArgs array

Optional.

↳ filter string

Lists the TensorboardRuns that match the filter expression.

↳ pageSize int

The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.

↳ pageToken string

A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.

↳ orderBy string

Field to use to sort the list.

↳ readMask FieldMask

Mask specifying which fields to read.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse

listTensorboardTimeSeries

Lists TensorboardTimeSeries in a Location.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedParent = $tensorboardServiceClient->tensorboardRunName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]');
    // Iterate over pages of elements
    $pagedResponse = $tensorboardServiceClient->listTensorboardTimeSeries($formattedParent);
    foreach ($pagedResponse->iteratePages() as $page) {
        foreach ($page as $element) {
            // doSomethingWith($element);
        }
    }
    // Alternatively:
    // Iterate through all elements
    $pagedResponse = $tensorboardServiceClient->listTensorboardTimeSeries($formattedParent);
    foreach ($pagedResponse->iterateAllElements() as $element) {
        // doSomethingWith($element);
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
parent string

Required. The resource name of the TensorboardRun to list TensorboardTimeSeries. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

optionalArgs array

Optional.

↳ filter string

Lists the TensorboardTimeSeries that match the filter expression.

↳ pageSize int

The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.

↳ pageToken string

A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.

↳ orderBy string

Field to use to sort the list.

↳ readMask FieldMask

Mask specifying which fields to read.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse

listTensorboards

Lists Tensorboards in a Location.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedParent = $tensorboardServiceClient->locationName('[PROJECT]', '[LOCATION]');
    // Iterate over pages of elements
    $pagedResponse = $tensorboardServiceClient->listTensorboards($formattedParent);
    foreach ($pagedResponse->iteratePages() as $page) {
        foreach ($page as $element) {
            // doSomethingWith($element);
        }
    }
    // Alternatively:
    // Iterate through all elements
    $pagedResponse = $tensorboardServiceClient->listTensorboards($formattedParent);
    foreach ($pagedResponse->iterateAllElements() as $element) {
        // doSomethingWith($element);
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
parent string

Required. The resource name of the Location to list Tensorboards. Format: projects/{project}/locations/{location}

optionalArgs array

Optional.

↳ filter string

Lists the Tensorboards that match the filter expression.

↳ pageSize int

The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.

↳ pageToken string

A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.

↳ orderBy string

Field to use to sort the list.

↳ readMask FieldMask

Mask specifying which fields to read.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse

readTensorboardBlobData

Gets bytes of TensorboardBlobs.

This is to allow reading blob data stored in consumer project's Cloud Storage bucket without users having to obtain Cloud Storage access permission.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedTimeSeries = $tensorboardServiceClient->tensorboardTimeSeriesName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]', '[TIME_SERIES]');
    // Read all responses until the stream is complete
    $stream = $tensorboardServiceClient->readTensorboardBlobData($formattedTimeSeries);
    foreach ($stream->readAll() as $element) {
        // doSomethingWith($element);
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
timeSeries string

Required. The resource name of the TensorboardTimeSeries to list Blobs. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

optionalArgs array

Optional.

↳ blobIds string[]

IDs of the blobs to read.

↳ timeoutMillis int

Timeout to use for this call.

Returns
TypeDescription
Google\ApiCore\ServerStream

readTensorboardTimeSeriesData

Reads a TensorboardTimeSeries' data. By default, if the number of data points stored is less than 1000, all data will be returned. Otherwise, 1000 data points will be randomly selected from this time series and returned.

This value can be changed by changing max_data_points, which can't be greater than 10k.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedTensorboardTimeSeries = $tensorboardServiceClient->tensorboardTimeSeriesName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]', '[TIME_SERIES]');
    $response = $tensorboardServiceClient->readTensorboardTimeSeriesData($formattedTensorboardTimeSeries);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
tensorboardTimeSeries string

Required. The resource name of the TensorboardTimeSeries to read data from. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

optionalArgs array

Optional.

↳ maxDataPoints int

The maximum number of TensorboardTimeSeries' data to return. This value should be a positive integer. This value can be set to -1 to return all data.

↳ filter string

Reads the TensorboardTimeSeries' data that match the filter expression.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\ReadTensorboardTimeSeriesDataResponse

updateTensorboard

Updates a Tensorboard.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $updateMask = new FieldMask();
    $tensorboard = new Tensorboard();
    $operationResponse = $tensorboardServiceClient->updateTensorboard($updateMask, $tensorboard);
    $operationResponse->pollUntilComplete();
    if ($operationResponse->operationSucceeded()) {
        $result = $operationResponse->getResult();
    // doSomethingWith($result)
    } else {
        $error = $operationResponse->getError();
        // handleError($error)
    }
    // Alternatively:
    // start the operation, keep the operation name, and resume later
    $operationResponse = $tensorboardServiceClient->updateTensorboard($updateMask, $tensorboard);
    $operationName = $operationResponse->getName();
    // ... do other work
    $newOperationResponse = $tensorboardServiceClient->resumeOperation($operationName, 'updateTensorboard');
    while (!$newOperationResponse->isDone()) {
        // ... do other work
        $newOperationResponse->reload();
    }
    if ($newOperationResponse->operationSucceeded()) {
        $result = $newOperationResponse->getResult();
    // doSomethingWith($result)
    } else {
        $error = $newOperationResponse->getError();
        // handleError($error)
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
updateMask Google\Protobuf\FieldMask

Required. Field mask is used to specify the fields to be overwritten in the Tensorboard resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten if new values are specified.

tensorboard Google\Cloud\AIPlatform\V1\Tensorboard

Required. The Tensorboard's name field is used to identify the Tensorboard to be updated. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

updateTensorboardExperiment

Updates a TensorboardExperiment.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $updateMask = new FieldMask();
    $tensorboardExperiment = new TensorboardExperiment();
    $response = $tensorboardServiceClient->updateTensorboardExperiment($updateMask, $tensorboardExperiment);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
updateMask Google\Protobuf\FieldMask

Required. Field mask is used to specify the fields to be overwritten in the TensorboardExperiment resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten if new values are specified.

tensorboardExperiment Google\Cloud\AIPlatform\V1\TensorboardExperiment

Required. The TensorboardExperiment's name field is used to identify the TensorboardExperiment to be updated. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\TensorboardExperiment

updateTensorboardRun

Updates a TensorboardRun.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $updateMask = new FieldMask();
    $tensorboardRun = new TensorboardRun();
    $response = $tensorboardServiceClient->updateTensorboardRun($updateMask, $tensorboardRun);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
updateMask Google\Protobuf\FieldMask

Required. Field mask is used to specify the fields to be overwritten in the TensorboardRun resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten if new values are specified.

tensorboardRun Google\Cloud\AIPlatform\V1\TensorboardRun

Required. The TensorboardRun's name field is used to identify the TensorboardRun to be updated. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\TensorboardRun

updateTensorboardTimeSeries

Updates a TensorboardTimeSeries.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $updateMask = new FieldMask();
    $tensorboardTimeSeries = new TensorboardTimeSeries();
    $response = $tensorboardServiceClient->updateTensorboardTimeSeries($updateMask, $tensorboardTimeSeries);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
updateMask Google\Protobuf\FieldMask

Required. Field mask is used to specify the fields to be overwritten in the TensorboardTimeSeries resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten if new values are specified.

tensorboardTimeSeries Google\Cloud\AIPlatform\V1\TensorboardTimeSeries

Required. The TensorboardTimeSeries' name field is used to identify the TensorboardTimeSeries to be updated. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\TensorboardTimeSeries

writeTensorboardExperimentData

Write time series data points of multiple TensorboardTimeSeries in multiple TensorboardRun's. If any data fail to be ingested, an error will be returned.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedTensorboardExperiment = $tensorboardServiceClient->tensorboardExperimentName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]');
    $writeRunDataRequests = [];
    $response = $tensorboardServiceClient->writeTensorboardExperimentData($formattedTensorboardExperiment, $writeRunDataRequests);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
tensorboardExperiment string

Required. The resource name of the TensorboardExperiment to write data to. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

writeRunDataRequests array<Google\Cloud\AIPlatform\V1\WriteTensorboardRunDataRequest>

Required. Requests containing per-run TensorboardTimeSeries data to write.

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\WriteTensorboardExperimentDataResponse

writeTensorboardRunData

Write time series data points into multiple TensorboardTimeSeries under a TensorboardRun. If any data fail to be ingested, an error will be returned.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $formattedTensorboardRun = $tensorboardServiceClient->tensorboardRunName('[PROJECT]', '[LOCATION]', '[TENSORBOARD]', '[EXPERIMENT]', '[RUN]');
    $timeSeriesData = [];
    $response = $tensorboardServiceClient->writeTensorboardRunData($formattedTensorboardRun, $timeSeriesData);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
tensorboardRun string

Required. The resource name of the TensorboardRun to write data to. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

timeSeriesData array<Google\Cloud\AIPlatform\V1\TimeSeriesData>

Required. The TensorboardTimeSeries data to write. Values with in a time series are indexed by their step value. Repeated writes to the same step will overwrite the existing value for that step. The upper limit of data points per write request is 5000.

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\WriteTensorboardRunDataResponse

getLocation

Gets information about a location.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $response = $tensorboardServiceClient->getLocation();
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
optionalArgs array

Optional.

↳ name string

Resource name for the location.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\Location\Location

listLocations

Lists information about the supported locations for this service.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    // Iterate over pages of elements
    $pagedResponse = $tensorboardServiceClient->listLocations();
    foreach ($pagedResponse->iteratePages() as $page) {
        foreach ($page as $element) {
            // doSomethingWith($element);
        }
    }
    // Alternatively:
    // Iterate through all elements
    $pagedResponse = $tensorboardServiceClient->listLocations();
    foreach ($pagedResponse->iterateAllElements() as $element) {
        // doSomethingWith($element);
    }
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
optionalArgs array

Optional.

↳ name string

The resource that owns the locations collection, if applicable.

↳ filter string

The standard list filter.

↳ pageSize int

The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.

↳ pageToken string

A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse

getIamPolicy

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $resource = 'resource';
    $response = $tensorboardServiceClient->getIamPolicy($resource);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
resource string

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

optionalArgs array

Optional.

↳ options GetPolicyOptions

OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\Iam\V1\Policy

setIamPolicy

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $resource = 'resource';
    $policy = new Policy();
    $response = $tensorboardServiceClient->setIamPolicy($resource, $policy);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
resource string

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Google\Cloud\Iam\V1\Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

optionalArgs array

Optional.

↳ updateMask FieldMask

OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag"

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\Iam\V1\Policy

testIamPermissions

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Sample code:

$tensorboardServiceClient = new TensorboardServiceClient();
try {
    $resource = 'resource';
    $permissions = [];
    $response = $tensorboardServiceClient->testIamPermissions($resource, $permissions);
} finally {
    $tensorboardServiceClient->close();
}
Parameters
NameDescription
resource string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions string[]

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

optionalArgs array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.

Returns
TypeDescription
Google\Cloud\Iam\V1\TestIamPermissionsResponse

Constants

SERVICE_NAME

Value: 'google.cloud.aiplatform.v1.TensorboardService'

The name of the service.

SERVICE_ADDRESS

Value: 'aiplatform.googleapis.com'

The default address of the service.

DEFAULT_SERVICE_PORT

Value: 443

The default port of the service.

CODEGEN_NAME

Value: 'gapic'

The name of the code generator, to be included in the agent header.