-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong project ID when running cloud monitoring custom metrics sample #244
Comments
Use It's a long story, but the short one is that monitoring is a unique API in that the project making the project is billed, so gcloud auth login does not provide the correct credentials. The new command is designed to fix it, and eventually will be recommended for all local code samples (gcloud auth login will only be for actual gcloud commands). You may also just need to wait a few minutes and/or click on the actual Stackdriver Monitoring screen in the Cloud console and add your account to Stackdriver. Sorry for the complexity :-\ |
Using your suggested beta equivalent seems to have fixed things. Thanks! |
Cool, @gtaylor just FYI some other APIs might not work with the beta command and will need |
Thanks, I might go on ahead and do that. |
…244) Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Source-Link: googleapis/synthtool@facee4c Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 chore(python): avoid .nox directories when building docs
…244) Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* feat!: migrate to microgenerator (#26) * docs(samples): add deny samples and tests (#209) * docs(samples): init add deny samples and tests * docs(samples): added requirements.txt * docs(samples): minor update and refactoring * added nox files * added comments and minor refactoring * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * added region tags * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * added region tags * modified comments acc to review * modified comments acc to review * updated env var * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * modified acc to review comments * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * modified acc to review comments * added init.py * updated acc to review comments Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: nicain <nicholascain@google.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update all dependencies (#217) * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update all dependencies (#218) * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update dependency google-cloud-iam to v2.8.2 (#225) * chore: detect samples tests in nested directories (#236) Source-Link: googleapis/synthtool@50db768 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e09366bdf0fd9c8976592988390b24d53583dd9f002d476934da43725adbb978 * feat: Add client for IAM Deny v2 API (#230) * feat: Create the public IAM Deny v2 API PiperOrigin-RevId: 470600752 Source-Link: googleapis/googleapis@dac66f6 Source-Link: googleapis/googleapis-gen@729529e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzI5NTI5ZWRjMTAzZTQ1MDg3ZmZhZTgzNTNlYWYwMDlhZDdmZThjMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * regenerate files using cl/470713093 * workaround docstring formatting issue * add pytest to samples CI * lint * fix import statement in samples/snippets * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs(samples): migrate samples from iam_v2beta to iam_v2 * update required checks to include samples * use GOOGLE_CLOUD_PROJECT * fix imports in samples/snippets * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add pytest * chore(python): prepare for release of the iam/v2 python client PiperOrigin-RevId: 471240188 Source-Link: googleapis/googleapis@ea847a1 Source-Link: googleapis/googleapis-gen@6f1e4cd Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmYxZTRjZDAxM2FiMjkxNDc3MzgyNmU2OGIyYTJkMDc2MzAzMGEzOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Bump gapic-generator-python version to 1.3.0 PiperOrigin-RevId: 472561635 Source-Link: googleapis/googleapis@332ecf5 Source-Link: googleapis/googleapis-gen@4313d68 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDMxM2Q2ODI4ODBmZDlkNzI0NzI5MTE2NGQ0ZTlkM2Q1YmQ5ZjE3NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: use gapic-generator-python 1.3.1 PiperOrigin-RevId: 472772457 Source-Link: googleapis/googleapis@855b74d Source-Link: googleapis/googleapis-gen@b64b1e7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjY0YjFlN2RhM2UxMzhmMTVjYTM2MTU1MmVmMDU0NWU1NDg5MWI0ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: integrate gapic-generator-python-1.4.1 and enable more py_test targets PiperOrigin-RevId: 473833416 Source-Link: googleapis/googleapis@565a550 Source-Link: googleapis/googleapis-gen@1ee1a06 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWVlMWEwNmM2ZGUzY2E4Yjg0MzU3MmMxZmRlMDU0OGY4NDIzNjk4OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * updated test to delete stale policies and avoid quota error * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat!: remove ListApplicablePolicies PiperOrigin-RevId: 475955031 Source-Link: googleapis/googleapis@65376f4 Source-Link: googleapis/googleapis-gen@c8504e9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzg1MDRlOTc4OTFlZDllNjY0Y2Y2ODI3MGQ3ZTYxYmVjMTYwZmU1NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * samples: wait for the operation to complete * samples: minor refactoring * use project `python-docs-samples-tests` Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com> Co-authored-by: SitaLakshmi <sita1996@gmail.com> * chore(deps): update all dependencies (#244) * removing noxfile.py, adding CODEOWNERS and blunderbuss config * fixing up test infra * test infra fix * testing with secrets Co-authored-by: arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com> Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: nicain <nicholascain@google.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> Co-authored-by: WhiteSource Renovate <renovate@whitesourcesoftware.com> Co-authored-by: WhiteSource Renovate <bot@renovateapp.com> Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: SitaLakshmi <sita1996@gmail.com> Co-authored-by: Maciej Strzelczyk <strzelczyk@google.com> Co-authored-by: Karl Weinmeister <11586922+kweinmeister@users.noreply.github.com>
* feat!: migrate to microgenerator (#26) * docs(samples): add deny samples and tests (#209) * docs(samples): init add deny samples and tests * docs(samples): added requirements.txt * docs(samples): minor update and refactoring * added nox files * added comments and minor refactoring * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * added region tags * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * added region tags * modified comments acc to review * modified comments acc to review * updated env var * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * modified acc to review comments * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * modified acc to review comments * added init.py * updated acc to review comments Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: nicain <nicholascain@google.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update all dependencies (#217) * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update all dependencies (#218) * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update dependency google-cloud-iam to v2.8.2 (#225) * chore: detect samples tests in nested directories (#236) Source-Link: googleapis/synthtool@50db768 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e09366bdf0fd9c8976592988390b24d53583dd9f002d476934da43725adbb978 * feat: Add client for IAM Deny v2 API (#230) * feat: Create the public IAM Deny v2 API PiperOrigin-RevId: 470600752 Source-Link: googleapis/googleapis@dac66f6 Source-Link: googleapis/googleapis-gen@729529e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzI5NTI5ZWRjMTAzZTQ1MDg3ZmZhZTgzNTNlYWYwMDlhZDdmZThjMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * regenerate files using cl/470713093 * workaround docstring formatting issue * add pytest to samples CI * lint * fix import statement in samples/snippets * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs(samples): migrate samples from iam_v2beta to iam_v2 * update required checks to include samples * use GOOGLE_CLOUD_PROJECT * fix imports in samples/snippets * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add pytest * chore(python): prepare for release of the iam/v2 python client PiperOrigin-RevId: 471240188 Source-Link: googleapis/googleapis@ea847a1 Source-Link: googleapis/googleapis-gen@6f1e4cd Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmYxZTRjZDAxM2FiMjkxNDc3MzgyNmU2OGIyYTJkMDc2MzAzMGEzOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Bump gapic-generator-python version to 1.3.0 PiperOrigin-RevId: 472561635 Source-Link: googleapis/googleapis@332ecf5 Source-Link: googleapis/googleapis-gen@4313d68 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDMxM2Q2ODI4ODBmZDlkNzI0NzI5MTE2NGQ0ZTlkM2Q1YmQ5ZjE3NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: use gapic-generator-python 1.3.1 PiperOrigin-RevId: 472772457 Source-Link: googleapis/googleapis@855b74d Source-Link: googleapis/googleapis-gen@b64b1e7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjY0YjFlN2RhM2UxMzhmMTVjYTM2MTU1MmVmMDU0NWU1NDg5MWI0ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: integrate gapic-generator-python-1.4.1 and enable more py_test targets PiperOrigin-RevId: 473833416 Source-Link: googleapis/googleapis@565a550 Source-Link: googleapis/googleapis-gen@1ee1a06 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWVlMWEwNmM2ZGUzY2E4Yjg0MzU3MmMxZmRlMDU0OGY4NDIzNjk4OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * updated test to delete stale policies and avoid quota error * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat!: remove ListApplicablePolicies PiperOrigin-RevId: 475955031 Source-Link: googleapis/googleapis@65376f4 Source-Link: googleapis/googleapis-gen@c8504e9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzg1MDRlOTc4OTFlZDllNjY0Y2Y2ODI3MGQ3ZTYxYmVjMTYwZmU1NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * samples: wait for the operation to complete * samples: minor refactoring * use project `python-docs-samples-tests` Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com> Co-authored-by: SitaLakshmi <sita1996@gmail.com> * chore(deps): update all dependencies (#244) * removing noxfile.py, adding CODEOWNERS and blunderbuss config * fixing up test infra * test infra fix * testing with secrets Co-authored-by: arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com> Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: nicain <nicholascain@google.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> Co-authored-by: WhiteSource Renovate <renovate@whitesourcesoftware.com> Co-authored-by: WhiteSource Renovate <bot@renovateapp.com> Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: SitaLakshmi <sita1996@gmail.com> Co-authored-by: Maciej Strzelczyk <strzelczyk@google.com> Co-authored-by: Karl Weinmeister <11586922+kweinmeister@users.noreply.github.com>
Trying to run this sample:
https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/monitoring/api/v3/custom_metric.py
Command is:
Output is:
It's tossing out a weird project ID, so when I follow the link I get something odd:
Seems like it's got me in some invalid project.
If I go to the actual project and look at the permissions, I've got them enabled (as of 20+ minutes ago):
Any ideas? I'm aiming to get this working within App Engine, which I'm not sure is even possible. I'm running these samples from my dev machine with the latest gcloud SDK after having done
gcloud auth login
.The text was updated successfully, but these errors were encountered: