You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gcloud functions call startInstancePubSub --data '{"data":"eyJ6b25lIjphc2lhLWVhc3QxLWMsImluc3RhbmNlIjoic2NhbGVvdXQtam9idm0ifQo="}'
error: |-
Error: function execution failed. Details:
Unexpected token a in JSON at position 8
Additionally, this code sample has been updated to use resource labels instead of instance names. See the instance scheduling tutorial to learn how to use resource labels with this code sample.
Activity
fhinkel commentedon Sep 1, 2019
@harryliu123 👋 Thanks for reporting the issue!
@djmailhot Could you please have a look at this? Seems like there's a problem with the
functions/scheduleinstancesample. Thank you.ace-n commentedon Sep 3, 2019
fhinkel commentedon Oct 3, 2019
Ping @djmailhot
djmailhot commentedon Oct 4, 2019
@harryliu123, the data encoding string you used has a JSON formatting error.
yours:
encoded - eyJ6b25lIjphc2lhLWVhc3QxLWMsImluc3RhbmNlIjoic2NhbGVvdXQtam9idm0ifQo=
decoded - {"zone":asia-east1-c,"instance":"scaleout-jobvm"}
corrected:
decoded - {"zone":"asia-east1-c","instance":"scaleout-jobvm"}
encoded - eyJ6b25lIjoiYXNpYS1lYXN0MS1jIiwiaW5zdGFuY2UiOiJzY2FsZW91dC1qb2J2bSJ9
Additionally, this code sample has been updated to use resource labels instead of instance names. See the instance scheduling tutorial to learn how to use resource labels with this code sample.