Class: Google::Apis::FirebasedatabaseV1beta::FirebaseRealtimeDatabaseService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::FirebasedatabaseV1beta::FirebaseRealtimeDatabaseService
- Defined in:
- generated/google/apis/firebasedatabase_v1beta/service.rb
Overview
Firebase Realtime Database Management API
The Firebase Realtime Database Management API enables programmatic provisioning and management of Realtime Database instances.
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, 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.
Constructor Details
#initialize ⇒ FirebaseRealtimeDatabaseService
Returns a new instance of FirebaseRealtimeDatabaseService.
46 47 48 49 |
# File 'generated/google/apis/firebasedatabase_v1beta/service.rb', line 46 def initialize super('https://firebasedatabase.googleapis.com/', '') @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.
39 40 41 |
# File 'generated/google/apis/firebasedatabase_v1beta/service.rb', line 39 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.
44 45 46 |
# File 'generated/google/apis/firebasedatabase_v1beta/service.rb', line 44 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.
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'generated/google/apis/firebasedatabase_v1beta/service.rb', line 82 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 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.
120 121 122 123 124 125 126 127 128 |
# File 'generated/google/apis/firebasedatabase_v1beta/service.rb', line 120 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.
154 155 156 157 158 159 160 161 162 163 164 |
# File 'generated/google/apis/firebasedatabase_v1beta/service.rb', line 154 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.
192 193 194 195 196 197 198 199 200 |
# File 'generated/google/apis/firebasedatabase_v1beta/service.rb', line 192 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, 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.
235 236 237 238 239 240 241 242 243 244 245 |
# File 'generated/google/apis/firebasedatabase_v1beta/service.rb', line 235 def list_project_location_instances(parent, page_size: nil, page_token: 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['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.
271 272 273 274 275 276 277 278 279 280 281 |
# File 'generated/google/apis/firebasedatabase_v1beta/service.rb', line 271 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 |