Sha256: 5d924368eac48a5f5fc3313a4d2eed1aec9de19a699919a821e6acba85c63346

Contents?: true

Size: 791 Bytes

Versions: 7

Compression:

Stored size: 791 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

7 entries across 7 versions & 2 rubygems

Version Path
gitlab-fog-google-1.14.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.13.0 lib/fog/google/requests/sql/insert_instance.rb
gitlab-fog-google-1.13.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.12.1 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.12.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.11.0 lib/fog/google/requests/sql/insert_instance.rb
fog-google-1.10.0 lib/fog/google/requests/sql/insert_instance.rb