Google App Engine: Unable to find 'increasing daily budget' - google-app-engine

I can't find it.
https://cloud.google.com/appengine/pricing talks about it but doesn't say where.
This one says it's in the billing section, but the billing section lists my billing accounts and inside an account I can't find it either.

Using the new console, you can change your billing from your App Engine settings:
https://console.developers.google.com/project/your-app-id/appengine/settings
Make sure you've linked your project to a billing account. To do this, head over to your project-level settings:
https://console.developers.google.com/project/your-app-id/settings
If that still doesn't work, try the old console:
https://appengine.google.com/billing/billing_status?&app_id=s~your-app-id.
You must prepend the "s~" to your App ID in the old console URL if your app uses High Replication Datastore (very likely).

Related

Why does the App Engine API return different domain-mappings depending on the user?

I created App Engine custom domains with my own GCP user account.
If I run this command as that user I see a resourceRecords: field with all the A and AAAA records:
gcloud app domain-mappings describe 'mydom.com'
If I run the SAME command as a different user (one that has app engine admin and viewer roles) I see the resourceRecords: field with only a CNAME record. Why is this?
No permissions errors, no other errors. The SAME command run by different users returns different values from the describe API.
This behavior is unexpected. How/why is this happening?
I run Terraform centrally with a GSA. That GSA is getting different data from the API because of whatever this behavior is doing plans return incorrect info.
EDIT:
There is now an official bug report for this (please star it!) https://issuetracker.google.com/issues/207364598
I found the reason for this frustratingly bizarre and unhelpful and poorly documented behavior.
I found the issue through this SO post: How to use Terraform `google_app_engine_domain_mapping` with service account?
If you are not an "owner" for the domain as defined here the API will indeed not return the IP address list and also not bother throwing any kind of helpful warning message.
While my question wasn't terraform specific it looks like you might be able to terraform the whole thing with the help of this custom provider: https://github.com/hectorj/terraform-provider-googlesiteverification.
Also, I tried adding the email of a google group as an owner and that did not seem to work. Individual users must be added.
There is an official bug for this (please star so google fixes it!): https://issuetracker.google.com/issues/207364598

Google app engine own domain

Im having trouble with Google App Engine and using my own domain. I have a domain that i'm also using in Google Apps for Work.
I have connected my GAE project in Google Apps so they are linked.
I have added my custom domain in GAE, verified ownership and it seems to be correct.
Here is a picture of the GAE settings.
And on Google Apps for work.
The other setting I know I have to do is on my domain registrar. I have added the records from GAE, from the picture I uploaded.
Im using one.com as a domain registrar and my DNS settings look like this:
Am I doing something wrong that you can see directly like "Hey what's this guy doing lol" or does it seem correct at first sight?
Thankful for any help in the right direction.
#
EDIT:
After following the tip from comment, I have verified and mapped the domain "lkpgpremiumcars.com". And added "beta" as subdomain. My "Custom domains" looks the same (like below):
I also removed A and AAAA-records and added a CNAME.
Waiting for DNS update to see if it works.
EDIT 2:
Still dont work.
BTW is it normal behavior that if I select the same subdomain again it says this:
Or is is just because it already points to this app?
You'll need to add this as a sub-domain.
First remove the custom domain (beta.lkpgpremiumcars.com) from the developers console.
Remove the A and AAAA records that you've added to the DNS.
Follow the instructions here and on step 1, only add the domain 'lkpgpremiumcars.com' and verify. This doesn't mean you're pointing the naked domain to your application.
Once it's verified, refresh the page and now you should have the domain available on step 2.
Select the second option on step 2, put 'beta' on the text box and select the previously added domain from the drop down beside. Click Add.
Go back to your DNS settings and add a CNAME record for 'beta' pointing to 'ghs.googlehosted.com.
Allow some time for propagation and it should work!

Can't add new hostname to google app engine

I am trying to add my new hostname "www.malaysiakini.com" to google app engine web address, but it fail to do so.
I was mapped my hostname to google pagespeed since last year. And i already remove google pagespeed service from the project list today.
I thought the hostname is now not being use by any service. Then, i tried to add the hostname into google app engine web address, i get the error message showing "Already used, please remove previous mapping first".
Can anyone help me on this?
I dont think you can use that name again, even if you deleted that app or the name.appspot.com domain seems not to exist. I think Google keeps a list of used app-names and I dont know if it's possible to delete an unused name from that list after you registered it, even if you deleted the app itself.
If you go to: https://appengine.google.com/settings?app_id=YOUR_APP_ID
You should be able to see a button: "Add Domain" click on it and it will take you into the process of assign your own domain for this specific project.

Connecting to Prediction API from Google API Consol using service account

I am trying to use the Google Prediction API for the first time.
I am just following the steps given in the article https://developers.google.com/appengine/articles/prediction_service_accounts.
I am getting a strange problem while executing step 2.4 in the above mentioned article.
I have followed the steps as below.
1) I have an application created in say xyz.com domain, and I have service account name of my application as "myapp#appspot.gserviceaccount.com".
2) Then I went to "Team" tab on the Google API Console, and tried to add the service account name of my application, to the project in which I have activated Prediction API and Google Cloud Storage.
While adding the serivce account to the project it gives me an error saying that
"Only users in domain xyz.com may be added to the project".
The same kind of message is also displayed on the bottom of the "Team" tab.
xyz.com is the domain in wich my application is deployed.
Could any one please help me understand why this kind of message is comming?
Are there any domain level admin settings required to add the service account to the Google Console API project?
Regards,
Nirzari
Currently, if you created a project with your Apps account, you can only add members of that same domain.
What you'll have to do is create a new project from something like xxx#gmail.com account (NOT your Apps domain account). You can then add both #appspot.gserviceaccount.com and yourself#xyz.com.
I think you can even remove xxx#gmail.com later on, once you've added yourself#xyz.com. Even activate billing for yourself#xyz.com, not xxx#gmail.com, if you need to.
Take from https://developers.google.com/appengine/docs/python/googlestorage/overview
You can modify the ACL of the bucket manually:
An alternate way to grant app access to a bucket is manually edit and set the bucket ACL and the default object ACL, using the gsutil utility:
Get the ACL for the bucket and save it to a file for editing: gsutil getacl gs://mybucket > myAcl.txt
Add the following Entry to the ACL file you just retrieved:
<Entry>
<Scope type="UserByEmail">
<EmailAddress>
your-application-id#appspot.gserviceaccount.com
</EmailAddress>
</Scope>
<Permission>
WRITE
</Permission>
</Entry>
If you are adding multiple apps to the ACL, repeat the above entry
for each app, changing only the email address to reflect each app's
service name.
Set the modified ACL on your bucket: gsutil setacl myAcl.txt gs://mybucket

Accessing Gmail emails through google app engine

How to get the e-mail contents by getting the user's login details in google app engine?
Try taking a look at the GMail API. You'll probably want to use OAuth.
https://developers.google.com/gmail/
This is exactly what I'm doing in my current project. Google App Engine Blog introduced a company named "Context.IO" and they provide very easy API to access GMail. I've implemented it in my project successfully.
Links
GAE Blog
Demo (You can look for a contact, and get all its emails...)
My Experience
They also provide a Explore feature that allow you to post and get json data from your gmail accounts.
However, if you registered for a free API key here, they will limit to 3 mailboxes per day. You can run a cron job to delete it daily. The nice thing is that you can contact them to get more mailboxes for development purposes :)
Hope my experience can help you
You can also use google service account. https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
Then you can use it in order to get access to account under your domain.
$client = new Google_Client();
$client->setApplicationName('My App');
$client->setAuthConfigFile('path/to/service_account.json');
$client->useApplicationDefaultCredentials();
// account that we want to check
$client->setSubject('account#mydomain.com');
$client->setAccessType('offline');
$client->setScopes([Google_Service_Gmail::GMAIL_READONLY]);
$service = new Google_Service_Gmail($client);
$messagesResponse = $service->users_messages->listUsersMessages('me');

Resources