Sha256: 86955cedb410cea404f84786648caeddd9c33a73cafa77d6f8a35e0671172d6a

Contents?: true

Size: 795 Bytes

Versions: 14

Compression:

Stored size: 795 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, options = {})
          instance = ::Google::Apis::SqladminV1beta4::DatabaseInstance.new(**options)
          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 = {})
          # :no-coverage:
          Fog::Mock.not_implemented
          # :no-coverage:
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-1.24.1 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.24.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.23.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.22.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.21.1 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.21.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.20.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.19.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.18.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.17.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.16.1 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.16.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.15.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.14.0 lib/fog/google/requests/sql/insert_instance.rb