Sha256: a3c95e5da76e27c87e5882388766ba6dc6657ff91bb7c903d91e0e5f968c3f51

Contents?: true

Size: 741 Bytes

Versions: 12

Compression:

Stored size: 741 Bytes

Contents

module Fog
  module Google
    class SQL
      ##
      # Creates a new Cloud SQL instance
      #
      # @see https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances/insert

      class Real
        def insert_instance(name, tier, instance = {})
          instance = ::Google::Apis::SqladminV1beta4::DatabaseInstance.new(instance)
          instance.name = name
          instance.settings = ::Google::Apis::SqladminV1beta4::Settings.new(instance.settings || {})
          instance.settings.tier = tier
          @sql.insert_instance(@project, instance)
        end
      end

      class Mock
        def insert_instance(_name, _tier, _options = {})
          Fog::Mock.not_implemented
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fog-google-1.5.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.4.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.3.3 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.3.2 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.3.1 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.3.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.2.2 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.2.1 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.2.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.1.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.0.1 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.0.0 lib/fog/google/requests/sql/insert_instance.rb