Class: Fog::Sql::AzureRM::SqlDatabases
- Inherits:
-
Collection
- Object
- Collection
- Fog::Sql::AzureRM::SqlDatabases
- Defined in:
- lib/fog/azurerm/models/sql/sql_databases.rb
Overview
Sql Server Collection for Database Service
Instance Method Summary collapse
- #all ⇒ Object
- #check_database_exists(resource_group, server_name, name) ⇒ Object
- #get(resource_group, server_name, name) ⇒ Object
Instance Method Details
#all ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/fog/azurerm/models/sql/sql_databases.rb', line 10 def all requires :resource_group, :server_name databases = [] service.list_databases(resource_group, server_name).each do |database| databases << Fog::Sql::AzureRM::SqlDatabase.parse(database) end load(databases) end |
#check_database_exists(resource_group, server_name, name) ⇒ Object
26 27 28 |
# File 'lib/fog/azurerm/models/sql/sql_databases.rb', line 26 def check_database_exists(resource_group, server_name, name) service.check_database_exists(resource_group, server_name, name) end |
#get(resource_group, server_name, name) ⇒ Object
20 21 22 23 24 |
# File 'lib/fog/azurerm/models/sql/sql_databases.rb', line 20 def get(resource_group, server_name, name) database = service.get_database(resource_group, server_name, name) database_fog = Fog::Sql::AzureRM::SqlDatabase.new(service: service) database_fog.merge_attributes(Fog::Sql::AzureRM::SqlDatabase.parse(database)) end |