How do I stop using a Flex for App Engine instance?

I am using the Google Cloud free trial and I am almost halfway through the free credit. I don't know if I am doing something wrong, or if it just costs more than I expected, so I looked at the price and realized I didn't understand much of it. I'm just learning and having fun, so I don't really want to spend money (or at least not that much), so anything to help make free loans last year would be great :)

https://firebase.google.com/pricing/

What I did with my function was to get information from Firebase database for notifications and then send notification using Firebase Messaging. Here's the code if it helps.

'use strict';

const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);

exports.sendNotifications = functions.database.ref('/Notifications/{pushID}/title')
  .onWrite(event => {

    if (!event.data.exists())
      return;

    event.data.ref.parent.once('value').then(function(dataSnapshot){

      // Grab the eventName and the message
      const title = dataSnapshot.child('title').val();
      const message = dataSnapshot.child('message').val();
      const recipients = dataSnapshot.child('recipients').val();
      const tag = dataSnapshot.child('tag').val();

      const payload = {
        notification:{
          title: title,
          body: message,
          tag: tag,
          color: "#51E0F5",
          sound: 'default'
        },
      };

      const options = {
        priority: 'high',
        collapseKey: 'chat',
        timeToLive: 3600    // 6 days
      };

      // Get rid of this Notification in Firebase
      event.data.ref.parent.remove();

      // Create notification
      if (recipients != null)
      {
        return admin.messaging().sendToDevice(recipients, payload, options);
      }
      else
      {
        return;
      }
    });
  })

      

As per transactions, I used

  • App Engine Flex Instance RAM: 1932.033 Gibibyte-hours
  • App Engine Core Instance Clock: 1932.033 Clock

How do I stop using a Flex for App Engine instance? What is it? Or it's time to look for a replacement before they start charging my card.

Thank!

+3


source to share


2 answers


You can stop all instances in flexible application engine by stopping VERSION. I use this all the time for development - there is no point in keeping things at night.



Go to the Google Cloud Platform Console, select an app, and then select a version. Check the version you want to stop and then click the Stop button at the top. Please note, you cannot delete DELETE your latest version, but you can stop it :) This disables all instances.

+6


source


you cannot stop a flexible App Engine instance. You will always have one copy.

Please see the following message

Google Appengine: budget and daily spending cap don't work



This question is also related to billing and pricing by appengine

Hello

Michael

+1


source







All Articles