class ProjectsLocationsInstances extends Resource (View source)

The "instances" collection of methods.

Typical usage is:

 $firebasedatabaseService = new Google\Service\FirebaseRealtimeDatabase(...);
 $instances = $firebasedatabaseService->projects_locations_instances;

Methods

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

Requests that a new DatabaseInstance be created. The state of a successfully created DatabaseInstance is ACTIVE. Only available for projects on the Blaze plan. Projects can be upgraded using the Cloud Billing API https://cloud.goog le.com/billing/reference/rest/v1/projects/updateBillingInfo. Note that it might take a few minutes for billing enablement state to propagate to Firebase systems. (instances.create)

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

Marks a DatabaseInstance to be deleted. The DatabaseInstance will be set to the DELETED state for 20 days, and will be purged within 30 days. The default database cannot be deleted. IDs for deleted database instances may never be recovered or re-used. The Database may only be deleted if it is already in a DISABLED state. (instances.delete)

disable(string $name, DisableDatabaseInstanceRequest $postBody, array $optParams = [])

Disables a DatabaseInstance. The database can be re-enabled later using ReenableDatabaseInstance. When a database is disabled, all reads and writes are denied, including view access in the Firebase console.

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

Gets the DatabaseInstance identified by the specified resource name.

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

Lists each DatabaseInstance associated with the specified parent project. The list items are returned in no particular order, but will be a consistent view of the database instances when additional requests are made with a pageToken. The resulting list contains instances in any STATE. The list results may be stale by a few seconds. Use GetDatabaseInstance for consistent reads. (instances.listProjectsLocationsInstances)

reenable(string $name, ReenableDatabaseInstanceRequest $postBody, array $optParams = [])

Enables a DatabaseInstance. The database must have been disabled previously using DisableDatabaseInstance. The state of a successfully reenabled DatabaseInstance is ACTIVE. (instances.reenable)

undelete(string $name, UndeleteDatabaseInstanceRequest $postBody, array $optParams = [])

Restores a DatabaseInstance that was previously marked to be deleted. After the delete method is used, DatabaseInstances are set to the DELETED state for 20 days, and will be purged within 30 days. Databases in the DELETED state can be undeleted without losing any data. This method may only be used on a DatabaseInstance in the DELETED state. Purged DatabaseInstances may not be recovered. (instances.undelete)

Details

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

Requests that a new DatabaseInstance be created. The state of a successfully created DatabaseInstance is ACTIVE. Only available for projects on the Blaze plan. Projects can be upgraded using the Cloud Billing API https://cloud.goog le.com/billing/reference/rest/v1/projects/updateBillingInfo. Note that it might take a few minutes for billing enablement state to propagate to Firebase systems. (instances.create)

Parameters

string $parent

Required. The parent project for which to create a database instance, in the form: projects/{project- number}/locations/{location-id}.

DatabaseInstance $postBody
array $optParams

Optional parameters.

Return Value

DatabaseInstance

Exceptions

Exception

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

Marks a DatabaseInstance to be deleted. The DatabaseInstance will be set to the DELETED state for 20 days, and will be purged within 30 days. The default database cannot be deleted. IDs for deleted database instances may never be recovered or re-used. The Database may only be deleted if it is already in a DISABLED state. (instances.delete)

Parameters

string $name

Required. The fully qualified resource name of the database instance, in the form: projects/{project- number}/locations/{location-id}/instances/{database-id}

array $optParams

Optional parameters.

Return Value

DatabaseInstance

Exceptions

Exception

DatabaseInstance disable(string $name, DisableDatabaseInstanceRequest $postBody, array $optParams = [])

Disables a DatabaseInstance. The database can be re-enabled later using ReenableDatabaseInstance. When a database is disabled, all reads and writes are denied, including view access in the Firebase console.

(instances.disable)

Parameters

string $name

Required. The fully qualified resource name of the database instance, in the form: projects/{project- number}/locations/{location-id}/instances/{database-id}

DisableDatabaseInstanceRequest $postBody
array $optParams

Optional parameters.

Return Value

DatabaseInstance

Exceptions

Exception

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

Gets the DatabaseInstance identified by the specified resource name.

(instances.get)

Parameters

string $name

Required. The fully qualified resource name of the database instance, in the form: projects/{project- number}/locations/{location-id}/instances/{database-id}. database-id is a globally unique identifier across all parent collections. For convenience, this method allows you to supply - as a wildcard character in place of specific collections under projects and locations. The resulting wildcarding form of the method is: projects/-/locations/-/instances/{database-id}.

array $optParams

Optional parameters.

Return Value

DatabaseInstance

Exceptions

Exception

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

Lists each DatabaseInstance associated with the specified parent project. The list items are returned in no particular order, but will be a consistent view of the database instances when additional requests are made with a pageToken. The resulting list contains instances in any STATE. The list results may be stale by a few seconds. Use GetDatabaseInstance for consistent reads. (instances.listProjectsLocationsInstances)

Parameters

string $parent

Required. The parent project for which to list database instances, in the form: projects/{project-number}/locations/{location-id} To list across all locations, use a parent in the form: projects/{project- number}/locations/-

array $optParams

Optional parameters.

Return Value

ListDatabaseInstancesResponse

Exceptions

Exception

DatabaseInstance reenable(string $name, ReenableDatabaseInstanceRequest $postBody, array $optParams = [])

Enables a DatabaseInstance. The database must have been disabled previously using DisableDatabaseInstance. The state of a successfully reenabled DatabaseInstance is ACTIVE. (instances.reenable)

Parameters

string $name

Required. The fully qualified resource name of the database instance, in the form: projects/{project- number}/locations/{location-id}/instances/{database-id}

ReenableDatabaseInstanceRequest $postBody
array $optParams

Optional parameters.

Return Value

DatabaseInstance

Exceptions

Exception

DatabaseInstance undelete(string $name, UndeleteDatabaseInstanceRequest $postBody, array $optParams = [])

Restores a DatabaseInstance that was previously marked to be deleted. After the delete method is used, DatabaseInstances are set to the DELETED state for 20 days, and will be purged within 30 days. Databases in the DELETED state can be undeleted without losing any data. This method may only be used on a DatabaseInstance in the DELETED state. Purged DatabaseInstances may not be recovered. (instances.undelete)

Parameters

string $name

Required. The fully qualified resource name of the database instance, in the form: projects/{project- number}/locations/{location-id}/instances/{database-id}

UndeleteDatabaseInstanceRequest $postBody
array $optParams

Optional parameters.

Return Value

DatabaseInstance

Exceptions

Exception