class ProjectsLocationsInstances extends Resource (View source)

The "instances" collection of methods.

Typical usage is:

 $notebooksService = new Google\Service\AIPlatformNotebooks(...);
 $instances = $notebooksService->projects_locations_instances;

Methods

checkUpgradability(string $notebookInstance, array $optParams = [])

Checks whether a notebook instance is upgradable.

create(string $parent, Instance $postBody, array $optParams = [])

Creates a new Instance in a given project and location. (instances.create)

delete(string $name, array $optParams = [])

Deletes a single Instance. (instances.delete)

diagnose(string $name, DiagnoseInstanceRequest $postBody, array $optParams = [])

Creates a Diagnostic File and runs Diagnostic Tool given an Instance.

get(string $name, array $optParams = [])

Gets details of a single Instance. (instances.get)

getConfig(string $name, array $optParams = [])

Gets general backend configurations that might also affect the frontend.

getIamPolicy(string $resource, array $optParams = [])

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

listProjectsLocationsInstances(string $parent, array $optParams = [])

Lists instances in a given project and location.

patch(string $name, Instance $postBody, array $optParams = [])

UpdateInstance updates an Instance. (instances.patch)

reportInfoSystem(string $name, ReportInstanceInfoSystemRequest $postBody, array $optParams = [])

Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.

reset(string $name, ResetInstanceRequest $postBody, array $optParams = [])

Resets a notebook instance. (instances.reset)

resizeDisk(string $notebookInstance, ResizeDiskRequest $postBody, array $optParams = [])

Resize a notebook instance disk to a higher capacity. (instances.resizeDisk)

rollback(string $name, RollbackInstanceRequest $postBody, array $optParams = [])

Rollbacks a notebook instance to the previous version. (instances.rollback)

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (instances.setIamPolicy)

start(string $name, StartInstanceRequest $postBody, array $optParams = [])

Starts a notebook instance. (instances.start)

stop(string $name, StopInstanceRequest $postBody, array $optParams = [])

Stops a notebook instance. (instances.stop)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

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.

upgrade(string $name, UpgradeInstanceRequest $postBody, array $optParams = [])

Upgrades a notebook instance to the latest version. (instances.upgrade)

upgradeSystem(string $name, UpgradeInstanceSystemRequest $postBody, array $optParams = [])

Allows notebook instances to upgrade themselves. Do not use this method directly. (instances.upgradeSystem)

Details

CheckInstanceUpgradabilityResponse checkUpgradability(string $notebookInstance, array $optParams = [])

Checks whether a notebook instance is upgradable.

(instances.checkUpgradability)

Parameters

string $notebookInstance

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

array $optParams

Optional parameters.

Return Value

CheckInstanceUpgradabilityResponse

Exceptions

Exception

Operation create(string $parent, Instance $postBody, array $optParams = [])

Creates a new Instance in a given project and location. (instances.create)

Parameters

string $parent

Required. Format: parent=projects/{project_id}/locations/{location}

Instance $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation delete(string $name, array $optParams = [])

Deletes a single Instance. (instances.delete)

Parameters

string $name

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation diagnose(string $name, DiagnoseInstanceRequest $postBody, array $optParams = [])

Creates a Diagnostic File and runs Diagnostic Tool given an Instance.

(instances.diagnose)

Parameters

string $name

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

DiagnoseInstanceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Instance get(string $name, array $optParams = [])

Gets details of a single Instance. (instances.get)

Parameters

string $name

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

array $optParams

Optional parameters.

Return Value

Instance

Exceptions

Exception

Config getConfig(string $name, array $optParams = [])

Gets general backend configurations that might also affect the frontend.

Location is required by CCFE. Although we could bypass it to send location- less request directly to the backend job, we would need CPE (go/cloud-cpe). Having the location might also be useful depending on the query. (instances.getConfig)

Parameters

string $name

Required. Format: projects/{project_id}/locations/{location}

array $optParams

Optional parameters.

Return Value

Config

Exceptions

Exception

Policy getIamPolicy(string $resource, array $optParams = [])

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

Parameters

string $resource

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

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListInstancesResponse listProjectsLocationsInstances(string $parent, array $optParams = [])

Lists instances in a given project and location.

(instances.listProjectsLocationsInstances)

Parameters

string $parent

Required. Format: parent=projects/{project_id}/locations/{location}

array $optParams

Optional parameters.

Return Value

ListInstancesResponse

Exceptions

Exception

Operation patch(string $name, Instance $postBody, array $optParams = [])

UpdateInstance updates an Instance. (instances.patch)

Parameters

string $name

Output only. The name of this notebook instance. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

Instance $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation reportInfoSystem(string $name, ReportInstanceInfoSystemRequest $postBody, array $optParams = [])

Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.

(instances.reportInfoSystem)

Parameters

string $name

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

ReportInstanceInfoSystemRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation reset(string $name, ResetInstanceRequest $postBody, array $optParams = [])

Resets a notebook instance. (instances.reset)

Parameters

string $name

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

ResetInstanceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation resizeDisk(string $notebookInstance, ResizeDiskRequest $postBody, array $optParams = [])

Resize a notebook instance disk to a higher capacity. (instances.resizeDisk)

Parameters

string $notebookInstance

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

ResizeDiskRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation rollback(string $name, RollbackInstanceRequest $postBody, array $optParams = [])

Rollbacks a notebook instance to the previous version. (instances.rollback)

Parameters

string $name

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

RollbackInstanceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (instances.setIamPolicy)

Parameters

string $resource

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

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

Operation start(string $name, StartInstanceRequest $postBody, array $optParams = [])

Starts a notebook instance. (instances.start)

Parameters

string $name

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

StartInstanceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation stop(string $name, StopInstanceRequest $postBody, array $optParams = [])

Stops a notebook instance. (instances.stop)

Parameters

string $name

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

StopInstanceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

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. (instances.testIamPermissions)

Parameters

string $resource

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

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception

Operation upgrade(string $name, UpgradeInstanceRequest $postBody, array $optParams = [])

Upgrades a notebook instance to the latest version. (instances.upgrade)

Parameters

string $name

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

UpgradeInstanceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation upgradeSystem(string $name, UpgradeInstanceSystemRequest $postBody, array $optParams = [])

Allows notebook instances to upgrade themselves. Do not use this method directly. (instances.upgradeSystem)

Parameters

string $name

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

UpgradeInstanceSystemRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception