Class: Google::Apis::FirebasedatabaseV1beta::FirebaseRealtimeDatabaseService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::FirebasedatabaseV1beta::FirebaseRealtimeDatabaseService
- Defined in:
- lib/google/apis/firebasedatabase_v1beta/service.rb
Overview
Firebase Realtime Database API
The Firebase Realtime Database API enables programmatic provisioning and management of Realtime Database instances.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://firebasedatabase.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_project_location_instance(parent, database_instance_object = nil, database_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
Requests that a new DatabaseInstance be created.
-
#delete_project_location_instance(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
Marks a DatabaseInstance to be deleted.
-
#disable_database_instance(name, disable_database_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
Disables a DatabaseInstance.
-
#get_project_location_instance(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
Gets the DatabaseInstance identified by the specified resource name.
-
#initialize ⇒ FirebaseRealtimeDatabaseService
constructor
A new instance of FirebaseRealtimeDatabaseService.
-
#list_project_location_instances(parent, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::ListDatabaseInstancesResponse
Lists each DatabaseInstance associated with the specified parent project.
-
#reenable_database_instance(name, reenable_database_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
Enables a DatabaseInstance.
-
#undelete_database_instance(name, undelete_database_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
Restores a DatabaseInstance that was previously marked to be deleted.
Constructor Details
#initialize ⇒ FirebaseRealtimeDatabaseService
Returns a new instance of FirebaseRealtimeDatabaseService.
48 49 50 51 52 53 |
# File 'lib/google/apis/firebasedatabase_v1beta/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-firebasedatabase_v1beta', client_version: Google::Apis::FirebasedatabaseV1beta::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
41 42 43 |
# File 'lib/google/apis/firebasedatabase_v1beta/service.rb', line 41 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
46 47 48 |
# File 'lib/google/apis/firebasedatabase_v1beta/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#create_project_location_instance(parent, database_instance_object = nil, database_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
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. google.com/billing/reference/rest/v1/projects/updateBillingInfo. Note that it might take a few minutes for billing enablement state to propagate to Firebase systems.
86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/google/apis/firebasedatabase_v1beta/service.rb', line 86 def create_project_location_instance(parent, database_instance_object = nil, database_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta/{+parent}/instances', ) command.request_representation = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance::Representation command.request_object = database_instance_object command.response_representation = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance::Representation command.response_class = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance command.params['parent'] = parent unless parent.nil? command.query['databaseId'] = database_id unless database_id.nil? command.query['validateOnly'] = validate_only unless validate_only.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_location_instance(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
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.
126 127 128 129 130 131 132 133 134 |
# File 'lib/google/apis/firebasedatabase_v1beta/service.rb', line 126 def delete_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta/{+name}', ) command.response_representation = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance::Representation command.response_class = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#disable_database_instance(name, disable_database_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
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.
161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/google/apis/firebasedatabase_v1beta/service.rb', line 161 def disable_database_instance(name, disable_database_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta/{+name}:disable', ) command.request_representation = Google::Apis::FirebasedatabaseV1beta::DisableDatabaseInstanceRequest::Representation command.request_object = disable_database_instance_request_object command.response_representation = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance::Representation command.response_class = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_instance(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
Gets the DatabaseInstance identified by the specified resource name.
199 200 201 202 203 204 205 206 207 |
# File 'lib/google/apis/firebasedatabase_v1beta/service.rb', line 199 def get_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta/{+name}', ) command.response_representation = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance::Representation command.response_class = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_location_instances(parent, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::ListDatabaseInstancesResponse
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.
244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/google/apis/firebasedatabase_v1beta/service.rb', line 244 def list_project_location_instances(parent, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta/{+parent}/instances', ) command.response_representation = Google::Apis::FirebasedatabaseV1beta::ListDatabaseInstancesResponse::Representation command.response_class = Google::Apis::FirebasedatabaseV1beta::ListDatabaseInstancesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['showDeleted'] = show_deleted unless show_deleted.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reenable_database_instance(name, reenable_database_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
Enables a DatabaseInstance. The database must have been disabled previously using DisableDatabaseInstance. The state of a successfully reenabled DatabaseInstance is ACTIVE.
282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/google/apis/firebasedatabase_v1beta/service.rb', line 282 def reenable_database_instance(name, reenable_database_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta/{+name}:reenable', ) command.request_representation = Google::Apis::FirebasedatabaseV1beta::ReenableDatabaseInstanceRequest::Representation command.request_object = reenable_database_instance_request_object command.response_representation = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance::Representation command.response_class = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#undelete_database_instance(name, undelete_database_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasedatabaseV1beta::DatabaseInstance
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.
322 323 324 325 326 327 328 329 330 331 332 |
# File 'lib/google/apis/firebasedatabase_v1beta/service.rb', line 322 def undelete_database_instance(name, undelete_database_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta/{+name}:undelete', ) command.request_representation = Google::Apis::FirebasedatabaseV1beta::UndeleteDatabaseInstanceRequest::Representation command.request_object = undelete_database_instance_request_object command.response_representation = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance::Representation command.response_class = Google::Apis::FirebasedatabaseV1beta::DatabaseInstance command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |