diff --git a/.coveragerc b/.coveragerc index b178b094..dd39c854 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [run] branch = True diff --git a/.flake8 b/.flake8 index 0268ecc9..20fe9bda 100644 --- a/.flake8 +++ b/.flake8 @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [flake8] ignore = E203, E266, E501, W503 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..939e5341 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows [Google's Open Source Community +Guidelines](https://opensource.google.com/conduct/). diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..b0477e49 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,43 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +Please run down the following list and make sure you've tried the usual "quick fixes": + + - Search the issues already opened: https://github.com/googleapis/python-monitoring/issues + - Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python + +If you are still having issues, please be sure to include as much information as possible: + +#### Environment details + + - OS type and version: + - Python version: `python --version` + - pip version: `pip --version` + - `google-cloud-monitoring` version: `pip show google-cloud-monitoring` + +#### Steps to reproduce + + 1. ? + 2. ? + +#### Code example + +```python +# example +``` + +#### Stack trace +``` +# example +``` + +Making sure to follow these steps will guarantee the quickest resolution possible. + +Thanks! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..6365857f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,18 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + + **Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + **Describe the solution you'd like** +A clear and concise description of what you want to happen. + **Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + **Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 00000000..99586903 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..6a333868 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-monitoring/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # 🦕 diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 00000000..4507ad05 --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1 @@ +releaseType: python diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3fb06e09 --- /dev/null +++ b/.gitignore @@ -0,0 +1,58 @@ +*.py[cod] +*.sw[op] + +# C extensions +*.so + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg +lib +lib64 +__pycache__ + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.nox +.cache +.pytest_cache + + +# Mac +.DS_Store + +# JetBrains +.idea + +# VS Code +.vscode + +# emacs +*~ + +# Built documentation +docs/_build +bigquery/docs/generated + +# Virtual environment +env/ +coverage.xml + +# System test environment variables. +system_tests/local_test_setup + +# Make sure a generated file isn't accidentally committed. +pylintrc +pylintrc.test \ No newline at end of file diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 00000000..59c67f70 --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +cd github/python-monitoring + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Debug: show build environment +env | grep KOKORO + +# Setup service account credentials. +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json + +# Setup project id. +export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json") + +# Remove old nox +python3.6 -m pip uninstall --yes --quiet nox-automation + +# Install nox +python3.6 -m pip install --upgrade --quiet nox +python3.6 -m nox --version + +python3.6 -m nox diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 00000000..042740e8 --- /dev/null +++ b/.kokoro/continuous/common.cfg @@ -0,0 +1,27 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python" + +# Use the trampoline script to run in docker. +build_file: "python-monitoring/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-monitoring/.kokoro/build.sh" +} diff --git a/.kokoro/continuous/continuous.cfg b/.kokoro/continuous/continuous.cfg new file mode 100644 index 00000000..8f43917d --- /dev/null +++ b/.kokoro/continuous/continuous.cfg @@ -0,0 +1 @@ +# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg new file mode 100644 index 00000000..f8e61870 --- /dev/null +++ b/.kokoro/docs/common.cfg @@ -0,0 +1,48 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-monitoring/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-monitoring/.kokoro/publish-docs.sh" +} + +env_vars: { + key: "STAGING_BUCKET" + value: "docs-staging" +} + +# Fetch the token needed for reporting release status to GitHub +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} \ No newline at end of file diff --git a/.kokoro/docs/docs.cfg b/.kokoro/docs/docs.cfg new file mode 100644 index 00000000..8f43917d --- /dev/null +++ b/.kokoro/docs/docs.cfg @@ -0,0 +1 @@ +# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg new file mode 100644 index 00000000..042740e8 --- /dev/null +++ b/.kokoro/presubmit/common.cfg @@ -0,0 +1,27 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python" + +# Use the trampoline script to run in docker. +build_file: "python-monitoring/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-monitoring/.kokoro/build.sh" +} diff --git a/.kokoro/presubmit/presubmit.cfg b/.kokoro/presubmit/presubmit.cfg new file mode 100644 index 00000000..8f43917d --- /dev/null +++ b/.kokoro/presubmit/presubmit.cfg @@ -0,0 +1 @@ +# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh new file mode 100755 index 00000000..d1e9d42d --- /dev/null +++ b/.kokoro/publish-docs.sh @@ -0,0 +1,57 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash + +set -eo pipefail + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +cd github/python-monitoring + +# Remove old nox +python3.6 -m pip uninstall --yes --quiet nox-automation + +# Install nox +python3.6 -m pip install --upgrade --quiet nox +python3.6 -m nox --version + +# build docs +nox -s docs + +python3 -m pip install gcp-docuploader + +# install a json parser +sudo apt-get update +sudo apt-get -y install software-properties-common +sudo add-apt-repository universe +sudo apt-get update +sudo apt-get -y install jq + +# create metadata +python3 -m docuploader create-metadata \ + --name=$(jq --raw-output '.name // empty' .repo-metadata.json) \ + --version=$(python3 setup.py --version) \ + --language=$(jq --raw-output '.language // empty' .repo-metadata.json) \ + --distribution-name=$(python3 setup.py --name) \ + --product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \ + --github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \ + --issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json) + +cat docs.metadata + +# upload docs +python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket docs-staging diff --git a/.kokoro/release.sh b/.kokoro/release.sh new file mode 100755 index 00000000..9304d636 --- /dev/null +++ b/.kokoro/release.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash + +set -eo pipefail + +# Start the releasetool reporter +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +# Ensure that we have the latest versions of Twine, Wheel, and Setuptools. +python3 -m pip install --upgrade twine wheel setuptools + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Move into the package, build the distribution and upload. +TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password") +cd github/python-monitoring +python3 setup.py sdist bdist_wheel +twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/* diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 00000000..bf6bb9af --- /dev/null +++ b/.kokoro/release/common.cfg @@ -0,0 +1,64 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-monitoring/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-monitoring/.kokoro/release.sh" +} + +# Fetch the token needed for reporting release status to GitHub +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} + +# Fetch PyPI password +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google_cloud_pypi_password" + } + } +} + +# Fetch magictoken to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "releasetool-magictoken" + } + } +} + +# Fetch api key to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "magic-github-proxy-api-key" + } + } +} diff --git a/.kokoro/release/release.cfg b/.kokoro/release/release.cfg new file mode 100644 index 00000000..8f43917d --- /dev/null +++ b/.kokoro/release/release.cfg @@ -0,0 +1 @@ +# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh new file mode 100755 index 00000000..e8c4251f --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright 2017 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" || ret_code=$? + +chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh +${KOKORO_GFILE_DIR}/trampoline_cleanup.sh || true + +exit ${ret_code} diff --git a/.repo-metadata.json b/.repo-metadata.json index 48920988..7d481fd9 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -6,7 +6,7 @@ "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", "release_level": "alpha", "language": "python", - "repo": "googleapis/google-cloud-python", + "repo": "googleapis/python-monitoring", "distribution_name": "google-cloud-monitoring", "api_id": "monitoring.googleapis.com" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a427e8ab..97ad260e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-monitoring/#history +## [0.35.0](https://www.github.com/googleapis/python-monitoring/compare/v0.34.0...v0.35.0) (2020-04-21) + + +### Features + +* add uptime check feature; increase default timeout (via synth) ([#15](https://www.github.com/googleapis/python-monitoring/issues/15)) ([dcf074a](https://www.github.com/googleapis/python-monitoring/commit/dcf074aed9922982f7324d4f2943d9435778d46c)) + ## 0.34.0 11-19-2019 14:27 PST diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..b3d1f602 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,44 @@ + +# Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 00000000..0a4ada23 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,270 @@ +.. Generated by synthtool. DO NOT EDIT! +############ +Contributing +############ + +#. **Please sign one of the contributor license agreements below.** +#. Fork the repo, develop and test your code changes, add docs. +#. Make sure that your commit messages clearly describe the changes. +#. Send a pull request. (Please Read: `Faster Pull Request Reviews`_) + +.. _Faster Pull Request Reviews: https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews + +.. contents:: Here are some guidelines for hacking on the Google Cloud Client libraries. + +*************** +Adding Features +*************** + +In order to add a feature: + +- The feature must be documented in both the API and narrative + documentation. + +- The feature must work fully on the following CPython versions: 2.7, + 3.5, 3.6, 3.7 and 3.8 on both UNIX and Windows. + +- The feature must not add unnecessary dependencies (where + "unnecessary" is of course subjective, but new dependencies should + be discussed). + +**************************** +Using a Development Checkout +**************************** + +You'll have to create a development environment using a Git checkout: + +- While logged into your GitHub account, navigate to the + ``python-monitoring`` `repo`_ on GitHub. + +- Fork and clone the ``python-monitoring`` repository to your GitHub account by + clicking the "Fork" button. + +- Clone your fork of ``python-monitoring`` from your GitHub account to your local + computer, substituting your account username and specifying the destination + as ``hack-on-python-monitoring``. E.g.:: + + $ cd ${HOME} + $ git clone git@github.com:USERNAME/python-monitoring.git hack-on-python-monitoring + $ cd hack-on-python-monitoring + # Configure remotes such that you can pull changes from the googleapis/python-monitoring + # repository into your local repository. + $ git remote add upstream git@github.com:googleapis/python-monitoring.git + # fetch and merge changes from upstream into master + $ git fetch upstream + $ git merge upstream/master + +Now your local repo is set up such that you will push changes to your GitHub +repo, from which you can submit a pull request. + +To work on the codebase and run the tests, we recommend using ``nox``, +but you can also use a ``virtualenv`` of your own creation. + +.. _repo: https://github.com/googleapis/python-monitoring + +Using ``nox`` +============= + +We use `nox `__ to instrument our tests. + +- To test your changes, run unit tests with ``nox``:: + + $ nox -s unit-2.7 + $ nox -s unit-3.7 + $ ... + + .. note:: + + The unit tests and system tests are described in the + ``noxfile.py`` files in each directory. + +.. nox: https://pypi.org/project/nox/ + +Note on Editable Installs / Develop Mode +======================================== + +- As mentioned previously, using ``setuptools`` in `develop mode`_ + or a ``pip`` `editable install`_ is not possible with this + library. This is because this library uses `namespace packages`_. + For context see `Issue #2316`_ and the relevant `PyPA issue`_. + + Since ``editable`` / ``develop`` mode can't be used, packages + need to be installed directly. Hence your changes to the source + tree don't get incorporated into the **already installed** + package. + +.. _namespace packages: https://www.python.org/dev/peps/pep-0420/ +.. _Issue #2316: https://github.com/GoogleCloudPlatform/google-cloud-python/issues/2316 +.. _PyPA issue: https://github.com/pypa/packaging-problems/issues/12 +.. _develop mode: https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode +.. _editable install: https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs + +***************************************** +I'm getting weird errors... Can you help? +***************************************** + +If the error mentions ``Python.h`` not being found, +install ``python-dev`` and try again. +On Debian/Ubuntu:: + + $ sudo apt-get install python-dev + +************ +Coding Style +************ + +- PEP8 compliance, with exceptions defined in the linter configuration. + If you have ``nox`` installed, you can test that you have not introduced + any non-compliant code via:: + + $ nox -s lint + +- In order to make ``nox -s lint`` run faster, you can set some environment + variables:: + + export GOOGLE_CLOUD_TESTING_REMOTE="upstream" + export GOOGLE_CLOUD_TESTING_BRANCH="master" + + By doing this, you are specifying the location of the most up-to-date + version of ``python-monitoring``. The the suggested remote name ``upstream`` + should point to the official ``googleapis`` checkout and the + the branch should be the main branch on that remote (``master``). + +Exceptions to PEP8: + +- Many unit tests use a helper method, ``_call_fut`` ("FUT" is short for + "Function-Under-Test"), which is PEP8-incompliant, but more readable. + Some also use a local variable, ``MUT`` (short for "Module-Under-Test"). + +******************** +Running System Tests +******************** + +- To run system tests, you can execute:: + + $ nox -s system-3.7 + $ nox -s system-2.7 + + .. note:: + + System tests are only configured to run under Python 2.7 and + Python 3.7. For expediency, we do not run them in older versions + of Python 3. + + This alone will not run the tests. You'll need to change some local + auth settings and change some configuration in your project to + run all the tests. + +- System tests will be run against an actual project and + so you'll need to provide some environment variables to facilitate + authentication to your project: + + - ``GOOGLE_APPLICATION_CREDENTIALS``: The path to a JSON key file; + Such a file can be downloaded directly from the developer's console by clicking + "Generate new JSON key". See private key + `docs `__ + for more details. + +- Once you have downloaded your json keys, set the environment variable + ``GOOGLE_APPLICATION_CREDENTIALS`` to the absolute path of the json file:: + + $ export GOOGLE_APPLICATION_CREDENTIALS="/Users//path/to/app_credentials.json" + + +************* +Test Coverage +************* + +- The codebase *must* have 100% test statement coverage after each commit. + You can test coverage via ``nox -s cover``. + +****************************************************** +Documentation Coverage and Building HTML Documentation +****************************************************** + +If you fix a bug, and the bug requires an API or behavior modification, all +documentation in this package which references that API or behavior must be +changed to reflect the bug fix, ideally in the same commit that fixes the bug +or adds the feature. + +Build the docs via: + + $ nox -s docs + +******************************************** +Note About ``README`` as it pertains to PyPI +******************************************** + +The `description on PyPI`_ for the project comes directly from the +``README``. Due to the reStructuredText (``rst``) parser used by +PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst`` +instead of +``https://github.com/googleapis/python-monitoring/blob/master/CONTRIBUTING.rst``) +may cause problems creating links or rendering the description. + +.. _description on PyPI: https://pypi.org/project/google-cloud-monitoring + + +************************* +Supported Python Versions +************************* + +We support: + +- `Python 3.5`_ +- `Python 3.6`_ +- `Python 3.7`_ +- `Python 3.8`_ + +.. _Python 3.5: https://docs.python.org/3.5/ +.. _Python 3.6: https://docs.python.org/3.6/ +.. _Python 3.7: https://docs.python.org/3.7/ +.. _Python 3.8: https://docs.python.org/3.8/ + + +Supported versions can be found in our ``noxfile.py`` `config`_. + +.. _config: https://github.com/googleapis/python-monitoring/blob/master/noxfile.py + +Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020. + +We also explicitly decided to support Python 3 beginning with version +3.5. Reasons for this include: + +- Encouraging use of newest versions of Python 3 +- Taking the lead of `prominent`_ open-source `projects`_ +- `Unicode literal support`_ which allows for a cleaner codebase that + works in both Python 2 and Python 3 + +.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django +.. _projects: http://flask.pocoo.org/docs/0.10/python3/ +.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/ + +********** +Versioning +********** + +This library follows `Semantic Versioning`_. + +.. _Semantic Versioning: http://semver.org/ + +Some packages are currently in major version zero (``0.y.z``), which means that +anything may change at any time and the public API should not be considered +stable. + +****************************** +Contributor License Agreements +****************************** + +Before we can accept your pull requests you'll need to sign a Contributor +License Agreement (CLA): + +- **If you are an individual writing original source code** and **you own the + intellectual property**, then you'll need to sign an + `individual CLA `__. +- **If you work for a company that wants to allow you to contribute your work**, + then you'll need to sign a + `corporate CLA `__. + +You can sign these electronically (just scroll to the bottom). After that, +we'll be able to accept your pull requests. diff --git a/MANIFEST.in b/MANIFEST.in index 9cbf175a..68855abc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,20 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Generated by synthtool. DO NOT EDIT! include README.rst LICENSE recursive-include google *.json *.proto recursive-include tests * diff --git a/docs/conf.py b/docs/conf.py index 4cb86bf6..f8b9c08e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath("..")) -__version__ = "0.1.0" +__version__ = "" # -- General configuration ------------------------------------------------ @@ -66,7 +66,7 @@ # General information about the project. project = u"google-cloud-monitoring" -copyright = u"2017, Google" +copyright = u"2019, Google" author = u"Google APIs" # The version info for the project you're documenting, acts as replacement for @@ -133,9 +133,9 @@ # further. For a list of options available for each theme, see the # documentation. html_theme_options = { - "description": "Google Cloud Client Libraries for Python", + "description": "Google Cloud Client Libraries for google-cloud-monitoring", "github_user": "googleapis", - "github_repo": "google-cloud-python", + "github_repo": "python-monitoring", "github_banner": True, "font_family": "'Roboto', Georgia, sans", "head_font_family": "'Roboto', Georgia, serif", @@ -264,7 +264,7 @@ u"google-cloud-monitoring Documentation", author, "manual", - ), + ) ] # The name of an image file (relative to this directory) to place at the top of @@ -318,9 +318,9 @@ u"google-cloud-monitoring Documentation", author, "google-cloud-monitoring", - "GAPIC library for the {metadata.shortName} v3 service", + "google-cloud-monitoring Library", "APIs", - ), + ) ] # Documents to append as an appendix to all manuals. @@ -339,14 +339,9 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { "python": ("http://python.readthedocs.org/en/latest/", None), - "gax": ("https://gax-python.readthedocs.org/en/latest/", None), "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), - "google-gax": ("https://gax-python.readthedocs.io/en/latest/", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest", None), + "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None), "grpc": ("https://grpc.io/grpc/python/", None), - "requests": ("https://requests.kennethreitz.org/en/master/", None), - "fastavro": ("https://fastavro.readthedocs.io/en/stable/", None), - "pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None), } diff --git a/docs/gapic/v3/api.rst b/docs/gapic/v3/api.rst index 615e0046..5eb2a6bb 100644 --- a/docs/gapic/v3/api.rst +++ b/docs/gapic/v3/api.rst @@ -1,5 +1,5 @@ -Client for Stackdriver Monitoring API -===================================== +Client for Cloud Monitoring API +=============================== .. automodule:: google.cloud.monitoring_v3 :members: diff --git a/docs/gapic/v3/types.rst b/docs/gapic/v3/types.rst index 9790a948..b1914656 100644 --- a/docs/gapic/v3/types.rst +++ b/docs/gapic/v3/types.rst @@ -1,5 +1,5 @@ -Types for Stackdriver Monitoring API Client -=========================================== +Types for Cloud Monitoring API Client +===================================== .. automodule:: google.cloud.monitoring_v3.types :members: \ No newline at end of file diff --git a/google/__init__.py b/google/__init__.py index 8fcc60e2..9a1b64a6 100644 --- a/google/__init__.py +++ b/google/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/__init__.py b/google/cloud/__init__.py index 8fcc60e2..9a1b64a6 100644 --- a/google/cloud/__init__.py +++ b/google/cloud/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/monitoring.py b/google/cloud/monitoring.py index a84ebd6e..42c574b1 100644 --- a/google/cloud/monitoring.py +++ b/google/cloud/monitoring.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/monitoring_v3/__init__.py b/google/cloud/monitoring_v3/__init__.py index 3fb6b4d9..17105590 100644 --- a/google/cloud/monitoring_v3/__init__.py +++ b/google/cloud/monitoring_v3/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ from __future__ import absolute_import +import sys +import warnings from google.cloud.monitoring_v3 import types from google.cloud.monitoring_v3.gapic import alert_policy_service_client @@ -29,6 +31,15 @@ from google.cloud.monitoring_v3.gapic import uptime_check_service_client +if sys.version_info[:2] == (2, 7): + message = ( + "A future version of this library will drop support for Python 2.7." + "More details about Python 2 support for Google Cloud Client Libraries" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + class AlertPolicyServiceClient(alert_policy_service_client.AlertPolicyServiceClient): __doc__ = alert_policy_service_client.AlertPolicyServiceClient.__doc__ enums = enums diff --git a/google/cloud/monitoring_v3/gapic/alert_policy_service_client.py b/google/cloud/monitoring_v3/gapic/alert_policy_service_client.py index 83c49eb2..3c0d8f82 100644 --- a/google/cloud/monitoring_v3/gapic/alert_policy_service_client.py +++ b/google/cloud/monitoring_v3/gapic/alert_policy_service_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-monitoring", + "google-cloud-monitoring" ).version @@ -90,12 +90,7 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def alert_policy_path(cls, project, alert_policy): - """DEPRECATED. Return a fully-qualified alert_policy string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified alert_policy string.""" return google.api_core.path_template.expand( "projects/{project}/alertPolicies/{alert_policy}", project=project, @@ -104,12 +99,7 @@ def alert_policy_path(cls, project, alert_policy): @classmethod def alert_policy_condition_path(cls, project, alert_policy, condition): - """DEPRECATED. Return a fully-qualified alert_policy_condition string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified alert_policy_condition string.""" return google.api_core.path_template.expand( "projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}", project=project, @@ -119,14 +109,9 @@ def alert_policy_condition_path(cls, project, alert_policy, condition): @classmethod def project_path(cls, project): - """DEPRECATED. Return a fully-qualified project string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", project=project, + "projects/{project}", project=project ) def __init__( @@ -216,12 +201,12 @@ def __init__( self.transport = transport else: self.transport = alert_policy_service_grpc_transport.AlertPolicyServiceGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials, + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION, + gapic_version=_GAPIC_LIBRARY_VERSION ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -232,7 +217,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME], + client_config["interfaces"][self._INTERFACE_NAME] ) # Save a dictionary of cached API call functions. @@ -277,9 +262,10 @@ def list_alert_policies( ... pass Args: - name (str): The project whose alert policies are to be listed. The format is + name (str): Required. The project whose alert policies are to be listed. The format + is: - projects/[PROJECT_ID] + projects/[PROJECT_ID_OR_NUMBER] Note that this field names the parent container in which the alerting policies to be listed are stored. To retrieve a single alerting policy @@ -337,7 +323,7 @@ def list_alert_policies( ) request = alert_service_pb2.ListAlertPoliciesRequest( - name=name, filter=filter_, order_by=order_by, page_size=page_size, + name=name, filter=filter_, order_by=order_by, page_size=page_size ) if metadata is None: metadata = [] @@ -387,9 +373,9 @@ def get_alert_policy( >>> response = client.get_alert_policy(name) Args: - name (str): The alerting policy to retrieve. The format is + name (str): Required. The alerting policy to retrieve. The format is: - projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -423,7 +409,7 @@ def get_alert_policy( client_info=self._client_info, ) - request = alert_service_pb2.GetAlertPolicyRequest(name=name,) + request = alert_service_pb2.GetAlertPolicyRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -465,17 +451,20 @@ def create_alert_policy( >>> response = client.create_alert_policy(name, alert_policy) Args: - name (str): The project in which to create the alerting policy. The format is - ``projects/[PROJECT_ID]``. + name (str): Required. The project in which to create the alerting policy. The format + is: + + projects/[PROJECT_ID_OR_NUMBER] Note that this field names the parent container in which the alerting policy will be written, not the name of the created policy. The alerting policy that is returned will have a name that contains a normalized representation of this name as a prefix but adds a suffix of the form - ``/alertPolicies/[POLICY_ID]``, identifying the policy in the container. - alert_policy (Union[dict, ~google.cloud.monitoring_v3.types.AlertPolicy]): The requested alerting policy. You should omit the ``name`` field in - this policy. The name will be returned in the new policy, including a - new [ALERT\_POLICY\_ID] value. + ``/alertPolicies/[ALERT_POLICY_ID]``, identifying the policy in the + container. + alert_policy (Union[dict, ~google.cloud.monitoring_v3.types.AlertPolicy]): Required. The requested alerting policy. You should omit the ``name`` + field in this policy. The name will be returned in the new policy, + including a new ``[ALERT_POLICY_ID]`` value. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.monitoring_v3.types.AlertPolicy` @@ -513,7 +502,7 @@ def create_alert_policy( ) request = alert_service_pb2.CreateAlertPolicyRequest( - name=name, alert_policy=alert_policy, + name=name, alert_policy=alert_policy ) if metadata is None: metadata = [] @@ -552,9 +541,9 @@ def delete_alert_policy( >>> client.delete_alert_policy(name) Args: - name (str): The alerting policy to delete. The format is: + name (str): Required. The alerting policy to delete. The format is: - projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] For more information, see ``AlertPolicy``. retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -587,7 +576,7 @@ def delete_alert_policy( client_info=self._client_info, ) - request = alert_service_pb2.DeleteAlertPolicyRequest(name=name,) + request = alert_service_pb2.DeleteAlertPolicyRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -696,7 +685,7 @@ def update_alert_policy( ) request = alert_service_pb2.UpdateAlertPolicyRequest( - alert_policy=alert_policy, update_mask=update_mask, + alert_policy=alert_policy, update_mask=update_mask ) if metadata is None: metadata = [] diff --git a/google/cloud/monitoring_v3/gapic/enums.py b/google/cloud/monitoring_v3/gapic/enums.py index 7b5d0ef5..2215de34 100644 --- a/google/cloud/monitoring_v3/gapic/enums.py +++ b/google/cloud/monitoring_v3/gapic/enums.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -52,17 +52,17 @@ class CalendarPeriod(enum.IntEnum): class ComparisonType(enum.IntEnum): """ - Specifies an ordering relationship on two arguments, here called left and - right. + Specifies an ordering relationship on two arguments, called ``left`` and + ``right``. Attributes: COMPARISON_UNSPECIFIED (int): No ordering relationship is specified. - COMPARISON_GT (int): The left argument is greater than the right argument. - COMPARISON_GE (int): The left argument is greater than or equal to the right argument. - COMPARISON_LT (int): The left argument is less than the right argument. - COMPARISON_LE (int): The left argument is less than or equal to the right argument. - COMPARISON_EQ (int): The left argument is equal to the right argument. - COMPARISON_NE (int): The left argument is not equal to the right argument. + COMPARISON_GT (int): True if the left argument is greater than the right argument. + COMPARISON_GE (int): True if the left argument is greater than or equal to the right argument. + COMPARISON_LT (int): True if the left argument is less than the right argument. + COMPARISON_LE (int): True if the left argument is less than or equal to the right argument. + COMPARISON_EQ (int): True if the left argument is equal to the right argument. + COMPARISON_NE (int): True if the left argument is not equal to the right argument. """ COMPARISON_UNSPECIFIED = 0 @@ -202,110 +202,125 @@ class UptimeCheckRegion(enum.IntEnum): class Aggregation(object): class Aligner(enum.IntEnum): """ - The Aligner describes how to bring the data points in a single - time series into temporal alignment. + The ``Aligner`` specifies the operation that will be applied to the data + points in each alignment period in a time series. Except for + ``ALIGN_NONE``, which specifies that no operation be applied, each + alignment operation replaces the set of data values in each alignment + period with a single value: the result of applying the operation to the + data values. An aligned time series has a single data value at the end + of each ``alignment_period``. + + An alignment operation can change the data type of the values, too. For + example, if you apply a counting operation to boolean values, the data + ``value_type`` in the original time series is ``BOOLEAN``, but the + ``value_type`` in the aligned result is ``INT64``. Attributes: - ALIGN_NONE (int): No alignment. Raw data is returned. Not valid if cross-time - series reduction is requested. The value type of the result is - the same as the value type of the input. - ALIGN_DELTA (int): Align and convert to delta metric type. This alignment is valid for - cumulative metrics and delta metrics. Aligning an existing delta metric - to a delta metric requires that the alignment period be increased. The - value type of the result is the same as the value type of the input. - - One can think of this aligner as a rate but without time units; that is, - the output is conceptually (second\_point - first\_point). - ALIGN_RATE (int): Align and convert to a rate. This alignment is valid for cumulative - metrics and delta metrics with numeric values. The output is a gauge - metric with value type ``DOUBLE``. - - One can think of this aligner as conceptually providing the slope of the - line that passes through the value at the start and end of the window. - In other words, this is conceptually ((y1 - y0)/(t1 - t0)), and the - output unit is one that has a "/time" dimension. - - If, by rate, you are looking for percentage change, see the - ``ALIGN_PERCENT_CHANGE`` aligner option. - ALIGN_INTERPOLATE (int): Align by interpolating between adjacent points around the - period boundary. This alignment is valid for gauge - metrics with numeric values. The value type of the result is the same - as the value type of the input. - ALIGN_NEXT_OLDER (int): Align by shifting the oldest data point before the period - boundary to the boundary. This alignment is valid for gauge - metrics. The value type of the result is the same as the - value type of the input. - ALIGN_MIN (int): Align time series via aggregation. The resulting data point in - the alignment period is the minimum of all data points in the - period. This alignment is valid for gauge and delta metrics with numeric - values. The value type of the result is the same as the value - type of the input. - ALIGN_MAX (int): Align time series via aggregation. The resulting data point in - the alignment period is the maximum of all data points in the - period. This alignment is valid for gauge and delta metrics with numeric - values. The value type of the result is the same as the value - type of the input. - ALIGN_MEAN (int): Align time series via aggregation. The resulting data point in the - alignment period is the average or arithmetic mean of all data points in - the period. This alignment is valid for gauge and delta metrics with - numeric values. The value type of the output is ``DOUBLE``. - ALIGN_COUNT (int): Align time series via aggregation. The resulting data point in the - alignment period is the count of all data points in the period. This - alignment is valid for gauge and delta metrics with numeric or Boolean - values. The value type of the output is ``INT64``. - ALIGN_SUM (int): Align time series via aggregation. The resulting data point in - the alignment period is the sum of all data points in the - period. This alignment is valid for gauge and delta metrics with numeric - and distribution values. The value type of the output is the - same as the value type of the input. - ALIGN_STDDEV (int): Align time series via aggregation. The resulting data point in the - alignment period is the standard deviation of all data points in the - period. This alignment is valid for gauge and delta metrics with numeric - values. The value type of the output is ``DOUBLE``. - ALIGN_COUNT_TRUE (int): Align time series via aggregation. The resulting data point in the - alignment period is the count of True-valued data points in the period. - This alignment is valid for gauge metrics with Boolean values. The value - type of the output is ``INT64``. - ALIGN_COUNT_FALSE (int): Align time series via aggregation. The resulting data point in the - alignment period is the count of False-valued data points in the period. - This alignment is valid for gauge metrics with Boolean values. The value - type of the output is ``INT64``. - ALIGN_FRACTION_TRUE (int): Align time series via aggregation. The resulting data point in the - alignment period is the fraction of True-valued data points in the - period. This alignment is valid for gauge metrics with Boolean values. - The output value is in the range [0, 1] and has value type ``DOUBLE``. - ALIGN_PERCENTILE_99 (int): Align time series via aggregation. The resulting data point in the - alignment period is the 99th percentile of all data points in the - period. This alignment is valid for gauge and delta metrics with - distribution values. The output is a gauge metric with value type + ALIGN_NONE (int): No alignment. Raw data is returned. Not valid if cross-series reduction + is requested. The ``value_type`` of the result is the same as the + ``value_type`` of the input. + ALIGN_DELTA (int): Align and convert to ``DELTA``. The output is ``delta = y1 - y0``. + + This alignment is valid for ``CUMULATIVE`` and ``DELTA`` metrics. If the + selected alignment period results in periods with no data, then the + aligned value for such a period is created by interpolation. The + ``value_type`` of the aligned result is the same as the ``value_type`` + of the input. + ALIGN_RATE (int): Align and convert to a rate. The result is computed as + ``rate = (y1 - y0)/(t1 - t0)``, or "delta over time". Think of this + aligner as providing the slope of the line that passes through the value + at the start and at the end of the ``alignment_period``. + + This aligner is valid for ``CUMULATIVE`` and ``DELTA`` metrics with + numeric values. If the selected alignment period results in periods with + no data, then the aligned value for such a period is created by + interpolation. The output is a ``GAUGE`` metric with ``value_type`` ``DOUBLE``. - ALIGN_PERCENTILE_95 (int): Align time series via aggregation. The resulting data point in the - alignment period is the 95th percentile of all data points in the - period. This alignment is valid for gauge and delta metrics with - distribution values. The output is a gauge metric with value type - ``DOUBLE``. - ALIGN_PERCENTILE_50 (int): Align time series via aggregation. The resulting data point in the - alignment period is the 50th percentile of all data points in the - period. This alignment is valid for gauge and delta metrics with - distribution values. The output is a gauge metric with value type - ``DOUBLE``. - ALIGN_PERCENTILE_05 (int): Align time series via aggregation. The resulting data point in the - alignment period is the 5th percentile of all data points in the period. - This alignment is valid for gauge and delta metrics with distribution - values. The output is a gauge metric with value type ``DOUBLE``. - ALIGN_PERCENT_CHANGE (int): Align and convert to a percentage change. This alignment is valid for - gauge and delta metrics with numeric values. This alignment conceptually - computes the equivalent of "((current - previous)/previous)\*100" where - previous value is determined based on the alignmentPeriod. In the event - that previous is 0 the calculated value is infinity with the exception - that if both (current - previous) and previous are 0 the calculated - value is 0. A 10 minute moving mean is computed at each point of the - time window prior to the above calculation to smooth the metric and - prevent false positives from very short lived spikes. Only applicable - for data that is >= 0. Any values < 0 are treated as no data. While - delta metrics are accepted by this alignment special care should be - taken that the values for the metric will always be positive. The output - is a gauge metric with value type ``DOUBLE``. + + If, by "rate", you mean "percentage change", see the + ``ALIGN_PERCENT_CHANGE`` aligner instead. + ALIGN_INTERPOLATE (int): Align by interpolating between adjacent points around the alignment + period boundary. This aligner is valid for ``GAUGE`` metrics with + numeric values. The ``value_type`` of the aligned result is the same as + the ``value_type`` of the input. + ALIGN_NEXT_OLDER (int): Align by moving the most recent data point before the end of the + alignment period to the boundary at the end of the alignment period. + This aligner is valid for ``GAUGE`` metrics. The ``value_type`` of the + aligned result is the same as the ``value_type`` of the input. + ALIGN_MIN (int): Align the time series by returning the minimum value in each alignment + period. This aligner is valid for ``GAUGE`` and ``DELTA`` metrics with + numeric values. The ``value_type`` of the aligned result is the same as + the ``value_type`` of the input. + ALIGN_MAX (int): Align the time series by returning the maximum value in each alignment + period. This aligner is valid for ``GAUGE`` and ``DELTA`` metrics with + numeric values. The ``value_type`` of the aligned result is the same as + the ``value_type`` of the input. + ALIGN_MEAN (int): Align the time series by returning the mean value in each alignment + period. This aligner is valid for ``GAUGE`` and ``DELTA`` metrics with + numeric values. The ``value_type`` of the aligned result is ``DOUBLE``. + ALIGN_COUNT (int): Align the time series by returning the number of values in each + alignment period. This aligner is valid for ``GAUGE`` and ``DELTA`` + metrics with numeric or Boolean values. The ``value_type`` of the + aligned result is ``INT64``. + ALIGN_SUM (int): Align the time series by returning the sum of the values in each + alignment period. This aligner is valid for ``GAUGE`` and ``DELTA`` + metrics with numeric and distribution values. The ``value_type`` of the + aligned result is the same as the ``value_type`` of the input. + ALIGN_STDDEV (int): Align the time series by returning the standard deviation of the values + in each alignment period. This aligner is valid for ``GAUGE`` and + ``DELTA`` metrics with numeric values. The ``value_type`` of the output + is ``DOUBLE``. + ALIGN_COUNT_TRUE (int): Align the time series by returning the number of ``True`` values in each + alignment period. This aligner is valid for ``GAUGE`` metrics with + Boolean values. The ``value_type`` of the output is ``INT64``. + ALIGN_COUNT_FALSE (int): Align the time series by returning the number of ``False`` values in + each alignment period. This aligner is valid for ``GAUGE`` metrics with + Boolean values. The ``value_type`` of the output is ``INT64``. + ALIGN_FRACTION_TRUE (int): Align the time series by returning the ratio of the number of ``True`` + values to the total number of values in each alignment period. This + aligner is valid for ``GAUGE`` metrics with Boolean values. The output + value is in the range [0.0, 1.0] and has ``value_type`` ``DOUBLE``. + ALIGN_PERCENTILE_99 (int): Align the time series by using `percentile + aggregation `__. The resulting + data point in each alignment period is the 99th percentile of all data + points in the period. This aligner is valid for ``GAUGE`` and ``DELTA`` + metrics with distribution values. The output is a ``GAUGE`` metric with + ``value_type`` ``DOUBLE``. + ALIGN_PERCENTILE_95 (int): Align the time series by using `percentile + aggregation `__. The resulting + data point in each alignment period is the 95th percentile of all data + points in the period. This aligner is valid for ``GAUGE`` and ``DELTA`` + metrics with distribution values. The output is a ``GAUGE`` metric with + ``value_type`` ``DOUBLE``. + ALIGN_PERCENTILE_50 (int): Align the time series by using `percentile + aggregation `__. The resulting + data point in each alignment period is the 50th percentile of all data + points in the period. This aligner is valid for ``GAUGE`` and ``DELTA`` + metrics with distribution values. The output is a ``GAUGE`` metric with + ``value_type`` ``DOUBLE``. + ALIGN_PERCENTILE_05 (int): Align the time series by using `percentile + aggregation `__. The resulting + data point in each alignment period is the 5th percentile of all data + points in the period. This aligner is valid for ``GAUGE`` and ``DELTA`` + metrics with distribution values. The output is a ``GAUGE`` metric with + ``value_type`` ``DOUBLE``. + ALIGN_PERCENT_CHANGE (int): Align and convert to a percentage change. This aligner is valid for + ``GAUGE`` and ``DELTA`` metrics with numeric values. This alignment + returns ``((current - previous)/previous) * 100``, where the value of + ``previous`` is determined based on the ``alignment_period``. + + If the values of ``current`` and ``previous`` are both 0, then the + returned value is 0. If only ``previous`` is 0, the returned value is + infinity. + + A 10-minute moving mean is computed at each point of the alignment + period prior to the above calculation to smooth the metric and prevent + false positives from very short-lived spikes. The moving mean is only + applicable for data whose values are ``>= 0``. Any values ``< 0`` are + treated as a missing datapoint, and are ignored. While ``DELTA`` metrics + are accepted by this alignment, special care should be taken that the + values for the metric will always be positive. The output is a ``GAUGE`` + metric with ``value_type`` ``DOUBLE``. """ ALIGN_NONE = 0 @@ -330,62 +345,71 @@ class Aligner(enum.IntEnum): class Reducer(enum.IntEnum): """ - A Reducer describes how to aggregate data points from multiple - time series into a single time series. + A Reducer operation describes how to aggregate data points from multiple + time series into a single time series, where the value of each data point + in the resulting series is a function of all the already aligned values in + the input time series. Attributes: - REDUCE_NONE (int): No cross-time series reduction. The output of the aligner is + REDUCE_NONE (int): No cross-time series reduction. The output of the ``Aligner`` is returned. - REDUCE_MEAN (int): Reduce by computing the mean across time series for each alignment - period. This reducer is valid for delta and gauge metrics with numeric - or distribution values. The value type of the output is ``DOUBLE``. - REDUCE_MIN (int): Reduce by computing the minimum across time series for each - alignment period. This reducer is valid for delta and - gauge metrics with numeric values. The value type of the output - is the same as the value type of the input. - REDUCE_MAX (int): Reduce by computing the maximum across time series for each - alignment period. This reducer is valid for delta and - gauge metrics with numeric values. The value type of the output - is the same as the value type of the input. - REDUCE_SUM (int): Reduce by computing the sum across time series for each - alignment period. This reducer is valid for delta and - gauge metrics with numeric and distribution values. The value type of - the output is the same as the value type of the input. - REDUCE_STDDEV (int): Reduce by computing the standard deviation across time series for each - alignment period. This reducer is valid for delta and gauge metrics with - numeric or distribution values. The value type of the output is + REDUCE_MEAN (int): Reduce by computing the mean value across time series for each alignment + period. This reducer is valid for ``DELTA`` and ``GAUGE`` metrics with + numeric or distribution values. The ``value_type`` of the output is ``DOUBLE``. - REDUCE_COUNT (int): Reduce by computing the count of data points across time series for each - alignment period. This reducer is valid for delta and gauge metrics of - numeric, Boolean, distribution, and string value type. The value type of - the output is ``INT64``. - REDUCE_COUNT_TRUE (int): Reduce by computing the count of True-valued data points across time - series for each alignment period. This reducer is valid for delta and - gauge metrics of Boolean value type. The value type of the output is - ``INT64``. - REDUCE_COUNT_FALSE (int): Reduce by computing the count of False-valued data points across time - series for each alignment period. This reducer is valid for delta and - gauge metrics of Boolean value type. The value type of the output is - ``INT64``. - REDUCE_FRACTION_TRUE (int): Reduce by computing the fraction of True-valued data points across time - series for each alignment period. This reducer is valid for delta and - gauge metrics of Boolean value type. The output value is in the range - [0, 1] and has value type ``DOUBLE``. - REDUCE_PERCENTILE_99 (int): Reduce by computing 99th percentile of data points across time series - for each alignment period. This reducer is valid for gauge and delta - metrics of numeric and distribution type. The value of the output is - ``DOUBLE`` - REDUCE_PERCENTILE_95 (int): Reduce by computing 95th percentile of data points across time series - for each alignment period. This reducer is valid for gauge and delta - metrics of numeric and distribution type. The value of the output is - ``DOUBLE`` - REDUCE_PERCENTILE_50 (int): Reduce by computing 50th percentile of data points across time series - for each alignment period. This reducer is valid for gauge and delta - metrics of numeric and distribution type. The value of the output is - ``DOUBLE`` - REDUCE_PERCENTILE_05 (int): Reduce by computing 5th percentile of data points across time series for - each alignment period. This reducer is valid for gauge and delta metrics - of numeric and distribution type. The value of the output is ``DOUBLE`` + REDUCE_MIN (int): Reduce by computing the minimum value across time series for each + alignment period. This reducer is valid for ``DELTA`` and ``GAUGE`` + metrics with numeric values. The ``value_type`` of the output is the + same as the ``value_type`` of the input. + REDUCE_MAX (int): Reduce by computing the maximum value across time series for each + alignment period. This reducer is valid for ``DELTA`` and ``GAUGE`` + metrics with numeric values. The ``value_type`` of the output is the + same as the ``value_type`` of the input. + REDUCE_SUM (int): Reduce by computing the sum across time series for each alignment + period. This reducer is valid for ``DELTA`` and ``GAUGE`` metrics with + numeric and distribution values. The ``value_type`` of the output is the + same as the ``value_type`` of the input. + REDUCE_STDDEV (int): Reduce by computing the standard deviation across time series for each + alignment period. This reducer is valid for ``DELTA`` and ``GAUGE`` + metrics with numeric or distribution values. The ``value_type`` of the + output is ``DOUBLE``. + REDUCE_COUNT (int): Reduce by computing the number of data points across time series for + each alignment period. This reducer is valid for ``DELTA`` and ``GAUGE`` + metrics of numeric, Boolean, distribution, and string ``value_type``. + The ``value_type`` of the output is ``INT64``. + REDUCE_COUNT_TRUE (int): Reduce by computing the number of ``True``-valued data points across + time series for each alignment period. This reducer is valid for + ``DELTA`` and ``GAUGE`` metrics of Boolean ``value_type``. The + ``value_type`` of the output is ``INT64``. + REDUCE_COUNT_FALSE (int): Reduce by computing the number of ``False``-valued data points across + time series for each alignment period. This reducer is valid for + ``DELTA`` and ``GAUGE`` metrics of Boolean ``value_type``. The + ``value_type`` of the output is ``INT64``. + REDUCE_FRACTION_TRUE (int): Reduce by computing the ratio of the number of ``True``-valued data + points to the total number of data points for each alignment period. + This reducer is valid for ``DELTA`` and ``GAUGE`` metrics of Boolean + ``value_type``. The output value is in the range [0.0, 1.0] and has + ``value_type`` ``DOUBLE``. + REDUCE_PERCENTILE_99 (int): Reduce by computing the `99th + percentile `__ of data points + across time series for each alignment period. This reducer is valid for + ``GAUGE`` and ``DELTA`` metrics of numeric and distribution type. The + value of the output is ``DOUBLE``. + REDUCE_PERCENTILE_95 (int): Reduce by computing the `95th + percentile `__ of data points + across time series for each alignment period. This reducer is valid for + ``GAUGE`` and ``DELTA`` metrics of numeric and distribution type. The + value of the output is ``DOUBLE``. + REDUCE_PERCENTILE_50 (int): Reduce by computing the `50th + percentile `__ of data points + across time series for each alignment period. This reducer is valid for + ``GAUGE`` and ``DELTA`` metrics of numeric and distribution type. The + value of the output is ``DOUBLE``. + REDUCE_PERCENTILE_05 (int): Reduce by computing the `5th + percentile `__ of data points + across time series for each alignment period. This reducer is valid for + ``GAUGE`` and ``DELTA`` metrics of numeric and distribution type. The + value of the output is ``DOUBLE``. """ REDUCE_NONE = 0 @@ -412,9 +436,9 @@ class ConditionCombinerType(enum.IntEnum): Attributes: COMBINE_UNSPECIFIED (int): An unspecified combiner. AND (int): Combine conditions using the logical ``AND`` operator. An incident is - created only if all conditions are met simultaneously. This combiner is - satisfied if all conditions are met, even if they are met on completely - different resources. + created only if all the conditions are met simultaneously. This combiner + is satisfied if all conditions are met, even if they are met on + completely different resources. OR (int): Combine conditions using the logical ``OR`` operator. An incident is created if any of the listed conditions is met. AND_WITH_MATCHING_RESOURCE (int): Combine conditions using logical ``AND`` operator, but unlike the @@ -583,6 +607,38 @@ class View(enum.IntEnum): class UptimeCheckConfig(object): + class HttpCheck(object): + class ContentType(enum.IntEnum): + """ + Header options corresponding to the Content-Type of the body in HTTP + requests. Note that a ``Content-Type`` header cannot be present in the + ``headers`` field if this field is specified. + + Attributes: + TYPE_UNSPECIFIED (int): No content type specified. If the request method is POST, an + unspecified content type results in a check creation rejection. + URL_ENCODED (int): ``body`` is in URL-encoded form. Equivalent to setting the + ``Content-Type`` to ``application/x-www-form-urlencoded`` in the HTTP + request. + """ + + TYPE_UNSPECIFIED = 0 + URL_ENCODED = 1 + + class RequestMethod(enum.IntEnum): + """ + The HTTP request method options. + + Attributes: + METHOD_UNSPECIFIED (int): No request method specified. + GET (int): GET request. + POST (int): POST request. + """ + + METHOD_UNSPECIFIED = 0 + GET = 1 + POST = 2 + class ContentMatcher(object): class ContentMatcherOption(enum.IntEnum): """ diff --git a/google/cloud/monitoring_v3/gapic/group_service_client.py b/google/cloud/monitoring_v3/gapic/group_service_client.py index 69876f98..6e931918 100644 --- a/google/cloud/monitoring_v3/gapic/group_service_client.py +++ b/google/cloud/monitoring_v3/gapic/group_service_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-monitoring", + "google-cloud-monitoring" ).version @@ -95,26 +95,16 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def group_path(cls, project, group): - """DEPRECATED. Return a fully-qualified group string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified group string.""" return google.api_core.path_template.expand( - "projects/{project}/groups/{group}", project=project, group=group, + "projects/{project}/groups/{group}", project=project, group=group ) @classmethod def project_path(cls, project): - """DEPRECATED. Return a fully-qualified project string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", project=project, + "projects/{project}", project=project ) def __init__( @@ -204,12 +194,12 @@ def __init__( self.transport = transport else: self.transport = group_service_grpc_transport.GroupServiceGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials, + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION, + gapic_version=_GAPIC_LIBRARY_VERSION ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -220,7 +210,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME], + client_config["interfaces"][self._INTERFACE_NAME] ) # Save a dictionary of cached API call functions. @@ -266,19 +256,37 @@ def list_groups( ... pass Args: - name (str): The project whose groups are to be listed. The format is - ``"projects/{project_id_or_number}"``. - children_of_group (str): A group name: ``"projects/{project_id_or_number}/groups/{group_id}"``. - Returns groups whose ``parentName`` field contains the group name. If no - groups have this parent, the results are empty. - ancestors_of_group (str): A group name: ``"projects/{project_id_or_number}/groups/{group_id}"``. + name (str): Required. The project whose groups are to be listed. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER] + children_of_group (str): A group name. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + + Returns groups whose ``parent_name`` field contains the group name. If + no groups have this parent, the results are empty. + ancestors_of_group (str): A group name. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + Returns groups that are ancestors of the specified group. The groups are returned in order, starting with the immediate parent and ending with the most distant ancestor. If the specified group has no immediate parent, the results are empty. - descendants_of_group (str): A group name: ``"projects/{project_id_or_number}/groups/{group_id}"``. + descendants_of_group (str): A group name. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + Returns the descendants of the specified group. This is a superset of - the results returned by the ``childrenOfGroup`` filter, and includes + the results returned by the ``children_of_group`` filter, and includes children-of-children, and so forth. page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- @@ -384,8 +392,11 @@ def get_group( >>> response = client.get_group(name) Args: - name (str): The group to retrieve. The format is - ``"projects/{project_id_or_number}/groups/{group_id}"``. + name (str): Required. The group to retrieve. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -419,7 +430,7 @@ def get_group( client_info=self._client_info, ) - request = group_service_pb2.GetGroupRequest(name=name,) + request = group_service_pb2.GetGroupRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -462,10 +473,13 @@ def create_group( >>> response = client.create_group(name, group) Args: - name (str): The project in which to create the group. The format is - ``"projects/{project_id_or_number}"``. - group (Union[dict, ~google.cloud.monitoring_v3.types.Group]): A group definition. It is an error to define the ``name`` field because - the system assigns the name. + name (str): Required. The project in which to create the group. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER] + group (Union[dict, ~google.cloud.monitoring_v3.types.Group]): Required. A group definition. It is an error to define the ``name`` + field because the system assigns the name. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.monitoring_v3.types.Group` @@ -504,7 +518,7 @@ def create_group( ) request = group_service_pb2.CreateGroupRequest( - name=name, group=group, validate_only=validate_only, + name=name, group=group, validate_only=validate_only ) if metadata is None: metadata = [] @@ -546,9 +560,9 @@ def update_group( >>> response = client.update_group(group) Args: - group (Union[dict, ~google.cloud.monitoring_v3.types.Group]): The new definition of the group. All fields of the existing group, - excepting ``name``, are replaced with the corresponding fields of this - group. + group (Union[dict, ~google.cloud.monitoring_v3.types.Group]): Required. The new definition of the group. All fields of the existing + group, excepting ``name``, are replaced with the corresponding fields of + this group. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.monitoring_v3.types.Group` @@ -587,7 +601,7 @@ def update_group( ) request = group_service_pb2.UpdateGroupRequest( - group=group, validate_only=validate_only, + group=group, validate_only=validate_only ) if metadata is None: metadata = [] @@ -627,8 +641,11 @@ def delete_group( >>> client.delete_group(name) Args: - name (str): The group to delete. The format is - ``"projects/{project_id_or_number}/groups/{group_id}"``. + name (str): Required. The group to delete. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] recursive (bool): If this field is true, then the request means to delete a group with all its descendants. Otherwise, the request means to delete a group only when it has no descendants. The default value is false. @@ -662,7 +679,7 @@ def delete_group( client_info=self._client_info, ) - request = group_service_pb2.DeleteGroupRequest(name=name, recursive=recursive,) + request = group_service_pb2.DeleteGroupRequest(name=name, recursive=recursive) if metadata is None: metadata = [] metadata = list(metadata) @@ -715,8 +732,11 @@ def list_group_members( ... pass Args: - name (str): The group whose members are listed. The format is - ``"projects/{project_id_or_number}/groups/{group_id}"``. + name (str): Required. The group whose members are listed. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page @@ -731,7 +751,7 @@ def list_group_members( :: - resource.type = "gce_instance" + `resource.type = "gce_instance"` interval (Union[dict, ~google.cloud.monitoring_v3.types.TimeInterval]): An optional time interval for which results should be returned. Only members that were part of the group during the specified interval are included in the response. If no interval is provided then the group @@ -776,7 +796,7 @@ def list_group_members( ) request = group_service_pb2.ListGroupMembersRequest( - name=name, page_size=page_size, filter=filter_, interval=interval, + name=name, page_size=page_size, filter=filter_, interval=interval ) if metadata is None: metadata = [] diff --git a/google/cloud/monitoring_v3/gapic/metric_service_client.py b/google/cloud/monitoring_v3/gapic/metric_service_client.py index a5c41fed..d9eb666c 100644 --- a/google/cloud/monitoring_v3/gapic/metric_service_client.py +++ b/google/cloud/monitoring_v3/gapic/metric_service_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-monitoring", + "google-cloud-monitoring" ).version @@ -90,12 +90,7 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def metric_descriptor_path(cls, project, metric_descriptor): - """DEPRECATED. Return a fully-qualified metric_descriptor string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified metric_descriptor string.""" return google.api_core.path_template.expand( "projects/{project}/metricDescriptors/{metric_descriptor=**}", project=project, @@ -104,12 +99,7 @@ def metric_descriptor_path(cls, project, metric_descriptor): @classmethod def monitored_resource_descriptor_path(cls, project, monitored_resource_descriptor): - """DEPRECATED. Return a fully-qualified monitored_resource_descriptor string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified monitored_resource_descriptor string.""" return google.api_core.path_template.expand( "projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}", project=project, @@ -118,14 +108,9 @@ def monitored_resource_descriptor_path(cls, project, monitored_resource_descript @classmethod def project_path(cls, project): - """DEPRECATED. Return a fully-qualified project string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", project=project, + "projects/{project}", project=project ) def __init__( @@ -215,12 +200,12 @@ def __init__( self.transport = transport else: self.transport = metric_service_grpc_transport.MetricServiceGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials, + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION, + gapic_version=_GAPIC_LIBRARY_VERSION ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -231,7 +216,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME], + client_config["interfaces"][self._INTERFACE_NAME] ) # Save a dictionary of cached API call functions. @@ -251,7 +236,7 @@ def list_monitored_resource_descriptors( metadata=None, ): """ - Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + Lists monitored resource descriptors that match a filter. This method does not require a Workspace. Example: >>> from google.cloud import monitoring_v3 @@ -275,8 +260,11 @@ def list_monitored_resource_descriptors( ... pass Args: - name (str): The project on which to execute the request. The format is - ``"projects/{project_id_or_number}"``. + name (str): Required. The project on which to execute the request. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER] filter_ (str): An optional `filter `__ describing the descriptors to be returned. The filter can reference the @@ -332,7 +320,7 @@ def list_monitored_resource_descriptors( ) request = metric_service_pb2.ListMonitoredResourceDescriptorsRequest( - name=name, filter=filter_, page_size=page_size, + name=name, filter=filter_, page_size=page_size ) if metadata is None: metadata = [] @@ -370,7 +358,7 @@ def get_monitored_resource_descriptor( metadata=None, ): """ - Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + Gets a single monitored resource descriptor. This method does not require a Workspace. Example: >>> from google.cloud import monitoring_v3 @@ -382,9 +370,13 @@ def get_monitored_resource_descriptor( >>> response = client.get_monitored_resource_descriptor(name) Args: - name (str): The monitored resource descriptor to get. The format is - ``"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"``. - The ``{resource_type}`` is a predefined type, such as + name (str): Required. The monitored resource descriptor to get. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] + + The ``[RESOURCE_TYPE]`` is a predefined type, such as ``cloudsql_database``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -423,7 +415,7 @@ def get_monitored_resource_descriptor( client_info=self._client_info, ) - request = metric_service_pb2.GetMonitoredResourceDescriptorRequest(name=name,) + request = metric_service_pb2.GetMonitoredResourceDescriptorRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -451,7 +443,7 @@ def list_metric_descriptors( metadata=None, ): """ - Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + Lists metric descriptors that match a filter. This method does not require a Workspace. Example: >>> from google.cloud import monitoring_v3 @@ -475,8 +467,11 @@ def list_metric_descriptors( ... pass Args: - name (str): The project on which to execute the request. The format is - ``"projects/{project_id_or_number}"``. + name (str): Required. The project on which to execute the request. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER] filter_ (str): If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the `filter `__ @@ -529,7 +524,7 @@ def list_metric_descriptors( ) request = metric_service_pb2.ListMetricDescriptorsRequest( - name=name, filter=filter_, page_size=page_size, + name=name, filter=filter_, page_size=page_size ) if metadata is None: metadata = [] @@ -567,7 +562,7 @@ def get_metric_descriptor( metadata=None, ): """ - Gets a single metric descriptor. This method does not require a Stackdriver account. + Gets a single metric descriptor. This method does not require a Workspace. Example: >>> from google.cloud import monitoring_v3 @@ -579,9 +574,14 @@ def get_metric_descriptor( >>> response = client.get_metric_descriptor(name) Args: - name (str): The metric descriptor on which to execute the request. The format is - ``"projects/{project_id_or_number}/metricDescriptors/{metric_id}"``. An - example value of ``{metric_id}`` is + name (str): Required. The metric descriptor on which to execute the request. The + format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + + An example value of ``[METRIC_ID]`` is ``"compute.googleapis.com/instance/disk/read_bytes_count"``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -616,7 +616,7 @@ def get_metric_descriptor( client_info=self._client_info, ) - request = metric_service_pb2.GetMetricDescriptorRequest(name=name,) + request = metric_service_pb2.GetMetricDescriptorRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -659,9 +659,12 @@ def create_metric_descriptor( >>> response = client.create_metric_descriptor(name, metric_descriptor) Args: - name (str): The project on which to execute the request. The format is - ``"projects/{project_id_or_number}"``. - metric_descriptor (Union[dict, ~google.cloud.monitoring_v3.types.MetricDescriptor]): The new `custom + name (str): Required. The project on which to execute the request. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER] + metric_descriptor (Union[dict, ~google.cloud.monitoring_v3.types.MetricDescriptor]): Required. The new `custom metric `__ descriptor. @@ -701,7 +704,7 @@ def create_metric_descriptor( ) request = metric_service_pb2.CreateMetricDescriptorRequest( - name=name, metric_descriptor=metric_descriptor, + name=name, metric_descriptor=metric_descriptor ) if metadata is None: metadata = [] @@ -742,9 +745,14 @@ def delete_metric_descriptor( >>> client.delete_metric_descriptor(name) Args: - name (str): The metric descriptor on which to execute the request. The format is - ``"projects/{project_id_or_number}/metricDescriptors/{metric_id}"``. An - example of ``{metric_id}`` is: + name (str): Required. The metric descriptor on which to execute the request. The + format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + + An example of ``[METRIC_ID]`` is: ``"custom.googleapis.com/my_test_metric"``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -776,7 +784,7 @@ def delete_metric_descriptor( client_info=self._client_info, ) - request = metric_service_pb2.DeleteMetricDescriptorRequest(name=name,) + request = metric_service_pb2.DeleteMetricDescriptorRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -808,7 +816,7 @@ def list_time_series( metadata=None, ): """ - Lists time series that match a filter. This method does not require a Stackdriver account. + Lists time series that match a filter. This method does not require a Workspace. Example: >>> from google.cloud import monitoring_v3 @@ -842,9 +850,12 @@ def list_time_series( ... pass Args: - name (str): The project on which to execute the request. The format is - "projects/{project\_id\_or\_number}". - filter_ (str): A `monitoring + name (str): Required. The project on which to execute the request. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER] + filter_ (str): Required. A `monitoring filter `__ that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and @@ -854,13 +865,13 @@ def list_time_series( metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" - interval (Union[dict, ~google.cloud.monitoring_v3.types.TimeInterval]): The time interval for which results should be returned. Only time series + interval (Union[dict, ~google.cloud.monitoring_v3.types.TimeInterval]): Required. The time interval for which results should be returned. Only time series that contain data points in the specified interval are included in the response. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.monitoring_v3.types.TimeInterval` - view (~google.cloud.monitoring_v3.types.TimeSeriesView): Specifies which information is returned about the time series. + view (~google.cloud.monitoring_v3.types.TimeSeriesView): Required. Specifies which information is returned about the time series. aggregation (Union[dict, ~google.cloud.monitoring_v3.types.Aggregation]): Specifies the alignment of data points in individual time series as well as how to combine the retrieved time series across specified labels. @@ -976,13 +987,16 @@ def create_time_series( >>> client.create_time_series(name, time_series) Args: - name (str): The project on which to execute the request. The format is - ``"projects/{project_id_or_number}"``. - time_series (list[Union[dict, ~google.cloud.monitoring_v3.types.TimeSeries]]): The new data to be added to a list of time series. Adds at most one data - point to each of several time series. The new data point must be more - recent than any other point in its time series. Each ``TimeSeries`` - value must fully specify a unique time series by supplying all label - values for the metric and the monitored resource. + name (str): Required. The project on which to execute the request. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER] + time_series (list[Union[dict, ~google.cloud.monitoring_v3.types.TimeSeries]]): Required. The new data to be added to a list of time series. Adds at + most one data point to each of several time series. The new data point + must be more recent than any other point in its time series. Each + ``TimeSeries`` value must fully specify a unique time series by + supplying all label values for the metric and the monitored resource. The maximum number of ``TimeSeries`` objects per ``Create`` request is 200. @@ -1020,7 +1034,7 @@ def create_time_series( ) request = metric_service_pb2.CreateTimeSeriesRequest( - name=name, time_series=time_series, + name=name, time_series=time_series ) if metadata is None: metadata = [] diff --git a/google/cloud/monitoring_v3/gapic/metric_service_client_config.py b/google/cloud/monitoring_v3/gapic/metric_service_client_config.py index 16594923..57315f7c 100644 --- a/google/cloud/monitoring_v3/gapic/metric_service_client_config.py +++ b/google/cloud/monitoring_v3/gapic/metric_service_client_config.py @@ -10,9 +10,9 @@ "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.3, + "max_rpc_timeout_millis": 90000, "total_timeout_millis": 600000, } }, @@ -48,7 +48,7 @@ "retry_params_name": "default", }, "ListTimeSeries": { - "timeout_millis": 60000, + "timeout_millis": 90000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, diff --git a/google/cloud/monitoring_v3/gapic/notification_channel_service_client.py b/google/cloud/monitoring_v3/gapic/notification_channel_service_client.py index 67e8b33e..70692644 100644 --- a/google/cloud/monitoring_v3/gapic/notification_channel_service_client.py +++ b/google/cloud/monitoring_v3/gapic/notification_channel_service_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-monitoring", + "google-cloud-monitoring" ).version @@ -96,12 +96,7 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def notification_channel_path(cls, project, notification_channel): - """DEPRECATED. Return a fully-qualified notification_channel string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified notification_channel string.""" return google.api_core.path_template.expand( "projects/{project}/notificationChannels/{notification_channel}", project=project, @@ -110,12 +105,7 @@ def notification_channel_path(cls, project, notification_channel): @classmethod def notification_channel_descriptor_path(cls, project, channel_descriptor): - """DEPRECATED. Return a fully-qualified notification_channel_descriptor string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified notification_channel_descriptor string.""" return google.api_core.path_template.expand( "projects/{project}/notificationChannelDescriptors/{channel_descriptor}", project=project, @@ -124,14 +114,9 @@ def notification_channel_descriptor_path(cls, project, channel_descriptor): @classmethod def project_path(cls, project): - """DEPRECATED. Return a fully-qualified project string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", project=project, + "projects/{project}", project=project ) def __init__( @@ -221,12 +206,12 @@ def __init__( self.transport = transport else: self.transport = notification_channel_service_grpc_transport.NotificationChannelServiceGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials, + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION, + gapic_version=_GAPIC_LIBRARY_VERSION ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -237,7 +222,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME], + client_config["interfaces"][self._INTERFACE_NAME] ) # Save a dictionary of cached API call functions. @@ -281,12 +266,12 @@ def list_notification_channel_descriptors( ... pass Args: - name (str): The REST resource name of the parent from which to retrieve the - notification channel descriptors. The expected syntax is: + name (str): Required. The REST resource name of the parent from which to retrieve + the notification channel descriptors. The expected syntax is: :: - projects/[PROJECT_ID] + projects/[PROJECT_ID_OR_NUMBER] Note that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the @@ -337,7 +322,7 @@ def list_notification_channel_descriptors( ) request = notification_service_pb2.ListNotificationChannelDescriptorsRequest( - name=name, page_size=page_size, + name=name, page_size=page_size ) if metadata is None: metadata = [] @@ -388,8 +373,12 @@ def get_notification_channel_descriptor( >>> response = client.get_notification_channel_descriptor(name) Args: - name (str): The channel type for which to execute the request. The format is - ``projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}``. + name (str): Required. The channel type for which to execute the request. The format + is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -428,7 +417,7 @@ def get_notification_channel_descriptor( ) request = notification_service_pb2.GetNotificationChannelDescriptorRequest( - name=name, + name=name ) if metadata is None: metadata = [] @@ -482,11 +471,15 @@ def list_notification_channels( ... pass Args: - name (str): The project on which to execute the request. The format is - ``projects/[PROJECT_ID]``. That is, this names the container in which to - look for the notification channels; it does not name a specific channel. - To query a specific channel by REST resource name, use the - ``GetNotificationChannel`` operation. + name (str): Required. The project on which to execute the request. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER] + + This names the container in which to look for the notification channels; + it does not name a specific channel. To query a specific channel by REST + resource name, use the ``GetNotificationChannel`` operation. filter_ (str): If provided, this field specifies the criteria that must be met by notification channels to be included in the response. @@ -542,7 +535,7 @@ def list_notification_channels( ) request = notification_service_pb2.ListNotificationChannelsRequest( - name=name, filter=filter_, order_by=order_by, page_size=page_size, + name=name, filter=filter_, order_by=order_by, page_size=page_size ) if metadata is None: metadata = [] @@ -596,8 +589,11 @@ def get_notification_channel( >>> response = client.get_notification_channel(name) Args: - name (str): The channel for which to execute the request. The format is - ``projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]``. + name (str): Required. The channel for which to execute the request. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -631,7 +627,7 @@ def get_notification_channel( client_info=self._client_info, ) - request = notification_service_pb2.GetNotificationChannelRequest(name=name,) + request = notification_service_pb2.GetNotificationChannelRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -674,18 +670,17 @@ def create_notification_channel( >>> response = client.create_notification_channel(name, notification_channel) Args: - name (str): The project on which to execute the request. The format is: + name (str): Required. The project on which to execute the request. The format is: :: - projects/[PROJECT_ID] + projects/[PROJECT_ID_OR_NUMBER] - Note that this names the container into which the channel will be - written. This does not name the newly created channel. The resulting - channel's name will have a normalized version of this field as a prefix, - but will add ``/notificationChannels/[CHANNEL_ID]`` to identify the - channel. - notification_channel (Union[dict, ~google.cloud.monitoring_v3.types.NotificationChannel]): The definition of the ``NotificationChannel`` to create. + This names the container into which the channel will be written, this + does not name the newly created channel. The resulting channel's name + will have a normalized version of this field as a prefix, but will add + ``/notificationChannels/[CHANNEL_ID]`` to identify the channel. + notification_channel (Union[dict, ~google.cloud.monitoring_v3.types.NotificationChannel]): Required. The definition of the ``NotificationChannel`` to create. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.monitoring_v3.types.NotificationChannel` @@ -725,7 +720,7 @@ def create_notification_channel( ) request = notification_service_pb2.CreateNotificationChannelRequest( - name=name, notification_channel=notification_channel, + name=name, notification_channel=notification_channel ) if metadata is None: metadata = [] @@ -767,10 +762,10 @@ def update_notification_channel( >>> response = client.update_notification_channel(notification_channel) Args: - notification_channel (Union[dict, ~google.cloud.monitoring_v3.types.NotificationChannel]): A description of the changes to be applied to the specified notification - channel. The description must provide a definition for fields to be - updated; the names of these fields should also be included in the - ``update_mask``. + notification_channel (Union[dict, ~google.cloud.monitoring_v3.types.NotificationChannel]): Required. A description of the changes to be applied to the specified + notification channel. The description must provide a definition for + fields to be updated; the names of these fields should also be included + in the ``update_mask``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.monitoring_v3.types.NotificationChannel` @@ -814,7 +809,7 @@ def update_notification_channel( ) request = notification_service_pb2.UpdateNotificationChannelRequest( - notification_channel=notification_channel, update_mask=update_mask, + notification_channel=notification_channel, update_mask=update_mask ) if metadata is None: metadata = [] @@ -854,8 +849,11 @@ def delete_notification_channel( >>> client.delete_notification_channel(name) Args: - name (str): The channel for which to execute the request. The format is - ``projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]``. + name (str): Required. The channel for which to execute the request. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] force (bool): If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing @@ -893,7 +891,7 @@ def delete_notification_channel( ) request = notification_service_pb2.DeleteNotificationChannelRequest( - name=name, force=force, + name=name, force=force ) if metadata is None: metadata = [] @@ -933,7 +931,7 @@ def send_notification_channel_verification_code( >>> client.send_notification_channel_verification_code(name) Args: - name (str): The notification channel to which to send a verification code. + name (str): Required. The notification channel to which to send a verification code. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -969,7 +967,7 @@ def send_notification_channel_verification_code( ) request = notification_service_pb2.SendNotificationChannelVerificationCodeRequest( - name=name, + name=name ) if metadata is None: metadata = [] @@ -1029,7 +1027,7 @@ def get_notification_channel_verification_code( >>> response = client.get_notification_channel_verification_code(name) Args: - name (str): The notification channel for which a verification code is to be generated + name (str): Required. The notification channel for which a verification code is to be generated and retrieved. This must name a channel that is already verified; if the specified channel is not verified, the request will fail. expire_time (Union[dict, ~google.cloud.monitoring_v3.types.Timestamp]): The desired expiration time. If specified, the API will guarantee that @@ -1082,7 +1080,7 @@ def get_notification_channel_verification_code( ) request = notification_service_pb2.GetNotificationChannelVerificationCodeRequest( - name=name, expire_time=expire_time, + name=name, expire_time=expire_time ) if metadata is None: metadata = [] @@ -1127,10 +1125,10 @@ def verify_notification_channel( >>> response = client.verify_notification_channel(name, code) Args: - name (str): The notification channel to verify. - code (str): The verification code that was delivered to the channel as a result of - invoking the ``SendNotificationChannelVerificationCode`` API method or - that was retrieved from a verified channel via + name (str): Required. The notification channel to verify. + code (str): Required. The verification code that was delivered to the channel as a + result of invoking the ``SendNotificationChannelVerificationCode`` API + method or that was retrieved from a verified channel via ``GetNotificationChannelVerificationCode``. For example, one might have "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any @@ -1171,7 +1169,7 @@ def verify_notification_channel( ) request = notification_service_pb2.VerifyNotificationChannelRequest( - name=name, code=code, + name=name, code=code ) if metadata is None: metadata = [] diff --git a/google/cloud/monitoring_v3/gapic/service_monitoring_service_client.py b/google/cloud/monitoring_v3/gapic/service_monitoring_service_client.py index 82b65ad2..f0941b18 100644 --- a/google/cloud/monitoring_v3/gapic/service_monitoring_service_client.py +++ b/google/cloud/monitoring_v3/gapic/service_monitoring_service_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -60,16 +60,16 @@ _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-monitoring", + "google-cloud-monitoring" ).version class ServiceMonitoringServiceClient(object): """ - The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints - for managing and querying aspects of a workspace's services. These - include the ``Service``'s monitored resources, its Service-Level - Objectives, and a taxonomy of categorized Health Metrics. + The Cloud Monitoring Service-Oriented Monitoring API has endpoints for + managing and querying aspects of a workspace's services. These include + the ``Service``'s monitored resources, its Service-Level Objectives, and + a taxonomy of categorized Health Metrics. """ SERVICE_ADDRESS = "monitoring.googleapis.com:443" @@ -101,36 +101,21 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def project_path(cls, project): - """DEPRECATED. Return a fully-qualified project string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", project=project, + "projects/{project}", project=project ) @classmethod def service_path(cls, project, service): - """DEPRECATED. Return a fully-qualified service string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified service string.""" return google.api_core.path_template.expand( - "projects/{project}/services/{service}", project=project, service=service, + "projects/{project}/services/{service}", project=project, service=service ) @classmethod def service_level_objective_path(cls, project, service, service_level_objective): - """DEPRECATED. Return a fully-qualified service_level_objective string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified service_level_objective string.""" return google.api_core.path_template.expand( "projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}", project=project, @@ -225,12 +210,12 @@ def __init__( self.transport = transport else: self.transport = service_monitoring_service_grpc_transport.ServiceMonitoringServiceGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials, + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION, + gapic_version=_GAPIC_LIBRARY_VERSION ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -241,7 +226,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME], + client_config["interfaces"][self._INTERFACE_NAME] ) # Save a dictionary of cached API call functions. @@ -276,14 +261,17 @@ def create_service( >>> response = client.create_service(parent, service) Args: - parent (str): Resource name of the parent workspace. Of the form - ``projects/{project_id}``. - service (Union[dict, ~google.cloud.monitoring_v3.types.Service]): The ``Service`` to create. + parent (str): Required. Resource name of the parent workspace. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER] + service (Union[dict, ~google.cloud.monitoring_v3.types.Service]): Required. The ``Service`` to create. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.monitoring_v3.types.Service` service_id (str): Optional. The Service id to use for this Service. If omitted, an id will - be generated instead. Must match the pattern [a-z0-9-]+ + be generated instead. Must match the pattern ``[a-z0-9\-]+`` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -318,7 +306,7 @@ def create_service( ) request = service_service_pb2.CreateServiceRequest( - parent=parent, service=service, service_id=service_id, + parent=parent, service=service, service_id=service_id ) if metadata is None: metadata = [] @@ -357,8 +345,11 @@ def get_service( >>> response = client.get_service(name) Args: - name (str): Resource name of the ``Service``. Of the form - ``projects/{project_id}/services/{service_id}``. + name (str): Required. Resource name of the ``Service``. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -392,7 +383,7 @@ def get_service( client_info=self._client_info, ) - request = service_service_pb2.GetServiceRequest(name=name,) + request = service_service_pb2.GetServiceRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -444,8 +435,13 @@ def list_services( ... pass Args: - parent (str): Resource name of the parent ``Workspace``. Of the form - ``projects/{project_id}``. + parent (str): Required. Resource name of the parent containing the listed services, + either a project or a Monitoring Workspace. The formats are: + + :: + + projects/[PROJECT_ID_OR_NUMBER] + workspaces/[HOST_PROJECT_ID_OR_NUMBER] filter_ (str): A filter specifying what ``Service``\ s to return. The filter currently supports the following fields: @@ -505,7 +501,7 @@ def list_services( ) request = service_service_pb2.ListServicesRequest( - parent=parent, filter=filter_, page_size=page_size, + parent=parent, filter=filter_, page_size=page_size ) if metadata is None: metadata = [] @@ -557,8 +553,8 @@ def update_service( >>> response = client.update_service(service) Args: - service (Union[dict, ~google.cloud.monitoring_v3.types.Service]): The ``Service`` to draw updates from. The given ``name`` specifies the - resource to update. + service (Union[dict, ~google.cloud.monitoring_v3.types.Service]): Required. The ``Service`` to draw updates from. The given ``name`` + specifies the resource to update. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.monitoring_v3.types.Service` @@ -600,7 +596,7 @@ def update_service( ) request = service_service_pb2.UpdateServiceRequest( - service=service, update_mask=update_mask, + service=service, update_mask=update_mask ) if metadata is None: metadata = [] @@ -639,8 +635,11 @@ def delete_service( >>> client.delete_service(name) Args: - name (str): Resource name of the ``Service`` to delete. Of the form - ``projects/{project_id}/service/{service_id}``. + name (str): Required. Resource name of the ``Service`` to delete. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -671,7 +670,7 @@ def delete_service( client_info=self._client_info, ) - request = service_service_pb2.DeleteServiceRequest(name=name,) + request = service_service_pb2.DeleteServiceRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -714,16 +713,19 @@ def create_service_level_objective( >>> response = client.create_service_level_objective(parent, service_level_objective) Args: - parent (str): Resource name of the parent ``Service``. Of the form - ``projects/{project_id}/services/{service_id}``. - service_level_objective (Union[dict, ~google.cloud.monitoring_v3.types.ServiceLevelObjective]): The ``ServiceLevelObjective`` to create. The provided ``name`` will be - respected if no ``ServiceLevelObjective`` exists with this name. + parent (str): Required. Resource name of the parent ``Service``. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + service_level_objective (Union[dict, ~google.cloud.monitoring_v3.types.ServiceLevelObjective]): Required. The ``ServiceLevelObjective`` to create. The provided ``name`` + will be respected if no ``ServiceLevelObjective`` exists with this name. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.monitoring_v3.types.ServiceLevelObjective` service_level_objective_id (str): Optional. The ServiceLevelObjective id to use for this ServiceLevelObjective. If omitted, an id will be generated instead. Must - match the pattern [a-z0-9-]+ + match the pattern ``[a-z0-9\-]+`` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -802,8 +804,12 @@ def get_service_level_objective( >>> response = client.get_service_level_objective(name) Args: - name (str): Resource name of the ``ServiceLevelObjective`` to get. Of the form - ``projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}``. + name (str): Required. Resource name of the ``ServiceLevelObjective`` to get. The + format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] view (~google.cloud.monitoring_v3.types.View): View of the ``ServiceLevelObjective`` to return. If ``DEFAULT``, return the ``ServiceLevelObjective`` as originally defined. If ``EXPLICIT`` and the ``ServiceLevelObjective`` is defined in terms of a ``BasicSli``, @@ -845,7 +851,7 @@ def get_service_level_objective( ) request = service_service_pb2.GetServiceLevelObjectiveRequest( - name=name, view=view, + name=name, view=view ) if metadata is None: metadata = [] @@ -899,8 +905,13 @@ def list_service_level_objectives( ... pass Args: - parent (str): Resource name of the parent ``Service``. Of the form - ``projects/{project_id}/services/{service_id}``. + parent (str): Required. Resource name of the parent containing the listed SLOs, either + a project or a Monitoring Workspace. The formats are: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- filter_ (str): A filter specifying what ``ServiceLevelObjective``\ s to return. page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- @@ -951,7 +962,7 @@ def list_service_level_objectives( ) request = service_service_pb2.ListServiceLevelObjectivesRequest( - parent=parent, filter=filter_, page_size=page_size, view=view, + parent=parent, filter=filter_, page_size=page_size, view=view ) if metadata is None: metadata = [] @@ -1003,8 +1014,8 @@ def update_service_level_objective( >>> response = client.update_service_level_objective(service_level_objective) Args: - service_level_objective (Union[dict, ~google.cloud.monitoring_v3.types.ServiceLevelObjective]): The ``ServiceLevelObjective`` to draw updates from. The given ``name`` - specifies the resource to update. + service_level_objective (Union[dict, ~google.cloud.monitoring_v3.types.ServiceLevelObjective]): Required. The ``ServiceLevelObjective`` to draw updates from. The given + ``name`` specifies the resource to update. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.monitoring_v3.types.ServiceLevelObjective` @@ -1048,7 +1059,7 @@ def update_service_level_objective( ) request = service_service_pb2.UpdateServiceLevelObjectiveRequest( - service_level_objective=service_level_objective, update_mask=update_mask, + service_level_objective=service_level_objective, update_mask=update_mask ) if metadata is None: metadata = [] @@ -1089,8 +1100,12 @@ def delete_service_level_objective( >>> client.delete_service_level_objective(name) Args: - name (str): Resource name of the ``ServiceLevelObjective`` to delete. Of the form - ``projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}``. + name (str): Required. Resource name of the ``ServiceLevelObjective`` to delete. The + format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -1123,7 +1138,7 @@ def delete_service_level_objective( client_info=self._client_info, ) - request = service_service_pb2.DeleteServiceLevelObjectiveRequest(name=name,) + request = service_service_pb2.DeleteServiceLevelObjectiveRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) diff --git a/google/cloud/monitoring_v3/gapic/transports/alert_policy_service_grpc_transport.py b/google/cloud/monitoring_v3/gapic/transports/alert_policy_service_grpc_transport.py index c0b5a2e5..e911a849 100644 --- a/google/cloud/monitoring_v3/gapic/transports/alert_policy_service_grpc_transport.py +++ b/google/cloud/monitoring_v3/gapic/transports/alert_policy_service_grpc_transport.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive.", + "The `channel` and `credentials` arguments are mutually " "exclusive." ) # Create the channel. @@ -79,7 +79,7 @@ def __init__( self._stubs = { "alert_policy_service_stub": alert_service_pb2_grpc.AlertPolicyServiceStub( channel - ), + ) } @classmethod diff --git a/google/cloud/monitoring_v3/gapic/transports/group_service_grpc_transport.py b/google/cloud/monitoring_v3/gapic/transports/group_service_grpc_transport.py index dd6971c0..f1916baf 100644 --- a/google/cloud/monitoring_v3/gapic/transports/group_service_grpc_transport.py +++ b/google/cloud/monitoring_v3/gapic/transports/group_service_grpc_transport.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive.", + "The `channel` and `credentials` arguments are mutually " "exclusive." ) # Create the channel. @@ -77,7 +77,7 @@ def __init__( # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - "group_service_stub": group_service_pb2_grpc.GroupServiceStub(channel), + "group_service_stub": group_service_pb2_grpc.GroupServiceStub(channel) } @classmethod diff --git a/google/cloud/monitoring_v3/gapic/transports/metric_service_grpc_transport.py b/google/cloud/monitoring_v3/gapic/transports/metric_service_grpc_transport.py index d1cb8d5d..a95e3d13 100644 --- a/google/cloud/monitoring_v3/gapic/transports/metric_service_grpc_transport.py +++ b/google/cloud/monitoring_v3/gapic/transports/metric_service_grpc_transport.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive.", + "The `channel` and `credentials` arguments are mutually " "exclusive." ) # Create the channel. @@ -77,7 +77,7 @@ def __init__( # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - "metric_service_stub": metric_service_pb2_grpc.MetricServiceStub(channel), + "metric_service_stub": metric_service_pb2_grpc.MetricServiceStub(channel) } @classmethod @@ -116,7 +116,7 @@ def channel(self): def list_monitored_resource_descriptors(self): """Return the gRPC stub for :meth:`MetricServiceClient.list_monitored_resource_descriptors`. - Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + Lists monitored resource descriptors that match a filter. This method does not require a Workspace. Returns: Callable: A callable which accepts the appropriate @@ -129,7 +129,7 @@ def list_monitored_resource_descriptors(self): def get_monitored_resource_descriptor(self): """Return the gRPC stub for :meth:`MetricServiceClient.get_monitored_resource_descriptor`. - Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + Gets a single monitored resource descriptor. This method does not require a Workspace. Returns: Callable: A callable which accepts the appropriate @@ -142,7 +142,7 @@ def get_monitored_resource_descriptor(self): def list_metric_descriptors(self): """Return the gRPC stub for :meth:`MetricServiceClient.list_metric_descriptors`. - Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + Lists metric descriptors that match a filter. This method does not require a Workspace. Returns: Callable: A callable which accepts the appropriate @@ -155,7 +155,7 @@ def list_metric_descriptors(self): def get_metric_descriptor(self): """Return the gRPC stub for :meth:`MetricServiceClient.get_metric_descriptor`. - Gets a single metric descriptor. This method does not require a Stackdriver account. + Gets a single metric descriptor. This method does not require a Workspace. Returns: Callable: A callable which accepts the appropriate @@ -197,7 +197,7 @@ def delete_metric_descriptor(self): def list_time_series(self): """Return the gRPC stub for :meth:`MetricServiceClient.list_time_series`. - Lists time series that match a filter. This method does not require a Stackdriver account. + Lists time series that match a filter. This method does not require a Workspace. Returns: Callable: A callable which accepts the appropriate diff --git a/google/cloud/monitoring_v3/gapic/transports/notification_channel_service_grpc_transport.py b/google/cloud/monitoring_v3/gapic/transports/notification_channel_service_grpc_transport.py index e967e20e..ce54f4f7 100644 --- a/google/cloud/monitoring_v3/gapic/transports/notification_channel_service_grpc_transport.py +++ b/google/cloud/monitoring_v3/gapic/transports/notification_channel_service_grpc_transport.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive.", + "The `channel` and `credentials` arguments are mutually " "exclusive." ) # Create the channel. @@ -79,7 +79,7 @@ def __init__( self._stubs = { "notification_channel_service_stub": notification_service_pb2_grpc.NotificationChannelServiceStub( channel - ), + ) } @classmethod diff --git a/google/cloud/monitoring_v3/gapic/transports/service_monitoring_service_grpc_transport.py b/google/cloud/monitoring_v3/gapic/transports/service_monitoring_service_grpc_transport.py index 2602a33e..f28253b1 100644 --- a/google/cloud/monitoring_v3/gapic/transports/service_monitoring_service_grpc_transport.py +++ b/google/cloud/monitoring_v3/gapic/transports/service_monitoring_service_grpc_transport.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive.", + "The `channel` and `credentials` arguments are mutually " "exclusive." ) # Create the channel. @@ -79,7 +79,7 @@ def __init__( self._stubs = { "service_monitoring_service_stub": service_service_pb2_grpc.ServiceMonitoringServiceStub( channel - ), + ) } @classmethod diff --git a/google/cloud/monitoring_v3/gapic/transports/uptime_check_service_grpc_transport.py b/google/cloud/monitoring_v3/gapic/transports/uptime_check_service_grpc_transport.py index cc1c1278..80aca866 100644 --- a/google/cloud/monitoring_v3/gapic/transports/uptime_check_service_grpc_transport.py +++ b/google/cloud/monitoring_v3/gapic/transports/uptime_check_service_grpc_transport.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive.", + "The `channel` and `credentials` arguments are mutually " "exclusive." ) # Create the channel. @@ -79,7 +79,7 @@ def __init__( self._stubs = { "uptime_check_service_stub": uptime_service_pb2_grpc.UptimeCheckServiceStub( channel - ), + ) } @classmethod diff --git a/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py b/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py index d9dd41a0..548f5ac6 100644 --- a/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py +++ b/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -63,7 +63,7 @@ _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-monitoring", + "google-cloud-monitoring" ).version @@ -108,24 +108,14 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def project_path(cls, project): - """DEPRECATED. Return a fully-qualified project string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", project=project, + "projects/{project}", project=project ) @classmethod def uptime_check_config_path(cls, project, uptime_check_config): - """DEPRECATED. Return a fully-qualified uptime_check_config string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified uptime_check_config string.""" return google.api_core.path_template.expand( "projects/{project}/uptimeCheckConfigs/{uptime_check_config}", project=project, @@ -219,12 +209,12 @@ def __init__( self.transport = transport else: self.transport = uptime_check_service_grpc_transport.UptimeCheckServiceGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials, + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION, + gapic_version=_GAPIC_LIBRARY_VERSION ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -235,7 +225,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME], + client_config["interfaces"][self._INTERFACE_NAME] ) # Save a dictionary of cached API call functions. @@ -279,8 +269,12 @@ def list_uptime_check_configs( ... pass Args: - parent (str): The project whose Uptime check configurations are listed. The format is - ``projects/[PROJECT_ID]``. + parent (str): Required. The project whose Uptime check configurations are listed. The + format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER] page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page @@ -323,7 +317,7 @@ def list_uptime_check_configs( ) request = uptime_service_pb2.ListUptimeCheckConfigsRequest( - parent=parent, page_size=page_size, + parent=parent, page_size=page_size ) if metadata is None: metadata = [] @@ -373,8 +367,11 @@ def get_uptime_check_config( >>> response = client.get_uptime_check_config(name) Args: - name (str): The Uptime check configuration to retrieve. The format is - ``projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]``. + name (str): Required. The Uptime check configuration to retrieve. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -408,7 +405,7 @@ def get_uptime_check_config( client_info=self._client_info, ) - request = uptime_service_pb2.GetUptimeCheckConfigRequest(name=name,) + request = uptime_service_pb2.GetUptimeCheckConfigRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -450,9 +447,13 @@ def create_uptime_check_config( >>> response = client.create_uptime_check_config(parent, uptime_check_config) Args: - parent (str): The project in which to create the Uptime check. The format is - ``projects/[PROJECT_ID]``. - uptime_check_config (Union[dict, ~google.cloud.monitoring_v3.types.UptimeCheckConfig]): The new Uptime check configuration. + parent (str): Required. The project in which to create the Uptime check. The format + is: + + :: + + projects/[PROJECT_ID_OR_NUMBER] + uptime_check_config (Union[dict, ~google.cloud.monitoring_v3.types.UptimeCheckConfig]): Required. The new Uptime check configuration. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.monitoring_v3.types.UptimeCheckConfig` @@ -490,7 +491,7 @@ def create_uptime_check_config( ) request = uptime_service_pb2.CreateUptimeCheckConfigRequest( - parent=parent, uptime_check_config=uptime_check_config, + parent=parent, uptime_check_config=uptime_check_config ) if metadata is None: metadata = [] @@ -589,7 +590,7 @@ def update_uptime_check_config( ) request = uptime_service_pb2.UpdateUptimeCheckConfigRequest( - uptime_check_config=uptime_check_config, update_mask=update_mask, + uptime_check_config=uptime_check_config, update_mask=update_mask ) if metadata is None: metadata = [] @@ -630,8 +631,11 @@ def delete_uptime_check_config( >>> client.delete_uptime_check_config(name) Args: - name (str): The Uptime check configuration to delete. The format is - ``projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]``. + name (str): Required. The Uptime check configuration to delete. The format is: + + :: + + projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -662,7 +666,7 @@ def delete_uptime_check_config( client_info=self._client_info, ) - request = uptime_service_pb2.DeleteUptimeCheckConfigRequest(name=name,) + request = uptime_service_pb2.DeleteUptimeCheckConfigRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -751,7 +755,7 @@ def list_uptime_check_ips( client_info=self._client_info, ) - request = uptime_service_pb2.ListUptimeCheckIpsRequest(page_size=page_size,) + request = uptime_service_pb2.ListUptimeCheckIpsRequest(page_size=page_size) iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( diff --git a/google/cloud/monitoring_v3/proto/alert.proto b/google/cloud/monitoring_v3/proto/alert.proto index a4ea225d..830a514d 100644 --- a/google/cloud/monitoring_v3/proto/alert.proto +++ b/google/cloud/monitoring_v3/proto/alert.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; +import "google/api/resource.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/mutation_record.proto"; import "google/protobuf/duration.proto"; @@ -29,12 +29,21 @@ option java_multiple_files = true; option java_outer_classname = "AlertProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A description of the conditions under which some aspect of your system is // considered to be "unhealthy" and the ways to notify people or services about // this state. For an overview of alert policies, see -// [Introduction to Alerting](/monitoring/alerts/). +// [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/). message AlertPolicy { + option (google.api.resource) = { + type: "monitoring.googleapis.com/AlertPolicy" + pattern: "projects/{project}/alertPolicies/{alert_policy}" + pattern: "organizations/{organization}/alertPolicies/{alert_policy}" + pattern: "folders/{folder}/alertPolicies/{alert_policy}" + pattern: "*" + }; + // A content string and a MIME type that describes the content string's // format. message Documentation { @@ -54,6 +63,14 @@ message AlertPolicy { // should open an incident. If a condition evaluates to true, it signifies // that something is wrong. message Condition { + option (google.api.resource) = { + type: "monitoring.googleapis.com/AlertPolicyCondition" + pattern: "projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}" + pattern: "organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}" + pattern: "folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}" + pattern: "*" + }; + // Specifies how many time series must fail a predicate to trigger a // condition. If not specified, then a `{count: 1}` trigger is used. message Trigger { @@ -72,13 +89,13 @@ message AlertPolicy { // A condition type that compares a collection of time series // against a threshold. message MetricThreshold { - // A [filter](/monitoring/api/v3/filters) that + // A [filter](https://cloud.google.com/monitoring/api/v3/filters) that // identifies which time series should be compared with the threshold. // // The filter is similar to the one that is specified in the // [`ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that - // call is useful to verify the time series that will be retrieved / + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + // (that call is useful to verify the time series that will be retrieved / // processed) and must specify the metric type and optionally may contain // restrictions on resource type, resource labels, and metric labels. // This field may not exceed 2048 Unicode characters in length. @@ -92,16 +109,16 @@ message AlertPolicy { // are applied in the order specified. // // This field is similar to the one in the [`ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It - // is advisable to use the `ListTimeSeries` method when debugging this + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + // It is advisable to use the `ListTimeSeries` method when debugging this // field. repeated Aggregation aggregations = 8; - // A [filter](/monitoring/api/v3/filters) that identifies a time - // series that should be used as the denominator of a ratio that will be - // compared with the threshold. If a `denominator_filter` is specified, - // the time series specified by the `filter` field will be used as the - // numerator. + // A [filter](https://cloud.google.com/monitoring/api/v3/filters) that + // identifies a time series that should be used as the denominator of a + // ratio that will be compared with the threshold. If a + // `denominator_filter` is specified, the time series specified by the + // `filter` field will be used as the numerator. // // The filter must specify the metric type and optionally may contain // restrictions on resource type, resource labels, and metric labels. @@ -158,13 +175,13 @@ message AlertPolicy { // when a time series for the specified metric of a monitored // resource does not include any data in the specified `duration`. message MetricAbsence { - // A [filter](/monitoring/api/v3/filters) that + // A [filter](https://cloud.google.com/monitoring/api/v3/filters) that // identifies which time series should be compared with the threshold. // // The filter is similar to the one that is specified in the // [`ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that - // call is useful to verify the time series that will be retrieved / + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + // (that call is useful to verify the time series that will be retrieved / // processed) and must specify the metric type and optionally may contain // restrictions on resource type, resource labels, and metric labels. // This field may not exceed 2048 Unicode characters in length. @@ -178,8 +195,8 @@ message AlertPolicy { // are applied in the order specified. // // This field is similar to the one in the [`ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It - // is advisable to use the `ListTimeSeries` method when debugging this + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + // It is advisable to use the `ListTimeSeries` method when debugging this // field. repeated Aggregation aggregations = 5; @@ -198,10 +215,23 @@ message AlertPolicy { Trigger trigger = 3; } + // A condition type that allows alert policies to be defined using + // Monitoring Query Language. + message TimeSeriesQueryLanguageCondition { + // Monitoring Query Language query that generates time series data and + // describes a condition for alerting on that data. + string query = 1; + + // A short explanation of what the query represents. For example: + // + // "Error ratio exceeds 15% for >5% of servers in >2 regions" + string summary = 2; + } + // Required if the condition exists. The unique resource name for this - // condition. Its syntax is: + // condition. Its format is: // - // projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] // // `[CONDITION_ID]` is assigned by Stackdriver Monitoring when the // condition is created as part of a new or updated alerting policy. @@ -238,6 +268,11 @@ message AlertPolicy { // A condition that checks that a time series continues to // receive new data points. MetricAbsence condition_absent = 2; + + // A condition that uses the Monitoring Query Language to define + // alerts. + // If set, no other conditions can be present. + TimeSeriesQueryLanguageCondition condition_time_series_query_language = 14; } } @@ -247,7 +282,7 @@ message AlertPolicy { COMBINE_UNSPECIFIED = 0; // Combine conditions using the logical `AND` operator. An - // incident is created only if all conditions are met + // incident is created only if all the conditions are met // simultaneously. This combiner is satisfied if all conditions are // met, even if they are met on completely different resources. AND = 1; @@ -263,9 +298,9 @@ message AlertPolicy { } // Required if the policy exists. The resource name for this policy. The - // syntax is: + // format is: // - // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] // // `[ALERT_POLICY_ID]` is assigned by Stackdriver Monitoring when the policy // is created. When calling the @@ -300,10 +335,14 @@ message AlertPolicy { // OR according to the `combiner` field. If the combined conditions evaluate // to true, then an incident is created. A policy can have from one to six // conditions. + // If `condition_time_series_query_language` is present, it must be the only + // `condition`. repeated Condition conditions = 12; - // How to combine the results of multiple conditions - // to determine if an incident should be opened. + // How to combine the results of multiple conditions to determine if an + // incident should be opened. + // If `condition_time_series_query_language` is present, this must be + // `COMBINE_UNSPECIFIED`. ConditionCombinerType combiner = 6; // Whether or not the policy is enabled. On write, the default interpretation @@ -324,9 +363,9 @@ message AlertPolicy { // [`NotificationChannel`][google.monitoring.v3.NotificationChannel] // objects that are returned from the [`ListNotificationChannels`] // [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - // method. The syntax of the entries in this field is: + // method. The format of the entries in this field is: // - // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] repeated string notification_channels = 14; // A read-only record of the creation of the alerting policy. If provided diff --git a/google/cloud/monitoring_v3/proto/alert_pb2.py b/google/cloud/monitoring_v3/proto/alert_pb2.py index a3344e9c..1dffe90e 100644 --- a/google/cloud/monitoring_v3/proto/alert_pb2.py +++ b/google/cloud/monitoring_v3/proto/alert_pb2.py @@ -15,6 +15,7 @@ _sym_db = _symbol_database.Default() +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.monitoring_v3.proto import ( common_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_common__pb2, ) @@ -31,12 +32,13 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\nAlertProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\nAlertProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n,google/cloud/monitoring_v3/proto/alert.proto\x12\x14google.monitoring.v3\x1a-google/cloud/monitoring_v3/proto/common.proto\x1a\x36google/cloud/monitoring_v3/proto/mutation_record.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto"\x83\r\n\x0b\x41lertPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x46\n\rdocumentation\x18\r \x01(\x0b\x32/.google.monitoring.v3.AlertPolicy.Documentation\x12\x46\n\x0buser_labels\x18\x10 \x03(\x0b\x32\x31.google.monitoring.v3.AlertPolicy.UserLabelsEntry\x12?\n\nconditions\x18\x0c \x03(\x0b\x32+.google.monitoring.v3.AlertPolicy.Condition\x12I\n\x08\x63ombiner\x18\x06 \x01(\x0e\x32\x37.google.monitoring.v3.AlertPolicy.ConditionCombinerType\x12+\n\x07\x65nabled\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12$\n\x08validity\x18\x12 \x01(\x0b\x32\x12.google.rpc.Status\x12\x1d\n\x15notification_channels\x18\x0e \x03(\t\x12=\n\x0f\x63reation_record\x18\n \x01(\x0b\x32$.google.monitoring.v3.MutationRecord\x12=\n\x0fmutation_record\x18\x0b \x01(\x0b\x32$.google.monitoring.v3.MutationRecord\x1a\x33\n\rDocumentation\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x1a\xf8\x06\n\tCondition\x12\x0c\n\x04name\x18\x0c \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12Z\n\x13\x63ondition_threshold\x18\x01 \x01(\x0b\x32;.google.monitoring.v3.AlertPolicy.Condition.MetricThresholdH\x00\x12U\n\x10\x63ondition_absent\x18\x02 \x01(\x0b\x32\x39.google.monitoring.v3.AlertPolicy.Condition.MetricAbsenceH\x00\x1a\x35\n\x07Trigger\x12\x0f\n\x05\x63ount\x18\x01 \x01(\x05H\x00\x12\x11\n\x07percent\x18\x02 \x01(\x01H\x00\x42\x06\n\x04type\x1a\x81\x03\n\x0fMetricThreshold\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x37\n\x0c\x61ggregations\x18\x08 \x03(\x0b\x32!.google.monitoring.v3.Aggregation\x12\x1a\n\x12\x64\x65nominator_filter\x18\t \x01(\t\x12\x43\n\x18\x64\x65nominator_aggregations\x18\n \x03(\x0b\x32!.google.monitoring.v3.Aggregation\x12\x38\n\ncomparison\x18\x04 \x01(\x0e\x32$.google.monitoring.v3.ComparisonType\x12\x17\n\x0fthreshold_value\x18\x05 \x01(\x01\x12+\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\x07trigger\x18\x07 \x01(\x0b\x32\x33.google.monitoring.v3.AlertPolicy.Condition.Trigger\x1a\xcb\x01\n\rMetricAbsence\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x12\x37\n\x0c\x61ggregations\x18\x05 \x03(\x0b\x32!.google.monitoring.v3.Aggregation\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\x07trigger\x18\x03 \x01(\x0b\x32\x33.google.monitoring.v3.AlertPolicy.Condition.TriggerB\x0b\n\tcondition\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"a\n\x15\x43onditionCombinerType\x12\x17\n\x13\x43OMBINE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x12\x06\n\x02OR\x10\x02\x12\x1e\n\x1a\x41ND_WITH_MATCHING_RESOURCE\x10\x03\x42\xa2\x01\n\x18\x63om.google.monitoring.v3B\nAlertProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n,google/cloud/monitoring_v3/proto/alert.proto\x12\x14google.monitoring.v3\x1a\x19google/api/resource.proto\x1a-google/cloud/monitoring_v3/proto/common.proto\x1a\x36google/cloud/monitoring_v3/proto/mutation_record.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto"\xab\x12\n\x0b\x41lertPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x46\n\rdocumentation\x18\r \x01(\x0b\x32/.google.monitoring.v3.AlertPolicy.Documentation\x12\x46\n\x0buser_labels\x18\x10 \x03(\x0b\x32\x31.google.monitoring.v3.AlertPolicy.UserLabelsEntry\x12?\n\nconditions\x18\x0c \x03(\x0b\x32+.google.monitoring.v3.AlertPolicy.Condition\x12I\n\x08\x63ombiner\x18\x06 \x01(\x0e\x32\x37.google.monitoring.v3.AlertPolicy.ConditionCombinerType\x12+\n\x07\x65nabled\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12$\n\x08validity\x18\x12 \x01(\x0b\x32\x12.google.rpc.Status\x12\x1d\n\x15notification_channels\x18\x0e \x03(\t\x12=\n\x0f\x63reation_record\x18\n \x01(\x0b\x32$.google.monitoring.v3.MutationRecord\x12=\n\x0fmutation_record\x18\x0b \x01(\x0b\x32$.google.monitoring.v3.MutationRecord\x1a\x33\n\rDocumentation\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x1a\xd4\n\n\tCondition\x12\x0c\n\x04name\x18\x0c \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12Z\n\x13\x63ondition_threshold\x18\x01 \x01(\x0b\x32;.google.monitoring.v3.AlertPolicy.Condition.MetricThresholdH\x00\x12U\n\x10\x63ondition_absent\x18\x02 \x01(\x0b\x32\x39.google.monitoring.v3.AlertPolicy.Condition.MetricAbsenceH\x00\x12|\n$condition_time_series_query_language\x18\x0e \x01(\x0b\x32L.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageConditionH\x00\x1a\x35\n\x07Trigger\x12\x0f\n\x05\x63ount\x18\x01 \x01(\x05H\x00\x12\x11\n\x07percent\x18\x02 \x01(\x01H\x00\x42\x06\n\x04type\x1a\x81\x03\n\x0fMetricThreshold\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x37\n\x0c\x61ggregations\x18\x08 \x03(\x0b\x32!.google.monitoring.v3.Aggregation\x12\x1a\n\x12\x64\x65nominator_filter\x18\t \x01(\t\x12\x43\n\x18\x64\x65nominator_aggregations\x18\n \x03(\x0b\x32!.google.monitoring.v3.Aggregation\x12\x38\n\ncomparison\x18\x04 \x01(\x0e\x32$.google.monitoring.v3.ComparisonType\x12\x17\n\x0fthreshold_value\x18\x05 \x01(\x01\x12+\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\x07trigger\x18\x07 \x01(\x0b\x32\x33.google.monitoring.v3.AlertPolicy.Condition.Trigger\x1a\xcb\x01\n\rMetricAbsence\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x12\x37\n\x0c\x61ggregations\x18\x05 \x03(\x0b\x32!.google.monitoring.v3.Aggregation\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\x07trigger\x18\x03 \x01(\x0b\x32\x33.google.monitoring.v3.AlertPolicy.Condition.Trigger\x1a\x42\n TimeSeriesQueryLanguageCondition\x12\r\n\x05query\x18\x01 \x01(\t\x12\x0f\n\x07summary\x18\x02 \x01(\t:\x97\x02\xea\x41\x93\x02\n.monitoring.googleapis.com/AlertPolicyCondition\x12\x46projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}\x12Porganizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}\x12\x44\x66olders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}\x12\x01*B\x0b\n\tcondition\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"a\n\x15\x43onditionCombinerType\x12\x17\n\x13\x43OMBINE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x12\x06\n\x02OR\x10\x02\x12\x1e\n\x1a\x41ND_WITH_MATCHING_RESOURCE\x10\x03:\xc9\x01\xea\x41\xc5\x01\n%monitoring.googleapis.com/AlertPolicy\x12/projects/{project}/alertPolicies/{alert_policy}\x12\x39organizations/{organization}/alertPolicies/{alert_policy}\x12-folders/{folder}/alertPolicies/{alert_policy}\x12\x01*B\xc2\x01\n\x18\x63om.google.monitoring.v3B\nAlertProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), dependencies=[ + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_common__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_mutation__record__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, @@ -75,8 +77,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1833, - serialized_end=1930, + serialized_start=2336, + serialized_end=2433, ) _sym_db.RegisterEnumDescriptor(_ALERTPOLICY_CONDITIONCOMBINERTYPE) @@ -133,8 +135,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=838, - serialized_end=889, + serialized_start=865, + serialized_end=916, ) _ALERTPOLICY_CONDITION_TRIGGER = _descriptor.Descriptor( @@ -195,10 +197,10 @@ index=0, containing_type=None, fields=[], - ), + ) ], - serialized_start=1120, - serialized_end=1173, + serialized_start=1273, + serialized_end=1326, ) _ALERTPOLICY_CONDITION_METRICTHRESHOLD = _descriptor.Descriptor( @@ -361,8 +363,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1176, - serialized_end=1561, + serialized_start=1329, + serialized_end=1714, ) _ALERTPOLICY_CONDITION_METRICABSENCE = _descriptor.Descriptor( @@ -453,8 +455,64 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1564, - serialized_end=1767, + serialized_start=1717, + serialized_end=1920, +) + +_ALERTPOLICY_CONDITION_TIMESERIESQUERYLANGUAGECONDITION = _descriptor.Descriptor( + name="TimeSeriesQueryLanguageCondition", + full_name="google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="query", + full_name="google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.query", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="summary", + full_name="google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.summary", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1922, + serialized_end=1988, ) _ALERTPOLICY_CONDITION = _descriptor.Descriptor( @@ -536,15 +594,36 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="condition_time_series_query_language", + full_name="google.monitoring.v3.AlertPolicy.Condition.condition_time_series_query_language", + index=4, + number=14, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[ _ALERTPOLICY_CONDITION_TRIGGER, _ALERTPOLICY_CONDITION_METRICTHRESHOLD, _ALERTPOLICY_CONDITION_METRICABSENCE, + _ALERTPOLICY_CONDITION_TIMESERIESQUERYLANGUAGECONDITION, ], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352A\223\002\n.monitoring.googleapis.com/AlertPolicyCondition\022Fprojects/{project}/alertPolicies/{alert_policy}/conditions/{condition}\022Porganizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}\022Dfolders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}\022\001*" + ), is_extendable=False, syntax="proto3", extension_ranges=[], @@ -555,10 +634,10 @@ index=0, containing_type=None, fields=[], - ), + ) ], - serialized_start=892, - serialized_end=1780, + serialized_start=919, + serialized_end=2283, ) _ALERTPOLICY_USERLABELSENTRY = _descriptor.Descriptor( @@ -613,8 +692,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1782, - serialized_end=1831, + serialized_start=2285, + serialized_end=2334, ) _ALERTPOLICY = _descriptor.Descriptor( @@ -829,14 +908,16 @@ _ALERTPOLICY_CONDITION, _ALERTPOLICY_USERLABELSENTRY, ], - enum_types=[_ALERTPOLICY_CONDITIONCOMBINERTYPE,], - serialized_options=None, + enum_types=[_ALERTPOLICY_CONDITIONCOMBINERTYPE], + serialized_options=_b( + "\352A\305\001\n%monitoring.googleapis.com/AlertPolicy\022/projects/{project}/alertPolicies/{alert_policy}\0229organizations/{organization}/alertPolicies/{alert_policy}\022-folders/{folder}/alertPolicies/{alert_policy}\022\001*" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=263, - serialized_end=1930, + serialized_start=290, + serialized_end=2637, ) _ALERTPOLICY_DOCUMENTATION.containing_type = _ALERTPOLICY @@ -887,12 +968,18 @@ "trigger" ].message_type = _ALERTPOLICY_CONDITION_TRIGGER _ALERTPOLICY_CONDITION_METRICABSENCE.containing_type = _ALERTPOLICY_CONDITION +_ALERTPOLICY_CONDITION_TIMESERIESQUERYLANGUAGECONDITION.containing_type = ( + _ALERTPOLICY_CONDITION +) _ALERTPOLICY_CONDITION.fields_by_name[ "condition_threshold" ].message_type = _ALERTPOLICY_CONDITION_METRICTHRESHOLD _ALERTPOLICY_CONDITION.fields_by_name[ "condition_absent" ].message_type = _ALERTPOLICY_CONDITION_METRICABSENCE +_ALERTPOLICY_CONDITION.fields_by_name[ + "condition_time_series_query_language" +].message_type = _ALERTPOLICY_CONDITION_TIMESERIESQUERYLANGUAGECONDITION _ALERTPOLICY_CONDITION.containing_type = _ALERTPOLICY _ALERTPOLICY_CONDITION.oneofs_by_name["condition"].fields.append( _ALERTPOLICY_CONDITION.fields_by_name["condition_threshold"] @@ -906,6 +993,12 @@ _ALERTPOLICY_CONDITION.fields_by_name[ "condition_absent" ].containing_oneof = _ALERTPOLICY_CONDITION.oneofs_by_name["condition"] +_ALERTPOLICY_CONDITION.oneofs_by_name["condition"].fields.append( + _ALERTPOLICY_CONDITION.fields_by_name["condition_time_series_query_language"] +) +_ALERTPOLICY_CONDITION.fields_by_name[ + "condition_time_series_query_language" +].containing_oneof = _ALERTPOLICY_CONDITION.oneofs_by_name["condition"] _ALERTPOLICY_USERLABELSENTRY.containing_type = _ALERTPOLICY _ALERTPOLICY.fields_by_name["documentation"].message_type = _ALERTPOLICY_DOCUMENTATION _ALERTPOLICY.fields_by_name["user_labels"].message_type = _ALERTPOLICY_USERLABELSENTRY @@ -943,8 +1036,6 @@ __module__="google.cloud.monitoring_v3.proto.alert_pb2", __doc__="""A content string and a MIME type that describes the content string's format. - - Attributes: content: The text of the documentation, interpreted according to @@ -972,8 +1063,6 @@ __module__="google.cloud.monitoring_v3.proto.alert_pb2", __doc__="""Specifies how many time series must fail a predicate to trigger a condition. If not specified, then a ``{count: 1}`` trigger is used. - - Attributes: type: A type of trigger. @@ -995,15 +1084,14 @@ __module__="google.cloud.monitoring_v3.proto.alert_pb2", __doc__="""A condition type that compares a collection of time series against a threshold. - - Attributes: filter: - A `filter `__ that identifies - which time series should be compared with the threshold. The - filter is similar to the one that is specified in the - ```ListTimeSeries`` request - `__ + A `filter + `__ that + identifies which time series should be compared with the + threshold. The filter is similar to the one that is specified + in the ```ListTimeSeries`` request `__ (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource @@ -1017,20 +1105,21 @@ aggregating streams across all members of a group of resrouces). Multiple aggregations are applied in the order specified. This field is similar to the one in the - ```ListTimeSeries`` request - `__. - It is advisable to use the ``ListTimeSeries`` method when - debugging this field. + ```ListTimeSeries`` request `__. It is + advisable to use the ``ListTimeSeries`` method when debugging + this field. denominator_filter: - A `filter `__ that identifies a - time series that should be used as the denominator of a ratio - that will be compared with the threshold. If a - ``denominator_filter`` is specified, the time series specified - by the ``filter`` field will be used as the numerator. The - filter must specify the metric type and optionally may contain - restrictions on resource type, resource labels, and metric - labels. This field may not exceed 2048 Unicode characters in - length. + A `filter + `__ that + identifies a time series that should be used as the + denominator of a ratio that will be compared with the + threshold. If a ``denominator_filter`` is specified, the time + series specified by the ``filter`` field will be used as the + numerator. The filter must specify the metric type and + optionally may contain restrictions on resource type, resource + labels, and metric labels. This field may not exceed 2048 + Unicode characters in length. denominator_aggregations: Specifies the alignment of data points in individual time series selected by ``denominatorFilter`` as well as how to @@ -1085,15 +1174,14 @@ resources. The predicate is considered in violation when a time series for the specified metric of a monitored resource does not include any data in the specified ``duration``. - - Attributes: filter: - A `filter `__ that identifies - which time series should be compared with the threshold. The - filter is similar to the one that is specified in the - ```ListTimeSeries`` request - `__ + A `filter + `__ that + identifies which time series should be compared with the + threshold. The filter is similar to the one that is specified + in the ```ListTimeSeries`` request `__ (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource @@ -1107,10 +1195,10 @@ aggregating streams across all members of a group of resrouces). Multiple aggregations are applied in the order specified. This field is similar to the one in the - ```ListTimeSeries`` request - `__. - It is advisable to use the ``ListTimeSeries`` method when - debugging this field. + ```ListTimeSeries`` request `__. It is + advisable to use the ``ListTimeSeries`` method when debugging + this field. duration: The amount of time that a time series must fail to report new data to be considered failing. Currently, only values that are @@ -1127,18 +1215,35 @@ # @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) ), ), + TimeSeriesQueryLanguageCondition=_reflection.GeneratedProtocolMessageType( + "TimeSeriesQueryLanguageCondition", + (_message.Message,), + dict( + DESCRIPTOR=_ALERTPOLICY_CONDITION_TIMESERIESQUERYLANGUAGECONDITION, + __module__="google.cloud.monitoring_v3.proto.alert_pb2", + __doc__="""A condition type that allows alert policies to be defined using + Monitoring Query Language. + Attributes: + query: + Monitoring Query Language query that generates time series + data and describes a condition for alerting on that data. + summary: + A short explanation of what the query represents. For example: + "Error ratio exceeds 15% for >5% of servers in >2 regions" + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition) + ), + ), DESCRIPTOR=_ALERTPOLICY_CONDITION, __module__="google.cloud.monitoring_v3.proto.alert_pb2", - __doc__="""A condition is a true/false test that determines when an alerting policy - should open an incident. If a condition evaluates to true, it signifies - that something is wrong. - - + __doc__="""A condition is a true/false test that determines when an alerting + policy should open an incident. If a condition evaluates to true, it + signifies that something is wrong. Attributes: name: Required if the condition exists. The unique resource name for - this condition. Its syntax is: :: projects/[PROJECT_ID]/ - alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] + this condition. Its format is: :: projects/[PROJECT_ID_O + R_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] ``[CONDITION_ID]`` is assigned by Stackdriver Monitoring when the condition is created as part of a new or updated alerting policy. When calling the [alertPolicies.create][google.monito @@ -1168,6 +1273,9 @@ condition_absent: A condition that checks that a time series continues to receive new data points. + condition_time_series_query_language: + A condition that uses the Monitoring Query Language to define + alerts. If set, no other conditions can be present. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.Condition) ), @@ -1186,19 +1294,18 @@ __doc__="""A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. For an overview of alert policies, see - `Introduction to Alerting `__. - - + `Introduction to Alerting + `__. Attributes: name: Required if the policy exists. The resource name for this - policy. The syntax is: :: - projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] - ``[ALERT_POLICY_ID]`` is assigned by Stackdriver Monitoring - when the policy is created. When calling the [alertPolicies.cr - eate][google.monitoring.v3.AlertPolicyService.CreateAlertPolic - y] method, do not include the ``name`` field in the alerting - policy passed as part of the request. + policy. The format is: :: projects/[PROJECT_ID_OR_NUMBER + ]/alertPolicies/[ALERT_POLICY_ID] ``[ALERT_POLICY_ID]`` is + assigned by Stackdriver Monitoring when the policy is created. + When calling the [alertPolicies.create][google.monitoring.v3.A + lertPolicyService.CreateAlertPolicy] method, do not include + the ``name`` field in the alerting policy passed as part of + the request. display_name: A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, @@ -1223,10 +1330,14 @@ A list of conditions for the policy. The conditions are combined by AND or OR according to the ``combiner`` field. If the combined conditions evaluate to true, then an incident is - created. A policy can have from one to six conditions. + created. A policy can have from one to six conditions. If + ``condition_time_series_query_language`` is present, it must + be the only ``condition``. combiner: How to combine the results of multiple conditions to determine - if an incident should be opened. + if an incident should be opened. If + ``condition_time_series_query_language`` is present, this must + be ``COMBINE_UNSPECIFIED``. enabled: Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On @@ -1246,9 +1357,9 @@ [``NotificationChannel``][google.monitoring.v3.NotificationCha nnel] objects that are returned from the [``ListNotificationCh annels``][google.monitoring.v3.NotificationChannelService.List - NotificationChannels] method. The syntax of the entries in - this field is: :: - projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] + NotificationChannels] method. The format of the entries in + this field is: :: projects/[PROJECT_ID_OR_NUMBER]/notifi + cationChannels/[CHANNEL_ID] creation_record: A read-only record of the creation of the alerting policy. If provided in a call to create or update, this field will be @@ -1267,9 +1378,12 @@ _sym_db.RegisterMessage(AlertPolicy.Condition.Trigger) _sym_db.RegisterMessage(AlertPolicy.Condition.MetricThreshold) _sym_db.RegisterMessage(AlertPolicy.Condition.MetricAbsence) +_sym_db.RegisterMessage(AlertPolicy.Condition.TimeSeriesQueryLanguageCondition) _sym_db.RegisterMessage(AlertPolicy.UserLabelsEntry) DESCRIPTOR._options = None +_ALERTPOLICY_CONDITION._options = None _ALERTPOLICY_USERLABELSENTRY._options = None +_ALERTPOLICY._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/monitoring_v3/proto/alert_service.proto b/google/cloud/monitoring_v3/proto/alert_service.proto index de5a30f0..ea0c5ada 100644 --- a/google/cloud/monitoring_v3/proto/alert_service.proto +++ b/google/cloud/monitoring_v3/proto/alert_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,17 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/alert.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -29,6 +30,7 @@ option java_multiple_files = true; option java_outer_classname = "AlertServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The AlertPolicyService API is used to manage (list, create, delete, // edit) alert policies in Stackdriver Monitoring. An alerting policy is @@ -51,6 +53,7 @@ service AlertPolicyService { option (google.api.http) = { get: "/v3/{name=projects/*}/alertPolicies" }; + option (google.api.method_signature) = "name"; } // Gets a single alerting policy. @@ -58,6 +61,7 @@ service AlertPolicyService { option (google.api.http) = { get: "/v3/{name=projects/*/alertPolicies/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new alerting policy. @@ -66,6 +70,7 @@ service AlertPolicyService { post: "/v3/{name=projects/*}/alertPolicies" body: "alert_policy" }; + option (google.api.method_signature) = "name,alert_policy"; } // Deletes an alerting policy. @@ -73,6 +78,7 @@ service AlertPolicyService { option (google.api.http) = { delete: "/v3/{name=projects/*/alertPolicies/*}" }; + option (google.api.method_signature) = "name"; } // Updates an alerting policy. You can either replace the entire policy with @@ -84,53 +90,71 @@ service AlertPolicyService { patch: "/v3/{alert_policy.name=projects/*/alertPolicies/*}" body: "alert_policy" }; + option (google.api.method_signature) = "update_mask,alert_policy"; } } // The protocol for the `CreateAlertPolicy` request. message CreateAlertPolicyRequest { - // The project in which to create the alerting policy. The format is - // `projects/[PROJECT_ID]`. + // Required. The project in which to create the alerting policy. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] // // Note that this field names the parent container in which the alerting // policy will be written, not the name of the created policy. The alerting // policy that is returned will have a name that contains a normalized // representation of this name as a prefix but adds a suffix of the form - // `/alertPolicies/[POLICY_ID]`, identifying the policy in the container. - string name = 3; - - // The requested alerting policy. You should omit the `name` field in this + // `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + // container. + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/AlertPolicy" + } + ]; + + // Required. The requested alerting policy. You should omit the `name` field in this // policy. The name will be returned in the new policy, including - // a new [ALERT_POLICY_ID] value. - AlertPolicy alert_policy = 2; + // a new `[ALERT_POLICY_ID]` value. + AlertPolicy alert_policy = 2 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `GetAlertPolicy` request. message GetAlertPolicyRequest { - // The alerting policy to retrieve. The format is + // Required. The alerting policy to retrieve. The format is: // - // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] - string name = 3; + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/AlertPolicy" + } + ]; } // The protocol for the `ListAlertPolicies` request. message ListAlertPoliciesRequest { - // The project whose alert policies are to be listed. The format is + // Required. The project whose alert policies are to be listed. The format is: // - // projects/[PROJECT_ID] + // projects/[PROJECT_ID_OR_NUMBER] // // Note that this field names the parent container in which the alerting // policies to be listed are stored. To retrieve a single alerting policy // by name, use the // [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] // operation, instead. - string name = 4; + string name = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/AlertPolicy" + } + ]; // If provided, this field specifies the criteria that must be met by // alert policies to be included in the response. // // For more details, see [sorting and - // filtering](/monitoring/api/v3/sorting-and-filtering). + // filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). string filter = 5; // A comma-separated list of fields by which to sort the result. Supports @@ -138,7 +162,7 @@ message ListAlertPoliciesRequest { // prefixed with a minus sign to sort by the field in descending order. // // For more details, see [sorting and - // filtering](/monitoring/api/v3/sorting-and-filtering). + // filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). string order_by = 6; // The maximum number of results to return in a single response. @@ -157,7 +181,7 @@ message ListAlertPoliciesResponse { // If there might be more results than were returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } @@ -190,15 +214,20 @@ message UpdateAlertPolicyRequest { // fields listed in `update_mask`. // If `update_mask` is not empty, any fields in this policy that are // not in `update_mask` are ignored. - AlertPolicy alert_policy = 3; + AlertPolicy alert_policy = 3 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `DeleteAlertPolicy` request. message DeleteAlertPolicyRequest { - // The alerting policy to delete. The format is: + // Required. The alerting policy to delete. The format is: // - // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] // // For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/AlertPolicy" + } + ]; } diff --git a/google/cloud/monitoring_v3/proto/alert_service_pb2.py b/google/cloud/monitoring_v3/proto/alert_service_pb2.py index f58e3054..68a96bd5 100644 --- a/google/cloud/monitoring_v3/proto/alert_service_pb2.py +++ b/google/cloud/monitoring_v3/proto/alert_service_pb2.py @@ -16,12 +16,14 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.monitoring_v3.proto import ( alert_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2, ) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -29,17 +31,19 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\021AlertServiceProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\021AlertServiceProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n4google/cloud/monitoring_v3/proto/alert_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a,google/cloud/monitoring_v3/proto/alert.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/api/client.proto"a\n\x18\x43reateAlertPolicyRequest\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x37\n\x0c\x61lert_policy\x18\x02 \x01(\x0b\x32!.google.monitoring.v3.AlertPolicy"%\n\x15GetAlertPolicyRequest\x12\x0c\n\x04name\x18\x03 \x01(\t"q\n\x18ListAlertPoliciesRequest\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"o\n\x19ListAlertPoliciesResponse\x12\x39\n\x0e\x61lert_policies\x18\x03 \x03(\x0b\x32!.google.monitoring.v3.AlertPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x84\x01\n\x18UpdateAlertPolicyRequest\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x37\n\x0c\x61lert_policy\x18\x03 \x01(\x0b\x32!.google.monitoring.v3.AlertPolicy"(\n\x18\x44\x65leteAlertPolicyRequest\x12\x0c\n\x04name\x18\x03 \x01(\t2\xda\x07\n\x12\x41lertPolicyService\x12\xa1\x01\n\x11ListAlertPolicies\x12..google.monitoring.v3.ListAlertPoliciesRequest\x1a/.google.monitoring.v3.ListAlertPoliciesResponse"+\x82\xd3\xe4\x93\x02%\x12#/v3/{name=projects/*}/alertPolicies\x12\x8f\x01\n\x0eGetAlertPolicy\x12+.google.monitoring.v3.GetAlertPolicyRequest\x1a!.google.monitoring.v3.AlertPolicy"-\x82\xd3\xe4\x93\x02\'\x12%/v3/{name=projects/*/alertPolicies/*}\x12\xa1\x01\n\x11\x43reateAlertPolicy\x12..google.monitoring.v3.CreateAlertPolicyRequest\x1a!.google.monitoring.v3.AlertPolicy"9\x82\xd3\xe4\x93\x02\x33"#/v3/{name=projects/*}/alertPolicies:\x0c\x61lert_policy\x12\x8a\x01\n\x11\x44\x65leteAlertPolicy\x12..google.monitoring.v3.DeleteAlertPolicyRequest\x1a\x16.google.protobuf.Empty"-\x82\xd3\xe4\x93\x02\'*%/v3/{name=projects/*/alertPolicies/*}\x12\xb0\x01\n\x11UpdateAlertPolicy\x12..google.monitoring.v3.UpdateAlertPolicyRequest\x1a!.google.monitoring.v3.AlertPolicy"H\x82\xd3\xe4\x93\x02\x42\x32\x32/v3/{alert_policy.name=projects/*/alertPolicies/*}:\x0c\x61lert_policy\x1a\xa9\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\x89\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readB\xa9\x01\n\x18\x63om.google.monitoring.v3B\x11\x41lertServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n4google/cloud/monitoring_v3/proto/alert_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/monitoring_v3/proto/alert.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\x95\x01\n\x18\x43reateAlertPolicyRequest\x12;\n\x04name\x18\x03 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%monitoring.googleapis.com/AlertPolicy\x12<\n\x0c\x61lert_policy\x18\x02 \x01(\x0b\x32!.google.monitoring.v3.AlertPolicyB\x03\xe0\x41\x02"T\n\x15GetAlertPolicyRequest\x12;\n\x04name\x18\x03 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%monitoring.googleapis.com/AlertPolicy"\xa0\x01\n\x18ListAlertPoliciesRequest\x12;\n\x04name\x18\x04 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%monitoring.googleapis.com/AlertPolicy\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"o\n\x19ListAlertPoliciesResponse\x12\x39\n\x0e\x61lert_policies\x18\x03 \x03(\x0b\x32!.google.monitoring.v3.AlertPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x89\x01\n\x18UpdateAlertPolicyRequest\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12<\n\x0c\x61lert_policy\x18\x03 \x01(\x0b\x32!.google.monitoring.v3.AlertPolicyB\x03\xe0\x41\x02"W\n\x18\x44\x65leteAlertPolicyRequest\x12;\n\x04name\x18\x03 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%monitoring.googleapis.com/AlertPolicy2\x9e\x08\n\x12\x41lertPolicyService\x12\xa8\x01\n\x11ListAlertPolicies\x12..google.monitoring.v3.ListAlertPoliciesRequest\x1a/.google.monitoring.v3.ListAlertPoliciesResponse"2\x82\xd3\xe4\x93\x02%\x12#/v3/{name=projects/*}/alertPolicies\xda\x41\x04name\x12\x96\x01\n\x0eGetAlertPolicy\x12+.google.monitoring.v3.GetAlertPolicyRequest\x1a!.google.monitoring.v3.AlertPolicy"4\x82\xd3\xe4\x93\x02\'\x12%/v3/{name=projects/*/alertPolicies/*}\xda\x41\x04name\x12\xb5\x01\n\x11\x43reateAlertPolicy\x12..google.monitoring.v3.CreateAlertPolicyRequest\x1a!.google.monitoring.v3.AlertPolicy"M\x82\xd3\xe4\x93\x02\x33"#/v3/{name=projects/*}/alertPolicies:\x0c\x61lert_policy\xda\x41\x11name,alert_policy\x12\x91\x01\n\x11\x44\x65leteAlertPolicy\x12..google.monitoring.v3.DeleteAlertPolicyRequest\x1a\x16.google.protobuf.Empty"4\x82\xd3\xe4\x93\x02\'*%/v3/{name=projects/*/alertPolicies/*}\xda\x41\x04name\x12\xcb\x01\n\x11UpdateAlertPolicy\x12..google.monitoring.v3.UpdateAlertPolicyRequest\x1a!.google.monitoring.v3.AlertPolicy"c\x82\xd3\xe4\x93\x02\x42\x32\x32/v3/{alert_policy.name=projects/*/alertPolicies/*}:\x0c\x61lert_policy\xda\x41\x18update_mask,alert_policy\x1a\xa9\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\x89\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readB\xc9\x01\n\x18\x63om.google.monitoring.v3B\x11\x41lertServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -66,7 +70,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A'\022%monitoring.googleapis.com/AlertPolicy" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -84,7 +90,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -96,8 +102,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=242, - serialized_end=339, + serialized_start=303, + serialized_end=452, ) @@ -123,9 +129,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A'\n%monitoring.googleapis.com/AlertPolicy" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -135,8 +143,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=341, - serialized_end=378, + serialized_start=454, + serialized_end=538, ) @@ -162,7 +170,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A'\022%monitoring.googleapis.com/AlertPolicy" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -246,8 +256,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=380, - serialized_end=493, + serialized_start=541, + serialized_end=701, ) @@ -303,8 +313,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=495, - serialized_end=606, + serialized_start=703, + serialized_end=814, ) @@ -348,7 +358,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -360,8 +370,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=609, - serialized_end=741, + serialized_start=817, + serialized_end=954, ) @@ -387,9 +397,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A'\n%monitoring.googleapis.com/AlertPolicy" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -399,8 +411,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=743, - serialized_end=783, + serialized_start=956, + serialized_end=1043, ) _CREATEALERTPOLICYREQUEST.fields_by_name[ @@ -438,22 +450,21 @@ DESCRIPTOR=_CREATEALERTPOLICYREQUEST, __module__="google.cloud.monitoring_v3.proto.alert_service_pb2", __doc__="""The protocol for the ``CreateAlertPolicy`` request. - - Attributes: name: - The project in which to create the alerting policy. The format - is ``projects/[PROJECT_ID]``. Note that this field names the - parent container in which the alerting policy will be written, - not the name of the created policy. The alerting policy that - is returned will have a name that contains a normalized - representation of this name as a prefix but adds a suffix of - the form ``/alertPolicies/[POLICY_ID]``, identifying the - policy in the container. + Required. The project in which to create the alerting policy. + The format is: :: projects/[PROJECT_ID_OR_NUMBER] Note + that this field names the parent container in which the + alerting policy will be written, not the name of the created + policy. The alerting policy that is returned will have a name + that contains a normalized representation of this name as a + prefix but adds a suffix of the form + ``/alertPolicies/[ALERT_POLICY_ID]``, identifying the policy + in the container. alert_policy: - The requested alerting policy. You should omit the ``name`` - field in this policy. The name will be returned in the new - policy, including a new [ALERT\_POLICY\_ID] value. + Required. The requested alerting policy. You should omit the + ``name`` field in this policy. The name will be returned in + the new policy, including a new ``[ALERT_POLICY_ID]`` value. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.CreateAlertPolicyRequest) ), @@ -467,12 +478,11 @@ DESCRIPTOR=_GETALERTPOLICYREQUEST, __module__="google.cloud.monitoring_v3.proto.alert_service_pb2", __doc__="""The protocol for the ``GetAlertPolicy`` request. - - Attributes: name: - The alerting policy to retrieve. The format is :: - projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + Required. The alerting policy to retrieve. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID + ] """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.GetAlertPolicyRequest) ), @@ -486,27 +496,29 @@ DESCRIPTOR=_LISTALERTPOLICIESREQUEST, __module__="google.cloud.monitoring_v3.proto.alert_service_pb2", __doc__="""The protocol for the ``ListAlertPolicies`` request. - - Attributes: name: - The project whose alert policies are to be listed. The format - is :: projects/[PROJECT_ID] Note that this field names - the parent container in which the alerting policies to be - listed are stored. To retrieve a single alerting policy by - name, use the [GetAlertPolicy][google.monitoring.v3.AlertPolic - yService.GetAlertPolicy] operation, instead. + Required. The project whose alert policies are to be listed. + The format is: :: projects/[PROJECT_ID_OR_NUMBER] Note + that this field names the parent container in which the + alerting policies to be listed are stored. To retrieve a + single alerting policy by name, use the [GetAlertPolicy][googl + e.monitoring.v3.AlertPolicyService.GetAlertPolicy] operation, + instead. filter: If provided, this field specifies the criteria that must be met by alert policies to be included in the response. For more details, see `sorting and filtering - `__. + `__. order_by: A comma-separated list of fields by which to sort the result. Supports the same set of field references as the ``filter`` field. Entries can be prefixed with a minus sign to sort by the field in descending order. For more details, see `sorting - and filtering `__. + and filtering + `__. page_size: The maximum number of results to return in a single response. page_token: @@ -527,15 +539,13 @@ DESCRIPTOR=_LISTALERTPOLICIESRESPONSE, __module__="google.cloud.monitoring_v3.proto.alert_service_pb2", __doc__="""The protocol for the ``ListAlertPolicies`` response. - - Attributes: alert_policies: The returned alert policies. next_page_token: If there might be more results than were returned, then this field is set to a non-empty value. To see the additional - results, use that value as ``pageToken`` in the next call to + results, use that value as ``page_token`` in the next call to this method. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.ListAlertPoliciesResponse) @@ -550,8 +560,6 @@ DESCRIPTOR=_UPDATEALERTPOLICYREQUEST, __module__="google.cloud.monitoring_v3.proto.alert_service_pb2", __doc__="""The protocol for the ``UpdateAlertPolicy`` request. - - Attributes: update_mask: Optional. A list of alerting policy field names. If this field @@ -592,13 +600,11 @@ DESCRIPTOR=_DELETEALERTPOLICYREQUEST, __module__="google.cloud.monitoring_v3.proto.alert_service_pb2", __doc__="""The protocol for the ``DeleteAlertPolicy`` request. - - Attributes: name: - The alerting policy to delete. The format is: :: - projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] For - more information, see + Required. The alerting policy to delete. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID + ] For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.DeleteAlertPolicyRequest) @@ -608,6 +614,12 @@ DESCRIPTOR._options = None +_CREATEALERTPOLICYREQUEST.fields_by_name["name"]._options = None +_CREATEALERTPOLICYREQUEST.fields_by_name["alert_policy"]._options = None +_GETALERTPOLICYREQUEST.fields_by_name["name"]._options = None +_LISTALERTPOLICIESREQUEST.fields_by_name["name"]._options = None +_UPDATEALERTPOLICYREQUEST.fields_by_name["alert_policy"]._options = None +_DELETEALERTPOLICYREQUEST.fields_by_name["name"]._options = None _ALERTPOLICYSERVICE = _descriptor.ServiceDescriptor( name="AlertPolicyService", @@ -617,8 +629,8 @@ serialized_options=_b( "\312A\031monitoring.googleapis.com\322A\211\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" ), - serialized_start=786, - serialized_end=1772, + serialized_start=1046, + serialized_end=2100, methods=[ _descriptor.MethodDescriptor( name="ListAlertPolicies", @@ -628,7 +640,7 @@ input_type=_LISTALERTPOLICIESREQUEST, output_type=_LISTALERTPOLICIESRESPONSE, serialized_options=_b( - "\202\323\344\223\002%\022#/v3/{name=projects/*}/alertPolicies" + "\202\323\344\223\002%\022#/v3/{name=projects/*}/alertPolicies\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -639,7 +651,7 @@ input_type=_GETALERTPOLICYREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2._ALERTPOLICY, serialized_options=_b( - "\202\323\344\223\002'\022%/v3/{name=projects/*/alertPolicies/*}" + "\202\323\344\223\002'\022%/v3/{name=projects/*/alertPolicies/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -650,7 +662,7 @@ input_type=_CREATEALERTPOLICYREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2._ALERTPOLICY, serialized_options=_b( - '\202\323\344\223\0023"#/v3/{name=projects/*}/alertPolicies:\014alert_policy' + '\202\323\344\223\0023"#/v3/{name=projects/*}/alertPolicies:\014alert_policy\332A\021name,alert_policy' ), ), _descriptor.MethodDescriptor( @@ -661,7 +673,7 @@ input_type=_DELETEALERTPOLICYREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002'*%/v3/{name=projects/*/alertPolicies/*}" + "\202\323\344\223\002'*%/v3/{name=projects/*/alertPolicies/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -672,7 +684,7 @@ input_type=_UPDATEALERTPOLICYREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2._ALERTPOLICY, serialized_options=_b( - "\202\323\344\223\002B22/v3/{alert_policy.name=projects/*/alertPolicies/*}:\014alert_policy" + "\202\323\344\223\002B22/v3/{alert_policy.name=projects/*/alertPolicies/*}:\014alert_policy\332A\030update_mask,alert_policy" ), ), ], diff --git a/google/cloud/monitoring_v3/proto/common.proto b/google/cloud/monitoring_v3/proto/common.proto index 1e89b0dc..f1b38c23 100644 --- a/google/cloud/monitoring_v3/proto/common.proto +++ b/google/cloud/monitoring_v3/proto/common.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -27,6 +26,7 @@ option java_multiple_files = true; option java_outer_classname = "CommonProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A single strongly-typed value. message TypedValue { @@ -64,7 +64,7 @@ message TypedValue { // than the end time. // // * In all cases, the start time of the next interval must be -// at least a microsecond after the end time of the previous interval. +// at least a millisecond after the end time of the previous interval. // Because the interval is closed, if the start time of a new interval // is the same as the end time of the previous interval, data written // at the new start time could overwrite data written at the previous @@ -79,329 +79,372 @@ message TimeInterval { google.protobuf.Timestamp start_time = 1; } -// Describes how to combine multiple time series to provide different views of -// the data. Aggregation consists of an alignment step on individual time -// series (`alignment_period` and `per_series_aligner`) followed by an optional -// reduction step of the data across the aligned time series -// (`cross_series_reducer` and `group_by_fields`). For more details, see -// [Aggregation](/monitoring/api/learn_more#aggregation). +// Describes how to combine multiple time series to provide a different view of +// the data. Aggregation of time series is done in two steps. First, each time +// series in the set is _aligned_ to the same time interval boundaries, then the +// set of time series is optionally _reduced_ in number. +// +// Alignment consists of applying the `per_series_aligner` operation +// to each time series after its data has been divided into regular +// `alignment_period` time intervals. This process takes _all_ of the data +// points in an alignment period, applies a mathematical transformation such as +// averaging, minimum, maximum, delta, etc., and converts them into a single +// data point per period. +// +// Reduction is when the aligned and transformed time series can optionally be +// combined, reducing the number of time series through similar mathematical +// transformations. Reduction involves applying a `cross_series_reducer` to +// all the time series, optionally sorting the time series into subsets with +// `group_by_fields`, and applying the reducer to each subset. +// +// The raw time series data can contain a huge amount of information from +// multiple sources. Alignment and reduction transforms this mass of data into +// a more manageable and representative collection of data, for example "the +// 95% latency across the average of all tasks in a cluster". This +// representative data can be more easily graphed and comprehended, and the +// individual time series data is still available for later drilldown. For more +// details, see [Filtering and +// aggregation](https://cloud.google.com/monitoring/api/v3/aggregation). message Aggregation { - // The Aligner describes how to bring the data points in a single - // time series into temporal alignment. + // The `Aligner` specifies the operation that will be applied to the data + // points in each alignment period in a time series. Except for + // `ALIGN_NONE`, which specifies that no operation be applied, each alignment + // operation replaces the set of data values in each alignment period with + // a single value: the result of applying the operation to the data values. + // An aligned time series has a single data value at the end of each + // `alignment_period`. + // + // An alignment operation can change the data type of the values, too. For + // example, if you apply a counting operation to boolean values, the data + // `value_type` in the original time series is `BOOLEAN`, but the `value_type` + // in the aligned result is `INT64`. enum Aligner { - // No alignment. Raw data is returned. Not valid if cross-time - // series reduction is requested. The value type of the result is - // the same as the value type of the input. + // No alignment. Raw data is returned. Not valid if cross-series reduction + // is requested. The `value_type` of the result is the same as the + // `value_type` of the input. ALIGN_NONE = 0; - // Align and convert to delta metric type. This alignment is valid - // for cumulative metrics and delta metrics. Aligning an existing - // delta metric to a delta metric requires that the alignment - // period be increased. The value type of the result is the same - // as the value type of the input. + // Align and convert to + // [DELTA][google.api.MetricDescriptor.MetricKind.DELTA]. + // The output is `delta = y1 - y0`. // - // One can think of this aligner as a rate but without time units; that - // is, the output is conceptually (second_point - first_point). + // This alignment is valid for + // [CUMULATIVE][google.api.MetricDescriptor.MetricKind.CUMULATIVE] and + // `DELTA` metrics. If the selected alignment period results in periods + // with no data, then the aligned value for such a period is created by + // interpolation. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_DELTA = 1; - // Align and convert to a rate. This alignment is valid for - // cumulative metrics and delta metrics with numeric values. The output is a - // gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align and convert to a rate. The result is computed as + // `rate = (y1 - y0)/(t1 - t0)`, or "delta over time". + // Think of this aligner as providing the slope of the line that passes + // through the value at the start and at the end of the `alignment_period`. // - // One can think of this aligner as conceptually providing the slope of - // the line that passes through the value at the start and end of the - // window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)), - // and the output unit is one that has a "/time" dimension. + // This aligner is valid for `CUMULATIVE` + // and `DELTA` metrics with numeric values. If the selected alignment + // period results in periods with no data, then the aligned value for + // such a period is created by interpolation. The output is a `GAUGE` + // metric with `value_type` `DOUBLE`. // - // If, by rate, you are looking for percentage change, see the - // `ALIGN_PERCENT_CHANGE` aligner option. + // If, by "rate", you mean "percentage change", see the + // `ALIGN_PERCENT_CHANGE` aligner instead. ALIGN_RATE = 2; - // Align by interpolating between adjacent points around the - // period boundary. This alignment is valid for gauge - // metrics with numeric values. The value type of the result is the same - // as the value type of the input. + // Align by interpolating between adjacent points around the alignment + // period boundary. This aligner is valid for `GAUGE` metrics with + // numeric values. The `value_type` of the aligned result is the same as the + // `value_type` of the input. ALIGN_INTERPOLATE = 3; - // Align by shifting the oldest data point before the period - // boundary to the boundary. This alignment is valid for gauge - // metrics. The value type of the result is the same as the - // value type of the input. + // Align by moving the most recent data point before the end of the + // alignment period to the boundary at the end of the alignment + // period. This aligner is valid for `GAUGE` metrics. The `value_type` of + // the aligned result is the same as the `value_type` of the input. ALIGN_NEXT_OLDER = 4; - // Align time series via aggregation. The resulting data point in - // the alignment period is the minimum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // values. The value type of the result is the same as the value - // type of the input. + // Align the time series by returning the minimum value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_MIN = 10; - // Align time series via aggregation. The resulting data point in - // the alignment period is the maximum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // values. The value type of the result is the same as the value - // type of the input. + // Align the time series by returning the maximum value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_MAX = 11; - // Align time series via aggregation. The resulting data point in - // the alignment period is the average or arithmetic mean of all - // data points in the period. This alignment is valid for gauge and delta - // metrics with numeric values. The value type of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the mean value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is `DOUBLE`. ALIGN_MEAN = 12; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // or Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of values in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric or Boolean values. The `value_type` of the aligned result is + // `INT64`. ALIGN_COUNT = 13; - // Align time series via aggregation. The resulting data point in - // the alignment period is the sum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // and distribution values. The value type of the output is the - // same as the value type of the input. + // Align the time series by returning the sum of the values in each + // alignment period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with numeric and distribution values. The `value_type` of the + // aligned result is the same as the `value_type` of the input. ALIGN_SUM = 14; - // Align time series via aggregation. The resulting data point in - // the alignment period is the standard deviation of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with numeric values. The value type of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the standard deviation of the values + // in each alignment period. This aligner is valid for `GAUGE` and + // `DELTA` metrics with numeric values. The `value_type` of the output is + // `DOUBLE`. ALIGN_STDDEV = 15; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of True-valued data points in the - // period. This alignment is valid for gauge metrics with - // Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of `True` values in + // each alignment period. This aligner is valid for `GAUGE` metrics with + // Boolean values. The `value_type` of the output is `INT64`. ALIGN_COUNT_TRUE = 16; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of False-valued data points in the - // period. This alignment is valid for gauge metrics with - // Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of `False` values in + // each alignment period. This aligner is valid for `GAUGE` metrics with + // Boolean values. The `value_type` of the output is `INT64`. ALIGN_COUNT_FALSE = 24; - // Align time series via aggregation. The resulting data point in - // the alignment period is the fraction of True-valued data points in the - // period. This alignment is valid for gauge metrics with Boolean values. - // The output value is in the range [0, 1] and has value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the ratio of the number of `True` + // values to the total number of values in each alignment period. This + // aligner is valid for `GAUGE` metrics with Boolean values. The output + // value is in the range [0.0, 1.0] and has `value_type` `DOUBLE`. ALIGN_FRACTION_TRUE = 17; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 99th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 99th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_99 = 18; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 95th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 95th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_95 = 19; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 50th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 50th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_50 = 20; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 5th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 5th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_05 = 21; - // Align and convert to a percentage change. This alignment is valid for - // gauge and delta metrics with numeric values. This alignment conceptually - // computes the equivalent of "((current - previous)/previous)*100" - // where previous value is determined based on the alignmentPeriod. - // In the event that previous is 0 the calculated value is infinity with the - // exception that if both (current - previous) and previous are 0 the - // calculated value is 0. - // A 10 minute moving mean is computed at each point of the time window + // Align and convert to a percentage change. This aligner is valid for + // `GAUGE` and `DELTA` metrics with numeric values. This alignment returns + // `((current - previous)/previous) * 100`, where the value of `previous` is + // determined based on the `alignment_period`. + // + // If the values of `current` and `previous` are both 0, then the returned + // value is 0. If only `previous` is 0, the returned value is infinity. + // + // A 10-minute moving mean is computed at each point of the alignment period // prior to the above calculation to smooth the metric and prevent false - // positives from very short lived spikes. - // Only applicable for data that is >= 0. Any values < 0 are treated as - // no data. While delta metrics are accepted by this alignment special care - // should be taken that the values for the metric will always be positive. - // The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // positives from very short-lived spikes. The moving mean is only + // applicable for data whose values are `>= 0`. Any values `< 0` are + // treated as a missing datapoint, and are ignored. While `DELTA` + // metrics are accepted by this alignment, special care should be taken that + // the values for the metric will always be positive. The output is a + // `GAUGE` metric with `value_type` `DOUBLE`. ALIGN_PERCENT_CHANGE = 23; } - // A Reducer describes how to aggregate data points from multiple - // time series into a single time series. + // A Reducer operation describes how to aggregate data points from multiple + // time series into a single time series, where the value of each data point + // in the resulting series is a function of all the already aligned values in + // the input time series. enum Reducer { - // No cross-time series reduction. The output of the aligner is + // No cross-time series reduction. The output of the `Aligner` is // returned. REDUCE_NONE = 0; - // Reduce by computing the mean across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric or distribution values. The value type of the - // output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Reduce by computing the mean value across time series for each + // alignment period. This reducer is valid for + // [DELTA][google.api.MetricDescriptor.MetricKind.DELTA] and + // [GAUGE][google.api.MetricDescriptor.MetricKind.GAUGE] metrics with + // numeric or distribution values. The `value_type` of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. REDUCE_MEAN = 1; - // Reduce by computing the minimum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric values. The value type of the output - // is the same as the value type of the input. + // Reduce by computing the minimum value across time series for each + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric values. The `value_type` of the output is the same as the + // `value_type` of the input. REDUCE_MIN = 2; - // Reduce by computing the maximum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric values. The value type of the output - // is the same as the value type of the input. + // Reduce by computing the maximum value across time series for each + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric values. The `value_type` of the output is the same as the + // `value_type` of the input. REDUCE_MAX = 3; // Reduce by computing the sum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric and distribution values. The value type of - // the output is the same as the value type of the input. + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric and distribution values. The `value_type` of the output is + // the same as the `value_type` of the input. REDUCE_SUM = 4; // Reduce by computing the standard deviation across time series - // for each alignment period. This reducer is valid for delta - // and gauge metrics with numeric or distribution values. The value type of - // the output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics with numeric or distribution values. The `value_type` + // of the output is `DOUBLE`. REDUCE_STDDEV = 5; - // Reduce by computing the count of data points across time series - // for each alignment period. This reducer is valid for delta - // and gauge metrics of numeric, Boolean, distribution, and string value - // type. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of data points across time series + // for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of numeric, Boolean, distribution, and string + // `value_type`. The `value_type` of the output is `INT64`. REDUCE_COUNT = 6; - // Reduce by computing the count of True-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The value type of - // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of `True`-valued data points across time + // series for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + // is `INT64`. REDUCE_COUNT_TRUE = 7; - // Reduce by computing the count of False-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The value type of - // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of `False`-valued data points across time + // series for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + // is `INT64`. REDUCE_COUNT_FALSE = 15; - // Reduce by computing the fraction of True-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The output value is in the - // range [0, 1] and has value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Reduce by computing the ratio of the number of `True`-valued data points + // to the total number of data points for each alignment period. This + // reducer is valid for `DELTA` and `GAUGE` metrics of Boolean `value_type`. + // The output value is in the range [0.0, 1.0] and has `value_type` + // `DOUBLE`. REDUCE_FRACTION_TRUE = 8; - // Reduce by computing 99th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [99th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_99 = 9; - // Reduce by computing 95th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [95th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_95 = 10; - // Reduce by computing 50th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [50th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_50 = 11; - // Reduce by computing 5th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [5th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_05 = 12; } - // The alignment period for per-[time series][google.monitoring.v3.TimeSeries] - // alignment. If present, `alignmentPeriod` must be at least 60 - // seconds. After per-time series alignment, each time series will - // contain data points only on the period boundaries. If - // `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then - // this field is ignored. If `perSeriesAligner` is specified and - // does not equal `ALIGN_NONE`, then this field must be defined; - // otherwise an error is returned. + // The `alignment_period` specifies a time interval, in seconds, that is used + // to divide the data in all the + // [time series][google.monitoring.v3.TimeSeries] into consistent blocks of + // time. This will be done before the per-series aligner can be applied to + // the data. + // + // The value must be at least 60 seconds. If a per-series aligner other than + // `ALIGN_NONE` is specified, this field is required or an error is returned. + // If no per-series aligner is specified, or the aligner `ALIGN_NONE` is + // specified, then this field is ignored. google.protobuf.Duration alignment_period = 1; - // The approach to be used to align individual time series. Not all - // alignment functions may be applied to all time series, depending - // on the metric type and value type of the original time - // series. Alignment may change the metric type or the value type of + // An `Aligner` describes how to bring the data points in a single + // time series into temporal alignment. Except for `ALIGN_NONE`, all + // alignments cause all the data points in an `alignment_period` to be + // mathematically grouped together, resulting in a single data point for + // each `alignment_period` with end timestamp at the end of the period. + // + // Not all alignment operations may be applied to all time series. The valid + // choices depend on the `metric_kind` and `value_type` of the original time + // series. Alignment can change the `metric_kind` or the `value_type` of // the time series. // // Time series data must be aligned in order to perform cross-time - // series reduction. If `crossSeriesReducer` is specified, then - // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` - // and `alignmentPeriod` must be specified; otherwise, an error is + // series reduction. If `cross_series_reducer` is specified, then + // `per_series_aligner` must be specified and not equal to `ALIGN_NONE` + // and `alignment_period` must be specified; otherwise, an error is // returned. Aligner per_series_aligner = 2; - // The approach to be used to combine time series. Not all reducer - // functions may be applied to all time series, depending on the - // metric type and the value type of the original time - // series. Reduction may change the metric type of value type of the - // time series. + // The reduction operation to be used to combine time series into a single + // time series, where the value of each data point in the resulting series is + // a function of all the already aligned values in the input time series. // - // Time series data must be aligned in order to perform cross-time - // series reduction. If `crossSeriesReducer` is specified, then - // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` - // and `alignmentPeriod` must be specified; otherwise, an error is - // returned. + // Not all reducer operations can be applied to all time series. The valid + // choices depend on the `metric_kind` and the `value_type` of the original + // time series. Reduction can yield a time series with a different + // `metric_kind` or `value_type` than the input time series. + // + // Time series data must first be aligned (see `per_series_aligner`) in order + // to perform cross-time series reduction. If `cross_series_reducer` is + // specified, then `per_series_aligner` must be specified, and must not be + // `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an + // error is returned. Reducer cross_series_reducer = 4; - // The set of fields to preserve when `crossSeriesReducer` is - // specified. The `groupByFields` determine how the time series are + // The set of fields to preserve when `cross_series_reducer` is + // specified. The `group_by_fields` determine how the time series are // partitioned into subsets prior to applying the aggregation - // function. Each subset contains time series that have the same + // operation. Each subset contains time series that have the same // value for each of the grouping fields. Each individual time // series is a member of exactly one subset. The - // `crossSeriesReducer` is applied to each subset of time series. + // `cross_series_reducer` is applied to each subset of time series. // It is not possible to reduce across different resource types, so // this field implicitly contains `resource.type`. Fields not - // specified in `groupByFields` are aggregated away. If - // `groupByFields` is not specified and all the time series have + // specified in `group_by_fields` are aggregated away. If + // `group_by_fields` is not specified and all the time series have // the same resource type, then the time series are aggregated into - // a single output time series. If `crossSeriesReducer` is not + // a single output time series. If `cross_series_reducer` is not // defined, this field is ignored. repeated string group_by_fields = 5; } -// Specifies an ordering relationship on two arguments, here called left and -// right. +// Specifies an ordering relationship on two arguments, called `left` and +// `right`. enum ComparisonType { // No ordering relationship is specified. COMPARISON_UNSPECIFIED = 0; - // The left argument is greater than the right argument. + // True if the left argument is greater than the right argument. COMPARISON_GT = 1; - // The left argument is greater than or equal to the right argument. + // True if the left argument is greater than or equal to the right argument. COMPARISON_GE = 2; - // The left argument is less than the right argument. + // True if the left argument is less than the right argument. COMPARISON_LT = 3; - // The left argument is less than or equal to the right argument. + // True if the left argument is less than or equal to the right argument. COMPARISON_LE = 4; - // The left argument is equal to the right argument. + // True if the left argument is equal to the right argument. COMPARISON_EQ = 5; - // The left argument is not equal to the right argument. + // True if the left argument is not equal to the right argument. COMPARISON_NE = 6; } diff --git a/google/cloud/monitoring_v3/proto/common_pb2.py b/google/cloud/monitoring_v3/proto/common_pb2.py index 1797ca0d..4c622375 100644 --- a/google/cloud/monitoring_v3/proto/common_pb2.py +++ b/google/cloud/monitoring_v3/proto/common_pb2.py @@ -27,10 +27,10 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\013CommonProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\013CommonProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n-google/cloud/monitoring_v3/proto/common.proto\x12\x14google.monitoring.v3\x1a\x1dgoogle/api/distribution.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xaa\x01\n\nTypedValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x36\n\x12\x64istribution_value\x18\x05 \x01(\x0b\x32\x18.google.api.DistributionH\x00\x42\x07\n\x05value"l\n\x0cTimeInterval\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xad\x07\n\x0b\x41ggregation\x12\x33\n\x10\x61lignment_period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\x12per_series_aligner\x18\x02 \x01(\x0e\x32).google.monitoring.v3.Aggregation.Aligner\x12G\n\x14\x63ross_series_reducer\x18\x04 \x01(\x0e\x32).google.monitoring.v3.Aggregation.Reducer\x12\x17\n\x0fgroup_by_fields\x18\x05 \x03(\t"\x8b\x03\n\x07\x41ligner\x12\x0e\n\nALIGN_NONE\x10\x00\x12\x0f\n\x0b\x41LIGN_DELTA\x10\x01\x12\x0e\n\nALIGN_RATE\x10\x02\x12\x15\n\x11\x41LIGN_INTERPOLATE\x10\x03\x12\x14\n\x10\x41LIGN_NEXT_OLDER\x10\x04\x12\r\n\tALIGN_MIN\x10\n\x12\r\n\tALIGN_MAX\x10\x0b\x12\x0e\n\nALIGN_MEAN\x10\x0c\x12\x0f\n\x0b\x41LIGN_COUNT\x10\r\x12\r\n\tALIGN_SUM\x10\x0e\x12\x10\n\x0c\x41LIGN_STDDEV\x10\x0f\x12\x14\n\x10\x41LIGN_COUNT_TRUE\x10\x10\x12\x15\n\x11\x41LIGN_COUNT_FALSE\x10\x18\x12\x17\n\x13\x41LIGN_FRACTION_TRUE\x10\x11\x12\x17\n\x13\x41LIGN_PERCENTILE_99\x10\x12\x12\x17\n\x13\x41LIGN_PERCENTILE_95\x10\x13\x12\x17\n\x13\x41LIGN_PERCENTILE_50\x10\x14\x12\x17\n\x13\x41LIGN_PERCENTILE_05\x10\x15\x12\x18\n\x14\x41LIGN_PERCENT_CHANGE\x10\x17"\xb1\x02\n\x07Reducer\x12\x0f\n\x0bREDUCE_NONE\x10\x00\x12\x0f\n\x0bREDUCE_MEAN\x10\x01\x12\x0e\n\nREDUCE_MIN\x10\x02\x12\x0e\n\nREDUCE_MAX\x10\x03\x12\x0e\n\nREDUCE_SUM\x10\x04\x12\x11\n\rREDUCE_STDDEV\x10\x05\x12\x10\n\x0cREDUCE_COUNT\x10\x06\x12\x15\n\x11REDUCE_COUNT_TRUE\x10\x07\x12\x16\n\x12REDUCE_COUNT_FALSE\x10\x0f\x12\x18\n\x14REDUCE_FRACTION_TRUE\x10\x08\x12\x18\n\x14REDUCE_PERCENTILE_99\x10\t\x12\x18\n\x14REDUCE_PERCENTILE_95\x10\n\x12\x18\n\x14REDUCE_PERCENTILE_50\x10\x0b\x12\x18\n\x14REDUCE_PERCENTILE_05\x10\x0c*\x9e\x01\n\x0e\x43omparisonType\x12\x1a\n\x16\x43OMPARISON_UNSPECIFIED\x10\x00\x12\x11\n\rCOMPARISON_GT\x10\x01\x12\x11\n\rCOMPARISON_GE\x10\x02\x12\x11\n\rCOMPARISON_LT\x10\x03\x12\x11\n\rCOMPARISON_LE\x10\x04\x12\x11\n\rCOMPARISON_EQ\x10\x05\x12\x11\n\rCOMPARISON_NE\x10\x06*a\n\x0bServiceTier\x12\x1c\n\x18SERVICE_TIER_UNSPECIFIED\x10\x00\x12\x16\n\x12SERVICE_TIER_BASIC\x10\x01\x12\x18\n\x14SERVICE_TIER_PREMIUM\x10\x02\x1a\x02\x18\x01\x42\xa3\x01\n\x18\x63om.google.monitoring.v3B\x0b\x43ommonProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n-google/cloud/monitoring_v3/proto/common.proto\x12\x14google.monitoring.v3\x1a\x1dgoogle/api/distribution.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xaa\x01\n\nTypedValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x36\n\x12\x64istribution_value\x18\x05 \x01(\x0b\x32\x18.google.api.DistributionH\x00\x42\x07\n\x05value"l\n\x0cTimeInterval\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xad\x07\n\x0b\x41ggregation\x12\x33\n\x10\x61lignment_period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\x12per_series_aligner\x18\x02 \x01(\x0e\x32).google.monitoring.v3.Aggregation.Aligner\x12G\n\x14\x63ross_series_reducer\x18\x04 \x01(\x0e\x32).google.monitoring.v3.Aggregation.Reducer\x12\x17\n\x0fgroup_by_fields\x18\x05 \x03(\t"\x8b\x03\n\x07\x41ligner\x12\x0e\n\nALIGN_NONE\x10\x00\x12\x0f\n\x0b\x41LIGN_DELTA\x10\x01\x12\x0e\n\nALIGN_RATE\x10\x02\x12\x15\n\x11\x41LIGN_INTERPOLATE\x10\x03\x12\x14\n\x10\x41LIGN_NEXT_OLDER\x10\x04\x12\r\n\tALIGN_MIN\x10\n\x12\r\n\tALIGN_MAX\x10\x0b\x12\x0e\n\nALIGN_MEAN\x10\x0c\x12\x0f\n\x0b\x41LIGN_COUNT\x10\r\x12\r\n\tALIGN_SUM\x10\x0e\x12\x10\n\x0c\x41LIGN_STDDEV\x10\x0f\x12\x14\n\x10\x41LIGN_COUNT_TRUE\x10\x10\x12\x15\n\x11\x41LIGN_COUNT_FALSE\x10\x18\x12\x17\n\x13\x41LIGN_FRACTION_TRUE\x10\x11\x12\x17\n\x13\x41LIGN_PERCENTILE_99\x10\x12\x12\x17\n\x13\x41LIGN_PERCENTILE_95\x10\x13\x12\x17\n\x13\x41LIGN_PERCENTILE_50\x10\x14\x12\x17\n\x13\x41LIGN_PERCENTILE_05\x10\x15\x12\x18\n\x14\x41LIGN_PERCENT_CHANGE\x10\x17"\xb1\x02\n\x07Reducer\x12\x0f\n\x0bREDUCE_NONE\x10\x00\x12\x0f\n\x0bREDUCE_MEAN\x10\x01\x12\x0e\n\nREDUCE_MIN\x10\x02\x12\x0e\n\nREDUCE_MAX\x10\x03\x12\x0e\n\nREDUCE_SUM\x10\x04\x12\x11\n\rREDUCE_STDDEV\x10\x05\x12\x10\n\x0cREDUCE_COUNT\x10\x06\x12\x15\n\x11REDUCE_COUNT_TRUE\x10\x07\x12\x16\n\x12REDUCE_COUNT_FALSE\x10\x0f\x12\x18\n\x14REDUCE_FRACTION_TRUE\x10\x08\x12\x18\n\x14REDUCE_PERCENTILE_99\x10\t\x12\x18\n\x14REDUCE_PERCENTILE_95\x10\n\x12\x18\n\x14REDUCE_PERCENTILE_50\x10\x0b\x12\x18\n\x14REDUCE_PERCENTILE_05\x10\x0c*\x9e\x01\n\x0e\x43omparisonType\x12\x1a\n\x16\x43OMPARISON_UNSPECIFIED\x10\x00\x12\x11\n\rCOMPARISON_GT\x10\x01\x12\x11\n\rCOMPARISON_GE\x10\x02\x12\x11\n\rCOMPARISON_LT\x10\x03\x12\x11\n\rCOMPARISON_LE\x10\x04\x12\x11\n\rCOMPARISON_EQ\x10\x05\x12\x11\n\rCOMPARISON_NE\x10\x06*a\n\x0bServiceTier\x12\x1c\n\x18SERVICE_TIER_UNSPECIFIED\x10\x00\x12\x16\n\x12SERVICE_TIER_BASIC\x10\x01\x12\x18\n\x14SERVICE_TIER_PREMIUM\x10\x02\x1a\x02\x18\x01\x42\xc3\x01\n\x18\x63om.google.monitoring.v3B\x0b\x43ommonProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), dependencies=[ google_dot_api_dot_distribution__pb2.DESCRIPTOR, @@ -435,7 +435,7 @@ index=0, containing_type=None, fields=[], - ), + ) ], serialized_start=168, serialized_end=338, @@ -581,7 +581,7 @@ ], extensions=[], nested_types=[], - enum_types=[_AGGREGATION_ALIGNER, _AGGREGATION_REDUCER,], + enum_types=[_AGGREGATION_ALIGNER, _AGGREGATION_REDUCER], serialized_options=None, is_extendable=False, syntax="proto3", @@ -651,8 +651,6 @@ DESCRIPTOR=_TYPEDVALUE, __module__="google.cloud.monitoring_v3.proto.common_pb2", __doc__="""A single strongly-typed value. - - Attributes: value: The typed value field. @@ -680,30 +678,23 @@ dict( DESCRIPTOR=_TIMEINTERVAL, __module__="google.cloud.monitoring_v3.proto.common_pb2", - __doc__="""A closed time interval. It extends from the start time to the end time, - and includes both: ``[startTime, endTime]``. Valid time intervals depend - on the - ```MetricKind`` `__ - of the metric value. In no case can the end time be earlier than the - start time. - - - For a ``GAUGE`` metric, the ``startTime`` value is technically - optional; if no value is specified, the start time defaults to the - value of the end time, and the interval represents a single point in - time. If both start and end times are specified, they must be - identical. Such an interval is valid only for ``GAUGE`` metrics, - which are point-in-time measurements. - - - For ``DELTA`` and ``CUMULATIVE`` metrics, the start time must be - earlier than the end time. - - - In all cases, the start time of the next interval must be at least a - microsecond after the end time of the previous interval. Because the - interval is closed, if the start time of a new interval is the same - as the end time of the previous interval, data written at the new - start time could overwrite data written at the previous end time. - - + __doc__="""A closed time interval. It extends from the start time to the end + time, and includes both: ``[startTime, endTime]``. Valid time + intervals depend on the ```MetricKind`` `__ of the metric value. In no + case can the end time be earlier than the start time. - For a + ``GAUGE`` metric, the ``startTime`` value is technically optional; + if no value is specified, the start time defaults to the value of + the end time, and the interval represents a single point in time. + If both start and end times are specified, they must be identical. + Such an interval is valid only for ``GAUGE`` metrics, which are + point-in-time measurements. - For ``DELTA`` and ``CUMULATIVE`` + metrics, the start time must be earlier than the end time. - In + all cases, the start time of the next interval must be at least a + millisecond after the end time of the previous interval. Because the + interval is closed, if the start time of a new interval is the same + as the end time of the previous interval, data written at the new + start time could overwrite data written at the previous end time. Attributes: end_time: Required. The end of the time interval. @@ -723,62 +714,89 @@ dict( DESCRIPTOR=_AGGREGATION, __module__="google.cloud.monitoring_v3.proto.common_pb2", - __doc__="""Describes how to combine multiple time series to provide different views - of the data. Aggregation consists of an alignment step on individual - time series (``alignment_period`` and ``per_series_aligner``) followed - by an optional reduction step of the data across the aligned time series - (``cross_series_reducer`` and ``group_by_fields``). For more details, - see `Aggregation `__. - - + __doc__="""Describes how to combine multiple time series to provide a different + view of the data. Aggregation of time series is done in two steps. + First, each time series in the set is *aligned* to the same time + interval boundaries, then the set of time series is optionally + *reduced* in number. Alignment consists of applying the + ``per_series_aligner`` operation to each time series after its data + has been divided into regular ``alignment_period`` time intervals. + This process takes *all* of the data points in an alignment period, + applies a mathematical transformation such as averaging, minimum, + maximum, delta, etc., and converts them into a single data point per + period. Reduction is when the aligned and transformed time series can + optionally be combined, reducing the number of time series through + similar mathematical transformations. Reduction involves applying a + ``cross_series_reducer`` to all the time series, optionally sorting + the time series into subsets with ``group_by_fields``, and applying + the reducer to each subset. The raw time series data can contain a + huge amount of information from multiple sources. Alignment and + reduction transforms this mass of data into a more manageable and + representative collection of data, for example "the 95% latency across + the average of all tasks in a cluster". This representative data can + be more easily graphed and comprehended, and the individual time + series data is still available for later drilldown. For more details, + see `Filtering and aggregation + `__. Attributes: alignment_period: - The alignment period for per-[time - series][google.monitoring.v3.TimeSeries] alignment. If - present, ``alignmentPeriod`` must be at least 60 seconds. - After per-time series alignment, each time series will contain - data points only on the period boundaries. If - ``perSeriesAligner`` is not specified or equals - ``ALIGN_NONE``, then this field is ignored. If - ``perSeriesAligner`` is specified and does not equal - ``ALIGN_NONE``, then this field must be defined; otherwise an - error is returned. + The ``alignment_period`` specifies a time interval, in + seconds, that is used to divide the data in all the [time + series][google.monitoring.v3.TimeSeries] into consistent + blocks of time. This will be done before the per-series + aligner can be applied to the data. The value must be at + least 60 seconds. If a per-series aligner other than + ``ALIGN_NONE`` is specified, this field is required or an + error is returned. If no per-series aligner is specified, or + the aligner ``ALIGN_NONE`` is specified, then this field is + ignored. per_series_aligner: - The approach to be used to align individual time series. Not - all alignment functions may be applied to all time series, - depending on the metric type and value type of the original - time series. Alignment may change the metric type or the value - type of the time series. Time series data must be aligned in - order to perform cross-time series reduction. If - ``crossSeriesReducer`` is specified, then ``perSeriesAligner`` - must be specified and not equal ``ALIGN_NONE`` and - ``alignmentPeriod`` must be specified; otherwise, an error is - returned. + An ``Aligner`` describes how to bring the data points in a + single time series into temporal alignment. Except for + ``ALIGN_NONE``, all alignments cause all the data points in an + ``alignment_period`` to be mathematically grouped together, + resulting in a single data point for each ``alignment_period`` + with end timestamp at the end of the period. Not all + alignment operations may be applied to all time series. The + valid choices depend on the ``metric_kind`` and ``value_type`` + of the original time series. Alignment can change the + ``metric_kind`` or the ``value_type`` of the time series. + Time series data must be aligned in order to perform cross- + time series reduction. If ``cross_series_reducer`` is + specified, then ``per_series_aligner`` must be specified and + not equal to ``ALIGN_NONE`` and ``alignment_period`` must be + specified; otherwise, an error is returned. cross_series_reducer: - The approach to be used to combine time series. Not all - reducer functions may be applied to all time series, depending - on the metric type and the value type of the original time - series. Reduction may change the metric type of value type of - the time series. Time series data must be aligned in order to - perform cross-time series reduction. If ``crossSeriesReducer`` - is specified, then ``perSeriesAligner`` must be specified and - not equal ``ALIGN_NONE`` and ``alignmentPeriod`` must be + The reduction operation to be used to combine time series into + a single time series, where the value of each data point in + the resulting series is a function of all the already aligned + values in the input time series. Not all reducer operations + can be applied to all time series. The valid choices depend on + the ``metric_kind`` and the ``value_type`` of the original + time series. Reduction can yield a time series with a + different ``metric_kind`` or ``value_type`` than the input + time series. Time series data must first be aligned (see + ``per_series_aligner``) in order to perform cross-time series + reduction. If ``cross_series_reducer`` is specified, then + ``per_series_aligner`` must be specified, and must not be + ``ALIGN_NONE``. An ``alignment_period`` must also be specified; otherwise, an error is returned. group_by_fields: - The set of fields to preserve when ``crossSeriesReducer`` is - specified. The ``groupByFields`` determine how the time series - are partitioned into subsets prior to applying the aggregation - function. Each subset contains time series that have the same - value for each of the grouping fields. Each individual time - series is a member of exactly one subset. The - ``crossSeriesReducer`` is applied to each subset of time + The set of fields to preserve when ``cross_series_reducer`` is + specified. The ``group_by_fields`` determine how the time + series are partitioned into subsets prior to applying the + aggregation operation. Each subset contains time series that + have the same value for each of the grouping fields. Each + individual time series is a member of exactly one subset. The + ``cross_series_reducer`` is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains ``resource.type``. - Fields not specified in ``groupByFields`` are aggregated away. - If ``groupByFields`` is not specified and all the time series - have the same resource type, then the time series are + Fields not specified in ``group_by_fields`` are aggregated + away. If ``group_by_fields`` is not specified and all the time + series have the same resource type, then the time series are aggregated into a single output time series. If - ``crossSeriesReducer`` is not defined, this field is ignored. + ``cross_series_reducer`` is not defined, this field is + ignored. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.Aggregation) ), @@ -789,3 +807,4 @@ DESCRIPTOR._options = None _SERVICETIER._options = None # @@protoc_insertion_point(module_scope) +# -*- coding: utf-8 -*- diff --git a/google/cloud/monitoring_v3/proto/dropped_labels.proto b/google/cloud/monitoring_v3/proto/dropped_labels.proto index 9b943ccd..ce6e46e1 100644 --- a/google/cloud/monitoring_v3/proto/dropped_labels.proto +++ b/google/cloud/monitoring_v3/proto/dropped_labels.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -23,6 +22,7 @@ option java_multiple_files = true; option java_outer_classname = "DroppedLabelsProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A set of (label, value) pairs which were dropped during aggregation, attached // to google.api.Distribution.Exemplars in google.api.Distribution values during diff --git a/google/cloud/monitoring_v3/proto/dropped_labels_pb2.py b/google/cloud/monitoring_v3/proto/dropped_labels_pb2.py index 9a04888c..987cd9d4 100644 --- a/google/cloud/monitoring_v3/proto/dropped_labels_pb2.py +++ b/google/cloud/monitoring_v3/proto/dropped_labels_pb2.py @@ -20,10 +20,10 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\022DroppedLabelsProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\022DroppedLabelsProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n5google/cloud/monitoring_v3/proto/dropped_labels.proto\x12\x14google.monitoring.v3"|\n\rDroppedLabels\x12=\n\x05label\x18\x01 \x03(\x0b\x32..google.monitoring.v3.DroppedLabels.LabelEntry\x1a,\n\nLabelEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\xaa\x01\n\x18\x63om.google.monitoring.v3B\x12\x44roppedLabelsProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n5google/cloud/monitoring_v3/proto/dropped_labels.proto\x12\x14google.monitoring.v3"|\n\rDroppedLabels\x12=\n\x05label\x18\x01 \x03(\x0b\x32..google.monitoring.v3.DroppedLabels.LabelEntry\x1a,\n\nLabelEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\xca\x01\n\x18\x63om.google.monitoring.v3B\x12\x44roppedLabelsProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), ) @@ -108,10 +108,10 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ), + ) ], extensions=[], - nested_types=[_DROPPEDLABELS_LABELENTRY,], + nested_types=[_DROPPEDLABELS_LABELENTRY], enum_types=[], serialized_options=None, is_extendable=False, @@ -143,22 +143,18 @@ DESCRIPTOR=_DROPPEDLABELS, __module__="google.cloud.monitoring_v3.proto.dropped_labels_pb2", __doc__="""A set of (label, value) pairs which were dropped during aggregation, - attached to google.api.Distribution.Exemplars in google.api.Distribution - values during aggregation. - - These values are used in combination with the label values that remain - on the aggregated Distribution timeseries to construct the full label - set for the exemplar values. The resulting full label set may be used to + attached to google.api.Distribution.Exemplars in + google.api.Distribution values during aggregation. These values are + used in combination with the label values that remain on the + aggregated Distribution timeseries to construct the full label set for + the exemplar values. The resulting full label set may be used to identify the specific task/job/instance (for example) which may be - contributing to a long-tail, while allowing the storage savings of only - storing aggregated distribution values for a large group. - - Note that there are no guarantees on ordering of the labels from - exemplar-to-exemplar and from distribution-to-distribution in the same - stream, and there may be duplicates. It is up to clients to resolve any + contributing to a long-tail, while allowing the storage savings of + only storing aggregated distribution values for a large group. Note + that there are no guarantees on ordering of the labels from exemplar- + to-exemplar and from distribution-to-distribution in the same stream, + and there may be duplicates. It is up to clients to resolve any ambiguities. - - Attributes: label: Map from label to its value, for all labels dropped in any diff --git a/google/cloud/monitoring_v3/proto/group.proto b/google/cloud/monitoring_v3/proto/group.proto index 716b270e..2d1ffbb6 100644 --- a/google/cloud/monitoring_v3/proto/group.proto +++ b/google/cloud/monitoring_v3/proto/group.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,18 +11,20 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; +import "google/api/resource.proto"; + option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; option java_multiple_files = true; option java_outer_classname = "GroupProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The description of a dynamic collection of monitored resources. Each group // has a filter that is matched against monitored resources and their associated @@ -51,19 +53,31 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // depending on what resources exist and what filters are associated with the // group and its ancestors. message Group { - // Output only. The name of this group. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. + option (google.api.resource) = { + type: "monitoring.googleapis.com/Group" + pattern: "projects/{project}/groups/{group}" + pattern: "organizations/{organization}/groups/{group}" + pattern: "folders/{folder}/groups/{group}" + pattern: "*" + }; + + // Output only. The name of this group. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // // When creating a group, this field is ignored and a new name is created // consisting of the project specified in the call to `CreateGroup` - // and a unique `{group_id}` that is generated automatically. + // and a unique `[GROUP_ID]` that is generated automatically. string name = 1; // A user-assigned name for this group, used only for display purposes. string display_name = 2; - // The name of the group's parent, if it has one. - // The format is `"projects/{project_id_or_number}/groups/{group_id}"`. - // For groups with no parent, `parentName` is the empty string, `""`. + // The name of the group's parent, if it has one. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // + // For groups with no parent, `parent_name` is the empty string, `""`. string parent_name = 3; // The filter used to determine which monitored resources belong to this diff --git a/google/cloud/monitoring_v3/proto/group_pb2.py b/google/cloud/monitoring_v3/proto/group_pb2.py index e194c3f6..d619ac4f 100644 --- a/google/cloud/monitoring_v3/proto/group_pb2.py +++ b/google/cloud/monitoring_v3/proto/group_pb2.py @@ -15,16 +15,20 @@ _sym_db = _symbol_database.Default() +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 + + DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/monitoring_v3/proto/group.proto", package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\nGroupProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\nGroupProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n,google/cloud/monitoring_v3/proto/group.proto\x12\x14google.monitoring.v3"d\n\x05Group\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0bparent_name\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x12\n\nis_cluster\x18\x06 \x01(\x08\x42\xa2\x01\n\x18\x63om.google.monitoring.v3B\nGroupProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n,google/cloud/monitoring_v3/proto/group.proto\x12\x14google.monitoring.v3\x1a\x19google/api/resource.proto"\x80\x02\n\x05Group\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0bparent_name\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x12\n\nis_cluster\x18\x06 \x01(\x08:\x99\x01\xea\x41\x95\x01\n\x1fmonitoring.googleapis.com/Group\x12!projects/{project}/groups/{group}\x12+organizations/{organization}/groups/{group}\x12\x1f\x66olders/{folder}/groups/{group}\x12\x01*B\xc2\x01\n\x18\x63om.google.monitoring.v3B\nGroupProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), + dependencies=[google_dot_api_dot_resource__pb2.DESCRIPTOR], ) @@ -129,13 +133,15 @@ extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352A\225\001\n\037monitoring.googleapis.com/Group\022!projects/{project}/groups/{group}\022+organizations/{organization}/groups/{group}\022\037folders/{folder}/groups/{group}\022\001*" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=70, - serialized_end=170, + serialized_start=98, + serialized_end=354, ) DESCRIPTOR.message_types_by_name["Group"] = _GROUP @@ -148,48 +154,42 @@ DESCRIPTOR=_GROUP, __module__="google.cloud.monitoring_v3.proto.group_pb2", __doc__="""The description of a dynamic collection of monitored resources. Each - group has a filter that is matched against monitored resources and their - associated metadata. If a group's filter matches an available monitored - resource, then that resource is a member of that group. Groups can - contain any number of monitored resources, and each monitored resource - can be a member of any number of groups. - - Groups can be nested in parent-child hierarchies. The ``parentName`` - field identifies an optional parent for each group. If a group has a - parent, then the only monitored resources available to be matched by the - group's filter are the resources contained in the parent group. In other - words, a group contains the monitored resources that match its filter - and the filters of all the group's ancestors. A group without a parent - can contain any monitored resource. - - For example, consider an infrastructure running a set of instances with - two user-defined tags: ``"environment"`` and ``"role"``. A parent group - has a filter, ``environment="production"``. A child of that parent group - has a filter, ``role="transcoder"``. The parent group contains all - instances in the production environment, regardless of their roles. The - child group contains instances that have the transcoder role *and* are - in the production environment. - - The monitored resources contained in a group can change at any moment, - depending on what resources exist and what filters are associated with - the group and its ancestors. - - + group has a filter that is matched against monitored resources and + their associated metadata. If a group's filter matches an available + monitored resource, then that resource is a member of that group. + Groups can contain any number of monitored resources, and each + monitored resource can be a member of any number of groups. Groups + can be nested in parent-child hierarchies. The ``parentName`` field + identifies an optional parent for each group. If a group has a parent, + then the only monitored resources available to be matched by the + group's filter are the resources contained in the parent group. In + other words, a group contains the monitored resources that match its + filter and the filters of all the group's ancestors. A group without a + parent can contain any monitored resource. For example, consider an + infrastructure running a set of instances with two user-defined tags: + ``"environment"`` and ``"role"``. A parent group has a filter, + ``environment="production"``. A child of that parent group has a + filter, ``role="transcoder"``. The parent group contains all instances + in the production environment, regardless of their roles. The child + group contains instances that have the transcoder role *and* are in + the production environment. The monitored resources contained in a + group can change at any moment, depending on what resources exist and + what filters are associated with the group and its ancestors. Attributes: name: - Output only. The name of this group. The format is - ``"projects/{project_id_or_number}/groups/{group_id}"``. When + Output only. The name of this group. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to - ``CreateGroup`` and a unique ``{group_id}`` that is generated + ``CreateGroup`` and a unique ``[GROUP_ID]`` that is generated automatically. display_name: A user-assigned name for this group, used only for display purposes. parent_name: - The name of the group's parent, if it has one. The format is - ``"projects/{project_id_or_number}/groups/{group_id}"``. For - groups with no parent, ``parentName`` is the empty string, + The name of the group's parent, if it has one. The format is: + :: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] For + groups with no parent, ``parent_name`` is the empty string, ``""``. filter: The filter used to determine which monitored resources belong @@ -206,4 +206,5 @@ DESCRIPTOR._options = None +_GROUP._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/monitoring_v3/proto/group_service.proto b/google/cloud/monitoring_v3/proto/group_service.proto index bf91a916..0163ab36 100644 --- a/google/cloud/monitoring_v3/proto/group_service.proto +++ b/google/cloud/monitoring_v3/proto/group_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,18 +11,19 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/group.proto"; import "google/protobuf/empty.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -30,6 +31,7 @@ option java_multiple_files = true; option java_outer_classname = "GroupServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The Group API lets you inspect and manage your // [groups](#google.monitoring.v3.Group). @@ -55,6 +57,7 @@ service GroupService { option (google.api.http) = { get: "/v3/{name=projects/*}/groups" }; + option (google.api.method_signature) = "name"; } // Gets a single group. @@ -62,6 +65,7 @@ service GroupService { option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new group. @@ -70,6 +74,7 @@ service GroupService { post: "/v3/{name=projects/*}/groups" body: "group" }; + option (google.api.method_signature) = "name,group"; } // Updates an existing group. @@ -79,6 +84,7 @@ service GroupService { put: "/v3/{group.name=projects/*/groups/*}" body: "group" }; + option (google.api.method_signature) = "group"; } // Deletes an existing group. @@ -86,6 +92,7 @@ service GroupService { option (google.api.http) = { delete: "/v3/{name=projects/*/groups/*}" }; + option (google.api.method_signature) = "name"; } // Lists the monitored resources that are members of a group. @@ -93,42 +100,64 @@ service GroupService { option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}/members" }; + option (google.api.method_signature) = "name"; } } // The `ListGroup` request. message ListGroupsRequest { - // The project whose groups are to be listed. The format is - // `"projects/{project_id_or_number}"`. - string name = 7; + // Required. The project whose groups are to be listed. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Group" + } + ]; // An optional filter consisting of a single group name. The filters limit // the groups returned based on their parent-child relationship with the // specified group. If no filter is specified, all groups are returned. oneof filter { - // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - // Returns groups whose `parentName` field contains the group + // A group name. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // + // Returns groups whose `parent_name` field contains the group // name. If no groups have this parent, the results are empty. - string children_of_group = 2; - - // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + string children_of_group = 2 [(google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + }]; + + // A group name. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // // Returns groups that are ancestors of the specified group. // The groups are returned in order, starting with the immediate parent and // ending with the most distant ancestor. If the specified group has no // immediate parent, the results are empty. - string ancestors_of_group = 3; - - // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + string ancestors_of_group = 3 [(google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + }]; + + // A group name. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // // Returns the descendants of the specified group. This is a superset of - // the results returned by the `childrenOfGroup` filter, and includes + // the results returned by the `children_of_group` filter, and includes // children-of-children, and so forth. - string descendants_of_group = 4; + string descendants_of_group = 4 [(google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + }]; } // A positive number that is the maximum number of results to return. int32 page_size = 5; - // If this field is not empty then it must contain the `nextPageToken` value + // If this field is not empty then it must contain the `next_page_token` value // returned by a previous call to this method. Using this field causes the // method to return additional results from the previous method call. string page_token = 6; @@ -141,26 +170,38 @@ message ListGroupsResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `GetGroup` request. message GetGroupRequest { - // The group to retrieve. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. - string name = 3; + // Required. The group to retrieve. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + } + ]; } // The `CreateGroup` request. message CreateGroupRequest { - // The project in which to create the group. The format is - // `"projects/{project_id_or_number}"`. - string name = 4; - - // A group definition. It is an error to define the `name` field because + // Required. The project in which to create the group. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Group" + } + ]; + + // Required. A group definition. It is an error to define the `name` field because // the system assigns the name. - Group group = 2; + Group group = 2 [(google.api.field_behavior) = REQUIRED]; // If true, validate this request but do not create the group. bool validate_only = 3; @@ -168,9 +209,9 @@ message CreateGroupRequest { // The `UpdateGroup` request. message UpdateGroupRequest { - // The new definition of the group. All fields of the existing group, + // Required. The new definition of the group. All fields of the existing group, // excepting `name`, are replaced with the corresponding fields of this group. - Group group = 2; + Group group = 2 [(google.api.field_behavior) = REQUIRED]; // If true, validate this request but do not update the existing group. bool validate_only = 3; @@ -179,9 +220,15 @@ message UpdateGroupRequest { // The `DeleteGroup` request. The default behavior is to be able to delete a // single group without any descendants. message DeleteGroupRequest { - // The group to delete. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. - string name = 3; + // Required. The group to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + } + ]; // If this field is true, then the request means to delete a group with all // its descendants. Otherwise, the request means to delete a group only when @@ -191,25 +238,32 @@ message DeleteGroupRequest { // The `ListGroupMembers` request. message ListGroupMembersRequest { - // The group whose members are listed. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. - string name = 7; + // Required. The group whose members are listed. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + string name = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + } + ]; // A positive number that is the maximum number of results to return. int32 page_size = 3; - // If this field is not empty then it must contain the `nextPageToken` value + // If this field is not empty then it must contain the `next_page_token` value // returned by a previous call to this method. Using this field causes the // method to return additional results from the previous method call. string page_token = 4; - // An optional [list filter](/monitoring/api/learn_more#filtering) describing - // the members to be returned. The filter may reference the type, labels, and - // metadata of monitored resources that comprise the group. - // For example, to return only resources representing Compute Engine VM - // instances, use this filter: + // An optional [list + // filter](https://cloud.google.com/monitoring/api/learn_more#filtering) + // describing the members to be returned. The filter may reference the type, + // labels, and metadata of monitored resources that comprise the group. For + // example, to return only resources representing Compute Engine VM instances, + // use this filter: // - // resource.type = "gce_instance" + // `resource.type = "gce_instance"` string filter = 5; // An optional time interval for which results should be returned. Only @@ -226,7 +280,7 @@ message ListGroupMembersResponse { // If there are more results than have been returned, then this field is // set to a non-empty value. To see the additional results, use that value as - // `pageToken` in the next call to this method. + // `page_token` in the next call to this method. string next_page_token = 2; // The total number of elements matching this request. diff --git a/google/cloud/monitoring_v3/proto/group_service_pb2.py b/google/cloud/monitoring_v3/proto/group_service_pb2.py index 323f6525..ccaa4243 100644 --- a/google/cloud/monitoring_v3/proto/group_service_pb2.py +++ b/google/cloud/monitoring_v3/proto/group_service_pb2.py @@ -16,9 +16,12 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import ( monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2, ) +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.monitoring_v3.proto import ( common_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_common__pb2, ) @@ -26,7 +29,6 @@ group_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_group__pb2, ) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -34,18 +36,20 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\021GroupServiceProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\021GroupServiceProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n4google/cloud/monitoring_v3/proto/group_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a#google/api/monitored_resource.proto\x1a-google/cloud/monitoring_v3/proto/common.proto\x1a,google/cloud/monitoring_v3/proto/group.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x17google/api/client.proto"\xad\x01\n\x11ListGroupsRequest\x12\x0c\n\x04name\x18\x07 \x01(\t\x12\x1b\n\x11\x63hildren_of_group\x18\x02 \x01(\tH\x00\x12\x1c\n\x12\x61ncestors_of_group\x18\x03 \x01(\tH\x00\x12\x1e\n\x14\x64\x65scendants_of_group\x18\x04 \x01(\tH\x00\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\tB\x08\n\x06\x66ilter"Y\n\x12ListGroupsResponse\x12*\n\x05group\x18\x01 \x03(\x0b\x32\x1b.google.monitoring.v3.Group\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x1f\n\x0fGetGroupRequest\x12\x0c\n\x04name\x18\x03 \x01(\t"e\n\x12\x43reateGroupRequest\x12\x0c\n\x04name\x18\x04 \x01(\t\x12*\n\x05group\x18\x02 \x01(\x0b\x32\x1b.google.monitoring.v3.Group\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08"W\n\x12UpdateGroupRequest\x12*\n\x05group\x18\x02 \x01(\x0b\x32\x1b.google.monitoring.v3.Group\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08"5\n\x12\x44\x65leteGroupRequest\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\trecursive\x18\x04 \x01(\x08"\x94\x01\n\x17ListGroupMembersRequest\x12\x0c\n\x04name\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x34\n\x08interval\x18\x06 \x01(\x0b\x32".google.monitoring.v3.TimeInterval"w\n\x18ListGroupMembersResponse\x12.\n\x07members\x18\x01 \x03(\x0b\x32\x1d.google.api.MonitoredResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xe7\x07\n\x0cGroupService\x12\x85\x01\n\nListGroups\x12\'.google.monitoring.v3.ListGroupsRequest\x1a(.google.monitoring.v3.ListGroupsResponse"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v3/{name=projects/*}/groups\x12v\n\x08GetGroup\x12%.google.monitoring.v3.GetGroupRequest\x1a\x1b.google.monitoring.v3.Group"&\x82\xd3\xe4\x93\x02 \x12\x1e/v3/{name=projects/*/groups/*}\x12\x81\x01\n\x0b\x43reateGroup\x12(.google.monitoring.v3.CreateGroupRequest\x1a\x1b.google.monitoring.v3.Group"+\x82\xd3\xe4\x93\x02%"\x1c/v3/{name=projects/*}/groups:\x05group\x12\x89\x01\n\x0bUpdateGroup\x12(.google.monitoring.v3.UpdateGroupRequest\x1a\x1b.google.monitoring.v3.Group"3\x82\xd3\xe4\x93\x02-\x1a$/v3/{group.name=projects/*/groups/*}:\x05group\x12w\n\x0b\x44\x65leteGroup\x12(.google.monitoring.v3.DeleteGroupRequest\x1a\x16.google.protobuf.Empty"&\x82\xd3\xe4\x93\x02 *\x1e/v3/{name=projects/*/groups/*}\x12\xa1\x01\n\x10ListGroupMembers\x12-.google.monitoring.v3.ListGroupMembersRequest\x1a..google.monitoring.v3.ListGroupMembersResponse".\x82\xd3\xe4\x93\x02(\x12&/v3/{name=projects/*/groups/*}/members\x1a\xa9\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\x89\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readB\xa9\x01\n\x18\x63om.google.monitoring.v3B\x11GroupServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n4google/cloud/monitoring_v3/proto/group_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/monitoring_v3/proto/common.proto\x1a,google/cloud/monitoring_v3/proto/group.proto\x1a\x1bgoogle/protobuf/empty.proto"\xc8\x02\n\x11ListGroupsRequest\x12\x35\n\x04name\x18\x07 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fmonitoring.googleapis.com/Group\x12\x41\n\x11\x63hildren_of_group\x18\x02 \x01(\tB$\xfa\x41!\n\x1fmonitoring.googleapis.com/GroupH\x00\x12\x42\n\x12\x61ncestors_of_group\x18\x03 \x01(\tB$\xfa\x41!\n\x1fmonitoring.googleapis.com/GroupH\x00\x12\x44\n\x14\x64\x65scendants_of_group\x18\x04 \x01(\tB$\xfa\x41!\n\x1fmonitoring.googleapis.com/GroupH\x00\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\tB\x08\n\x06\x66ilter"Y\n\x12ListGroupsResponse\x12*\n\x05group\x18\x01 \x03(\x0b\x32\x1b.google.monitoring.v3.Group\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"H\n\x0fGetGroupRequest\x12\x35\n\x04name\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmonitoring.googleapis.com/Group"\x93\x01\n\x12\x43reateGroupRequest\x12\x35\n\x04name\x18\x04 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fmonitoring.googleapis.com/Group\x12/\n\x05group\x18\x02 \x01(\x0b\x32\x1b.google.monitoring.v3.GroupB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08"\\\n\x12UpdateGroupRequest\x12/\n\x05group\x18\x02 \x01(\x0b\x32\x1b.google.monitoring.v3.GroupB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08"^\n\x12\x44\x65leteGroupRequest\x12\x35\n\x04name\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmonitoring.googleapis.com/Group\x12\x11\n\trecursive\x18\x04 \x01(\x08"\xbd\x01\n\x17ListGroupMembersRequest\x12\x35\n\x04name\x18\x07 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmonitoring.googleapis.com/Group\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x34\n\x08interval\x18\x06 \x01(\x0b\x32".google.monitoring.v3.TimeInterval"w\n\x18ListGroupMembersResponse\x12.\n\x07members\x18\x01 \x03(\x0b\x32\x1d.google.api.MonitoredResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\x98\x08\n\x0cGroupService\x12\x8c\x01\n\nListGroups\x12\'.google.monitoring.v3.ListGroupsRequest\x1a(.google.monitoring.v3.ListGroupsResponse"+\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v3/{name=projects/*}/groups\xda\x41\x04name\x12}\n\x08GetGroup\x12%.google.monitoring.v3.GetGroupRequest\x1a\x1b.google.monitoring.v3.Group"-\x82\xd3\xe4\x93\x02 \x12\x1e/v3/{name=projects/*/groups/*}\xda\x41\x04name\x12\x8e\x01\n\x0b\x43reateGroup\x12(.google.monitoring.v3.CreateGroupRequest\x1a\x1b.google.monitoring.v3.Group"8\x82\xd3\xe4\x93\x02%"\x1c/v3/{name=projects/*}/groups:\x05group\xda\x41\nname,group\x12\x91\x01\n\x0bUpdateGroup\x12(.google.monitoring.v3.UpdateGroupRequest\x1a\x1b.google.monitoring.v3.Group";\x82\xd3\xe4\x93\x02-\x1a$/v3/{group.name=projects/*/groups/*}:\x05group\xda\x41\x05group\x12~\n\x0b\x44\x65leteGroup\x12(.google.monitoring.v3.DeleteGroupRequest\x1a\x16.google.protobuf.Empty"-\x82\xd3\xe4\x93\x02 *\x1e/v3/{name=projects/*/groups/*}\xda\x41\x04name\x12\xa8\x01\n\x10ListGroupMembers\x12-.google.monitoring.v3.ListGroupMembersRequest\x1a..google.monitoring.v3.ListGroupMembersResponse"5\x82\xd3\xe4\x93\x02(\x12&/v3/{name=projects/*/groups/*}/members\xda\x41\x04name\x1a\xa9\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\x89\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readB\xc9\x01\n\x18\x63om.google.monitoring.v3B\x11GroupServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_common__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_group__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -72,7 +76,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\022\037monitoring.googleapis.com/Group" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -90,7 +96,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\372A!\n\037monitoring.googleapis.com/Group"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -108,7 +114,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\372A!\n\037monitoring.googleapis.com/Group"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -126,7 +132,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\372A!\n\037monitoring.googleapis.com/Group"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -180,10 +186,10 @@ index=0, containing_type=None, fields=[], - ), + ) ], - serialized_start=293, - serialized_end=466, + serialized_start=353, + serialized_end=681, ) @@ -239,8 +245,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=468, - serialized_end=557, + serialized_start=683, + serialized_end=772, ) @@ -266,9 +272,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\n\037monitoring.googleapis.com/Group" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -278,8 +286,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=559, - serialized_end=590, + serialized_start=774, + serialized_end=846, ) @@ -305,7 +313,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\022\037monitoring.googleapis.com/Group" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -323,7 +333,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -353,8 +363,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=592, - serialized_end=693, + serialized_start=849, + serialized_end=996, ) @@ -380,7 +390,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -410,8 +420,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=695, - serialized_end=782, + serialized_start=998, + serialized_end=1090, ) @@ -437,7 +447,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\n\037monitoring.googleapis.com/Group" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -467,8 +479,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=784, - serialized_end=837, + serialized_start=1092, + serialized_end=1186, ) @@ -494,7 +506,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\n\037monitoring.googleapis.com/Group" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -578,8 +592,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=840, - serialized_end=988, + serialized_start=1189, + serialized_end=1378, ) @@ -653,8 +667,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=990, - serialized_end=1109, + serialized_start=1380, + serialized_end=1499, ) _LISTGROUPSREQUEST.oneofs_by_name["filter"].fields.append( @@ -709,42 +723,39 @@ DESCRIPTOR=_LISTGROUPSREQUEST, __module__="google.cloud.monitoring_v3.proto.group_service_pb2", __doc__="""The ``ListGroup`` request. - - Attributes: name: - The project whose groups are to be listed. The format is - ``"projects/{project_id_or_number}"``. + Required. The project whose groups are to be listed. The + format is: :: projects/[PROJECT_ID_OR_NUMBER] filter: An optional filter consisting of a single group name. The filters limit the groups returned based on their parent-child relationship with the specified group. If no filter is specified, all groups are returned. children_of_group: - A group name: - ``"projects/{project_id_or_number}/groups/{group_id}"``. - Returns groups whose ``parentName`` field contains the group - name. If no groups have this parent, the results are empty. + A group name. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] Returns + groups whose ``parent_name`` field contains the group name. If + no groups have this parent, the results are empty. ancestors_of_group: - A group name: - ``"projects/{project_id_or_number}/groups/{group_id}"``. - Returns groups that are ancestors of the specified group. The - groups are returned in order, starting with the immediate - parent and ending with the most distant ancestor. If the - specified group has no immediate parent, the results are - empty. + A group name. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] Returns + groups that are ancestors of the specified group. The groups + are returned in order, starting with the immediate parent and + ending with the most distant ancestor. If the specified group + has no immediate parent, the results are empty. descendants_of_group: - A group name: - ``"projects/{project_id_or_number}/groups/{group_id}"``. - Returns the descendants of the specified group. This is a - superset of the results returned by the ``childrenOfGroup`` - filter, and includes children-of-children, and so forth. + A group name. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] Returns the + descendants of the specified group. This is a superset of the + results returned by the ``children_of_group`` filter, and + includes children-of-children, and so forth. page_size: A positive number that is the maximum number of results to return. page_token: If this field is not empty then it must contain the - ``nextPageToken`` value returned by a previous call to this + ``next_page_token`` value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. """, @@ -760,15 +771,13 @@ DESCRIPTOR=_LISTGROUPSRESPONSE, __module__="google.cloud.monitoring_v3.proto.group_service_pb2", __doc__="""The ``ListGroups`` response. - - Attributes: group: The groups that match the specified filters. next_page_token: If there are more results than have been returned, then this field is set to a non-empty value. To see the additional - results, use that value as ``pageToken`` in the next call to + results, use that value as ``page_token`` in the next call to this method. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.ListGroupsResponse) @@ -783,12 +792,10 @@ DESCRIPTOR=_GETGROUPREQUEST, __module__="google.cloud.monitoring_v3.proto.group_service_pb2", __doc__="""The ``GetGroup`` request. - - Attributes: name: - The group to retrieve. The format is - ``"projects/{project_id_or_number}/groups/{group_id}"``. + Required. The group to retrieve. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.GetGroupRequest) ), @@ -802,15 +809,13 @@ DESCRIPTOR=_CREATEGROUPREQUEST, __module__="google.cloud.monitoring_v3.proto.group_service_pb2", __doc__="""The ``CreateGroup`` request. - - Attributes: name: - The project in which to create the group. The format is - ``"projects/{project_id_or_number}"``. + Required. The project in which to create the group. The format + is: :: projects/[PROJECT_ID_OR_NUMBER] group: - A group definition. It is an error to define the ``name`` - field because the system assigns the name. + Required. A group definition. It is an error to define the + ``name`` field because the system assigns the name. validate_only: If true, validate this request but do not create the group. """, @@ -826,13 +831,11 @@ DESCRIPTOR=_UPDATEGROUPREQUEST, __module__="google.cloud.monitoring_v3.proto.group_service_pb2", __doc__="""The ``UpdateGroup`` request. - - Attributes: group: - The new definition of the group. All fields of the existing - group, excepting ``name``, are replaced with the corresponding - fields of this group. + Required. The new definition of the group. All fields of the + existing group, excepting ``name``, are replaced with the + corresponding fields of this group. validate_only: If true, validate this request but do not update the existing group. @@ -850,12 +853,10 @@ __module__="google.cloud.monitoring_v3.proto.group_service_pb2", __doc__="""The ``DeleteGroup`` request. The default behavior is to be able to delete a single group without any descendants. - - Attributes: name: - The group to delete. The format is - ``"projects/{project_id_or_number}/groups/{group_id}"``. + Required. The group to delete. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] recursive: If this field is true, then the request means to delete a group with all its descendants. Otherwise, the request means @@ -874,28 +875,26 @@ DESCRIPTOR=_LISTGROUPMEMBERSREQUEST, __module__="google.cloud.monitoring_v3.proto.group_service_pb2", __doc__="""The ``ListGroupMembers`` request. - - Attributes: name: - The group whose members are listed. The format is - ``"projects/{project_id_or_number}/groups/{group_id}"``. + Required. The group whose members are listed. The format is: + :: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] page_size: A positive number that is the maximum number of results to return. page_token: If this field is not empty then it must contain the - ``nextPageToken`` value returned by a previous call to this + ``next_page_token`` value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. filter: - An optional `list filter - `__ describing the - members to be returned. The filter may reference the type, - labels, and metadata of monitored resources that comprise the - group. For example, to return only resources representing - Compute Engine VM instances, use this filter: :: - resource.type = "gce_instance" + An optional `list filter `__ describing the members to be + returned. The filter may reference the type, labels, and + metadata of monitored resources that comprise the group. For + example, to return only resources representing Compute Engine + VM instances, use this filter: :: `resource.type = + "gce_instance"` interval: An optional time interval for which results should be returned. Only members that were part of the group during the @@ -915,15 +914,13 @@ DESCRIPTOR=_LISTGROUPMEMBERSRESPONSE, __module__="google.cloud.monitoring_v3.proto.group_service_pb2", __doc__="""The ``ListGroupMembers`` response. - - Attributes: members: A set of monitored resources in the group. next_page_token: If there are more results than have been returned, then this field is set to a non-empty value. To see the additional - results, use that value as ``pageToken`` in the next call to + results, use that value as ``page_token`` in the next call to this method. total_size: The total number of elements matching this request. @@ -935,6 +932,16 @@ DESCRIPTOR._options = None +_LISTGROUPSREQUEST.fields_by_name["name"]._options = None +_LISTGROUPSREQUEST.fields_by_name["children_of_group"]._options = None +_LISTGROUPSREQUEST.fields_by_name["ancestors_of_group"]._options = None +_LISTGROUPSREQUEST.fields_by_name["descendants_of_group"]._options = None +_GETGROUPREQUEST.fields_by_name["name"]._options = None +_CREATEGROUPREQUEST.fields_by_name["name"]._options = None +_CREATEGROUPREQUEST.fields_by_name["group"]._options = None +_UPDATEGROUPREQUEST.fields_by_name["group"]._options = None +_DELETEGROUPREQUEST.fields_by_name["name"]._options = None +_LISTGROUPMEMBERSREQUEST.fields_by_name["name"]._options = None _GROUPSERVICE = _descriptor.ServiceDescriptor( name="GroupService", @@ -944,8 +951,8 @@ serialized_options=_b( "\312A\031monitoring.googleapis.com\322A\211\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" ), - serialized_start=1112, - serialized_end=2111, + serialized_start=1502, + serialized_end=2550, methods=[ _descriptor.MethodDescriptor( name="ListGroups", @@ -955,7 +962,7 @@ input_type=_LISTGROUPSREQUEST, output_type=_LISTGROUPSRESPONSE, serialized_options=_b( - "\202\323\344\223\002\036\022\034/v3/{name=projects/*}/groups" + "\202\323\344\223\002\036\022\034/v3/{name=projects/*}/groups\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -966,7 +973,7 @@ input_type=_GETGROUPREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_group__pb2._GROUP, serialized_options=_b( - "\202\323\344\223\002 \022\036/v3/{name=projects/*/groups/*}" + "\202\323\344\223\002 \022\036/v3/{name=projects/*/groups/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -977,7 +984,7 @@ input_type=_CREATEGROUPREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_group__pb2._GROUP, serialized_options=_b( - '\202\323\344\223\002%"\034/v3/{name=projects/*}/groups:\005group' + '\202\323\344\223\002%"\034/v3/{name=projects/*}/groups:\005group\332A\nname,group' ), ), _descriptor.MethodDescriptor( @@ -988,7 +995,7 @@ input_type=_UPDATEGROUPREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_group__pb2._GROUP, serialized_options=_b( - "\202\323\344\223\002-\032$/v3/{group.name=projects/*/groups/*}:\005group" + "\202\323\344\223\002-\032$/v3/{group.name=projects/*/groups/*}:\005group\332A\005group" ), ), _descriptor.MethodDescriptor( @@ -999,7 +1006,7 @@ input_type=_DELETEGROUPREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002 *\036/v3/{name=projects/*/groups/*}" + "\202\323\344\223\002 *\036/v3/{name=projects/*/groups/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1010,7 +1017,7 @@ input_type=_LISTGROUPMEMBERSREQUEST, output_type=_LISTGROUPMEMBERSRESPONSE, serialized_options=_b( - "\202\323\344\223\002(\022&/v3/{name=projects/*/groups/*}/members" + "\202\323\344\223\002(\022&/v3/{name=projects/*/groups/*}/members\332A\004name" ), ), ], diff --git a/google/cloud/monitoring_v3/proto/metric.proto b/google/cloud/monitoring_v3/proto/metric.proto index 3c202ed4..5a4833b1 100644 --- a/google/cloud/monitoring_v3/proto/metric.proto +++ b/google/cloud/monitoring_v3/proto/metric.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -22,6 +21,7 @@ import "google/api/label.proto"; import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; import "google/monitoring/v3/common.proto"; +import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -29,6 +29,7 @@ option java_multiple_files = true; option java_outer_classname = "MetricProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A single data point in a time series. message Point { @@ -94,3 +95,134 @@ message TimeSeries { // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. repeated Point points = 5; } + +// A descriptor for the labels and points in a timeseries. +message TimeSeriesDescriptor { + // A descriptor for the value columns in a data point. + message ValueDescriptor { + // The value key. + string key = 1; + + // The value type. + google.api.MetricDescriptor.ValueType value_type = 2; + + // The value stream kind. + google.api.MetricDescriptor.MetricKind metric_kind = 3; + } + + // Descriptors for the labels. + repeated google.api.LabelDescriptor label_descriptors = 1; + + // Descriptors for the point data value columns. + repeated ValueDescriptor point_descriptors = 5; +} + +// Represents the values of a time series associated with a +// TimeSeriesDescriptor. +message TimeSeriesData { + // A point's value columns and time interval. Each point has one or more + // point values corresponding to the entries in `point_descriptors` field in + // the TimeSeriesDescriptor associated with this object. + message PointData { + // The values that make up the point. + repeated TypedValue values = 1; + + // The time interval associated with the point. + TimeInterval time_interval = 2; + } + + // The values of the labels in the time series identifier, given in the same + // order as the `label_descriptors` field of the TimeSeriesDescriptor + // associated with this object. Each value must have a value of the type + // given in the corresponding entry of `label_descriptors`. + repeated LabelValue label_values = 1; + + // The points in the time series. + repeated PointData point_data = 2; +} + +// A label value. +message LabelValue { + // The label value can be a bool, int64, or string. + oneof value { + // A bool label value. + bool bool_value = 1; + + // An int64 label value. + int64 int64_value = 2; + + // A string label value. + string string_value = 3; + } +} + +// An error associated with a query in the time series query language format. +message QueryError { + // The location of the time series query language text that this error applies + // to. + TextLocator locator = 1; + + // The error message. + string message = 2; +} + +// A locator for text. Indicates a particular part of the text of a request or +// of an object referenced in the request. +// +// For example, suppose the request field `text` contains: +// +// text: "The quick brown fox jumps over the lazy dog." +// +// Then the locator: +// +// source: "text" +// start_position { +// line: 1 +// column: 17 +// } +// end_position { +// line: 1 +// column: 19 +// } +// +// refers to the part of the text: "fox". +message TextLocator { + // The position of a byte within the text. + message Position { + // The line, starting with 1, where the byte is positioned. + int32 line = 1; + + // The column within the line, starting with 1, where the byte is + // positioned. This is a byte index even though the text is UTF-8. + int32 column = 2; + } + + // The source of the text. The source may be a field in the request, in which + // case its format is the format of the + // google.rpc.BadRequest.FieldViolation.field field in + // https://cloud.google.com/apis/design/errors#error_details. It may also be + // be a source other than the request field (e.g. a macro definition + // referenced in the text of the query), in which case this is the name of + // the source (e.g. the macro name). + string source = 1; + + // The position of the first byte within the text. + Position start_position = 2; + + // The position of the last byte within the text. + Position end_position = 3; + + // If `source`, `start_position`, and `end_position` describe a call on + // some object (e.g. a macro in the time series query language text) and a + // location is to be designated in that object's text, `nested_locator` + // identifies the location within that object. + TextLocator nested_locator = 4; + + // When `nested_locator` is set, this field gives the reason for the nesting. + // Usually, the reason is a macro invocation. In that case, the macro name + // (including the leading '@') signals the location of the macro call + // in the text and a macro argument name (including the leading '$') signals + // the location of the macro argument inside the macro body that got + // substituted away. + string nesting_reason = 5; +} diff --git a/google/cloud/monitoring_v3/proto/metric_pb2.py b/google/cloud/monitoring_v3/proto/metric_pb2.py index 955b9858..12e6a6e6 100644 --- a/google/cloud/monitoring_v3/proto/metric_pb2.py +++ b/google/cloud/monitoring_v3/proto/metric_pb2.py @@ -24,6 +24,7 @@ from google.cloud.monitoring_v3.proto import ( common_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_common__pb2, ) +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -31,10 +32,10 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\013MetricProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\013MetricProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n-google/cloud/monitoring_v3/proto/metric.proto\x12\x14google.monitoring.v3\x1a\x1dgoogle/api/distribution.proto\x1a\x16google/api/label.proto\x1a\x17google/api/metric.proto\x1a#google/api/monitored_resource.proto\x1a-google/cloud/monitoring_v3/proto/common.proto"n\n\x05Point\x12\x34\n\x08interval\x18\x01 \x01(\x0b\x32".google.monitoring.v3.TimeInterval\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .google.monitoring.v3.TypedValue"\xc1\x02\n\nTimeSeries\x12"\n\x06metric\x18\x01 \x01(\x0b\x32\x12.google.api.Metric\x12/\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResource\x12\x37\n\x08metadata\x18\x07 \x01(\x0b\x32%.google.api.MonitoredResourceMetadata\x12<\n\x0bmetric_kind\x18\x03 \x01(\x0e\x32\'.google.api.MetricDescriptor.MetricKind\x12:\n\nvalue_type\x18\x04 \x01(\x0e\x32&.google.api.MetricDescriptor.ValueType\x12+\n\x06points\x18\x05 \x03(\x0b\x32\x1b.google.monitoring.v3.PointB\xa3\x01\n\x18\x63om.google.monitoring.v3B\x0bMetricProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n-google/cloud/monitoring_v3/proto/metric.proto\x12\x14google.monitoring.v3\x1a\x1dgoogle/api/distribution.proto\x1a\x16google/api/label.proto\x1a\x17google/api/metric.proto\x1a#google/api/monitored_resource.proto\x1a-google/cloud/monitoring_v3/proto/common.proto\x1a\x1egoogle/protobuf/duration.proto"n\n\x05Point\x12\x34\n\x08interval\x18\x01 \x01(\x0b\x32".google.monitoring.v3.TimeInterval\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .google.monitoring.v3.TypedValue"\xc1\x02\n\nTimeSeries\x12"\n\x06metric\x18\x01 \x01(\x0b\x32\x12.google.api.Metric\x12/\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResource\x12\x37\n\x08metadata\x18\x07 \x01(\x0b\x32%.google.api.MonitoredResourceMetadata\x12<\n\x0bmetric_kind\x18\x03 \x01(\x0e\x32\'.google.api.MetricDescriptor.MetricKind\x12:\n\nvalue_type\x18\x04 \x01(\x0e\x32&.google.api.MetricDescriptor.ValueType\x12+\n\x06points\x18\x05 \x03(\x0b\x32\x1b.google.monitoring.v3.Point"\xc0\x02\n\x14TimeSeriesDescriptor\x12\x36\n\x11label_descriptors\x18\x01 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12U\n\x11point_descriptors\x18\x05 \x03(\x0b\x32:.google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor\x1a\x98\x01\n\x0fValueDescriptor\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\nvalue_type\x18\x02 \x01(\x0e\x32&.google.api.MetricDescriptor.ValueType\x12<\n\x0bmetric_kind\x18\x03 \x01(\x0e\x32\'.google.api.MetricDescriptor.MetricKind"\x86\x02\n\x0eTimeSeriesData\x12\x36\n\x0clabel_values\x18\x01 \x03(\x0b\x32 .google.monitoring.v3.LabelValue\x12\x42\n\npoint_data\x18\x02 \x03(\x0b\x32..google.monitoring.v3.TimeSeriesData.PointData\x1ax\n\tPointData\x12\x30\n\x06values\x18\x01 \x03(\x0b\x32 .google.monitoring.v3.TypedValue\x12\x39\n\rtime_interval\x18\x02 \x01(\x0b\x32".google.monitoring.v3.TimeInterval"Z\n\nLabelValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x42\x07\n\x05value"Q\n\nQueryError\x12\x32\n\x07locator\x18\x01 \x01(\x0b\x32!.google.monitoring.v3.TextLocator\x12\x0f\n\x07message\x18\x02 \x01(\t"\xa0\x02\n\x0bTextLocator\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x42\n\x0estart_position\x18\x02 \x01(\x0b\x32*.google.monitoring.v3.TextLocator.Position\x12@\n\x0c\x65nd_position\x18\x03 \x01(\x0b\x32*.google.monitoring.v3.TextLocator.Position\x12\x39\n\x0enested_locator\x18\x04 \x01(\x0b\x32!.google.monitoring.v3.TextLocator\x12\x16\n\x0enesting_reason\x18\x05 \x01(\t\x1a(\n\x08Position\x12\x0c\n\x04line\x18\x01 \x01(\x05\x12\x0e\n\x06\x63olumn\x18\x02 \x01(\x05\x42\xc3\x01\n\x18\x63om.google.monitoring.v3B\x0bMetricProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), dependencies=[ google_dot_api_dot_distribution__pb2.DESCRIPTOR, @@ -42,6 +43,7 @@ google_dot_api_dot_metric__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_common__pb2.DESCRIPTOR, + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, ], ) @@ -98,8 +100,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=235, - serialized_end=345, + serialized_start=267, + serialized_end=377, ) @@ -227,8 +229,559 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=348, - serialized_end=669, + serialized_start=380, + serialized_end=701, +) + + +_TIMESERIESDESCRIPTOR_VALUEDESCRIPTOR = _descriptor.Descriptor( + name="ValueDescriptor", + full_name="google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value_type", + full_name="google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.value_type", + index=1, + number=2, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="metric_kind", + full_name="google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.metric_kind", + index=2, + number=3, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=872, + serialized_end=1024, +) + +_TIMESERIESDESCRIPTOR = _descriptor.Descriptor( + name="TimeSeriesDescriptor", + full_name="google.monitoring.v3.TimeSeriesDescriptor", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="label_descriptors", + full_name="google.monitoring.v3.TimeSeriesDescriptor.label_descriptors", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="point_descriptors", + full_name="google.monitoring.v3.TimeSeriesDescriptor.point_descriptors", + index=1, + number=5, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_TIMESERIESDESCRIPTOR_VALUEDESCRIPTOR], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=704, + serialized_end=1024, +) + + +_TIMESERIESDATA_POINTDATA = _descriptor.Descriptor( + name="PointData", + full_name="google.monitoring.v3.TimeSeriesData.PointData", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="values", + full_name="google.monitoring.v3.TimeSeriesData.PointData.values", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="time_interval", + full_name="google.monitoring.v3.TimeSeriesData.PointData.time_interval", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1169, + serialized_end=1289, +) + +_TIMESERIESDATA = _descriptor.Descriptor( + name="TimeSeriesData", + full_name="google.monitoring.v3.TimeSeriesData", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="label_values", + full_name="google.monitoring.v3.TimeSeriesData.label_values", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="point_data", + full_name="google.monitoring.v3.TimeSeriesData.point_data", + index=1, + number=2, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_TIMESERIESDATA_POINTDATA], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1027, + serialized_end=1289, +) + + +_LABELVALUE = _descriptor.Descriptor( + name="LabelValue", + full_name="google.monitoring.v3.LabelValue", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="bool_value", + full_name="google.monitoring.v3.LabelValue.bool_value", + index=0, + number=1, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="int64_value", + full_name="google.monitoring.v3.LabelValue.int64_value", + index=1, + number=2, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="string_value", + full_name="google.monitoring.v3.LabelValue.string_value", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="value", + full_name="google.monitoring.v3.LabelValue.value", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=1291, + serialized_end=1381, +) + + +_QUERYERROR = _descriptor.Descriptor( + name="QueryError", + full_name="google.monitoring.v3.QueryError", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="locator", + full_name="google.monitoring.v3.QueryError.locator", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="message", + full_name="google.monitoring.v3.QueryError.message", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1383, + serialized_end=1464, +) + + +_TEXTLOCATOR_POSITION = _descriptor.Descriptor( + name="Position", + full_name="google.monitoring.v3.TextLocator.Position", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="line", + full_name="google.monitoring.v3.TextLocator.Position.line", + index=0, + number=1, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="column", + full_name="google.monitoring.v3.TextLocator.Position.column", + index=1, + number=2, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1715, + serialized_end=1755, +) + +_TEXTLOCATOR = _descriptor.Descriptor( + name="TextLocator", + full_name="google.monitoring.v3.TextLocator", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="source", + full_name="google.monitoring.v3.TextLocator.source", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="start_position", + full_name="google.monitoring.v3.TextLocator.start_position", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="end_position", + full_name="google.monitoring.v3.TextLocator.end_position", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="nested_locator", + full_name="google.monitoring.v3.TextLocator.nested_locator", + index=3, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="nesting_reason", + full_name="google.monitoring.v3.TextLocator.nesting_reason", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_TEXTLOCATOR_POSITION], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1467, + serialized_end=1755, ) _POINT.fields_by_name[ @@ -257,8 +810,62 @@ "value_type" ].enum_type = google_dot_api_dot_metric__pb2._METRICDESCRIPTOR_VALUETYPE _TIMESERIES.fields_by_name["points"].message_type = _POINT +_TIMESERIESDESCRIPTOR_VALUEDESCRIPTOR.fields_by_name[ + "value_type" +].enum_type = google_dot_api_dot_metric__pb2._METRICDESCRIPTOR_VALUETYPE +_TIMESERIESDESCRIPTOR_VALUEDESCRIPTOR.fields_by_name[ + "metric_kind" +].enum_type = google_dot_api_dot_metric__pb2._METRICDESCRIPTOR_METRICKIND +_TIMESERIESDESCRIPTOR_VALUEDESCRIPTOR.containing_type = _TIMESERIESDESCRIPTOR +_TIMESERIESDESCRIPTOR.fields_by_name[ + "label_descriptors" +].message_type = google_dot_api_dot_label__pb2._LABELDESCRIPTOR +_TIMESERIESDESCRIPTOR.fields_by_name[ + "point_descriptors" +].message_type = _TIMESERIESDESCRIPTOR_VALUEDESCRIPTOR +_TIMESERIESDATA_POINTDATA.fields_by_name[ + "values" +].message_type = ( + google_dot_cloud_dot_monitoring__v3_dot_proto_dot_common__pb2._TYPEDVALUE +) +_TIMESERIESDATA_POINTDATA.fields_by_name[ + "time_interval" +].message_type = ( + google_dot_cloud_dot_monitoring__v3_dot_proto_dot_common__pb2._TIMEINTERVAL +) +_TIMESERIESDATA_POINTDATA.containing_type = _TIMESERIESDATA +_TIMESERIESDATA.fields_by_name["label_values"].message_type = _LABELVALUE +_TIMESERIESDATA.fields_by_name["point_data"].message_type = _TIMESERIESDATA_POINTDATA +_LABELVALUE.oneofs_by_name["value"].fields.append( + _LABELVALUE.fields_by_name["bool_value"] +) +_LABELVALUE.fields_by_name["bool_value"].containing_oneof = _LABELVALUE.oneofs_by_name[ + "value" +] +_LABELVALUE.oneofs_by_name["value"].fields.append( + _LABELVALUE.fields_by_name["int64_value"] +) +_LABELVALUE.fields_by_name["int64_value"].containing_oneof = _LABELVALUE.oneofs_by_name[ + "value" +] +_LABELVALUE.oneofs_by_name["value"].fields.append( + _LABELVALUE.fields_by_name["string_value"] +) +_LABELVALUE.fields_by_name[ + "string_value" +].containing_oneof = _LABELVALUE.oneofs_by_name["value"] +_QUERYERROR.fields_by_name["locator"].message_type = _TEXTLOCATOR +_TEXTLOCATOR_POSITION.containing_type = _TEXTLOCATOR +_TEXTLOCATOR.fields_by_name["start_position"].message_type = _TEXTLOCATOR_POSITION +_TEXTLOCATOR.fields_by_name["end_position"].message_type = _TEXTLOCATOR_POSITION +_TEXTLOCATOR.fields_by_name["nested_locator"].message_type = _TEXTLOCATOR DESCRIPTOR.message_types_by_name["Point"] = _POINT DESCRIPTOR.message_types_by_name["TimeSeries"] = _TIMESERIES +DESCRIPTOR.message_types_by_name["TimeSeriesDescriptor"] = _TIMESERIESDESCRIPTOR +DESCRIPTOR.message_types_by_name["TimeSeriesData"] = _TIMESERIESDATA +DESCRIPTOR.message_types_by_name["LabelValue"] = _LABELVALUE +DESCRIPTOR.message_types_by_name["QueryError"] = _QUERYERROR +DESCRIPTOR.message_types_by_name["TextLocator"] = _TEXTLOCATOR _sym_db.RegisterFileDescriptor(DESCRIPTOR) Point = _reflection.GeneratedProtocolMessageType( @@ -268,8 +875,6 @@ DESCRIPTOR=_POINT, __module__="google.cloud.monitoring_v3.proto.metric_pb2", __doc__="""A single data point in a time series. - - Attributes: interval: The time interval to which the data point applies. For @@ -297,12 +902,10 @@ dict( DESCRIPTOR=_TIMESERIES, __module__="google.cloud.monitoring_v3.proto.metric_pb2", - __doc__="""A collection of data points that describes the time-varying values of a - metric. A time series is identified by a combination of a - fully-specified monitored resource and a fully-specified metric. This - type is used for both listing and creating time series. - - + __doc__="""A collection of data points that describes the time-varying values of + a metric. A time series is identified by a combination of a fully- + specified monitored resource and a fully-specified metric. This type + is used for both listing and creating time series. Attributes: metric: The associated metric. A fully-specified metric used to @@ -347,6 +950,192 @@ ) _sym_db.RegisterMessage(TimeSeries) +TimeSeriesDescriptor = _reflection.GeneratedProtocolMessageType( + "TimeSeriesDescriptor", + (_message.Message,), + dict( + ValueDescriptor=_reflection.GeneratedProtocolMessageType( + "ValueDescriptor", + (_message.Message,), + dict( + DESCRIPTOR=_TIMESERIESDESCRIPTOR_VALUEDESCRIPTOR, + __module__="google.cloud.monitoring_v3.proto.metric_pb2", + __doc__="""A descriptor for the value columns in a data point. + Attributes: + key: + The value key. + value_type: + The value type. + metric_kind: + The value stream kind. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor) + ), + ), + DESCRIPTOR=_TIMESERIESDESCRIPTOR, + __module__="google.cloud.monitoring_v3.proto.metric_pb2", + __doc__="""A descriptor for the labels and points in a timeseries. + Attributes: + label_descriptors: + Descriptors for the labels. + point_descriptors: + Descriptors for the point data value columns. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.TimeSeriesDescriptor) + ), +) +_sym_db.RegisterMessage(TimeSeriesDescriptor) +_sym_db.RegisterMessage(TimeSeriesDescriptor.ValueDescriptor) + +TimeSeriesData = _reflection.GeneratedProtocolMessageType( + "TimeSeriesData", + (_message.Message,), + dict( + PointData=_reflection.GeneratedProtocolMessageType( + "PointData", + (_message.Message,), + dict( + DESCRIPTOR=_TIMESERIESDATA_POINTDATA, + __module__="google.cloud.monitoring_v3.proto.metric_pb2", + __doc__="""A point's value columns and time interval. Each point has one or more + point values corresponding to the entries in ``point_descriptors`` + field in the TimeSeriesDescriptor associated with this object. + Attributes: + values: + The values that make up the point. + time_interval: + The time interval associated with the point. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.TimeSeriesData.PointData) + ), + ), + DESCRIPTOR=_TIMESERIESDATA, + __module__="google.cloud.monitoring_v3.proto.metric_pb2", + __doc__="""Represents the values of a time series associated with a + TimeSeriesDescriptor. + Attributes: + label_values: + The values of the labels in the time series identifier, given + in the same order as the ``label_descriptors`` field of the + TimeSeriesDescriptor associated with this object. Each value + must have a value of the type given in the corresponding entry + of ``label_descriptors``. + point_data: + The points in the time series. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.TimeSeriesData) + ), +) +_sym_db.RegisterMessage(TimeSeriesData) +_sym_db.RegisterMessage(TimeSeriesData.PointData) + +LabelValue = _reflection.GeneratedProtocolMessageType( + "LabelValue", + (_message.Message,), + dict( + DESCRIPTOR=_LABELVALUE, + __module__="google.cloud.monitoring_v3.proto.metric_pb2", + __doc__="""A label value. + Attributes: + value: + The label value can be a bool, int64, or string. + bool_value: + A bool label value. + int64_value: + An int64 label value. + string_value: + A string label value. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.LabelValue) + ), +) +_sym_db.RegisterMessage(LabelValue) + +QueryError = _reflection.GeneratedProtocolMessageType( + "QueryError", + (_message.Message,), + dict( + DESCRIPTOR=_QUERYERROR, + __module__="google.cloud.monitoring_v3.proto.metric_pb2", + __doc__="""An error associated with a query in the time series query language + format. + Attributes: + locator: + The location of the time series query language text that this + error applies to. + message: + The error message. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.QueryError) + ), +) +_sym_db.RegisterMessage(QueryError) + +TextLocator = _reflection.GeneratedProtocolMessageType( + "TextLocator", + (_message.Message,), + dict( + Position=_reflection.GeneratedProtocolMessageType( + "Position", + (_message.Message,), + dict( + DESCRIPTOR=_TEXTLOCATOR_POSITION, + __module__="google.cloud.monitoring_v3.proto.metric_pb2", + __doc__="""The position of a byte within the text. + Attributes: + line: + The line, starting with 1, where the byte is positioned. + column: + The column within the line, starting with 1, where the byte is + positioned. This is a byte index even though the text is + UTF-8. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.TextLocator.Position) + ), + ), + DESCRIPTOR=_TEXTLOCATOR, + __module__="google.cloud.monitoring_v3.proto.metric_pb2", + __doc__="""A locator for text. Indicates a particular part of the text of a + request or of an object referenced in the request. For example, + suppose the request field ``text`` contains: text: "The quick brown + fox jumps over the lazy dog." Then the locator: source: "text" + start\_position { line: 1 column: 17 } end\_position { line: 1 column: + 19 } refers to the part of the text: "fox". + Attributes: + source: + The source of the text. The source may be a field in the + request, in which case its format is the format of the + google.rpc.BadRequest.FieldViolation.field field in + https://cloud.google.com/apis/design/errors#error\_details. It + may also be be a source other than the request field (e.g. a + macro definition referenced in the text of the query), in + which case this is the name of the source (e.g. the macro + name). + start_position: + The position of the first byte within the text. + end_position: + The position of the last byte within the text. + nested_locator: + If ``source``, ``start_position``, and ``end_position`` + describe a call on some object (e.g. a macro in the time + series query language text) and a location is to be designated + in that object's text, ``nested_locator`` identifies the + location within that object. + nesting_reason: + When ``nested_locator`` is set, this field gives the reason + for the nesting. Usually, the reason is a macro invocation. In + that case, the macro name (including the leading '@') signals + the location of the macro call in the text and a macro + argument name (including the leading '$') signals the location + of the macro argument inside the macro body that got + substituted away. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.TextLocator) + ), +) +_sym_db.RegisterMessage(TextLocator) +_sym_db.RegisterMessage(TextLocator.Position) + DESCRIPTOR._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/monitoring_v3/proto/metric_service.proto b/google/cloud/monitoring_v3/proto/metric_service.proto index 101dee40..11999035 100644 --- a/google/cloud/monitoring_v3/proto/metric_service.proto +++ b/google/cloud/monitoring_v3/proto/metric_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,22 +11,23 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/alert.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/metric.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -34,6 +35,23 @@ option java_multiple_files = true; option java_outer_classname = "MetricServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; +option (google.api.resource_definition) = { + type: "monitoring.googleapis.com/MetricDescriptor" + pattern: "projects/{project}/metricDescriptors/{metric_descriptor=**}" + pattern: "organizations/{organization}/metricDescriptors/{metric_descriptor=**}" + pattern: "folders/{folder}/metricDescriptors/{metric_descriptor=**}" + pattern: "*" + history: ORIGINALLY_SINGLE_PATTERN +}; +option (google.api.resource_definition) = { + type: "monitoring.googleapis.com/MonitoredResourceDescriptor" + pattern: "projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}" + pattern: "organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}" + pattern: "folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}" + pattern: "*" + history: ORIGINALLY_SINGLE_PATTERN +}; // Manages metric descriptors, monitored resource descriptors, and // time series data. @@ -45,57 +63,65 @@ service MetricService { "https://www.googleapis.com/auth/monitoring.read," "https://www.googleapis.com/auth/monitoring.write"; - // Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + // Lists monitored resource descriptors that match a filter. This method does not require a Workspace. rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/monitoredResourceDescriptors" }; + option (google.api.method_signature) = "name"; } - // Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + // Gets a single monitored resource descriptor. This method does not require a Workspace. rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) returns (google.api.MonitoredResourceDescriptor) { option (google.api.http) = { - get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}" + get: "/v3/{name=projects/*/monitoredResourceDescriptors/**}" }; + option (google.api.method_signature) = "name"; } - // Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + // Lists metric descriptors that match a filter. This method does not require a Workspace. rpc ListMetricDescriptors(ListMetricDescriptorsRequest) returns (ListMetricDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/metricDescriptors" }; + option (google.api.method_signature) = "name"; } - // Gets a single metric descriptor. This method does not require a Stackdriver account. + // Gets a single metric descriptor. This method does not require a Workspace. rpc GetMetricDescriptor(GetMetricDescriptorRequest) returns (google.api.MetricDescriptor) { option (google.api.http) = { get: "/v3/{name=projects/*/metricDescriptors/**}" }; + option (google.api.method_signature) = "name"; } // Creates a new metric descriptor. // User-created metric descriptors define - // [custom metrics](/monitoring/custom-metrics). + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics). rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) { option (google.api.http) = { post: "/v3/{name=projects/*}/metricDescriptors" body: "metric_descriptor" }; + option (google.api.method_signature) = "name,metric_descriptor"; } // Deletes a metric descriptor. Only user-created - // [custom metrics](/monitoring/custom-metrics) can be deleted. + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be + // deleted. rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/metricDescriptors/**}" }; + option (google.api.method_signature) = "name"; } - // Lists time series that match a filter. This method does not require a Stackdriver account. + // Lists time series that match a filter. This method does not require a Workspace. rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/timeSeries" }; + option (google.api.method_signature) = "name,filter,interval,view"; } // Creates or adds data to one or more time series. @@ -107,20 +133,26 @@ service MetricService { post: "/v3/{name=projects/*}/timeSeries" body: "*" }; + option (google.api.method_signature) = "name,time_series"; } } // The `ListMonitoredResourceDescriptors` request. message ListMonitoredResourceDescriptorsRequest { - // The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. - string name = 5; - - // An optional [filter](/monitoring/api/v3/filters) describing - // the descriptors to be returned. The filter can reference - // the descriptor's type and labels. For example, the - // following filter returns only Google Compute Engine descriptors - // that have an `id` label: + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/MonitoredResourceDescriptor" + } + ]; + + // An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) + // describing the descriptors to be returned. The filter can reference the + // descriptor's type and labels. For example, the following filter returns + // only Google Compute Engine descriptors that have an `id` label: // // resource.type = starts_with("gce_") AND resource.label:id string filter = 2; @@ -142,31 +174,44 @@ message ListMonitoredResourceDescriptorsResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `GetMonitoredResourceDescriptor` request. message GetMonitoredResourceDescriptorRequest { - // The monitored resource descriptor to get. The format is - // `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. - // The `{resource_type}` is a predefined type, such as + // Required. The monitored resource descriptor to get. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] + // + // The `[RESOURCE_TYPE]` is a predefined type, such as // `cloudsql_database`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/MonitoredResourceDescriptor" + } + ]; } // The `ListMetricDescriptors` request. message ListMetricDescriptorsRequest { - // The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. - string name = 5; + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; // If this field is empty, all custom and // system-defined metric descriptors are returned. - // Otherwise, the [filter](/monitoring/api/v3/filters) + // Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) // specifies which metric descriptors are to be // returned. For example, the following filter matches all - // [custom metrics](/monitoring/custom-metrics): + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics): // // metric.type = starts_with("custom.googleapis.com/") string filter = 2; @@ -188,37 +233,57 @@ message ListMetricDescriptorsResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `GetMetricDescriptor` request. message GetMetricDescriptorRequest { - // The metric descriptor on which to execute the request. The format is - // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - // An example value of `{metric_id}` is + // Required. The metric descriptor on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + // + // An example value of `[METRIC_ID]` is // `"compute.googleapis.com/instance/disk/read_bytes_count"`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; } // The `CreateMetricDescriptor` request. message CreateMetricDescriptorRequest { - // The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. - string name = 3; - - // The new [custom metric](/monitoring/custom-metrics) + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; + + // Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) // descriptor. - google.api.MetricDescriptor metric_descriptor = 2; + google.api.MetricDescriptor metric_descriptor = 2 [(google.api.field_behavior) = REQUIRED]; } // The `DeleteMetricDescriptor` request. message DeleteMetricDescriptorRequest { - // The metric descriptor on which to execute the request. The format is - // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - // An example of `{metric_id}` is: + // Required. The metric descriptor on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + // + // An example of `[METRIC_ID]` is: // `"custom.googleapis.com/my_test_metric"`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; } // The `ListTimeSeries` request. @@ -234,23 +299,29 @@ message ListTimeSeriesRequest { HEADERS = 1; } - // The project on which to execute the request. The format is - // "projects/{project_id_or_number}". - string name = 10; - - // A [monitoring filter](/monitoring/api/v3/filters) that specifies which time - // series should be returned. The filter must specify a single metric type, - // and can additionally specify metric labels and other information. For - // example: + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 10 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // that specifies which time series should be returned. The filter must + // specify a single metric type, and can additionally specify metric labels + // and other information. For example: // // metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND // metric.labels.instance_name = "my-instance-name" - string filter = 2; + string filter = 2 [(google.api.field_behavior) = REQUIRED]; - // The time interval for which results should be returned. Only time series + // Required. The time interval for which results should be returned. Only time series // that contain data points in the specified interval are included // in the response. - TimeInterval interval = 4; + TimeInterval interval = 4 [(google.api.field_behavior) = REQUIRED]; // Specifies the alignment of data points in individual time series as // well as how to combine the retrieved time series across specified labels. @@ -263,8 +334,8 @@ message ListTimeSeriesRequest { // currently returned in reverse time order (most recent to oldest). string order_by = 6; - // Specifies which information is returned about the time series. - TimeSeriesView view = 7; + // Required. Specifies which information is returned about the time series. + TimeSeriesView view = 7 [(google.api.field_behavior) = REQUIRED]; // A positive number that is the maximum number of results to return. If // `page_size` is empty or more than 100,000 results, the effective @@ -286,7 +357,7 @@ message ListTimeSeriesResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; // Query execution errors that may have caused the time series data returned @@ -296,18 +367,24 @@ message ListTimeSeriesResponse { // The `CreateTimeSeries` request. message CreateTimeSeriesRequest { - // The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. - string name = 3; - - // The new data to be added to a list of time series. + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The new data to be added to a list of time series. // Adds at most one data point to each of several time series. The new data // point must be more recent than any other point in its time series. Each // `TimeSeries` value must fully specify a unique time series by supplying // all label values for the metric and the monitored resource. // // The maximum number of `TimeSeries` objects per `Create` request is 200. - repeated TimeSeries time_series = 2; + repeated TimeSeries time_series = 2 [(google.api.field_behavior) = REQUIRED]; } // DEPRECATED. Used to hold per-time-series error status. @@ -339,3 +416,52 @@ message CreateTimeSeriesSummary { // The number of points that failed to be written. Order is not guaranteed. repeated Error errors = 3; } + +// The `QueryTimeSeries` request. +message QueryTimeSeriesRequest { + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 1; + + // Required. The query in the monitoring query language format. The default + // time zone is in UTC. + string query = 7; + + // A positive number that is the maximum number of time_series_data to return. + int32 page_size = 9; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 10; +} + +// The `QueryTimeSeries` response. +message QueryTimeSeriesResponse { + // The descriptor for the time series data. + TimeSeriesDescriptor time_series_descriptor = 8; + + // The time series data. + repeated TimeSeriesData time_series_data = 9; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, use that value as + // `page_token` in the next call to this method. + string next_page_token = 10; + + // Query execution errors that may have caused the time series data returned + // to be incomplete. The available data will be available in the + // response. + repeated google.rpc.Status partial_errors = 11; +} + +// This is an error detail intended to be used with INVALID_ARGUMENT errors. +message QueryErrorList { + // Errors in parsing the time series query language text. The number of errors + // in the response may be limited. + repeated QueryError errors = 1; + + // A summary of all the errors. + string error_summary = 2; +} diff --git a/google/cloud/monitoring_v3/proto/metric_service_pb2.py b/google/cloud/monitoring_v3/proto/metric_service_pb2.py index 57ca2bcb..bb301025 100644 --- a/google/cloud/monitoring_v3/proto/metric_service_pb2.py +++ b/google/cloud/monitoring_v3/proto/metric_service_pb2.py @@ -16,10 +16,13 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import metric_pb2 as google_dot_api_dot_metric__pb2 from google.api import ( monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2, ) +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.monitoring_v3.proto import ( alert_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2, ) @@ -32,7 +35,6 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -40,22 +42,24 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\022MetricServiceProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\022MetricServiceProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3\352A\360\001\n*monitoring.googleapis.com/MetricDescriptor\022;projects/{project}/metricDescriptors/{metric_descriptor=**}\022Eorganizations/{organization}/metricDescriptors/{metric_descriptor=**}\0229folders/{folder}/metricDescriptors/{metric_descriptor=**}\022\001* \001\352A\267\002\n5monitoring.googleapis.com/MonitoredResourceDescriptor\022Oprojects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}\022Yorganizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}\022Mfolders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}\022\001* \001" ), serialized_pb=_b( - '\n5google/cloud/monitoring_v3/proto/metric_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/metric.proto\x1a#google/api/monitored_resource.proto\x1a,google/cloud/monitoring_v3/proto/alert.proto\x1a-google/cloud/monitoring_v3/proto/common.proto\x1a-google/cloud/monitoring_v3/proto/metric.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x17google/rpc/status.proto\x1a\x17google/api/client.proto"n\n\'ListMonitoredResourceDescriptorsRequest\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"5\n%GetMonitoredResourceDescriptorRequest\x12\x0c\n\x04name\x18\x03 \x01(\t"c\n\x1cListMetricDescriptorsRequest\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"r\n\x1dListMetricDescriptorsResponse\x12\x38\n\x12metric_descriptors\x18\x01 \x03(\x0b\x32\x1c.google.api.MetricDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"*\n\x1aGetMetricDescriptorRequest\x12\x0c\n\x04name\x18\x03 \x01(\t"f\n\x1d\x43reateMetricDescriptorRequest\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x37\n\x11metric_descriptor\x18\x02 \x01(\x0b\x32\x1c.google.api.MetricDescriptor"-\n\x1d\x44\x65leteMetricDescriptorRequest\x12\x0c\n\x04name\x18\x03 \x01(\t"\xcf\x02\n\x15ListTimeSeriesRequest\x12\x0c\n\x04name\x18\n \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x34\n\x08interval\x18\x04 \x01(\x0b\x32".google.monitoring.v3.TimeInterval\x12\x36\n\x0b\x61ggregation\x18\x05 \x01(\x0b\x32!.google.monitoring.v3.Aggregation\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12H\n\x04view\x18\x07 \x01(\x0e\x32:.google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView\x12\x11\n\tpage_size\x18\x08 \x01(\x05\x12\x12\n\npage_token\x18\t \x01(\t"\'\n\x0eTimeSeriesView\x12\x08\n\x04\x46ULL\x10\x00\x12\x0b\n\x07HEADERS\x10\x01"\x96\x01\n\x16ListTimeSeriesResponse\x12\x35\n\x0btime_series\x18\x01 \x03(\x0b\x32 .google.monitoring.v3.TimeSeries\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12,\n\x10\x65xecution_errors\x18\x03 \x03(\x0b\x32\x12.google.rpc.Status"^\n\x17\x43reateTimeSeriesRequest\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x35\n\x0btime_series\x18\x02 \x03(\x0b\x32 .google.monitoring.v3.TimeSeries"z\n\x15\x43reateTimeSeriesError\x12\x39\n\x0btime_series\x18\x01 \x01(\x0b\x32 .google.monitoring.v3.TimeSeriesB\x02\x18\x01\x12&\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x02\x18\x01"\xd8\x01\n\x17\x43reateTimeSeriesSummary\x12\x19\n\x11total_point_count\x18\x01 \x01(\x05\x12\x1b\n\x13success_point_count\x18\x02 \x01(\x05\x12\x43\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x33.google.monitoring.v3.CreateTimeSeriesSummary.Error\x1a@\n\x05\x45rror\x12"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x13\n\x0bpoint_count\x18\x02 \x01(\x05\x32\xd2\x0c\n\rMetricService\x12\xdd\x01\n ListMonitoredResourceDescriptors\x12=.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest\x1a>.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse":\x82\xd3\xe4\x93\x02\x34\x12\x32/v3/{name=projects/*}/monitoredResourceDescriptors\x12\xc4\x01\n\x1eGetMonitoredResourceDescriptor\x12;.google.monitoring.v3.GetMonitoredResourceDescriptorRequest\x1a\'.google.api.MonitoredResourceDescriptor"<\x82\xd3\xe4\x93\x02\x36\x12\x34/v3/{name=projects/*/monitoredResourceDescriptors/*}\x12\xb1\x01\n\x15ListMetricDescriptors\x12\x32.google.monitoring.v3.ListMetricDescriptorsRequest\x1a\x33.google.monitoring.v3.ListMetricDescriptorsResponse"/\x82\xd3\xe4\x93\x02)\x12\'/v3/{name=projects/*}/metricDescriptors\x12\x99\x01\n\x13GetMetricDescriptor\x12\x30.google.monitoring.v3.GetMetricDescriptorRequest\x1a\x1c.google.api.MetricDescriptor"2\x82\xd3\xe4\x93\x02,\x12*/v3/{name=projects/*/metricDescriptors/**}\x12\xaf\x01\n\x16\x43reateMetricDescriptor\x12\x33.google.monitoring.v3.CreateMetricDescriptorRequest\x1a\x1c.google.api.MetricDescriptor"B\x82\xd3\xe4\x93\x02<"\'/v3/{name=projects/*}/metricDescriptors:\x11metric_descriptor\x12\x99\x01\n\x16\x44\x65leteMetricDescriptor\x12\x33.google.monitoring.v3.DeleteMetricDescriptorRequest\x1a\x16.google.protobuf.Empty"2\x82\xd3\xe4\x93\x02,**/v3/{name=projects/*/metricDescriptors/**}\x12\x95\x01\n\x0eListTimeSeries\x12+.google.monitoring.v3.ListTimeSeriesRequest\x1a,.google.monitoring.v3.ListTimeSeriesResponse"(\x82\xd3\xe4\x93\x02"\x12 /v3/{name=projects/*}/timeSeries\x12\x86\x01\n\x10\x43reateTimeSeries\x12-.google.monitoring.v3.CreateTimeSeriesRequest\x1a\x16.google.protobuf.Empty"+\x82\xd3\xe4\x93\x02%" /v3/{name=projects/*}/timeSeries:\x01*\x1a\xda\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\xba\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read,https://www.googleapis.com/auth/monitoring.writeB\xaa\x01\n\x18\x63om.google.monitoring.v3B\x12MetricServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n5google/cloud/monitoring_v3/proto/metric_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/monitoring_v3/proto/alert.proto\x1a-google/cloud/monitoring_v3/proto/common.proto\x1a-google/cloud/monitoring_v3/proto/metric.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x17google/rpc/status.proto"\xad\x01\n\'ListMonitoredResourceDescriptorsRequest\x12K\n\x04name\x18\x05 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35monitoring.googleapis.com/MonitoredResourceDescriptor\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"t\n%GetMonitoredResourceDescriptorRequest\x12K\n\x04name\x18\x03 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5monitoring.googleapis.com/MonitoredResourceDescriptor"\x97\x01\n\x1cListMetricDescriptorsRequest\x12@\n\x04name\x18\x05 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*monitoring.googleapis.com/MetricDescriptor\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"r\n\x1dListMetricDescriptorsResponse\x12\x38\n\x12metric_descriptors\x18\x01 \x03(\x0b\x32\x1c.google.api.MetricDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"^\n\x1aGetMetricDescriptorRequest\x12@\n\x04name\x18\x03 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*monitoring.googleapis.com/MetricDescriptor"\x9f\x01\n\x1d\x43reateMetricDescriptorRequest\x12@\n\x04name\x18\x03 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*monitoring.googleapis.com/MetricDescriptor\x12<\n\x11metric_descriptor\x18\x02 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x02"a\n\x1d\x44\x65leteMetricDescriptorRequest\x12@\n\x04name\x18\x03 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*monitoring.googleapis.com/MetricDescriptor"\x93\x03\n\x15ListTimeSeriesRequest\x12\x41\n\x04name\x18\n \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x08interval\x18\x04 \x01(\x0b\x32".google.monitoring.v3.TimeIntervalB\x03\xe0\x41\x02\x12\x36\n\x0b\x61ggregation\x18\x05 \x01(\x0b\x32!.google.monitoring.v3.Aggregation\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12M\n\x04view\x18\x07 \x01(\x0e\x32:.google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesViewB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x08 \x01(\x05\x12\x12\n\npage_token\x18\t \x01(\t"\'\n\x0eTimeSeriesView\x12\x08\n\x04\x46ULL\x10\x00\x12\x0b\n\x07HEADERS\x10\x01"\x96\x01\n\x16ListTimeSeriesResponse\x12\x35\n\x0btime_series\x18\x01 \x03(\x0b\x32 .google.monitoring.v3.TimeSeries\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12,\n\x10\x65xecution_errors\x18\x03 \x03(\x0b\x32\x12.google.rpc.Status"\x98\x01\n\x17\x43reateTimeSeriesRequest\x12\x41\n\x04name\x18\x03 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12:\n\x0btime_series\x18\x02 \x03(\x0b\x32 .google.monitoring.v3.TimeSeriesB\x03\xe0\x41\x02"z\n\x15\x43reateTimeSeriesError\x12\x39\n\x0btime_series\x18\x01 \x01(\x0b\x32 .google.monitoring.v3.TimeSeriesB\x02\x18\x01\x12&\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x02\x18\x01"\xd8\x01\n\x17\x43reateTimeSeriesSummary\x12\x19\n\x11total_point_count\x18\x01 \x01(\x05\x12\x1b\n\x13success_point_count\x18\x02 \x01(\x05\x12\x43\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x33.google.monitoring.v3.CreateTimeSeriesSummary.Error\x1a@\n\x05\x45rror\x12"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x13\n\x0bpoint_count\x18\x02 \x01(\x05"\\\n\x16QueryTimeSeriesRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05query\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\x12\x12\n\npage_token\x18\n \x01(\t"\xea\x01\n\x17QueryTimeSeriesResponse\x12J\n\x16time_series_descriptor\x18\x08 \x01(\x0b\x32*.google.monitoring.v3.TimeSeriesDescriptor\x12>\n\x10time_series_data\x18\t \x03(\x0b\x32$.google.monitoring.v3.TimeSeriesData\x12\x17\n\x0fnext_page_token\x18\n \x01(\t\x12*\n\x0epartial_errors\x18\x0b \x03(\x0b\x32\x12.google.rpc.Status"Y\n\x0eQueryErrorList\x12\x30\n\x06\x65rrors\x18\x01 \x03(\x0b\x32 .google.monitoring.v3.QueryError\x12\x15\n\rerror_summary\x18\x02 \x01(\t2\xbe\r\n\rMetricService\x12\xe4\x01\n ListMonitoredResourceDescriptors\x12=.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest\x1a>.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse"A\x82\xd3\xe4\x93\x02\x34\x12\x32/v3/{name=projects/*}/monitoredResourceDescriptors\xda\x41\x04name\x12\xcc\x01\n\x1eGetMonitoredResourceDescriptor\x12;.google.monitoring.v3.GetMonitoredResourceDescriptorRequest\x1a\'.google.api.MonitoredResourceDescriptor"D\x82\xd3\xe4\x93\x02\x37\x12\x35/v3/{name=projects/*/monitoredResourceDescriptors/**}\xda\x41\x04name\x12\xb8\x01\n\x15ListMetricDescriptors\x12\x32.google.monitoring.v3.ListMetricDescriptorsRequest\x1a\x33.google.monitoring.v3.ListMetricDescriptorsResponse"6\x82\xd3\xe4\x93\x02)\x12\'/v3/{name=projects/*}/metricDescriptors\xda\x41\x04name\x12\xa0\x01\n\x13GetMetricDescriptor\x12\x30.google.monitoring.v3.GetMetricDescriptorRequest\x1a\x1c.google.api.MetricDescriptor"9\x82\xd3\xe4\x93\x02,\x12*/v3/{name=projects/*/metricDescriptors/**}\xda\x41\x04name\x12\xc8\x01\n\x16\x43reateMetricDescriptor\x12\x33.google.monitoring.v3.CreateMetricDescriptorRequest\x1a\x1c.google.api.MetricDescriptor"[\x82\xd3\xe4\x93\x02<"\'/v3/{name=projects/*}/metricDescriptors:\x11metric_descriptor\xda\x41\x16name,metric_descriptor\x12\xa0\x01\n\x16\x44\x65leteMetricDescriptor\x12\x33.google.monitoring.v3.DeleteMetricDescriptorRequest\x1a\x16.google.protobuf.Empty"9\x82\xd3\xe4\x93\x02,**/v3/{name=projects/*/metricDescriptors/**}\xda\x41\x04name\x12\xb1\x01\n\x0eListTimeSeries\x12+.google.monitoring.v3.ListTimeSeriesRequest\x1a,.google.monitoring.v3.ListTimeSeriesResponse"D\x82\xd3\xe4\x93\x02"\x12 /v3/{name=projects/*}/timeSeries\xda\x41\x19name,filter,interval,view\x12\x99\x01\n\x10\x43reateTimeSeries\x12-.google.monitoring.v3.CreateTimeSeriesRequest\x1a\x16.google.protobuf.Empty">\x82\xd3\xe4\x93\x02%" /v3/{name=projects/*}/timeSeries:\x01*\xda\x41\x10name,time_series\x1a\xda\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\xba\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read,https://www.googleapis.com/auth/monitoring.writeB\xf9\x05\n\x18\x63om.google.monitoring.v3B\x12MetricServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3\xea\x41\xf0\x01\n*monitoring.googleapis.com/MetricDescriptor\x12;projects/{project}/metricDescriptors/{metric_descriptor=**}\x12\x45organizations/{organization}/metricDescriptors/{metric_descriptor=**}\x12\x39\x66olders/{folder}/metricDescriptors/{metric_descriptor=**}\x12\x01* \x01\xea\x41\xb7\x02\n5monitoring.googleapis.com/MonitoredResourceDescriptor\x12Oprojects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}\x12Yorganizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}\x12Mfolders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}\x12\x01* \x01\x62\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_metric__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_common__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_metric__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -75,8 +79,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1439, - serialized_end=1478, + serialized_start=1909, + serialized_end=1948, ) _sym_db.RegisterEnumDescriptor(_LISTTIMESERIESREQUEST_TIMESERIESVIEW) @@ -103,7 +107,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A7\0225monitoring.googleapis.com/MonitoredResourceDescriptor" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -169,8 +175,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=422, - serialized_end=532, + serialized_start=483, + serialized_end=656, ) @@ -226,8 +232,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=535, - serialized_end=673, + serialized_start=659, + serialized_end=797, ) @@ -253,9 +259,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A7\n5monitoring.googleapis.com/MonitoredResourceDescriptor" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -265,8 +273,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=675, - serialized_end=728, + serialized_start=799, + serialized_end=915, ) @@ -292,7 +300,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A,\022*monitoring.googleapis.com/MetricDescriptor" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -358,8 +368,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=730, - serialized_end=829, + serialized_start=918, + serialized_end=1069, ) @@ -415,8 +425,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=831, - serialized_end=945, + serialized_start=1071, + serialized_end=1185, ) @@ -442,9 +452,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A,\n*monitoring.googleapis.com/MetricDescriptor" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -454,8 +466,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=947, - serialized_end=989, + serialized_start=1187, + serialized_end=1281, ) @@ -481,7 +493,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A,\022*monitoring.googleapis.com/MetricDescriptor" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -499,7 +513,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -511,8 +525,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=991, - serialized_end=1093, + serialized_start=1284, + serialized_end=1443, ) @@ -538,9 +552,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A,\n*monitoring.googleapis.com/MetricDescriptor" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -550,8 +566,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1095, - serialized_end=1140, + serialized_start=1445, + serialized_end=1542, ) @@ -577,7 +593,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -595,7 +613,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -613,7 +631,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -667,7 +685,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -709,14 +727,14 @@ ], extensions=[], nested_types=[], - enum_types=[_LISTTIMESERIESREQUEST_TIMESERIESVIEW,], + enum_types=[_LISTTIMESERIESREQUEST_TIMESERIESVIEW], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1143, - serialized_end=1478, + serialized_start=1545, + serialized_end=1948, ) @@ -790,8 +808,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1481, - serialized_end=1631, + serialized_start=1951, + serialized_end=2101, ) @@ -817,7 +835,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -835,7 +855,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -847,8 +867,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1633, - serialized_end=1727, + serialized_start=2104, + serialized_end=2256, ) @@ -904,8 +924,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1729, - serialized_end=1851, + serialized_start=2258, + serialized_end=2380, ) @@ -961,8 +981,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2006, - serialized_end=2070, + serialized_start=2535, + serialized_end=2599, ) _CREATETIMESERIESSUMMARY = _descriptor.Descriptor( @@ -1028,15 +1048,258 @@ ), ], extensions=[], - nested_types=[_CREATETIMESERIESSUMMARY_ERROR,], + nested_types=[_CREATETIMESERIESSUMMARY_ERROR], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2383, + serialized_end=2599, +) + + +_QUERYTIMESERIESREQUEST = _descriptor.Descriptor( + name="QueryTimeSeriesRequest", + full_name="google.monitoring.v3.QueryTimeSeriesRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.monitoring.v3.QueryTimeSeriesRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="query", + full_name="google.monitoring.v3.QueryTimeSeriesRequest.query", + index=1, + number=7, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.monitoring.v3.QueryTimeSeriesRequest.page_size", + index=2, + number=9, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.monitoring.v3.QueryTimeSeriesRequest.page_token", + index=3, + number=10, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], enum_types=[], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1854, - serialized_end=2070, + serialized_start=2601, + serialized_end=2693, +) + + +_QUERYTIMESERIESRESPONSE = _descriptor.Descriptor( + name="QueryTimeSeriesResponse", + full_name="google.monitoring.v3.QueryTimeSeriesResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="time_series_descriptor", + full_name="google.monitoring.v3.QueryTimeSeriesResponse.time_series_descriptor", + index=0, + number=8, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="time_series_data", + full_name="google.monitoring.v3.QueryTimeSeriesResponse.time_series_data", + index=1, + number=9, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.monitoring.v3.QueryTimeSeriesResponse.next_page_token", + index=2, + number=10, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="partial_errors", + full_name="google.monitoring.v3.QueryTimeSeriesResponse.partial_errors", + index=3, + number=11, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2696, + serialized_end=2930, +) + + +_QUERYERRORLIST = _descriptor.Descriptor( + name="QueryErrorList", + full_name="google.monitoring.v3.QueryErrorList", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="errors", + full_name="google.monitoring.v3.QueryErrorList.errors", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="error_summary", + full_name="google.monitoring.v3.QueryErrorList.error_summary", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2932, + serialized_end=3021, ) _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE.fields_by_name[ @@ -1092,6 +1355,24 @@ _CREATETIMESERIESSUMMARY.fields_by_name[ "errors" ].message_type = _CREATETIMESERIESSUMMARY_ERROR +_QUERYTIMESERIESRESPONSE.fields_by_name[ + "time_series_descriptor" +].message_type = ( + google_dot_cloud_dot_monitoring__v3_dot_proto_dot_metric__pb2._TIMESERIESDESCRIPTOR +) +_QUERYTIMESERIESRESPONSE.fields_by_name[ + "time_series_data" +].message_type = ( + google_dot_cloud_dot_monitoring__v3_dot_proto_dot_metric__pb2._TIMESERIESDATA +) +_QUERYTIMESERIESRESPONSE.fields_by_name[ + "partial_errors" +].message_type = google_dot_rpc_dot_status__pb2._STATUS +_QUERYERRORLIST.fields_by_name[ + "errors" +].message_type = ( + google_dot_cloud_dot_monitoring__v3_dot_proto_dot_metric__pb2._QUERYERROR +) DESCRIPTOR.message_types_by_name[ "ListMonitoredResourceDescriptorsRequest" ] = _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST @@ -1121,6 +1402,9 @@ DESCRIPTOR.message_types_by_name["CreateTimeSeriesRequest"] = _CREATETIMESERIESREQUEST DESCRIPTOR.message_types_by_name["CreateTimeSeriesError"] = _CREATETIMESERIESERROR DESCRIPTOR.message_types_by_name["CreateTimeSeriesSummary"] = _CREATETIMESERIESSUMMARY +DESCRIPTOR.message_types_by_name["QueryTimeSeriesRequest"] = _QUERYTIMESERIESREQUEST +DESCRIPTOR.message_types_by_name["QueryTimeSeriesResponse"] = _QUERYTIMESERIESRESPONSE +DESCRIPTOR.message_types_by_name["QueryErrorList"] = _QUERYERRORLIST _sym_db.RegisterFileDescriptor(DESCRIPTOR) ListMonitoredResourceDescriptorsRequest = _reflection.GeneratedProtocolMessageType( @@ -1130,21 +1414,19 @@ DESCRIPTOR=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""The ``ListMonitoredResourceDescriptors`` request. - - Attributes: name: - The project on which to execute the request. The format is - ``"projects/{project_id_or_number}"``. + Required. The project on which to execute the request. The + format is: :: projects/[PROJECT_ID_OR_NUMBER] filter: - An optional `filter `__ describing - the descriptors to be returned. The filter can reference the - descriptor's type and labels. For example, the following - filter returns only Google Compute Engine descriptors that - have an ``id`` label:: - + An optional `filter + `__ + describing the descriptors to be returned. The filter can + reference the descriptor's type and labels. For example, the + following filter returns only Google Compute Engine + descriptors that have an ``id`` label: :: + resource.type = starts_with("gce_") AND resource.label:id - page_size: A positive number that is the maximum number of results to return. @@ -1166,8 +1448,6 @@ DESCRIPTOR=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""The ``ListMonitoredResourceDescriptors`` response. - - Attributes: resource_descriptors: The monitored resource descriptors that are available to this @@ -1175,7 +1455,7 @@ next_page_token: If there are more results than have been returned, then this field is set to a non-empty value. To see the additional - results, use that value as ``pageToken`` in the next call to + results, use that value as ``page_token`` in the next call to this method. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) @@ -1190,14 +1470,12 @@ DESCRIPTOR=_GETMONITOREDRESOURCEDESCRIPTORREQUEST, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""The ``GetMonitoredResourceDescriptor`` request. - - Attributes: name: - The monitored resource descriptor to get. The format is ``"pro - jects/{project_id_or_number}/monitoredResourceDescriptors/{res - ource_type}"``. The ``{resource_type}`` is a predefined type, - such as ``cloudsql_database``. + Required. The monitored resource descriptor to get. The format + is: :: projects/[PROJECT_ID_OR_NUMBER]/monitoredResource + Descriptors/[RESOURCE_TYPE] The ``[RESOURCE_TYPE]`` is a + predefined type, such as ``cloudsql_database``. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.GetMonitoredResourceDescriptorRequest) ), @@ -1211,20 +1489,18 @@ DESCRIPTOR=_LISTMETRICDESCRIPTORSREQUEST, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""The ``ListMetricDescriptors`` request. - - Attributes: name: - The project on which to execute the request. The format is - ``"projects/{project_id_or_number}"``. + Required. The project on which to execute the request. The + format is: :: projects/[PROJECT_ID_OR_NUMBER] filter: If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the `filter - `__ specifies which metric - descriptors are to be returned. For example, the following - filter matches all `custom metrics `__: :: metric.type = - starts_with("custom.googleapis.com/") + `__ + specifies which metric descriptors are to be returned. For + example, the following filter matches all `custom metrics + `__: :: + metric.type = starts_with("custom.googleapis.com/") page_size: A positive number that is the maximum number of results to return. @@ -1246,8 +1522,6 @@ DESCRIPTOR=_LISTMETRICDESCRIPTORSRESPONSE, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""The ``ListMetricDescriptors`` response. - - Attributes: metric_descriptors: The metric descriptors that are available to the project and @@ -1255,7 +1529,7 @@ next_page_token: If there are more results than have been returned, then this field is set to a non-empty value. To see the additional - results, use that value as ``pageToken`` in the next call to + results, use that value as ``page_token`` in the next call to this method. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.ListMetricDescriptorsResponse) @@ -1270,13 +1544,12 @@ DESCRIPTOR=_GETMETRICDESCRIPTORREQUEST, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""The ``GetMetricDescriptor`` request. - - Attributes: name: - The metric descriptor on which to execute the request. The - format is ``"projects/{project_id_or_number}/metricDescriptors - /{metric_id}"``. An example value of ``{metric_id}`` is + Required. The metric descriptor on which to execute the + request. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + An example value of ``[METRIC_ID]`` is ``"compute.googleapis.com/instance/disk/read_bytes_count"``. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.GetMetricDescriptorRequest) @@ -1291,14 +1564,13 @@ DESCRIPTOR=_CREATEMETRICDESCRIPTORREQUEST, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""The ``CreateMetricDescriptor`` request. - - Attributes: name: - The project on which to execute the request. The format is - ``"projects/{project_id_or_number}"``. + Required. The project on which to execute the request. The + format is: :: projects/[PROJECT_ID_OR_NUMBER] metric_descriptor: - The new `custom metric `__ + Required. The new `custom metric + `__ descriptor. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.CreateMetricDescriptorRequest) @@ -1313,13 +1585,12 @@ DESCRIPTOR=_DELETEMETRICDESCRIPTORREQUEST, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""The ``DeleteMetricDescriptor`` request. - - Attributes: name: - The metric descriptor on which to execute the request. The - format is ``"projects/{project_id_or_number}/metricDescriptors - /{metric_id}"``. An example of ``{metric_id}`` is: + Required. The metric descriptor on which to execute the + request. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + An example of ``[METRIC_ID]`` is: ``"custom.googleapis.com/my_test_metric"``. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.DeleteMetricDescriptorRequest) @@ -1334,23 +1605,22 @@ DESCRIPTOR=_LISTTIMESERIESREQUEST, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""The ``ListTimeSeries`` request. - - Attributes: name: - The project on which to execute the request. The format is - "projects/{project\_id\_or\_number}". + Required. The project on which to execute the request. The + format is: :: projects/[PROJECT_ID_OR_NUMBER] filter: - A `monitoring filter `__ that + Required. A `monitoring filter + `__ that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: :: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" interval: - The time interval for which results should be returned. Only - time series that contain data points in the specified interval - are included in the response. + Required. The time interval for which results should be + returned. Only time series that contain data points in the + specified interval are included in the response. aggregation: Specifies the alignment of data points in individual time series as well as how to combine the retrieved time series @@ -1361,7 +1631,8 @@ series are currently returned in reverse time order (most recent to oldest). view: - Specifies which information is returned about the time series. + Required. Specifies which information is returned about the + time series. page_size: A positive number that is the maximum number of results to return. If ``page_size`` is empty or more than 100,000 @@ -1387,8 +1658,6 @@ DESCRIPTOR=_LISTTIMESERIESRESPONSE, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""The ``ListTimeSeries`` response. - - Attributes: time_series: One or more time series that match the filter included in the @@ -1396,7 +1665,7 @@ next_page_token: If there are more results than have been returned, then this field is set to a non-empty value. To see the additional - results, use that value as ``pageToken`` in the next call to + results, use that value as ``page_token`` in the next call to this method. execution_errors: Query execution errors that may have caused the time series @@ -1414,18 +1683,16 @@ DESCRIPTOR=_CREATETIMESERIESREQUEST, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""The ``CreateTimeSeries`` request. - - Attributes: name: - The project on which to execute the request. The format is - ``"projects/{project_id_or_number}"``. + Required. The project on which to execute the request. The + format is: :: projects/[PROJECT_ID_OR_NUMBER] time_series: - The new data to be added to a list of time series. Adds at - most one data point to each of several time series. The new - data point must be more recent than any other point in its - time series. Each ``TimeSeries`` value must fully specify a - unique time series by supplying all label values for the + Required. The new data to be added to a list of time series. + Adds at most one data point to each of several time series. + The new data point must be more recent than any other point in + its time series. Each ``TimeSeries`` value must fully specify + a unique time series by supplying all label values for the metric and the monitored resource. The maximum number of ``TimeSeries`` objects per ``Create`` request is 200. """, @@ -1441,8 +1708,6 @@ DESCRIPTOR=_CREATETIMESERIESERROR, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""DEPRECATED. Used to hold per-time-series error status. - - Attributes: time_series: DEPRECATED. Time series ID that resulted in the ``status`` @@ -1467,8 +1732,6 @@ DESCRIPTOR=_CREATETIMESERIESSUMMARY_ERROR, __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""Detailed information about an error category. - - Attributes: status: The status of the requested write operation. @@ -1483,8 +1746,6 @@ __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", __doc__="""Summary of the result of a failed request to write data to a time series. - - Attributes: total_point_count: The number of points in the request. @@ -1500,8 +1761,96 @@ _sym_db.RegisterMessage(CreateTimeSeriesSummary) _sym_db.RegisterMessage(CreateTimeSeriesSummary.Error) +QueryTimeSeriesRequest = _reflection.GeneratedProtocolMessageType( + "QueryTimeSeriesRequest", + (_message.Message,), + dict( + DESCRIPTOR=_QUERYTIMESERIESREQUEST, + __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", + __doc__="""The ``QueryTimeSeries`` request. + Attributes: + name: + Required. The project on which to execute the request. The + format is: :: projects/[PROJECT_ID_OR_NUMBER] + query: + Required. The query in the monitoring query language format. + The default time zone is in UTC. + page_size: + A positive number that is the maximum number of + time\_series\_data to return. + page_token: + If this field is not empty then it must contain the + ``nextPageToken`` value returned by a previous call to this + method. Using this field causes the method to return + additional results from the previous method call. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.QueryTimeSeriesRequest) + ), +) +_sym_db.RegisterMessage(QueryTimeSeriesRequest) + +QueryTimeSeriesResponse = _reflection.GeneratedProtocolMessageType( + "QueryTimeSeriesResponse", + (_message.Message,), + dict( + DESCRIPTOR=_QUERYTIMESERIESRESPONSE, + __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", + __doc__="""The ``QueryTimeSeries`` response. + Attributes: + time_series_descriptor: + The descriptor for the time series data. + time_series_data: + The time series data. + next_page_token: + If there are more results than have been returned, then this + field is set to a non-empty value. To see the additional + results, use that value as ``page_token`` in the next call to + this method. + partial_errors: + Query execution errors that may have caused the time series + data returned to be incomplete. The available data will be + available in the response. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.QueryTimeSeriesResponse) + ), +) +_sym_db.RegisterMessage(QueryTimeSeriesResponse) + +QueryErrorList = _reflection.GeneratedProtocolMessageType( + "QueryErrorList", + (_message.Message,), + dict( + DESCRIPTOR=_QUERYERRORLIST, + __module__="google.cloud.monitoring_v3.proto.metric_service_pb2", + __doc__="""This is an error detail intended to be used with INVALID\_ARGUMENT + errors. + Attributes: + errors: + Errors in parsing the time series query language text. The + number of errors in the response may be limited. + error_summary: + A summary of all the errors. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.QueryErrorList) + ), +) +_sym_db.RegisterMessage(QueryErrorList) + DESCRIPTOR._options = None +_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["name"]._options = None +_GETMONITOREDRESOURCEDESCRIPTORREQUEST.fields_by_name["name"]._options = None +_LISTMETRICDESCRIPTORSREQUEST.fields_by_name["name"]._options = None +_GETMETRICDESCRIPTORREQUEST.fields_by_name["name"]._options = None +_CREATEMETRICDESCRIPTORREQUEST.fields_by_name["name"]._options = None +_CREATEMETRICDESCRIPTORREQUEST.fields_by_name["metric_descriptor"]._options = None +_DELETEMETRICDESCRIPTORREQUEST.fields_by_name["name"]._options = None +_LISTTIMESERIESREQUEST.fields_by_name["name"]._options = None +_LISTTIMESERIESREQUEST.fields_by_name["filter"]._options = None +_LISTTIMESERIESREQUEST.fields_by_name["interval"]._options = None +_LISTTIMESERIESREQUEST.fields_by_name["view"]._options = None +_CREATETIMESERIESREQUEST.fields_by_name["name"]._options = None +_CREATETIMESERIESREQUEST.fields_by_name["time_series"]._options = None _CREATETIMESERIESERROR.fields_by_name["time_series"]._options = None _CREATETIMESERIESERROR.fields_by_name["status"]._options = None @@ -1513,8 +1862,8 @@ serialized_options=_b( "\312A\031monitoring.googleapis.com\322A\272\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read,https://www.googleapis.com/auth/monitoring.write" ), - serialized_start=2073, - serialized_end=3691, + serialized_start=3024, + serialized_end=4750, methods=[ _descriptor.MethodDescriptor( name="ListMonitoredResourceDescriptors", @@ -1524,7 +1873,7 @@ input_type=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, output_type=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, serialized_options=_b( - "\202\323\344\223\0024\0222/v3/{name=projects/*}/monitoredResourceDescriptors" + "\202\323\344\223\0024\0222/v3/{name=projects/*}/monitoredResourceDescriptors\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1535,7 +1884,7 @@ input_type=_GETMONITOREDRESOURCEDESCRIPTORREQUEST, output_type=google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCEDESCRIPTOR, serialized_options=_b( - "\202\323\344\223\0026\0224/v3/{name=projects/*/monitoredResourceDescriptors/*}" + "\202\323\344\223\0027\0225/v3/{name=projects/*/monitoredResourceDescriptors/**}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1546,7 +1895,7 @@ input_type=_LISTMETRICDESCRIPTORSREQUEST, output_type=_LISTMETRICDESCRIPTORSRESPONSE, serialized_options=_b( - "\202\323\344\223\002)\022'/v3/{name=projects/*}/metricDescriptors" + "\202\323\344\223\002)\022'/v3/{name=projects/*}/metricDescriptors\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1557,7 +1906,7 @@ input_type=_GETMETRICDESCRIPTORREQUEST, output_type=google_dot_api_dot_metric__pb2._METRICDESCRIPTOR, serialized_options=_b( - "\202\323\344\223\002,\022*/v3/{name=projects/*/metricDescriptors/**}" + "\202\323\344\223\002,\022*/v3/{name=projects/*/metricDescriptors/**}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1568,7 +1917,7 @@ input_type=_CREATEMETRICDESCRIPTORREQUEST, output_type=google_dot_api_dot_metric__pb2._METRICDESCRIPTOR, serialized_options=_b( - "\202\323\344\223\002<\"'/v3/{name=projects/*}/metricDescriptors:\021metric_descriptor" + "\202\323\344\223\002<\"'/v3/{name=projects/*}/metricDescriptors:\021metric_descriptor\332A\026name,metric_descriptor" ), ), _descriptor.MethodDescriptor( @@ -1579,7 +1928,7 @@ input_type=_DELETEMETRICDESCRIPTORREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002,**/v3/{name=projects/*/metricDescriptors/**}" + "\202\323\344\223\002,**/v3/{name=projects/*/metricDescriptors/**}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1590,7 +1939,7 @@ input_type=_LISTTIMESERIESREQUEST, output_type=_LISTTIMESERIESRESPONSE, serialized_options=_b( - '\202\323\344\223\002"\022 /v3/{name=projects/*}/timeSeries' + '\202\323\344\223\002"\022 /v3/{name=projects/*}/timeSeries\332A\031name,filter,interval,view' ), ), _descriptor.MethodDescriptor( @@ -1601,7 +1950,7 @@ input_type=_CREATETIMESERIESREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - '\202\323\344\223\002%" /v3/{name=projects/*}/timeSeries:\001*' + '\202\323\344\223\002%" /v3/{name=projects/*}/timeSeries:\001*\332A\020name,time_series' ), ), ], diff --git a/google/cloud/monitoring_v3/proto/metric_service_pb2_grpc.py b/google/cloud/monitoring_v3/proto/metric_service_pb2_grpc.py index 581a7953..8bcfc6fc 100644 --- a/google/cloud/monitoring_v3/proto/metric_service_pb2_grpc.py +++ b/google/cloud/monitoring_v3/proto/metric_service_pb2_grpc.py @@ -70,28 +70,28 @@ class MetricServiceServicer(object): """ def ListMonitoredResourceDescriptors(self, request, context): - """Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + """Lists monitored resource descriptors that match a filter. This method does not require a Workspace. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetMonitoredResourceDescriptor(self, request, context): - """Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + """Gets a single monitored resource descriptor. This method does not require a Workspace. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListMetricDescriptors(self, request, context): - """Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + """Lists metric descriptors that match a filter. This method does not require a Workspace. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetMetricDescriptor(self, request, context): - """Gets a single metric descriptor. This method does not require a Stackdriver account. + """Gets a single metric descriptor. This method does not require a Workspace. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -100,7 +100,7 @@ def GetMetricDescriptor(self, request, context): def CreateMetricDescriptor(self, request, context): """Creates a new metric descriptor. User-created metric descriptors define - [custom metrics](/monitoring/custom-metrics). + [custom metrics](https://cloud.google.com/monitoring/custom-metrics). """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -108,14 +108,15 @@ def CreateMetricDescriptor(self, request, context): def DeleteMetricDescriptor(self, request, context): """Deletes a metric descriptor. Only user-created - [custom metrics](/monitoring/custom-metrics) can be deleted. + [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be + deleted. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListTimeSeries(self, request, context): - """Lists time series that match a filter. This method does not require a Stackdriver account. + """Lists time series that match a filter. This method does not require a Workspace. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") diff --git a/google/cloud/monitoring_v3/proto/mutation_record.proto b/google/cloud/monitoring_v3/proto/mutation_record.proto index eab1f37d..b830eb62 100644 --- a/google/cloud/monitoring_v3/proto/mutation_record.proto +++ b/google/cloud/monitoring_v3/proto/mutation_record.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -25,6 +24,7 @@ option java_multiple_files = true; option java_outer_classname = "MutationRecordProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // Describes a change made to a configuration. message MutationRecord { diff --git a/google/cloud/monitoring_v3/proto/mutation_record_pb2.py b/google/cloud/monitoring_v3/proto/mutation_record_pb2.py index aeb3abd8..47baee33 100644 --- a/google/cloud/monitoring_v3/proto/mutation_record_pb2.py +++ b/google/cloud/monitoring_v3/proto/mutation_record_pb2.py @@ -23,12 +23,12 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\023MutationRecordProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\023MutationRecordProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n6google/cloud/monitoring_v3/proto/mutation_record.proto\x12\x14google.monitoring.v3\x1a\x1fgoogle/protobuf/timestamp.proto"U\n\x0eMutationRecord\x12/\n\x0bmutate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nmutated_by\x18\x02 \x01(\tB\xab\x01\n\x18\x63om.google.monitoring.v3B\x13MutationRecordProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n6google/cloud/monitoring_v3/proto/mutation_record.proto\x12\x14google.monitoring.v3\x1a\x1fgoogle/protobuf/timestamp.proto"U\n\x0eMutationRecord\x12/\n\x0bmutate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nmutated_by\x18\x02 \x01(\tB\xcb\x01\n\x18\x63om.google.monitoring.v3B\x13MutationRecordProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), - dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,], + dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR], ) @@ -101,8 +101,6 @@ DESCRIPTOR=_MUTATIONRECORD, __module__="google.cloud.monitoring_v3.proto.mutation_record_pb2", __doc__="""Describes a change made to a configuration. - - Attributes: mutate_time: When the change occurred. diff --git a/google/cloud/monitoring_v3/proto/notification.proto b/google/cloud/monitoring_v3/proto/notification.proto index 939ca267..897a14c0 100644 --- a/google/cloud/monitoring_v3/proto/notification.proto +++ b/google/cloud/monitoring_v3/proto/notification.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -19,6 +18,7 @@ package google.monitoring.v3; import "google/api/label.proto"; import "google/api/launch_stage.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/common.proto"; import "google/protobuf/wrappers.proto"; @@ -28,14 +28,23 @@ option java_multiple_files = true; option java_outer_classname = "NotificationProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A description of a notification channel. The descriptor includes // the properties of the channel and the set of labels or fields that // must be specified to configure channels of a given type. message NotificationChannelDescriptor { - // The full REST resource name for this descriptor. The syntax is: + option (google.api.resource) = { + type: "monitoring.googleapis.com/NotificationChannelDescriptor" + pattern: "projects/{project}/notificationChannelDescriptors/{channel_descriptor}" + pattern: "organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}" + pattern: "folders/{folder}/notificationChannelDescriptors/{channel_descriptor}" + pattern: "*" + }; + + // The full REST resource name for this descriptor. The format is: // - // projects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE] + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] // // In the above, `[TYPE]` is the value of the `type` field. string name = 6; @@ -61,6 +70,9 @@ message NotificationChannelDescriptor { // The tiers that support this notification channel; the project service tier // must be one of the supported_tiers. repeated ServiceTier supported_tiers = 5 [deprecated = true]; + + // The product launch stage for channels of this type. + google.api.LaunchStage launch_stage = 7; } // A `NotificationChannel` is a medium through which an alert is @@ -69,6 +81,14 @@ message NotificationChannelDescriptor { // containing sensitive information like authentication tokens or // contact info are only partially populated on retrieval. message NotificationChannel { + option (google.api.resource) = { + type: "monitoring.googleapis.com/NotificationChannel" + pattern: "projects/{project}/notificationChannels/{notification_channel}" + pattern: "organizations/{organization}/notificationChannels/{notification_channel}" + pattern: "folders/{folder}/notificationChannels/{notification_channel}" + pattern: "*" + }; + // Indicates whether the channel has been verified or not. It is illegal // to specify this field in a // [`CreateNotificationChannel`][google.monitoring.v3.NotificationChannelService.CreateNotificationChannel] @@ -97,9 +117,9 @@ message NotificationChannel { // value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field. string type = 1; - // The full REST resource name for this channel. The syntax is: + // The full REST resource name for this channel. The format is: // - // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] // // The `[CHANNEL_ID]` is automatically assigned by the server on creation. string name = 6; diff --git a/google/cloud/monitoring_v3/proto/notification_pb2.py b/google/cloud/monitoring_v3/proto/notification_pb2.py index 4d34d99f..617e6780 100644 --- a/google/cloud/monitoring_v3/proto/notification_pb2.py +++ b/google/cloud/monitoring_v3/proto/notification_pb2.py @@ -17,6 +17,7 @@ from google.api import label_pb2 as google_dot_api_dot_label__pb2 from google.api import launch_stage_pb2 as google_dot_api_dot_launch__stage__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.monitoring_v3.proto import ( common_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_common__pb2, ) @@ -28,14 +29,15 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\021NotificationProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\021NotificationProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n3google/cloud/monitoring_v3/proto/notification.proto\x12\x14google.monitoring.v3\x1a\x16google/api/label.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a-google/cloud/monitoring_v3/proto/common.proto\x1a\x1egoogle/protobuf/wrappers.proto"\xd3\x01\n\x1dNotificationChannelDescriptor\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12+\n\x06labels\x18\x04 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12>\n\x0fsupported_tiers\x18\x05 \x03(\x0e\x32!.google.monitoring.v3.ServiceTierB\x02\x18\x01"\xb6\x04\n\x13NotificationChannel\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x45\n\x06labels\x18\x05 \x03(\x0b\x32\x35.google.monitoring.v3.NotificationChannel.LabelsEntry\x12N\n\x0buser_labels\x18\x08 \x03(\x0b\x32\x39.google.monitoring.v3.NotificationChannel.UserLabelsEntry\x12Y\n\x13verification_status\x18\t \x01(\x0e\x32<.google.monitoring.v3.NotificationChannel.VerificationStatus\x12+\n\x07\x65nabled\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"W\n\x12VerificationStatus\x12#\n\x1fVERIFICATION_STATUS_UNSPECIFIED\x10\x00\x12\x0e\n\nUNVERIFIED\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02\x42\xa9\x01\n\x18\x63om.google.monitoring.v3B\x11NotificationProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n3google/cloud/monitoring_v3/proto/notification.proto\x12\x14google.monitoring.v3\x1a\x16google/api/label.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/monitoring_v3/proto/common.proto\x1a\x1egoogle/protobuf/wrappers.proto"\xa5\x04\n\x1dNotificationChannelDescriptor\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12+\n\x06labels\x18\x04 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12>\n\x0fsupported_tiers\x18\x05 \x03(\x0e\x32!.google.monitoring.v3.ServiceTierB\x02\x18\x01\x12-\n\x0claunch_stage\x18\x07 \x01(\x0e\x32\x17.google.api.LaunchStage:\xa0\x02\xea\x41\x9c\x02\n7monitoring.googleapis.com/NotificationChannelDescriptor\x12\x46projects/{project}/notificationChannelDescriptors/{channel_descriptor}\x12Porganizations/{organization}/notificationChannelDescriptors/{channel_descriptor}\x12\x44\x66olders/{folder}/notificationChannelDescriptors/{channel_descriptor}\x12\x01*"\xb7\x06\n\x13NotificationChannel\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x45\n\x06labels\x18\x05 \x03(\x0b\x32\x35.google.monitoring.v3.NotificationChannel.LabelsEntry\x12N\n\x0buser_labels\x18\x08 \x03(\x0b\x32\x39.google.monitoring.v3.NotificationChannel.UserLabelsEntry\x12Y\n\x13verification_status\x18\t \x01(\x0e\x32<.google.monitoring.v3.NotificationChannel.VerificationStatus\x12+\n\x07\x65nabled\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"W\n\x12VerificationStatus\x12#\n\x1fVERIFICATION_STATUS_UNSPECIFIED\x10\x00\x12\x0e\n\nUNVERIFIED\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02:\xfe\x01\xea\x41\xfa\x01\n-monitoring.googleapis.com/NotificationChannel\x12>projects/{project}/notificationChannels/{notification_channel}\x12Horganizations/{organization}/notificationChannels/{notification_channel}\x12google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), dependencies=[ google_dot_api_dot_label__pb2.DESCRIPTOR, google_dot_api_dot_launch__stage__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_common__pb2.DESCRIPTOR, google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR, ], @@ -64,8 +66,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=905, - serialized_end=992, + serialized_start=1270, + serialized_end=1357, ) _sym_db.RegisterEnumDescriptor(_NOTIFICATIONCHANNEL_VERIFICATIONSTATUS) @@ -185,17 +187,37 @@ serialized_options=_b("\030\001"), file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="launch_stage", + full_name="google.monitoring.v3.NotificationChannelDescriptor.launch_stage", + index=6, + number=7, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352A\234\002\n7monitoring.googleapis.com/NotificationChannelDescriptor\022Fprojects/{project}/notificationChannelDescriptors/{channel_descriptor}\022Porganizations/{organization}/notificationChannelDescriptors/{channel_descriptor}\022Dfolders/{folder}/notificationChannelDescriptors/{channel_descriptor}\022\001*" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=212, - serialized_end=423, + serialized_start=239, + serialized_end=788, ) @@ -251,8 +273,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=807, - serialized_end=852, + serialized_start=1172, + serialized_end=1217, ) _NOTIFICATIONCHANNEL_USERLABELSENTRY = _descriptor.Descriptor( @@ -307,8 +329,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=854, - serialized_end=903, + serialized_start=1219, + serialized_end=1268, ) _NOTIFICATIONCHANNEL = _descriptor.Descriptor( @@ -468,14 +490,16 @@ _NOTIFICATIONCHANNEL_LABELSENTRY, _NOTIFICATIONCHANNEL_USERLABELSENTRY, ], - enum_types=[_NOTIFICATIONCHANNEL_VERIFICATIONSTATUS,], - serialized_options=None, + enum_types=[_NOTIFICATIONCHANNEL_VERIFICATIONSTATUS], + serialized_options=_b( + "\352A\372\001\n-monitoring.googleapis.com/NotificationChannel\022>projects/{project}/notificationChannels/{notification_channel}\022Horganizations/{organization}/notificationChannels/{notification_channel}\022google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\030NotificationServiceProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n;google/cloud/monitoring_v3/proto/notification_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x33google/cloud/monitoring_v3/proto/notification.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/api/client.proto"`\n)ListNotificationChannelDescriptorsRequest\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"\x97\x01\n*ListNotificationChannelDescriptorsResponse\x12P\n\x13\x63hannel_descriptors\x18\x01 \x03(\x0b\x32\x33.google.monitoring.v3.NotificationChannelDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"7\n\'GetNotificationChannelDescriptorRequest\x12\x0c\n\x04name\x18\x03 \x01(\t"y\n CreateNotificationChannelRequest\x12\x0c\n\x04name\x18\x03 \x01(\t\x12G\n\x14notification_channel\x18\x02 \x01(\x0b\x32).google.monitoring.v3.NotificationChannel"x\n\x1fListNotificationChannelsRequest\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x06 \x01(\t\x12\x10\n\x08order_by\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"\x85\x01\n ListNotificationChannelsResponse\x12H\n\x15notification_channels\x18\x03 \x03(\x0b\x32).google.monitoring.v3.NotificationChannel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"-\n\x1dGetNotificationChannelRequest\x12\x0c\n\x04name\x18\x03 \x01(\t"\x9c\x01\n UpdateNotificationChannelRequest\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12G\n\x14notification_channel\x18\x03 \x01(\x0b\x32).google.monitoring.v3.NotificationChannel"?\n DeleteNotificationChannelRequest\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05\x66orce\x18\x05 \x01(\x08">\n.SendNotificationChannelVerificationCodeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"n\n-GetNotificationChannelVerificationCodeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"o\n.GetNotificationChannelVerificationCodeResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp">\n VerifyNotificationChannelRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t2\xe7\x11\n\x1aNotificationChannelService\x12\xe5\x01\n"ListNotificationChannelDescriptors\x12?.google.monitoring.v3.ListNotificationChannelDescriptorsRequest\x1a@.google.monitoring.v3.ListNotificationChannelDescriptorsResponse"<\x82\xd3\xe4\x93\x02\x36\x12\x34/v3/{name=projects/*}/notificationChannelDescriptors\x12\xd6\x01\n GetNotificationChannelDescriptor\x12=.google.monitoring.v3.GetNotificationChannelDescriptorRequest\x1a\x33.google.monitoring.v3.NotificationChannelDescriptor">\x82\xd3\xe4\x93\x02\x38\x12\x36/v3/{name=projects/*/notificationChannelDescriptors/*}\x12\xbd\x01\n\x18ListNotificationChannels\x12\x35.google.monitoring.v3.ListNotificationChannelsRequest\x1a\x36.google.monitoring.v3.ListNotificationChannelsResponse"2\x82\xd3\xe4\x93\x02,\x12*/v3/{name=projects/*}/notificationChannels\x12\xae\x01\n\x16GetNotificationChannel\x12\x33.google.monitoring.v3.GetNotificationChannelRequest\x1a).google.monitoring.v3.NotificationChannel"4\x82\xd3\xe4\x93\x02.\x12,/v3/{name=projects/*/notificationChannels/*}\x12\xc8\x01\n\x19\x43reateNotificationChannel\x12\x36.google.monitoring.v3.CreateNotificationChannelRequest\x1a).google.monitoring.v3.NotificationChannel"H\x82\xd3\xe4\x93\x02\x42"*/v3/{name=projects/*}/notificationChannels:\x14notification_channel\x12\xdf\x01\n\x19UpdateNotificationChannel\x12\x36.google.monitoring.v3.UpdateNotificationChannelRequest\x1a).google.monitoring.v3.NotificationChannel"_\x82\xd3\xe4\x93\x02Y2A/v3/{notification_channel.name=projects/*/notificationChannels/*}:\x14notification_channel\x12\xa1\x01\n\x19\x44\x65leteNotificationChannel\x12\x36.google.monitoring.v3.DeleteNotificationChannelRequest\x1a\x16.google.protobuf.Empty"4\x82\xd3\xe4\x93\x02.*,/v3/{name=projects/*/notificationChannels/*}\x12\xd5\x01\n\'SendNotificationChannelVerificationCode\x12\x44.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest\x1a\x16.google.protobuf.Empty"L\x82\xd3\xe4\x93\x02\x46"A/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode:\x01*\x12\x80\x02\n&GetNotificationChannelVerificationCode\x12\x43.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest\x1a\x44.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse"K\x82\xd3\xe4\x93\x02\x45"@/v3/{name=projects/*/notificationChannels/*}:getVerificationCode:\x01*\x12\xbe\x01\n\x19VerifyNotificationChannel\x12\x36.google.monitoring.v3.VerifyNotificationChannelRequest\x1a).google.monitoring.v3.NotificationChannel">\x82\xd3\xe4\x93\x02\x38"3/v3/{name=projects/*/notificationChannels/*}:verify:\x01*\x1a\xa9\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\x89\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readB\xb0\x01\n\x18\x63om.google.monitoring.v3B\x18NotificationServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n;google/cloud/monitoring_v3/proto/notification_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/monitoring_v3/proto/notification.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xa1\x01\n)ListNotificationChannelDescriptorsRequest\x12M\n\x04name\x18\x04 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37monitoring.googleapis.com/NotificationChannelDescriptor\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"\x97\x01\n*ListNotificationChannelDescriptorsResponse\x12P\n\x13\x63hannel_descriptors\x18\x01 \x03(\x0b\x32\x33.google.monitoring.v3.NotificationChannelDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"x\n\'GetNotificationChannelDescriptorRequest\x12M\n\x04name\x18\x03 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7monitoring.googleapis.com/NotificationChannelDescriptor"\xb5\x01\n CreateNotificationChannelRequest\x12\x43\n\x04name\x18\x03 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-monitoring.googleapis.com/NotificationChannel\x12L\n\x14notification_channel\x18\x02 \x01(\x0b\x32).google.monitoring.v3.NotificationChannelB\x03\xe0\x41\x02"\xaf\x01\n\x1fListNotificationChannelsRequest\x12\x43\n\x04name\x18\x05 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-monitoring.googleapis.com/NotificationChannel\x12\x0e\n\x06\x66ilter\x18\x06 \x01(\t\x12\x10\n\x08order_by\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"\x85\x01\n ListNotificationChannelsResponse\x12H\n\x15notification_channels\x18\x03 \x03(\x0b\x32).google.monitoring.v3.NotificationChannel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"d\n\x1dGetNotificationChannelRequest\x12\x43\n\x04name\x18\x03 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-monitoring.googleapis.com/NotificationChannel"\xa1\x01\n UpdateNotificationChannelRequest\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12L\n\x14notification_channel\x18\x03 \x01(\x0b\x32).google.monitoring.v3.NotificationChannelB\x03\xe0\x41\x02"v\n DeleteNotificationChannelRequest\x12\x43\n\x04name\x18\x03 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-monitoring.googleapis.com/NotificationChannel\x12\r\n\x05\x66orce\x18\x05 \x01(\x08"u\n.SendNotificationChannelVerificationCodeRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-monitoring.googleapis.com/NotificationChannel"\xa5\x01\n-GetNotificationChannelVerificationCodeRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-monitoring.googleapis.com/NotificationChannel\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"o\n.GetNotificationChannelVerificationCodeResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"z\n VerifyNotificationChannelRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-monitoring.googleapis.com/NotificationChannel\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\xea\x12\n\x1aNotificationChannelService\x12\xec\x01\n"ListNotificationChannelDescriptors\x12?.google.monitoring.v3.ListNotificationChannelDescriptorsRequest\x1a@.google.monitoring.v3.ListNotificationChannelDescriptorsResponse"C\x82\xd3\xe4\x93\x02\x36\x12\x34/v3/{name=projects/*}/notificationChannelDescriptors\xda\x41\x04name\x12\xdd\x01\n GetNotificationChannelDescriptor\x12=.google.monitoring.v3.GetNotificationChannelDescriptorRequest\x1a\x33.google.monitoring.v3.NotificationChannelDescriptor"E\x82\xd3\xe4\x93\x02\x38\x12\x36/v3/{name=projects/*/notificationChannelDescriptors/*}\xda\x41\x04name\x12\xc4\x01\n\x18ListNotificationChannels\x12\x35.google.monitoring.v3.ListNotificationChannelsRequest\x1a\x36.google.monitoring.v3.ListNotificationChannelsResponse"9\x82\xd3\xe4\x93\x02,\x12*/v3/{name=projects/*}/notificationChannels\xda\x41\x04name\x12\xb5\x01\n\x16GetNotificationChannel\x12\x33.google.monitoring.v3.GetNotificationChannelRequest\x1a).google.monitoring.v3.NotificationChannel";\x82\xd3\xe4\x93\x02.\x12,/v3/{name=projects/*/notificationChannels/*}\xda\x41\x04name\x12\xe4\x01\n\x19\x43reateNotificationChannel\x12\x36.google.monitoring.v3.CreateNotificationChannelRequest\x1a).google.monitoring.v3.NotificationChannel"d\x82\xd3\xe4\x93\x02\x42"*/v3/{name=projects/*}/notificationChannels:\x14notification_channel\xda\x41\x19name,notification_channel\x12\x83\x02\n\x19UpdateNotificationChannel\x12\x36.google.monitoring.v3.UpdateNotificationChannelRequest\x1a).google.monitoring.v3.NotificationChannel"\x82\x01\x82\xd3\xe4\x93\x02Y2A/v3/{notification_channel.name=projects/*/notificationChannels/*}:\x14notification_channel\xda\x41 update_mask,notification_channel\x12\xae\x01\n\x19\x44\x65leteNotificationChannel\x12\x36.google.monitoring.v3.DeleteNotificationChannelRequest\x1a\x16.google.protobuf.Empty"A\x82\xd3\xe4\x93\x02.*,/v3/{name=projects/*/notificationChannels/*}\xda\x41\nname,force\x12\xdc\x01\n\'SendNotificationChannelVerificationCode\x12\x44.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest\x1a\x16.google.protobuf.Empty"S\x82\xd3\xe4\x93\x02\x46"A/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode:\x01*\xda\x41\x04name\x12\x87\x02\n&GetNotificationChannelVerificationCode\x12\x43.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest\x1a\x44.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse"R\x82\xd3\xe4\x93\x02\x45"@/v3/{name=projects/*/notificationChannels/*}:getVerificationCode:\x01*\xda\x41\x04name\x12\xca\x01\n\x19VerifyNotificationChannel\x12\x36.google.monitoring.v3.VerifyNotificationChannelRequest\x1a).google.monitoring.v3.NotificationChannel"J\x82\xd3\xe4\x93\x02\x38"3/v3/{name=projects/*/notificationChannels/*}:verify:\x01*\xda\x41\tname,code\x1a\xa9\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\x89\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readB\xd0\x01\n\x18\x63om.google.monitoring.v3B\x18NotificationServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_notification__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -70,7 +74,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A9\0227monitoring.googleapis.com/NotificationChannelDescriptor" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -118,8 +124,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=319, - serialized_end=415, + serialized_start=380, + serialized_end=541, ) @@ -175,8 +181,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=418, - serialized_end=569, + serialized_start=544, + serialized_end=695, ) @@ -202,9 +208,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A9\n7monitoring.googleapis.com/NotificationChannelDescriptor" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -214,8 +222,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=571, - serialized_end=626, + serialized_start=697, + serialized_end=817, ) @@ -241,7 +249,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A/\022-monitoring.googleapis.com/NotificationChannel" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -259,7 +269,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -271,8 +281,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=628, - serialized_end=749, + serialized_start=820, + serialized_end=1001, ) @@ -298,7 +308,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A/\022-monitoring.googleapis.com/NotificationChannel" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -382,8 +394,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=751, - serialized_end=871, + serialized_start=1004, + serialized_end=1179, ) @@ -439,8 +451,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=874, - serialized_end=1007, + serialized_start=1182, + serialized_end=1315, ) @@ -466,9 +478,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A/\n-monitoring.googleapis.com/NotificationChannel" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -478,8 +492,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1009, - serialized_end=1054, + serialized_start=1317, + serialized_end=1417, ) @@ -523,7 +537,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -535,8 +549,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1057, - serialized_end=1213, + serialized_start=1420, + serialized_end=1581, ) @@ -562,7 +576,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A/\n-monitoring.googleapis.com/NotificationChannel" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -592,8 +608,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1215, - serialized_end=1278, + serialized_start=1583, + serialized_end=1701, ) @@ -619,9 +635,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A/\n-monitoring.googleapis.com/NotificationChannel" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -631,8 +649,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1280, - serialized_end=1342, + serialized_start=1703, + serialized_end=1820, ) @@ -658,7 +676,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A/\n-monitoring.googleapis.com/NotificationChannel" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -688,8 +708,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1344, - serialized_end=1454, + serialized_start=1823, + serialized_end=1988, ) @@ -745,8 +765,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1456, - serialized_end=1567, + serialized_start=1990, + serialized_end=2101, ) @@ -772,7 +792,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A/\n-monitoring.googleapis.com/NotificationChannel" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -790,7 +812,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -802,8 +824,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1569, - serialized_end=1631, + serialized_start=2103, + serialized_end=2225, ) _LISTNOTIFICATIONCHANNELDESCRIPTORSRESPONSE.fields_by_name[ @@ -883,17 +905,16 @@ DESCRIPTOR=_LISTNOTIFICATIONCHANNELDESCRIPTORSREQUEST, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``ListNotificationChannelDescriptors`` request. - - Attributes: name: - The REST resource name of the parent from which to retrieve - the notification channel descriptors. The expected syntax is: - :: projects/[PROJECT_ID] Note that this names the parent - container in which to look for the descriptors; to retrieve a - single descriptor by name, use the [GetNotificationChannelDesc - riptor][google.monitoring.v3.NotificationChannelService.GetNot - ificationChannelDescriptor] operation, instead. + Required. The REST resource name of the parent from which to + retrieve the notification channel descriptors. The expected + syntax is: :: projects/[PROJECT_ID_OR_NUMBER] Note that + this names the parent container in which to look for the + descriptors; to retrieve a single descriptor by name, use the + [GetNotificationChannelDescriptor][google.monitoring.v3.Notifi + cationChannelService.GetNotificationChannelDescriptor] + operation, instead. page_size: The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be @@ -915,8 +936,6 @@ DESCRIPTOR=_LISTNOTIFICATIONCHANNELDESCRIPTORSRESPONSE, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``ListNotificationChannelDescriptors`` response. - - Attributes: channel_descriptors: The monitored resource descriptors supported for the specified @@ -939,13 +958,11 @@ DESCRIPTOR=_GETNOTIFICATIONCHANNELDESCRIPTORREQUEST, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``GetNotificationChannelDescriptor`` response. - - Attributes: name: - The channel type for which to execute the request. The format - is ``projects/[PROJECT_ID]/notificationChannelDescriptors/{cha - nnel_type}``. + Required. The channel type for which to execute the request. + The format is: :: projects/[PROJECT_ID_OR_NUMBER]/notifi + cationChannelDescriptors/[CHANNEL_TYPE] """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.GetNotificationChannelDescriptorRequest) ), @@ -959,19 +976,18 @@ DESCRIPTOR=_CREATENOTIFICATIONCHANNELREQUEST, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``CreateNotificationChannel`` request. - - Attributes: name: - The project on which to execute the request. The format is: - :: projects/[PROJECT_ID] Note that this names the - container into which the channel will be written. This does - not name the newly created channel. The resulting channel's - name will have a normalized version of this field as a prefix, - but will add ``/notificationChannels/[CHANNEL_ID]`` to - identify the channel. + Required. The project on which to execute the request. The + format is: :: projects/[PROJECT_ID_OR_NUMBER] This + names the container into which the channel will be written, + this does not name the newly created channel. The resulting + channel's name will have a normalized version of this field as + a prefix, but will add ``/notificationChannels/[CHANNEL_ID]`` + to identify the channel. notification_channel: - The definition of the ``NotificationChannel`` to create. + Required. The definition of the ``NotificationChannel`` to + create. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.CreateNotificationChannelRequest) ), @@ -985,28 +1001,28 @@ DESCRIPTOR=_LISTNOTIFICATIONCHANNELSREQUEST, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``ListNotificationChannels`` request. - - Attributes: name: - The project on which to execute the request. The format is - ``projects/[PROJECT_ID]``. That is, this names the container - in which to look for the notification channels; it does not - name a specific channel. To query a specific channel by REST - resource name, use the [``GetNotificationChannel``][google.mon - itoring.v3.NotificationChannelService.GetNotificationChannel] - operation. + Required. The project on which to execute the request. The + format is: :: projects/[PROJECT_ID_OR_NUMBER] This + names the container in which to look for the notification + channels; it does not name a specific channel. To query a + specific channel by REST resource name, use the [``GetNotifica + tionChannel``][google.monitoring.v3.NotificationChannelService + .GetNotificationChannel] operation. filter: If provided, this field specifies the criteria that must be met by notification channels to be included in the response. For more details, see `sorting and filtering - `__. + `__. order_by: A comma-separated list of fields by which to sort the result. Supports the same set of fields as in ``filter``. Entries can be prefixed with a minus sign to sort in descending rather than ascending order. For more details, see `sorting and - filtering `__. + filtering `__. page_size: The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be @@ -1028,8 +1044,6 @@ DESCRIPTOR=_LISTNOTIFICATIONCHANNELSRESPONSE, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``ListNotificationChannels`` response. - - Attributes: notification_channels: The notification channels defined for the specified project. @@ -1051,12 +1065,11 @@ DESCRIPTOR=_GETNOTIFICATIONCHANNELREQUEST, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``GetNotificationChannel`` request. - - Attributes: name: - The channel for which to execute the request. The format is - ``projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]``. + Required. The channel for which to execute the request. The + format is: :: projects/[PROJECT_ID_OR_NUMBER]/notificati + onChannels/[CHANNEL_ID] """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.GetNotificationChannelRequest) ), @@ -1070,14 +1083,12 @@ DESCRIPTOR=_UPDATENOTIFICATIONCHANNELREQUEST, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``UpdateNotificationChannel`` request. - - Attributes: update_mask: The fields to update. notification_channel: - A description of the changes to be applied to the specified - notification channel. The description must provide a + Required. A description of the changes to be applied to the + specified notification channel. The description must provide a definition for fields to be updated; the names of these fields should also be included in the ``update_mask``. """, @@ -1093,12 +1104,11 @@ DESCRIPTOR=_DELETENOTIFICATIONCHANNELREQUEST, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``DeleteNotificationChannel`` request. - - Attributes: name: - The channel for which to execute the request. The format is - ``projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]``. + Required. The channel for which to execute the request. The + format is: :: projects/[PROJECT_ID_OR_NUMBER]/notificati + onChannels/[CHANNEL_ID] force: If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to @@ -1118,11 +1128,10 @@ DESCRIPTOR=_SENDNOTIFICATIONCHANNELVERIFICATIONCODEREQUEST, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``SendNotificationChannelVerificationCode`` request. - - Attributes: name: - The notification channel to which to send a verification code. + Required. The notification channel to which to send a + verification code. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.SendNotificationChannelVerificationCodeRequest) ), @@ -1136,14 +1145,12 @@ DESCRIPTOR=_GETNOTIFICATIONCHANNELVERIFICATIONCODEREQUEST, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``GetNotificationChannelVerificationCode`` request. - - Attributes: name: - The notification channel for which a verification code is to - be generated and retrieved. This must name a channel that is - already verified; if the specified channel is not verified, - the request will fail. + Required. The notification channel for which a verification + code is to be generated and retrieved. This must name a + channel that is already verified; if the specified channel is + not verified, the request will fail. expire_time: The desired expiration time. If specified, the API will guarantee that the returned code will not be valid after the @@ -1169,8 +1176,6 @@ DESCRIPTOR=_GETNOTIFICATIONCHANNELVERIFICATIONCODERESPONSE, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``GetNotificationChannelVerificationCode`` request. - - Attributes: code: The verification code, which may be used to verify other @@ -1196,14 +1201,12 @@ DESCRIPTOR=_VERIFYNOTIFICATIONCHANNELREQUEST, __module__="google.cloud.monitoring_v3.proto.notification_service_pb2", __doc__="""The ``VerifyNotificationChannel`` request. - - Attributes: name: - The notification channel to verify. + Required. The notification channel to verify. code: - The verification code that was delivered to the channel as a - result of invoking the + Required. The verification code that was delivered to the + channel as a result of invoking the ``SendNotificationChannelVerificationCode`` API method or that was retrieved from a verified channel via ``GetNotificationChannelVerificationCode``. For example, one @@ -1219,6 +1222,18 @@ DESCRIPTOR._options = None +_LISTNOTIFICATIONCHANNELDESCRIPTORSREQUEST.fields_by_name["name"]._options = None +_GETNOTIFICATIONCHANNELDESCRIPTORREQUEST.fields_by_name["name"]._options = None +_CREATENOTIFICATIONCHANNELREQUEST.fields_by_name["name"]._options = None +_CREATENOTIFICATIONCHANNELREQUEST.fields_by_name["notification_channel"]._options = None +_LISTNOTIFICATIONCHANNELSREQUEST.fields_by_name["name"]._options = None +_GETNOTIFICATIONCHANNELREQUEST.fields_by_name["name"]._options = None +_UPDATENOTIFICATIONCHANNELREQUEST.fields_by_name["notification_channel"]._options = None +_DELETENOTIFICATIONCHANNELREQUEST.fields_by_name["name"]._options = None +_SENDNOTIFICATIONCHANNELVERIFICATIONCODEREQUEST.fields_by_name["name"]._options = None +_GETNOTIFICATIONCHANNELVERIFICATIONCODEREQUEST.fields_by_name["name"]._options = None +_VERIFYNOTIFICATIONCHANNELREQUEST.fields_by_name["name"]._options = None +_VERIFYNOTIFICATIONCHANNELREQUEST.fields_by_name["code"]._options = None _NOTIFICATIONCHANNELSERVICE = _descriptor.ServiceDescriptor( name="NotificationChannelService", @@ -1228,8 +1243,8 @@ serialized_options=_b( "\312A\031monitoring.googleapis.com\322A\211\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" ), - serialized_start=1634, - serialized_end=3913, + serialized_start=2228, + serialized_end=4638, methods=[ _descriptor.MethodDescriptor( name="ListNotificationChannelDescriptors", @@ -1239,7 +1254,7 @@ input_type=_LISTNOTIFICATIONCHANNELDESCRIPTORSREQUEST, output_type=_LISTNOTIFICATIONCHANNELDESCRIPTORSRESPONSE, serialized_options=_b( - "\202\323\344\223\0026\0224/v3/{name=projects/*}/notificationChannelDescriptors" + "\202\323\344\223\0026\0224/v3/{name=projects/*}/notificationChannelDescriptors\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1250,7 +1265,7 @@ input_type=_GETNOTIFICATIONCHANNELDESCRIPTORREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_notification__pb2._NOTIFICATIONCHANNELDESCRIPTOR, serialized_options=_b( - "\202\323\344\223\0028\0226/v3/{name=projects/*/notificationChannelDescriptors/*}" + "\202\323\344\223\0028\0226/v3/{name=projects/*/notificationChannelDescriptors/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1261,7 +1276,7 @@ input_type=_LISTNOTIFICATIONCHANNELSREQUEST, output_type=_LISTNOTIFICATIONCHANNELSRESPONSE, serialized_options=_b( - "\202\323\344\223\002,\022*/v3/{name=projects/*}/notificationChannels" + "\202\323\344\223\002,\022*/v3/{name=projects/*}/notificationChannels\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1272,7 +1287,7 @@ input_type=_GETNOTIFICATIONCHANNELREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_notification__pb2._NOTIFICATIONCHANNEL, serialized_options=_b( - "\202\323\344\223\002.\022,/v3/{name=projects/*/notificationChannels/*}" + "\202\323\344\223\002.\022,/v3/{name=projects/*/notificationChannels/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1283,7 +1298,7 @@ input_type=_CREATENOTIFICATIONCHANNELREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_notification__pb2._NOTIFICATIONCHANNEL, serialized_options=_b( - '\202\323\344\223\002B"*/v3/{name=projects/*}/notificationChannels:\024notification_channel' + '\202\323\344\223\002B"*/v3/{name=projects/*}/notificationChannels:\024notification_channel\332A\031name,notification_channel' ), ), _descriptor.MethodDescriptor( @@ -1294,7 +1309,7 @@ input_type=_UPDATENOTIFICATIONCHANNELREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_notification__pb2._NOTIFICATIONCHANNEL, serialized_options=_b( - "\202\323\344\223\002Y2A/v3/{notification_channel.name=projects/*/notificationChannels/*}:\024notification_channel" + "\202\323\344\223\002Y2A/v3/{notification_channel.name=projects/*/notificationChannels/*}:\024notification_channel\332A update_mask,notification_channel" ), ), _descriptor.MethodDescriptor( @@ -1305,7 +1320,7 @@ input_type=_DELETENOTIFICATIONCHANNELREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002.*,/v3/{name=projects/*/notificationChannels/*}" + "\202\323\344\223\002.*,/v3/{name=projects/*/notificationChannels/*}\332A\nname,force" ), ), _descriptor.MethodDescriptor( @@ -1316,7 +1331,7 @@ input_type=_SENDNOTIFICATIONCHANNELVERIFICATIONCODEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - '\202\323\344\223\002F"A/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode:\001*' + '\202\323\344\223\002F"A/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode:\001*\332A\004name' ), ), _descriptor.MethodDescriptor( @@ -1327,7 +1342,7 @@ input_type=_GETNOTIFICATIONCHANNELVERIFICATIONCODEREQUEST, output_type=_GETNOTIFICATIONCHANNELVERIFICATIONCODERESPONSE, serialized_options=_b( - '\202\323\344\223\002E"@/v3/{name=projects/*/notificationChannels/*}:getVerificationCode:\001*' + '\202\323\344\223\002E"@/v3/{name=projects/*/notificationChannels/*}:getVerificationCode:\001*\332A\004name' ), ), _descriptor.MethodDescriptor( @@ -1338,7 +1353,7 @@ input_type=_VERIFYNOTIFICATIONCHANNELREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_notification__pb2._NOTIFICATIONCHANNEL, serialized_options=_b( - '\202\323\344\223\0028"3/v3/{name=projects/*/notificationChannels/*}:verify:\001*' + '\202\323\344\223\0028"3/v3/{name=projects/*/notificationChannels/*}:verify:\001*\332A\tname,code' ), ), ], diff --git a/google/cloud/monitoring_v3/proto/service.proto b/google/cloud/monitoring_v3/proto/service.proto index 7de20331..a89c007c 100644 --- a/google/cloud/monitoring_v3/proto/service.proto +++ b/google/cloud/monitoring_v3/proto/service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/type/calendar_period.proto"; @@ -28,13 +28,22 @@ option java_multiple_files = true; option java_outer_classname = "ServiceMonitoringProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A `Service` is a discrete, autonomous, and network-accessible unit, designed // to solve an individual concern // ([Wikipedia](https://en.wikipedia.org/wiki/Service-orientation)). In -// Stackdriver Monitoring, a `Service` acts as the root resource under which +// Cloud Monitoring, a `Service` acts as the root resource under which // operational aspects of the service are accessible. message Service { + option (google.api.resource) = { + type: "monitoring.googleapis.com/Service" + pattern: "projects/{project}/services/{service}" + pattern: "organizations/{organization}/services/{service}" + pattern: "folders/{folder}/services/{service}" + pattern: "*" + }; + // Custom view of service telemetry. Currently a place-holder pending final // design. message Custom { @@ -57,8 +66,11 @@ message Service { string service = 1; } - // Istio service. Learn more at http://istio.io. + // Istio service scoped to a single Kubernetes cluster. Learn more at + // http://istio.io. message ClusterIstio { + option deprecated = true; + // The location of the Kubernetes cluster in which this Istio service is // defined. Corresponds to the `location` resource label in `k8s_cluster` // resources. @@ -78,6 +90,21 @@ message Service { string service_name = 4; } + // Istio service scoped to an Istio mesh + message MeshIstio { + // Identifier for the mesh in which this Istio service is defined. + // Corresponds to the `mesh_uid` metric label in Istio metrics. + string mesh_uid = 1; + + // The namespace of the Istio service underlying this service. Corresponds + // to the `destination_service_namespace` metric label in Istio metrics. + string service_namespace = 3; + + // The name of the Istio service underlying this service. Corresponds to the + // `destination_service_name` metric label in Istio metrics. + string service_name = 4; + } + // Configuration for how to query telemetry on a Service. message Telemetry { // The full name of the resource that defines this service. Formatted as @@ -85,8 +112,9 @@ message Service { string resource_name = 1; } - // Resource name for this Service. Of the form - // `projects/{project_id}/services/{service_id}`. + // Resource name for this Service. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] string name = 1; // Name used for UI elements listing this Service. @@ -104,7 +132,10 @@ message Service { CloudEndpoints cloud_endpoints = 8; // Type used for Istio services that live in a Kubernetes cluster. - ClusterIstio cluster_istio = 9; + ClusterIstio cluster_istio = 9 [deprecated = true]; + + // Type used for Istio services scoped to an Istio mesh. + MeshIstio mesh_istio = 10; } // Configuration for how to query telemetry on a Service. @@ -118,6 +149,15 @@ message Service { // "99% of requests in each rolling week have latency below 200 milliseconds" or // "99.5% of requests in each calendar month return successfully." message ServiceLevelObjective { + option (google.api.resource) = { + type: "monitoring.googleapis.com/ServiceLevelObjective" + pattern: "projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}" + pattern: "organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}" + pattern: "folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}" + pattern: "*" + history: ORIGINALLY_SINGLE_PATTERN + }; + // `ServiceLevelObjective.View` determines what form of // `ServiceLevelObjective` is returned from `GetServiceLevelObjective`, // `ListServiceLevelObjectives`, and `ListServiceLevelObjectiveVersions` RPCs. @@ -137,9 +177,9 @@ message ServiceLevelObjective { EXPLICIT = 1; } - // Resource name for this `ServiceLevelObjective`. - // Of the form - // `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + // Resource name for this `ServiceLevelObjective`. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] string name = 1; // Name used for UI elements listing this SLO. @@ -151,7 +191,7 @@ message ServiceLevelObjective { ServiceLevelIndicator service_level_indicator = 3; // The fraction of service that must be good in order for this objective to be - // met. `0 < goal <= 1`. + // met. `0 < goal <= 0.999`. double goal = 4; // The time period over which the objective will be evaluated. diff --git a/google/cloud/monitoring_v3/proto/service_pb2.py b/google/cloud/monitoring_v3/proto/service_pb2.py index 257a6dbc..1df20691 100644 --- a/google/cloud/monitoring_v3/proto/service_pb2.py +++ b/google/cloud/monitoring_v3/proto/service_pb2.py @@ -18,6 +18,7 @@ from google.api import ( monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2, ) +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.type import calendar_period_pb2 as google_dot_type_dot_calendar__period__pb2 @@ -28,13 +29,14 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\026ServiceMonitoringProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\026ServiceMonitoringProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n.google/cloud/monitoring_v3/proto/service.proto\x12\x14google.monitoring.v3\x1a#google/api/monitored_resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a!google/type/calendar_period.proto"\xd6\x04\n\x07Service\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x36\n\x06\x63ustom\x18\x06 \x01(\x0b\x32$.google.monitoring.v3.Service.CustomH\x00\x12=\n\napp_engine\x18\x07 \x01(\x0b\x32\'.google.monitoring.v3.Service.AppEngineH\x00\x12G\n\x0f\x63loud_endpoints\x18\x08 \x01(\x0b\x32,.google.monitoring.v3.Service.CloudEndpointsH\x00\x12\x43\n\rcluster_istio\x18\t \x01(\x0b\x32*.google.monitoring.v3.Service.ClusterIstioH\x00\x12:\n\ttelemetry\x18\r \x01(\x0b\x32\'.google.monitoring.v3.Service.Telemetry\x1a\x08\n\x06\x43ustom\x1a\x1e\n\tAppEngine\x12\x11\n\tmodule_id\x18\x01 \x01(\t\x1a!\n\x0e\x43loudEndpoints\x12\x0f\n\x07service\x18\x01 \x01(\t\x1ag\n\x0c\x43lusterIstio\x12\x10\n\x08location\x18\x01 \x01(\t\x12\x14\n\x0c\x63luster_name\x18\x02 \x01(\t\x12\x19\n\x11service_namespace\x18\x03 \x01(\t\x12\x14\n\x0cservice_name\x18\x04 \x01(\t\x1a"\n\tTelemetry\x12\x15\n\rresource_name\x18\x01 \x01(\tB\x0c\n\nidentifier"\xc4\x02\n\x15ServiceLevelObjective\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12L\n\x17service_level_indicator\x18\x03 \x01(\x0b\x32+.google.monitoring.v3.ServiceLevelIndicator\x12\x0c\n\x04goal\x18\x04 \x01(\x01\x12\x33\n\x0erolling_period\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x36\n\x0f\x63\x61lendar_period\x18\x06 \x01(\x0e\x32\x1b.google.type.CalendarPeriodH\x00"4\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x02\x12\x0c\n\x08\x45XPLICIT\x10\x01\x42\x08\n\x06period"\xd4\x01\n\x15ServiceLevelIndicator\x12\x33\n\tbasic_sli\x18\x04 \x01(\x0b\x32\x1e.google.monitoring.v3.BasicSliH\x00\x12>\n\rrequest_based\x18\x01 \x01(\x0b\x32%.google.monitoring.v3.RequestBasedSliH\x00\x12>\n\rwindows_based\x18\x02 \x01(\x0b\x32%.google.monitoring.v3.WindowsBasedSliH\x00\x42\x06\n\x04type"\xb6\x02\n\x08\x42\x61sicSli\x12\x0e\n\x06method\x18\x07 \x03(\t\x12\x10\n\x08location\x18\x08 \x03(\t\x12\x0f\n\x07version\x18\t \x03(\t\x12K\n\x0c\x61vailability\x18\x02 \x01(\x0b\x32\x33.google.monitoring.v3.BasicSli.AvailabilityCriteriaH\x00\x12\x41\n\x07latency\x18\x03 \x01(\x0b\x32..google.monitoring.v3.BasicSli.LatencyCriteriaH\x00\x1a\x16\n\x14\x41vailabilityCriteria\x1a?\n\x0fLatencyCriteria\x12,\n\tthreshold\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\n\x0csli_criteria"!\n\x05Range\x12\x0b\n\x03min\x18\x01 \x01(\x01\x12\x0b\n\x03max\x18\x02 \x01(\x01"\xa1\x01\n\x0fRequestBasedSli\x12\x41\n\x10good_total_ratio\x18\x01 \x01(\x0b\x32%.google.monitoring.v3.TimeSeriesRatioH\x00\x12\x41\n\x10\x64istribution_cut\x18\x03 \x01(\x0b\x32%.google.monitoring.v3.DistributionCutH\x00\x42\x08\n\x06method"h\n\x0fTimeSeriesRatio\x12\x1b\n\x13good_service_filter\x18\x04 \x01(\t\x12\x1a\n\x12\x62\x61\x64_service_filter\x18\x05 \x01(\t\x12\x1c\n\x14total_service_filter\x18\x06 \x01(\t"Z\n\x0f\x44istributionCut\x12\x1b\n\x13\x64istribution_filter\x18\x04 \x01(\t\x12*\n\x05range\x18\x05 \x01(\x0b\x32\x1b.google.monitoring.v3.Range"\x83\x05\n\x0fWindowsBasedSli\x12 \n\x16good_bad_metric_filter\x18\x05 \x01(\tH\x00\x12`\n\x1agood_total_ratio_threshold\x18\x02 \x01(\x0b\x32:.google.monitoring.v3.WindowsBasedSli.PerformanceThresholdH\x00\x12Q\n\x14metric_mean_in_range\x18\x06 \x01(\x0b\x32\x31.google.monitoring.v3.WindowsBasedSli.MetricRangeH\x00\x12P\n\x13metric_sum_in_range\x18\x07 \x01(\x0b\x32\x31.google.monitoring.v3.WindowsBasedSli.MetricRangeH\x00\x12\x30\n\rwindow_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xb0\x01\n\x14PerformanceThreshold\x12<\n\x0bperformance\x18\x01 \x01(\x0b\x32%.google.monitoring.v3.RequestBasedSliH\x00\x12?\n\x15\x62\x61sic_sli_performance\x18\x03 \x01(\x0b\x32\x1e.google.monitoring.v3.BasicSliH\x00\x12\x11\n\tthreshold\x18\x02 \x01(\x01\x42\x06\n\x04type\x1aN\n\x0bMetricRange\x12\x13\n\x0btime_series\x18\x01 \x01(\t\x12*\n\x05range\x18\x04 \x01(\x0b\x32\x1b.google.monitoring.v3.RangeB\x12\n\x10window_criterionB\xae\x01\n\x18\x63om.google.monitoring.v3B\x16ServiceMonitoringProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n.google/cloud/monitoring_v3/proto/service.proto\x12\x14google.monitoring.v3\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a!google/type/calendar_period.proto"\x97\x07\n\x07Service\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x36\n\x06\x63ustom\x18\x06 \x01(\x0b\x32$.google.monitoring.v3.Service.CustomH\x00\x12=\n\napp_engine\x18\x07 \x01(\x0b\x32\'.google.monitoring.v3.Service.AppEngineH\x00\x12G\n\x0f\x63loud_endpoints\x18\x08 \x01(\x0b\x32,.google.monitoring.v3.Service.CloudEndpointsH\x00\x12G\n\rcluster_istio\x18\t \x01(\x0b\x32*.google.monitoring.v3.Service.ClusterIstioB\x02\x18\x01H\x00\x12=\n\nmesh_istio\x18\n \x01(\x0b\x32\'.google.monitoring.v3.Service.MeshIstioH\x00\x12:\n\ttelemetry\x18\r \x01(\x0b\x32\'.google.monitoring.v3.Service.Telemetry\x1a\x08\n\x06\x43ustom\x1a\x1e\n\tAppEngine\x12\x11\n\tmodule_id\x18\x01 \x01(\t\x1a!\n\x0e\x43loudEndpoints\x12\x0f\n\x07service\x18\x01 \x01(\t\x1ak\n\x0c\x43lusterIstio\x12\x10\n\x08location\x18\x01 \x01(\t\x12\x14\n\x0c\x63luster_name\x18\x02 \x01(\t\x12\x19\n\x11service_namespace\x18\x03 \x01(\t\x12\x14\n\x0cservice_name\x18\x04 \x01(\t:\x02\x18\x01\x1aN\n\tMeshIstio\x12\x10\n\x08mesh_uid\x18\x01 \x01(\t\x12\x19\n\x11service_namespace\x18\x03 \x01(\t\x12\x14\n\x0cservice_name\x18\x04 \x01(\t\x1a"\n\tTelemetry\x12\x15\n\rresource_name\x18\x01 \x01(\t:\xa7\x01\xea\x41\xa3\x01\n!monitoring.googleapis.com/Service\x12%projects/{project}/services/{service}\x12/organizations/{organization}/services/{service}\x12#folders/{folder}/services/{service}\x12\x01*B\x0c\n\nidentifier"\x91\x05\n\x15ServiceLevelObjective\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12L\n\x17service_level_indicator\x18\x03 \x01(\x0b\x32+.google.monitoring.v3.ServiceLevelIndicator\x12\x0c\n\x04goal\x18\x04 \x01(\x01\x12\x33\n\x0erolling_period\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x36\n\x0f\x63\x61lendar_period\x18\x06 \x01(\x0e\x32\x1b.google.type.CalendarPeriodH\x00"4\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x02\x12\x0c\n\x08\x45XPLICIT\x10\x01:\xca\x02\xea\x41\xc6\x02\n/monitoring.googleapis.com/ServiceLevelObjective\x12Vprojects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}\x12`organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}\x12Tfolders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}\x12\x01* \x01\x42\x08\n\x06period"\xd4\x01\n\x15ServiceLevelIndicator\x12\x33\n\tbasic_sli\x18\x04 \x01(\x0b\x32\x1e.google.monitoring.v3.BasicSliH\x00\x12>\n\rrequest_based\x18\x01 \x01(\x0b\x32%.google.monitoring.v3.RequestBasedSliH\x00\x12>\n\rwindows_based\x18\x02 \x01(\x0b\x32%.google.monitoring.v3.WindowsBasedSliH\x00\x42\x06\n\x04type"\xb6\x02\n\x08\x42\x61sicSli\x12\x0e\n\x06method\x18\x07 \x03(\t\x12\x10\n\x08location\x18\x08 \x03(\t\x12\x0f\n\x07version\x18\t \x03(\t\x12K\n\x0c\x61vailability\x18\x02 \x01(\x0b\x32\x33.google.monitoring.v3.BasicSli.AvailabilityCriteriaH\x00\x12\x41\n\x07latency\x18\x03 \x01(\x0b\x32..google.monitoring.v3.BasicSli.LatencyCriteriaH\x00\x1a\x16\n\x14\x41vailabilityCriteria\x1a?\n\x0fLatencyCriteria\x12,\n\tthreshold\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\n\x0csli_criteria"!\n\x05Range\x12\x0b\n\x03min\x18\x01 \x01(\x01\x12\x0b\n\x03max\x18\x02 \x01(\x01"\xa1\x01\n\x0fRequestBasedSli\x12\x41\n\x10good_total_ratio\x18\x01 \x01(\x0b\x32%.google.monitoring.v3.TimeSeriesRatioH\x00\x12\x41\n\x10\x64istribution_cut\x18\x03 \x01(\x0b\x32%.google.monitoring.v3.DistributionCutH\x00\x42\x08\n\x06method"h\n\x0fTimeSeriesRatio\x12\x1b\n\x13good_service_filter\x18\x04 \x01(\t\x12\x1a\n\x12\x62\x61\x64_service_filter\x18\x05 \x01(\t\x12\x1c\n\x14total_service_filter\x18\x06 \x01(\t"Z\n\x0f\x44istributionCut\x12\x1b\n\x13\x64istribution_filter\x18\x04 \x01(\t\x12*\n\x05range\x18\x05 \x01(\x0b\x32\x1b.google.monitoring.v3.Range"\x83\x05\n\x0fWindowsBasedSli\x12 \n\x16good_bad_metric_filter\x18\x05 \x01(\tH\x00\x12`\n\x1agood_total_ratio_threshold\x18\x02 \x01(\x0b\x32:.google.monitoring.v3.WindowsBasedSli.PerformanceThresholdH\x00\x12Q\n\x14metric_mean_in_range\x18\x06 \x01(\x0b\x32\x31.google.monitoring.v3.WindowsBasedSli.MetricRangeH\x00\x12P\n\x13metric_sum_in_range\x18\x07 \x01(\x0b\x32\x31.google.monitoring.v3.WindowsBasedSli.MetricRangeH\x00\x12\x30\n\rwindow_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xb0\x01\n\x14PerformanceThreshold\x12<\n\x0bperformance\x18\x01 \x01(\x0b\x32%.google.monitoring.v3.RequestBasedSliH\x00\x12?\n\x15\x62\x61sic_sli_performance\x18\x03 \x01(\x0b\x32\x1e.google.monitoring.v3.BasicSliH\x00\x12\x11\n\tthreshold\x18\x02 \x01(\x01\x42\x06\n\x04type\x1aN\n\x0bMetricRange\x12\x13\n\x0btime_series\x18\x01 \x01(\t\x12*\n\x05range\x18\x04 \x01(\x0b\x32\x1b.google.monitoring.v3.RangeB\x12\n\x10window_criterionB\xce\x01\n\x18\x63om.google.monitoring.v3B\x16ServiceMonitoringProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), dependencies=[ google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, google_dot_type_dot_calendar__period__pb2.DESCRIPTOR, @@ -64,8 +66,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1073, - serialized_end=1125, + serialized_start=1421, + serialized_end=1473, ) _sym_db.RegisterEnumDescriptor(_SERVICELEVELOBJECTIVE_VIEW) @@ -85,8 +87,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=578, - serialized_end=586, + serialized_start=672, + serialized_end=680, ) _SERVICE_APPENGINE = _descriptor.Descriptor( @@ -113,7 +115,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -123,8 +125,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=588, - serialized_end=618, + serialized_start=682, + serialized_end=712, ) _SERVICE_CLOUDENDPOINTS = _descriptor.Descriptor( @@ -151,7 +153,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -161,8 +163,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=620, - serialized_end=653, + serialized_start=714, + serialized_end=747, ) _SERVICE_CLUSTERISTIO = _descriptor.Descriptor( @@ -248,13 +250,87 @@ extensions=[], nested_types=[], enum_types=[], + serialized_options=_b("\030\001"), + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=749, + serialized_end=856, +) + +_SERVICE_MESHISTIO = _descriptor.Descriptor( + name="MeshIstio", + full_name="google.monitoring.v3.Service.MeshIstio", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="mesh_uid", + full_name="google.monitoring.v3.Service.MeshIstio.mesh_uid", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="service_namespace", + full_name="google.monitoring.v3.Service.MeshIstio.service_namespace", + index=1, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="service_name", + full_name="google.monitoring.v3.Service.MeshIstio.service_name", + index=2, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=655, - serialized_end=758, + serialized_start=858, + serialized_end=936, ) _SERVICE_TELEMETRY = _descriptor.Descriptor( @@ -281,7 +357,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -291,8 +367,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=760, - serialized_end=794, + serialized_start=938, + serialized_end=972, ) _SERVICE = _descriptor.Descriptor( @@ -407,13 +483,31 @@ containing_type=None, is_extension=False, extension_scope=None, + serialized_options=_b("\030\001"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="mesh_istio", + full_name="google.monitoring.v3.Service.mesh_istio", + index=6, + number=10, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, serialized_options=None, file=DESCRIPTOR, ), _descriptor.FieldDescriptor( name="telemetry", full_name="google.monitoring.v3.Service.telemetry", - index=6, + index=7, number=13, type=11, cpp_type=10, @@ -435,10 +529,13 @@ _SERVICE_APPENGINE, _SERVICE_CLOUDENDPOINTS, _SERVICE_CLUSTERISTIO, + _SERVICE_MESHISTIO, _SERVICE_TELEMETRY, ], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352A\243\001\n!monitoring.googleapis.com/Service\022%projects/{project}/services/{service}\022/organizations/{organization}/services/{service}\022#folders/{folder}/services/{service}\022\001*" + ), is_extendable=False, syntax="proto3", extension_ranges=[], @@ -449,10 +546,10 @@ index=0, containing_type=None, fields=[], - ), + ) ], - serialized_start=210, - serialized_end=808, + serialized_start=237, + serialized_end=1156, ) @@ -574,8 +671,10 @@ ], extensions=[], nested_types=[], - enum_types=[_SERVICELEVELOBJECTIVE_VIEW,], - serialized_options=None, + enum_types=[_SERVICELEVELOBJECTIVE_VIEW], + serialized_options=_b( + "\352A\306\002\n/monitoring.googleapis.com/ServiceLevelObjective\022Vprojects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}\022`organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}\022Tfolders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}\022\001* \001" + ), is_extendable=False, syntax="proto3", extension_ranges=[], @@ -586,10 +685,10 @@ index=0, containing_type=None, fields=[], - ), + ) ], - serialized_start=811, - serialized_end=1135, + serialized_start=1159, + serialized_end=1816, ) @@ -669,10 +768,10 @@ index=0, containing_type=None, fields=[], - ), + ) ], - serialized_start=1138, - serialized_end=1350, + serialized_start=1819, + serialized_end=2031, ) @@ -691,8 +790,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1560, - serialized_end=1582, + serialized_start=2241, + serialized_end=2263, ) _BASICSLI_LATENCYCRITERIA = _descriptor.Descriptor( @@ -719,7 +818,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -729,8 +828,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1584, - serialized_end=1647, + serialized_start=2265, + serialized_end=2328, ) _BASICSLI = _descriptor.Descriptor( @@ -832,7 +931,7 @@ ), ], extensions=[], - nested_types=[_BASICSLI_AVAILABILITYCRITERIA, _BASICSLI_LATENCYCRITERIA,], + nested_types=[_BASICSLI_AVAILABILITYCRITERIA, _BASICSLI_LATENCYCRITERIA], enum_types=[], serialized_options=None, is_extendable=False, @@ -845,10 +944,10 @@ index=0, containing_type=None, fields=[], - ), + ) ], - serialized_start=1353, - serialized_end=1663, + serialized_start=2034, + serialized_end=2344, ) @@ -904,8 +1003,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1665, - serialized_end=1698, + serialized_start=2346, + serialized_end=2379, ) @@ -967,10 +1066,10 @@ index=0, containing_type=None, fields=[], - ), + ) ], - serialized_start=1701, - serialized_end=1862, + serialized_start=2382, + serialized_end=2543, ) @@ -1044,8 +1143,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1864, - serialized_end=1968, + serialized_start=2545, + serialized_end=2649, ) @@ -1101,8 +1200,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1970, - serialized_end=2060, + serialized_start=2651, + serialized_end=2741, ) @@ -1182,10 +1281,10 @@ index=0, containing_type=None, fields=[], - ), + ) ], - serialized_start=2430, - serialized_end=2606, + serialized_start=3111, + serialized_end=3287, ) _WINDOWSBASEDSLI_METRICRANGE = _descriptor.Descriptor( @@ -1240,8 +1339,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2608, - serialized_end=2686, + serialized_start=3289, + serialized_end=3367, ) _WINDOWSBASEDSLI = _descriptor.Descriptor( @@ -1343,7 +1442,7 @@ ), ], extensions=[], - nested_types=[_WINDOWSBASEDSLI_PERFORMANCETHRESHOLD, _WINDOWSBASEDSLI_METRICRANGE,], + nested_types=[_WINDOWSBASEDSLI_PERFORMANCETHRESHOLD, _WINDOWSBASEDSLI_METRICRANGE], enum_types=[], serialized_options=None, is_extendable=False, @@ -1356,21 +1455,23 @@ index=0, containing_type=None, fields=[], - ), + ) ], - serialized_start=2063, - serialized_end=2706, + serialized_start=2744, + serialized_end=3387, ) _SERVICE_CUSTOM.containing_type = _SERVICE _SERVICE_APPENGINE.containing_type = _SERVICE _SERVICE_CLOUDENDPOINTS.containing_type = _SERVICE _SERVICE_CLUSTERISTIO.containing_type = _SERVICE +_SERVICE_MESHISTIO.containing_type = _SERVICE _SERVICE_TELEMETRY.containing_type = _SERVICE _SERVICE.fields_by_name["custom"].message_type = _SERVICE_CUSTOM _SERVICE.fields_by_name["app_engine"].message_type = _SERVICE_APPENGINE _SERVICE.fields_by_name["cloud_endpoints"].message_type = _SERVICE_CLOUDENDPOINTS _SERVICE.fields_by_name["cluster_istio"].message_type = _SERVICE_CLUSTERISTIO +_SERVICE.fields_by_name["mesh_istio"].message_type = _SERVICE_MESHISTIO _SERVICE.fields_by_name["telemetry"].message_type = _SERVICE_TELEMETRY _SERVICE.oneofs_by_name["identifier"].fields.append(_SERVICE.fields_by_name["custom"]) _SERVICE.fields_by_name["custom"].containing_oneof = _SERVICE.oneofs_by_name[ @@ -1394,6 +1495,12 @@ _SERVICE.fields_by_name["cluster_istio"].containing_oneof = _SERVICE.oneofs_by_name[ "identifier" ] +_SERVICE.oneofs_by_name["identifier"].fields.append( + _SERVICE.fields_by_name["mesh_istio"] +) +_SERVICE.fields_by_name["mesh_istio"].containing_oneof = _SERVICE.oneofs_by_name[ + "identifier" +] _SERVICELEVELOBJECTIVE.fields_by_name[ "service_level_indicator" ].message_type = _SERVICELEVELINDICATOR @@ -1549,9 +1656,8 @@ dict( DESCRIPTOR=_SERVICE_CUSTOM, __module__="google.cloud.monitoring_v3.proto.service_pb2", - __doc__="""Custom view of service telemetry. Currently a place-holder pending final - design. - """, + __doc__="""Custom view of service telemetry. Currently a place-holder pending + final design.""", # @@protoc_insertion_point(class_scope:google.monitoring.v3.Service.Custom) ), ), @@ -1562,8 +1668,6 @@ DESCRIPTOR=_SERVICE_APPENGINE, __module__="google.cloud.monitoring_v3.proto.service_pb2", __doc__="""App Engine service. Learn more at https://cloud.google.com/appengine. - - Attributes: module_id: The ID of the App Engine module underlying this service. @@ -1582,8 +1686,6 @@ __module__="google.cloud.monitoring_v3.proto.service_pb2", __doc__="""Cloud Endpoints service. Learn more at https://cloud.google.com/endpoints. - - Attributes: service: The name of the Cloud Endpoints service underlying this @@ -1600,9 +1702,8 @@ dict( DESCRIPTOR=_SERVICE_CLUSTERISTIO, __module__="google.cloud.monitoring_v3.proto.service_pb2", - __doc__="""Istio service. Learn more at http://istio.io. - - + __doc__="""Istio service scoped to a single Kubernetes cluster. Learn more at + http://istio.io. Attributes: location: The location of the Kubernetes cluster in which this Istio @@ -1624,6 +1725,30 @@ # @@protoc_insertion_point(class_scope:google.monitoring.v3.Service.ClusterIstio) ), ), + MeshIstio=_reflection.GeneratedProtocolMessageType( + "MeshIstio", + (_message.Message,), + dict( + DESCRIPTOR=_SERVICE_MESHISTIO, + __module__="google.cloud.monitoring_v3.proto.service_pb2", + __doc__="""Istio service scoped to an Istio mesh + Attributes: + mesh_uid: + Identifier for the mesh in which this Istio service is + defined. Corresponds to the ``mesh_uid`` metric label in Istio + metrics. + service_namespace: + The namespace of the Istio service underlying this service. + Corresponds to the ``destination_service_namespace`` metric + label in Istio metrics. + service_name: + The name of the Istio service underlying this service. + Corresponds to the ``destination_service_name`` metric label + in Istio metrics. + """, + # @@protoc_insertion_point(class_scope:google.monitoring.v3.Service.MeshIstio) + ), + ), Telemetry=_reflection.GeneratedProtocolMessageType( "Telemetry", (_message.Message,), @@ -1631,8 +1756,6 @@ DESCRIPTOR=_SERVICE_TELEMETRY, __module__="google.cloud.monitoring_v3.proto.service_pb2", __doc__="""Configuration for how to query telemetry on a Service. - - Attributes: resource_name: The full name of the resource that defines this service. @@ -1645,16 +1768,14 @@ DESCRIPTOR=_SERVICE, __module__="google.cloud.monitoring_v3.proto.service_pb2", __doc__="""A ``Service`` is a discrete, autonomous, and network-accessible unit, - designed to solve an individual concern - (`Wikipedia `__). In - Stackdriver Monitoring, a ``Service`` acts as the root resource under - which operational aspects of the service are accessible. - - + designed to solve an individual concern (`Wikipedia + `__). In Cloud + Monitoring, a ``Service`` acts as the root resource under which + operational aspects of the service are accessible. Attributes: name: - Resource name for this Service. Of the form - ``projects/{project_id}/services/{service_id}``. + Resource name for this Service. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] display_name: Name used for UI elements listing this Service. identifier: @@ -1669,6 +1790,8 @@ cluster_istio: Type used for Istio services that live in a Kubernetes cluster. + mesh_istio: + Type used for Istio services scoped to an Istio mesh. telemetry: Configuration for how to query telemetry on a Service. """, @@ -1680,6 +1803,7 @@ _sym_db.RegisterMessage(Service.AppEngine) _sym_db.RegisterMessage(Service.CloudEndpoints) _sym_db.RegisterMessage(Service.ClusterIstio) +_sym_db.RegisterMessage(Service.MeshIstio) _sym_db.RegisterMessage(Service.Telemetry) ServiceLevelObjective = _reflection.GeneratedProtocolMessageType( @@ -1693,15 +1817,13 @@ goal, and a period over which the objective is to be evaluated against that goal. The SLO can use SLIs defined in a number of different manners. Typical SLOs might include "99% of requests in each rolling - week have latency below 200 milliseconds" or "99.5% of requests in each - calendar month return successfully." - - + week have latency below 200 milliseconds" or "99.5% of requests in + each calendar month return successfully." Attributes: name: - Resource name for this ``ServiceLevelObjective``. Of the form - ``projects/{project_id}/services/{service_id}/serviceLevelObje - ctives/{slo_name}``. + Resource name for this ``ServiceLevelObjective``. The format + is: :: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE + _ID]/serviceLevelObjectives/[SLO_NAME] display_name: Name used for UI elements listing this SLO. service_level_indicator: @@ -1710,7 +1832,7 @@ single aspect of service quality. goal: The fraction of service that must be good in order for this - objective to be met. ``0 < goal <= 1``. + objective to be met. ``0 < goal <= 0.999``. period: The time period over which the objective will be evaluated. rolling_period: @@ -1734,21 +1856,19 @@ DESCRIPTOR=_SERVICELEVELINDICATOR, __module__="google.cloud.monitoring_v3.proto.service_pb2", __doc__="""A Service-Level Indicator (SLI) describes the "performance" of a - service. For some services, the SLI is well-defined. In such cases, the - SLI can be described easily by referencing the well-known SLI and + service. For some services, the SLI is well-defined. In such cases, + the SLI can be described easily by referencing the well-known SLI and providing the needed parameters. Alternatively, a "custom" SLI can be defined with a query to the underlying metric store. An SLI is defined to be ``good_service / total_service`` over any queried time interval. - The value of performance always falls into the range - ``0 <= performance <= 1``. A custom SLI describes how to compute this - ratio, whether this is by dividing values from a pair of time series, - cutting a ``Distribution`` into good and bad counts, or counting time - windows in which the service complies with a criterion. For separation - of concerns, a single Service-Level Indicator measures performance for + The value of performance always falls into the range ``0 <= + performance <= 1``. A custom SLI describes how to compute this ratio, + whether this is by dividing values from a pair of time series, cutting + a ``Distribution`` into good and bad counts, or counting time windows + in which the service complies with a criterion. For separation of + concerns, a single Service-Level Indicator measures performance for only one aspect of service quality, such as fraction of successful queries or fast-enough queries. - - Attributes: type: Service level indicators can be grouped by whether the "unit" @@ -1776,8 +1896,7 @@ dict( DESCRIPTOR=_BASICSLI_AVAILABILITYCRITERIA, __module__="google.cloud.monitoring_v3.proto.service_pb2", - __doc__="""Future parameters for the availability SLI. - """, + __doc__="""Future parameters for the availability SLI.""", # @@protoc_insertion_point(class_scope:google.monitoring.v3.BasicSli.AvailabilityCriteria) ), ), @@ -1788,8 +1907,6 @@ DESCRIPTOR=_BASICSLI_LATENCYCRITERIA, __module__="google.cloud.monitoring_v3.proto.service_pb2", __doc__="""Parameters for a latency threshold SLI. - - Attributes: threshold: Good service is defined to be the count of requests made to @@ -1803,11 +1920,9 @@ __doc__="""An SLI measuring performance on a well-known service type. Performance will be computed on the basis of pre-defined metrics. The type of the ``service_resource`` determines the metrics to use and the - ``service_resource.labels`` and ``metric_labels`` are used to construct - a monitoring filter to filter that metric down to just the data relevant - to this service. - - + ``service_resource.labels`` and ``metric_labels`` are used to + construct a monitoring filter to filter that metric down to just the + data relevant to this service. Attributes: method: OPTIONAL: The set of RPCs to which this SLI is relevant. @@ -1855,11 +1970,9 @@ DESCRIPTOR=_RANGE, __module__="google.cloud.monitoring_v3.proto.service_pb2", __doc__="""Range of numerical values, inclusive of ``min`` and exclusive of - ``max``. If the open range "< range.max" is desired, set - ``range.min = -infinity``. If the open range ">= range.min" is desired, - set ``range.max = infinity``. - - + ``max``. If the open range "< range.max" is desired, set ``range.min = + -infinity``. If the open range ">= range.min" is desired, set + ``range.max = infinity``. Attributes: min: Range minimum. @@ -1879,21 +1992,19 @@ __module__="google.cloud.monitoring_v3.proto.service_pb2", __doc__="""Service Level Indicators for which atomic units of service are counted directly. - - Attributes: method: The means to compute a ratio of ``good_service`` to ``total_service``. good_total_ratio: - ``good_total_ratio`` is used when the ratio of + \ ``good_total_ratio`` is used when the ratio of ``good_service`` to ``total_service`` is computed from two ``TimeSeries``. distribution_cut: - ``distribution_cut`` is used when ``good_service`` is a count - of values aggregated in a ``Distribution`` that fall into a - good range. The ``total_service`` is the total count of all - values aggregated in the ``Distribution``. + \ ``distribution_cut`` is used when ``good_service`` is a + count of values aggregated in a ``Distribution`` that fall + into a good range. The ``total_service`` is the total count of + all values aggregated in the ``Distribution``. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.RequestBasedSli) ), @@ -1906,15 +2017,13 @@ dict( DESCRIPTOR=_TIMESERIESRATIO, __module__="google.cloud.monitoring_v3.proto.service_pb2", - __doc__="""A ``TimeSeriesRatio`` specifies two ``TimeSeries`` to use for computing - the ``good_service / total_service`` ratio. The specified ``TimeSeries`` - must have ``ValueType = DOUBLE`` or ``ValueType = INT64`` and must have - ``MetricKind = DELTA`` or ``MetricKind = CUMULATIVE``. The - ``TimeSeriesRatio`` must specify exactly two of good, bad, and total, - and the relationship ``good_service + bad_service = total_service`` will - be assumed. - - + __doc__="""A ``TimeSeriesRatio`` specifies two ``TimeSeries`` to use for + computing the ``good_service / total_service`` ratio. The specified + ``TimeSeries`` must have ``ValueType = DOUBLE`` or ``ValueType = + INT64`` and must have ``MetricKind = DELTA`` or ``MetricKind = + CUMULATIVE``. The ``TimeSeriesRatio`` must specify exactly two of + good, bad, and total, and the relationship ``good_service + + bad_service = total_service`` will be assumed. Attributes: good_service_filter: A `monitoring filter @@ -1954,10 +2063,8 @@ measuring good service and total service. The ``TimeSeries`` must have ``ValueType = DISTRIBUTION`` and ``MetricKind = DELTA`` or ``MetricKind = CUMULATIVE``. The computed ``good_service`` will be the - count of values x in the ``Distribution`` such that - ``range.min <= x < range.max``. - - + count of values x in the ``Distribution`` such that ``range.min <= x < + range.max``. Attributes: distribution_filter: A `monitoring filter @@ -1986,16 +2093,14 @@ __module__="google.cloud.monitoring_v3.proto.service_pb2", __doc__="""A ``PerformanceThreshold`` is used when each window is good when that window has a sufficiently high ``performance``. - - Attributes: type: The means, either a request-based SLI or a basic SLI, by which to compute performance over a window. performance: - ``RequestBasedSli`` to evaluate to judge window quality. + \ ``RequestBasedSli`` to evaluate to judge window quality. basic_sli_performance: - ``BasicSli`` to evaluate to judge window quality. + \ ``BasicSli`` to evaluate to judge window quality. threshold: If window ``performance >= threshold``, the window is counted as good. @@ -2009,12 +2114,10 @@ dict( DESCRIPTOR=_WINDOWSBASEDSLI_METRICRANGE, __module__="google.cloud.monitoring_v3.proto.service_pb2", - __doc__="""A ``MetricRange`` is used when each window is good when the value x of a - single ``TimeSeries`` satisfies ``range.min <= x < range.max``. The - provided ``TimeSeries`` must have ``ValueType = INT64`` or - ``ValueType = DOUBLE`` and ``MetricKind = GAUGE``. - - + __doc__="""A ``MetricRange`` is used when each window is good when the value x of + a single ``TimeSeries`` satisfies ``range.min <= x < range.max``. The + provided ``TimeSeries`` must have ``ValueType = INT64`` or ``ValueType + = DOUBLE`` and ``MetricKind = GAUGE``. Attributes: time_series: A `monitoring filter @@ -2031,11 +2134,9 @@ DESCRIPTOR=_WINDOWSBASEDSLI, __module__="google.cloud.monitoring_v3.proto.service_pb2", __doc__="""A ``WindowsBasedSli`` defines ``good_service`` as the count of time - windows for which the provided service was of good quality. Criteria for - determining if service was good are embedded in the + windows for which the provided service was of good quality. Criteria + for determining if service was good are embedded in the ``window_criterion``. - - Attributes: window_criterion: The criterion to use for evaluating window goodness. @@ -2065,4 +2166,8 @@ DESCRIPTOR._options = None +_SERVICE_CLUSTERISTIO._options = None +_SERVICE.fields_by_name["cluster_istio"]._options = None +_SERVICE._options = None +_SERVICELEVELOBJECTIVE._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/monitoring_v3/proto/service_service.proto b/google/cloud/monitoring_v3/proto/service_service.proto index e0a35833..cd5f7db6 100644 --- a/google/cloud/monitoring_v3/proto/service_service.proto +++ b/google/cloud/monitoring_v3/proto/service_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,18 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; -import "google/api/monitored_resource.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/service.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -30,8 +30,9 @@ option java_multiple_files = true; option java_outer_classname = "ServiceMonitoringServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; -// The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for +// The Cloud Monitoring Service-Oriented Monitoring API has endpoints for // managing and querying aspects of a workspace's services. These include the // `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy // of categorized Health Metrics. @@ -48,6 +49,7 @@ service ServiceMonitoringService { post: "/v3/{parent=*/*}/services" body: "service" }; + option (google.api.method_signature) = "parent,service"; } // Get the named `Service`. @@ -55,6 +57,7 @@ service ServiceMonitoringService { option (google.api.http) = { get: "/v3/{name=*/*/services/*}" }; + option (google.api.method_signature) = "name"; } // List `Service`s for this workspace. @@ -62,6 +65,7 @@ service ServiceMonitoringService { option (google.api.http) = { get: "/v3/{parent=*/*}/services" }; + option (google.api.method_signature) = "parent"; } // Update this `Service`. @@ -70,6 +74,7 @@ service ServiceMonitoringService { patch: "/v3/{service.name=*/*/services/*}" body: "service" }; + option (google.api.method_signature) = "service"; } // Soft delete this `Service`. @@ -77,6 +82,7 @@ service ServiceMonitoringService { option (google.api.http) = { delete: "/v3/{name=*/*/services/*}" }; + option (google.api.method_signature) = "name"; } // Create a `ServiceLevelObjective` for the given `Service`. @@ -85,6 +91,7 @@ service ServiceMonitoringService { post: "/v3/{parent=*/*/services/*}/serviceLevelObjectives" body: "service_level_objective" }; + option (google.api.method_signature) = "parent,service_level_objective"; } // Get a `ServiceLevelObjective` by name. @@ -92,6 +99,7 @@ service ServiceMonitoringService { option (google.api.http) = { get: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" }; + option (google.api.method_signature) = "name"; } // List the `ServiceLevelObjective`s for the given `Service`. @@ -99,6 +107,7 @@ service ServiceMonitoringService { option (google.api.http) = { get: "/v3/{parent=*/*/services/*}/serviceLevelObjectives" }; + option (google.api.method_signature) = "parent"; } // Update the given `ServiceLevelObjective`. @@ -107,6 +116,7 @@ service ServiceMonitoringService { patch: "/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}" body: "service_level_objective" }; + option (google.api.method_signature) = "service_level_objective"; } // Delete the given `ServiceLevelObjective`. @@ -114,35 +124,56 @@ service ServiceMonitoringService { option (google.api.http) = { delete: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" }; + option (google.api.method_signature) = "name"; } } // The `CreateService` request. message CreateServiceRequest { - // Resource name of the parent workspace. - // Of the form `projects/{project_id}`. - string parent = 1; + // Required. Resource name of the parent workspace. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Service" + } + ]; // Optional. The Service id to use for this Service. If omitted, an id will be - // generated instead. Must match the pattern [a-z0-9\-]+ + // generated instead. Must match the pattern `[a-z0-9\-]+` string service_id = 3; - // The `Service` to create. - Service service = 2; + // Required. The `Service` to create. + Service service = 2 [(google.api.field_behavior) = REQUIRED]; } // The `GetService` request. message GetServiceRequest { - // Resource name of the `Service`. - // Of the form `projects/{project_id}/services/{service_id}`. - string name = 1; + // Required. Resource name of the `Service`. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; } // The `ListServices` request. message ListServicesRequest { - // Resource name of the parent `Workspace`. - // Of the form `projects/{project_id}`. - string parent = 1; + // Required. Resource name of the parent containing the listed services, either a + // project or a Monitoring Workspace. The formats are: + // + // projects/[PROJECT_ID_OR_NUMBER] + // workspaces/[HOST_PROJECT_ID_OR_NUMBER] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Service" + } + ]; // A filter specifying what `Service`s to return. The filter currently // supports the following fields: @@ -178,15 +209,15 @@ message ListServicesResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `UpdateService` request. message UpdateServiceRequest { - // The `Service` to draw updates from. + // Required. The `Service` to draw updates from. // The given `name` specifies the resource to update. - Service service = 1; + Service service = 1 [(google.api.field_behavior) = REQUIRED]; // A set of field paths defining which fields to use for the update. google.protobuf.FieldMask update_mask = 2; @@ -194,34 +225,51 @@ message UpdateServiceRequest { // The `DeleteService` request. message DeleteServiceRequest { - // Resource name of the `Service` to delete. - // Of the form `projects/{project_id}/service/{service_id}`. - string name = 1; + // Required. Resource name of the `Service` to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; } // The `CreateServiceLevelObjective` request. message CreateServiceLevelObjectiveRequest { - // Resource name of the parent `Service`. - // Of the form `projects/{project_id}/services/{service_id}`. - string parent = 1; + // Required. Resource name of the parent `Service`. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; // Optional. The ServiceLevelObjective id to use for this // ServiceLevelObjective. If omitted, an id will be generated instead. Must - // match the pattern [a-z0-9\-]+ + // match the pattern `[a-z0-9\-]+` string service_level_objective_id = 3; - // The `ServiceLevelObjective` to create. + // Required. The `ServiceLevelObjective` to create. // The provided `name` will be respected if no `ServiceLevelObjective` exists // with this name. - ServiceLevelObjective service_level_objective = 2; + ServiceLevelObjective service_level_objective = 2 [(google.api.field_behavior) = REQUIRED]; } // The `GetServiceLevelObjective` request. message GetServiceLevelObjectiveRequest { - // Resource name of the `ServiceLevelObjective` to get. - // Of the form - // `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. - string name = 1; + // Required. Resource name of the `ServiceLevelObjective` to get. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/ServiceLevelObjective" + } + ]; // View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the // `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the @@ -232,9 +280,17 @@ message GetServiceLevelObjectiveRequest { // The `ListServiceLevelObjectives` request. message ListServiceLevelObjectivesRequest { - // Resource name of the parent `Service`. - // Of the form `projects/{project_id}/services/{service_id}`. - string parent = 1; + // Required. Resource name of the parent containing the listed SLOs, either a + // project or a Monitoring Workspace. The formats are: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + // workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; // A filter specifying what `ServiceLevelObjective`s to return. string filter = 2; @@ -262,15 +318,15 @@ message ListServiceLevelObjectivesResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `UpdateServiceLevelObjective` request. message UpdateServiceLevelObjectiveRequest { - // The `ServiceLevelObjective` to draw updates from. + // Required. The `ServiceLevelObjective` to draw updates from. // The given `name` specifies the resource to update. - ServiceLevelObjective service_level_objective = 1; + ServiceLevelObjective service_level_objective = 1 [(google.api.field_behavior) = REQUIRED]; // A set of field paths defining which fields to use for the update. google.protobuf.FieldMask update_mask = 2; @@ -278,8 +334,13 @@ message UpdateServiceLevelObjectiveRequest { // The `DeleteServiceLevelObjective` request. message DeleteServiceLevelObjectiveRequest { - // Resource name of the `ServiceLevelObjective` to delete. - // Of the form - // `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. - string name = 1; + // Required. Resource name of the `ServiceLevelObjective` to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/ServiceLevelObjective" + } + ]; } diff --git a/google/cloud/monitoring_v3/proto/service_service_pb2.py b/google/cloud/monitoring_v3/proto/service_service_pb2.py index b69435e0..ec2410b1 100644 --- a/google/cloud/monitoring_v3/proto/service_service_pb2.py +++ b/google/cloud/monitoring_v3/proto/service_service_pb2.py @@ -16,15 +16,14 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 -from google.api import ( - monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2, -) +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.monitoring_v3.proto import ( service_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_service__pb2, ) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -32,18 +31,19 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\035ServiceMonitoringServiceProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\035ServiceMonitoringServiceProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n6google/cloud/monitoring_v3/proto/service_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a#google/api/monitored_resource.proto\x1a.google/cloud/monitoring_v3/proto/service.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/api/client.proto"j\n\x14\x43reateServiceRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x12\n\nservice_id\x18\x03 \x01(\t\x12.\n\x07service\x18\x02 \x01(\x0b\x32\x1d.google.monitoring.v3.Service"!\n\x11GetServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\\\n\x13ListServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"`\n\x14ListServicesResponse\x12/\n\x08services\x18\x01 \x03(\x0b\x32\x1d.google.monitoring.v3.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"w\n\x14UpdateServiceRequest\x12.\n\x07service\x18\x01 \x01(\x0b\x32\x1d.google.monitoring.v3.Service\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"$\n\x14\x44\x65leteServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\xa6\x01\n"CreateServiceLevelObjectiveRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12"\n\x1aservice_level_objective_id\x18\x03 \x01(\t\x12L\n\x17service_level_objective\x18\x02 \x01(\x0b\x32+.google.monitoring.v3.ServiceLevelObjective"o\n\x1fGetServiceLevelObjectiveRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x04view\x18\x02 \x01(\x0e\x32\x30.google.monitoring.v3.ServiceLevelObjective.View"\xaa\x01\n!ListServiceLevelObjectivesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12>\n\x04view\x18\x05 \x01(\x0e\x32\x30.google.monitoring.v3.ServiceLevelObjective.View"\x8c\x01\n"ListServiceLevelObjectivesResponse\x12M\n\x18service_level_objectives\x18\x01 \x03(\x0b\x32+.google.monitoring.v3.ServiceLevelObjective\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xa3\x01\n"UpdateServiceLevelObjectiveRequest\x12L\n\x17service_level_objective\x18\x01 \x01(\x0b\x32+.google.monitoring.v3.ServiceLevelObjective\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"2\n"DeleteServiceLevelObjectiveRequest\x12\x0c\n\x04name\x18\x01 \x01(\t2\xe5\x0e\n\x18ServiceMonitoringService\x12\x86\x01\n\rCreateService\x12*.google.monitoring.v3.CreateServiceRequest\x1a\x1d.google.monitoring.v3.Service"*\x82\xd3\xe4\x93\x02$"\x19/v3/{parent=*/*}/services:\x07service\x12w\n\nGetService\x12\'.google.monitoring.v3.GetServiceRequest\x1a\x1d.google.monitoring.v3.Service"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v3/{name=*/*/services/*}\x12\x88\x01\n\x0cListServices\x12).google.monitoring.v3.ListServicesRequest\x1a*.google.monitoring.v3.ListServicesResponse"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v3/{parent=*/*}/services\x12\x8e\x01\n\rUpdateService\x12*.google.monitoring.v3.UpdateServiceRequest\x1a\x1d.google.monitoring.v3.Service"2\x82\xd3\xe4\x93\x02,2!/v3/{service.name=*/*/services/*}:\x07service\x12v\n\rDeleteService\x12*.google.monitoring.v3.DeleteServiceRequest\x1a\x16.google.protobuf.Empty"!\x82\xd3\xe4\x93\x02\x1b*\x19/v3/{name=*/*/services/*}\x12\xd9\x01\n\x1b\x43reateServiceLevelObjective\x12\x38.google.monitoring.v3.CreateServiceLevelObjectiveRequest\x1a+.google.monitoring.v3.ServiceLevelObjective"S\x82\xd3\xe4\x93\x02M"2/v3/{parent=*/*/services/*}/serviceLevelObjectives:\x17service_level_objective\x12\xba\x01\n\x18GetServiceLevelObjective\x12\x35.google.monitoring.v3.GetServiceLevelObjectiveRequest\x1a+.google.monitoring.v3.ServiceLevelObjective":\x82\xd3\xe4\x93\x02\x34\x12\x32/v3/{name=*/*/services/*/serviceLevelObjectives/*}\x12\xcb\x01\n\x1aListServiceLevelObjectives\x12\x37.google.monitoring.v3.ListServiceLevelObjectivesRequest\x1a\x38.google.monitoring.v3.ListServiceLevelObjectivesResponse":\x82\xd3\xe4\x93\x02\x34\x12\x32/v3/{parent=*/*/services/*}/serviceLevelObjectives\x12\xf1\x01\n\x1bUpdateServiceLevelObjective\x12\x38.google.monitoring.v3.UpdateServiceLevelObjectiveRequest\x1a+.google.monitoring.v3.ServiceLevelObjective"k\x82\xd3\xe4\x93\x02\x65\x32J/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}:\x17service_level_objective\x12\xab\x01\n\x1b\x44\x65leteServiceLevelObjective\x12\x38.google.monitoring.v3.DeleteServiceLevelObjectiveRequest\x1a\x16.google.protobuf.Empty":\x82\xd3\xe4\x93\x02\x34*2/v3/{name=*/*/services/*/serviceLevelObjectives/*}\x1a\xa9\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\x89\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readB\xb5\x01\n\x18\x63om.google.monitoring.v3B\x1dServiceMonitoringServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n6google/cloud/monitoring_v3/proto/service_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/monitoring_v3/proto/service.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\x9a\x01\n\x14\x43reateServiceRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!monitoring.googleapis.com/Service\x12\x12\n\nservice_id\x18\x03 \x01(\t\x12\x33\n\x07service\x18\x02 \x01(\x0b\x32\x1d.google.monitoring.v3.ServiceB\x03\xe0\x41\x02"L\n\x11GetServiceRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!monitoring.googleapis.com/Service"\x87\x01\n\x13ListServicesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!monitoring.googleapis.com/Service\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"`\n\x14ListServicesResponse\x12/\n\x08services\x18\x01 \x03(\x0b\x32\x1d.google.monitoring.v3.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"|\n\x14UpdateServiceRequest\x12\x33\n\x07service\x18\x01 \x01(\x0b\x32\x1d.google.monitoring.v3.ServiceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"O\n\x14\x44\x65leteServiceRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!monitoring.googleapis.com/Service"\xd6\x01\n"CreateServiceLevelObjectiveRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!monitoring.googleapis.com/Service\x12"\n\x1aservice_level_objective_id\x18\x03 \x01(\t\x12Q\n\x17service_level_objective\x18\x02 \x01(\x0b\x32+.google.monitoring.v3.ServiceLevelObjectiveB\x03\xe0\x41\x02"\xa8\x01\n\x1fGetServiceLevelObjectiveRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/monitoring.googleapis.com/ServiceLevelObjective\x12>\n\x04view\x18\x02 \x01(\x0e\x32\x30.google.monitoring.v3.ServiceLevelObjective.View"\xd5\x01\n!ListServiceLevelObjectivesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!monitoring.googleapis.com/Service\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12>\n\x04view\x18\x05 \x01(\x0e\x32\x30.google.monitoring.v3.ServiceLevelObjective.View"\x8c\x01\n"ListServiceLevelObjectivesResponse\x12M\n\x18service_level_objectives\x18\x01 \x03(\x0b\x32+.google.monitoring.v3.ServiceLevelObjective\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xa8\x01\n"UpdateServiceLevelObjectiveRequest\x12Q\n\x17service_level_objective\x18\x01 \x01(\x0b\x32+.google.monitoring.v3.ServiceLevelObjectiveB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"k\n"DeleteServiceLevelObjectiveRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/monitoring.googleapis.com/ServiceLevelObjective2\xea\x0f\n\x18ServiceMonitoringService\x12\x97\x01\n\rCreateService\x12*.google.monitoring.v3.CreateServiceRequest\x1a\x1d.google.monitoring.v3.Service";\x82\xd3\xe4\x93\x02$"\x19/v3/{parent=*/*}/services:\x07service\xda\x41\x0eparent,service\x12~\n\nGetService\x12\'.google.monitoring.v3.GetServiceRequest\x1a\x1d.google.monitoring.v3.Service"(\x82\xd3\xe4\x93\x02\x1b\x12\x19/v3/{name=*/*/services/*}\xda\x41\x04name\x12\x91\x01\n\x0cListServices\x12).google.monitoring.v3.ListServicesRequest\x1a*.google.monitoring.v3.ListServicesResponse"*\x82\xd3\xe4\x93\x02\x1b\x12\x19/v3/{parent=*/*}/services\xda\x41\x06parent\x12\x98\x01\n\rUpdateService\x12*.google.monitoring.v3.UpdateServiceRequest\x1a\x1d.google.monitoring.v3.Service"<\x82\xd3\xe4\x93\x02,2!/v3/{service.name=*/*/services/*}:\x07service\xda\x41\x07service\x12}\n\rDeleteService\x12*.google.monitoring.v3.DeleteServiceRequest\x1a\x16.google.protobuf.Empty"(\x82\xd3\xe4\x93\x02\x1b*\x19/v3/{name=*/*/services/*}\xda\x41\x04name\x12\xfa\x01\n\x1b\x43reateServiceLevelObjective\x12\x38.google.monitoring.v3.CreateServiceLevelObjectiveRequest\x1a+.google.monitoring.v3.ServiceLevelObjective"t\x82\xd3\xe4\x93\x02M"2/v3/{parent=*/*/services/*}/serviceLevelObjectives:\x17service_level_objective\xda\x41\x1eparent,service_level_objective\x12\xc1\x01\n\x18GetServiceLevelObjective\x12\x35.google.monitoring.v3.GetServiceLevelObjectiveRequest\x1a+.google.monitoring.v3.ServiceLevelObjective"A\x82\xd3\xe4\x93\x02\x34\x12\x32/v3/{name=*/*/services/*/serviceLevelObjectives/*}\xda\x41\x04name\x12\xd4\x01\n\x1aListServiceLevelObjectives\x12\x37.google.monitoring.v3.ListServiceLevelObjectivesRequest\x1a\x38.google.monitoring.v3.ListServiceLevelObjectivesResponse"C\x82\xd3\xe4\x93\x02\x34\x12\x32/v3/{parent=*/*/services/*}/serviceLevelObjectives\xda\x41\x06parent\x12\x8c\x02\n\x1bUpdateServiceLevelObjective\x12\x38.google.monitoring.v3.UpdateServiceLevelObjectiveRequest\x1a+.google.monitoring.v3.ServiceLevelObjective"\x85\x01\x82\xd3\xe4\x93\x02\x65\x32J/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}:\x17service_level_objective\xda\x41\x17service_level_objective\x12\xb2\x01\n\x1b\x44\x65leteServiceLevelObjective\x12\x38.google.monitoring.v3.DeleteServiceLevelObjectiveRequest\x1a\x16.google.protobuf.Empty"A\x82\xd3\xe4\x93\x02\x34*2/v3/{name=*/*/services/*/serviceLevelObjectives/*}\xda\x41\x04name\x1a\xa9\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\x89\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readB\xd5\x01\n\x18\x63om.google.monitoring.v3B\x1dServiceMonitoringServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, - google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_service__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -70,7 +70,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\022!monitoring.googleapis.com/Service" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -106,7 +108,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -118,8 +120,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=283, - serialized_end=389, + serialized_start=307, + serialized_end=461, ) @@ -145,9 +147,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!monitoring.googleapis.com/Service" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -157,8 +161,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=391, - serialized_end=424, + serialized_start=463, + serialized_end=539, ) @@ -184,7 +188,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\022!monitoring.googleapis.com/Service" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -250,8 +256,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=426, - serialized_end=518, + serialized_start=542, + serialized_end=677, ) @@ -307,8 +313,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=520, - serialized_end=616, + serialized_start=679, + serialized_end=775, ) @@ -334,7 +340,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -364,8 +370,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=618, - serialized_end=737, + serialized_start=777, + serialized_end=901, ) @@ -391,9 +397,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!monitoring.googleapis.com/Service" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -403,8 +411,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=739, - serialized_end=775, + serialized_start=903, + serialized_end=982, ) @@ -430,7 +438,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!monitoring.googleapis.com/Service" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -466,7 +476,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -478,8 +488,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=778, - serialized_end=944, + serialized_start=985, + serialized_end=1199, ) @@ -505,7 +515,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A1\n/monitoring.googleapis.com/ServiceLevelObjective" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -535,8 +547,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=946, - serialized_end=1057, + serialized_start=1202, + serialized_end=1370, ) @@ -562,7 +574,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!monitoring.googleapis.com/Service" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -646,8 +660,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1060, - serialized_end=1230, + serialized_start=1373, + serialized_end=1586, ) @@ -703,8 +717,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1233, - serialized_end=1373, + serialized_start=1589, + serialized_end=1729, ) @@ -730,7 +744,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -760,8 +774,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1376, - serialized_end=1539, + serialized_start=1732, + serialized_end=1900, ) @@ -787,9 +801,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A1\n/monitoring.googleapis.com/ServiceLevelObjective" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -799,8 +815,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1541, - serialized_end=1591, + serialized_start=1902, + serialized_end=2009, ) _CREATESERVICEREQUEST.fields_by_name[ @@ -876,18 +892,16 @@ DESCRIPTOR=_CREATESERVICEREQUEST, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``CreateService`` request. - - Attributes: parent: - Resource name of the parent workspace. Of the form - ``projects/{project_id}``. + Required. Resource name of the parent workspace. The format + is: :: projects/[PROJECT_ID_OR_NUMBER] service_id: Optional. The Service id to use for this Service. If omitted, an id will be generated instead. Must match the pattern - [a-z0-9-]+ + ``[a-z0-9\-]+`` service: - The ``Service`` to create. + Required. The ``Service`` to create. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.CreateServiceRequest) ), @@ -901,12 +915,10 @@ DESCRIPTOR=_GETSERVICEREQUEST, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``GetService`` request. - - Attributes: name: - Resource name of the ``Service``. Of the form - ``projects/{project_id}/services/{service_id}``. + Required. Resource name of the ``Service``. The format is: :: + projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.GetServiceRequest) ), @@ -920,12 +932,12 @@ DESCRIPTOR=_LISTSERVICESREQUEST, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``ListServices`` request. - - Attributes: parent: - Resource name of the parent ``Workspace``. Of the form - ``projects/{project_id}``. + Required. Resource name of the parent containing the listed + services, either a project or a Monitoring Workspace. The + formats are: :: projects/[PROJECT_ID_OR_NUMBER] + workspaces/[HOST_PROJECT_ID_OR_NUMBER] filter: A filter specifying what ``Service``\ s to return. The filter currently supports the following fields: :: - @@ -960,15 +972,13 @@ DESCRIPTOR=_LISTSERVICESRESPONSE, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``ListServices`` response. - - Attributes: services: The ``Service``\ s matching the specified filter. next_page_token: If there are more results than have been returned, then this field is set to a non-empty value. To see the additional - results, use that value as ``pageToken`` in the next call to + results, use that value as ``page_token`` in the next call to this method. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.ListServicesResponse) @@ -983,12 +993,10 @@ DESCRIPTOR=_UPDATESERVICEREQUEST, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``UpdateService`` request. - - Attributes: service: - The ``Service`` to draw updates from. The given ``name`` - specifies the resource to update. + Required. The ``Service`` to draw updates from. The given + ``name`` specifies the resource to update. update_mask: A set of field paths defining which fields to use for the update. @@ -1005,12 +1013,11 @@ DESCRIPTOR=_DELETESERVICEREQUEST, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``DeleteService`` request. - - Attributes: name: - Resource name of the ``Service`` to delete. Of the form - ``projects/{project_id}/service/{service_id}``. + Required. Resource name of the ``Service`` to delete. The + format is: :: + projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.DeleteServiceRequest) ), @@ -1024,20 +1031,19 @@ DESCRIPTOR=_CREATESERVICELEVELOBJECTIVEREQUEST, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``CreateServiceLevelObjective`` request. - - Attributes: parent: - Resource name of the parent ``Service``. Of the form - ``projects/{project_id}/services/{service_id}``. + Required. Resource name of the parent ``Service``. The format + is: :: + projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] service_level_objective_id: Optional. The ServiceLevelObjective id to use for this ServiceLevelObjective. If omitted, an id will be generated - instead. Must match the pattern [a-z0-9-]+ + instead. Must match the pattern ``[a-z0-9\-]+`` service_level_objective: - The ``ServiceLevelObjective`` to create. The provided ``name`` - will be respected if no ``ServiceLevelObjective`` exists with - this name. + Required. The ``ServiceLevelObjective`` to create. The + provided ``name`` will be respected if no + ``ServiceLevelObjective`` exists with this name. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.CreateServiceLevelObjectiveRequest) ), @@ -1051,13 +1057,11 @@ DESCRIPTOR=_GETSERVICELEVELOBJECTIVEREQUEST, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``GetServiceLevelObjective`` request. - - Attributes: name: - Resource name of the ``ServiceLevelObjective`` to get. Of the - form ``projects/{project_id}/services/{service_id}/serviceLeve - lObjectives/{slo_name}``. + Required. Resource name of the ``ServiceLevelObjective`` to + get. The format is: :: projects/[PROJECT_ID_OR_NUMBER]/s + ervices/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] view: View of the ``ServiceLevelObjective`` to return. If ``DEFAULT``, return the ``ServiceLevelObjective`` as @@ -1078,12 +1082,13 @@ DESCRIPTOR=_LISTSERVICELEVELOBJECTIVESREQUEST, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``ListServiceLevelObjectives`` request. - - Attributes: parent: - Resource name of the parent ``Service``. Of the form - ``projects/{project_id}/services/{service_id}``. + Required. Resource name of the parent containing the listed + SLOs, either a project or a Monitoring Workspace. The formats + are: :: + projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- filter: A filter specifying what ``ServiceLevelObjective``\ s to return. @@ -1115,8 +1120,6 @@ DESCRIPTOR=_LISTSERVICELEVELOBJECTIVESRESPONSE, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``ListServiceLevelObjectives`` response. - - Attributes: service_level_objectives: The ``ServiceLevelObjective``\ s matching the specified @@ -1124,7 +1127,7 @@ next_page_token: If there are more results than have been returned, then this field is set to a non-empty value. To see the additional - results, use that value as ``pageToken`` in the next call to + results, use that value as ``page_token`` in the next call to this method. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.ListServiceLevelObjectivesResponse) @@ -1139,12 +1142,10 @@ DESCRIPTOR=_UPDATESERVICELEVELOBJECTIVEREQUEST, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``UpdateServiceLevelObjective`` request. - - Attributes: service_level_objective: - The ``ServiceLevelObjective`` to draw updates from. The given - ``name`` specifies the resource to update. + Required. The ``ServiceLevelObjective`` to draw updates from. + The given ``name`` specifies the resource to update. update_mask: A set of field paths defining which fields to use for the update. @@ -1161,13 +1162,11 @@ DESCRIPTOR=_DELETESERVICELEVELOBJECTIVEREQUEST, __module__="google.cloud.monitoring_v3.proto.service_service_pb2", __doc__="""The ``DeleteServiceLevelObjective`` request. - - Attributes: name: - Resource name of the ``ServiceLevelObjective`` to delete. Of - the form ``projects/{project_id}/services/{service_id}/service - LevelObjectives/{slo_name}``. + Required. Resource name of the ``ServiceLevelObjective`` to + delete. The format is: :: projects/[PROJECT_ID_OR_NUMBER + ]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.DeleteServiceLevelObjectiveRequest) ), @@ -1176,6 +1175,22 @@ DESCRIPTOR._options = None +_CREATESERVICEREQUEST.fields_by_name["parent"]._options = None +_CREATESERVICEREQUEST.fields_by_name["service"]._options = None +_GETSERVICEREQUEST.fields_by_name["name"]._options = None +_LISTSERVICESREQUEST.fields_by_name["parent"]._options = None +_UPDATESERVICEREQUEST.fields_by_name["service"]._options = None +_DELETESERVICEREQUEST.fields_by_name["name"]._options = None +_CREATESERVICELEVELOBJECTIVEREQUEST.fields_by_name["parent"]._options = None +_CREATESERVICELEVELOBJECTIVEREQUEST.fields_by_name[ + "service_level_objective" +]._options = None +_GETSERVICELEVELOBJECTIVEREQUEST.fields_by_name["name"]._options = None +_LISTSERVICELEVELOBJECTIVESREQUEST.fields_by_name["parent"]._options = None +_UPDATESERVICELEVELOBJECTIVEREQUEST.fields_by_name[ + "service_level_objective" +]._options = None +_DELETESERVICELEVELOBJECTIVEREQUEST.fields_by_name["name"]._options = None _SERVICEMONITORINGSERVICE = _descriptor.ServiceDescriptor( name="ServiceMonitoringService", @@ -1185,8 +1200,8 @@ serialized_options=_b( "\312A\031monitoring.googleapis.com\322A\211\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" ), - serialized_start=1594, - serialized_end=3487, + serialized_start=2012, + serialized_end=4038, methods=[ _descriptor.MethodDescriptor( name="CreateService", @@ -1196,7 +1211,7 @@ input_type=_CREATESERVICEREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_service__pb2._SERVICE, serialized_options=_b( - '\202\323\344\223\002$"\031/v3/{parent=*/*}/services:\007service' + '\202\323\344\223\002$"\031/v3/{parent=*/*}/services:\007service\332A\016parent,service' ), ), _descriptor.MethodDescriptor( @@ -1207,7 +1222,7 @@ input_type=_GETSERVICEREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_service__pb2._SERVICE, serialized_options=_b( - "\202\323\344\223\002\033\022\031/v3/{name=*/*/services/*}" + "\202\323\344\223\002\033\022\031/v3/{name=*/*/services/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1218,7 +1233,7 @@ input_type=_LISTSERVICESREQUEST, output_type=_LISTSERVICESRESPONSE, serialized_options=_b( - "\202\323\344\223\002\033\022\031/v3/{parent=*/*}/services" + "\202\323\344\223\002\033\022\031/v3/{parent=*/*}/services\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -1229,7 +1244,7 @@ input_type=_UPDATESERVICEREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_service__pb2._SERVICE, serialized_options=_b( - "\202\323\344\223\002,2!/v3/{service.name=*/*/services/*}:\007service" + "\202\323\344\223\002,2!/v3/{service.name=*/*/services/*}:\007service\332A\007service" ), ), _descriptor.MethodDescriptor( @@ -1240,7 +1255,7 @@ input_type=_DELETESERVICEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002\033*\031/v3/{name=*/*/services/*}" + "\202\323\344\223\002\033*\031/v3/{name=*/*/services/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1251,7 +1266,7 @@ input_type=_CREATESERVICELEVELOBJECTIVEREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_service__pb2._SERVICELEVELOBJECTIVE, serialized_options=_b( - '\202\323\344\223\002M"2/v3/{parent=*/*/services/*}/serviceLevelObjectives:\027service_level_objective' + '\202\323\344\223\002M"2/v3/{parent=*/*/services/*}/serviceLevelObjectives:\027service_level_objective\332A\036parent,service_level_objective' ), ), _descriptor.MethodDescriptor( @@ -1262,7 +1277,7 @@ input_type=_GETSERVICELEVELOBJECTIVEREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_service__pb2._SERVICELEVELOBJECTIVE, serialized_options=_b( - "\202\323\344\223\0024\0222/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + "\202\323\344\223\0024\0222/v3/{name=*/*/services/*/serviceLevelObjectives/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1273,7 +1288,7 @@ input_type=_LISTSERVICELEVELOBJECTIVESREQUEST, output_type=_LISTSERVICELEVELOBJECTIVESRESPONSE, serialized_options=_b( - "\202\323\344\223\0024\0222/v3/{parent=*/*/services/*}/serviceLevelObjectives" + "\202\323\344\223\0024\0222/v3/{parent=*/*/services/*}/serviceLevelObjectives\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -1284,7 +1299,7 @@ input_type=_UPDATESERVICELEVELOBJECTIVEREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_service__pb2._SERVICELEVELOBJECTIVE, serialized_options=_b( - "\202\323\344\223\002e2J/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}:\027service_level_objective" + "\202\323\344\223\002e2J/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}:\027service_level_objective\332A\027service_level_objective" ), ), _descriptor.MethodDescriptor( @@ -1295,7 +1310,7 @@ input_type=_DELETESERVICELEVELOBJECTIVEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\0024*2/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + "\202\323\344\223\0024*2/v3/{name=*/*/services/*/serviceLevelObjectives/*}\332A\004name" ), ), ], diff --git a/google/cloud/monitoring_v3/proto/service_service_pb2_grpc.py b/google/cloud/monitoring_v3/proto/service_service_pb2_grpc.py index 3c03dc9c..d9bc2479 100644 --- a/google/cloud/monitoring_v3/proto/service_service_pb2_grpc.py +++ b/google/cloud/monitoring_v3/proto/service_service_pb2_grpc.py @@ -11,7 +11,7 @@ class ServiceMonitoringServiceStub(object): - """The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for + """The Cloud Monitoring Service-Oriented Monitoring API has endpoints for managing and querying aspects of a workspace's services. These include the `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy of categorized Health Metrics. @@ -76,7 +76,7 @@ def __init__(self, channel): class ServiceMonitoringServiceServicer(object): - """The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for + """The Cloud Monitoring Service-Oriented Monitoring API has endpoints for managing and querying aspects of a workspace's services. These include the `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy of categorized Health Metrics. diff --git a/google/cloud/monitoring_v3/proto/span_context.proto b/google/cloud/monitoring_v3/proto/span_context.proto index cbcb8f72..72cce35f 100644 --- a/google/cloud/monitoring_v3/proto/span_context.proto +++ b/google/cloud/monitoring_v3/proto/span_context.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -23,21 +22,24 @@ option java_multiple_files = true; option java_outer_classname = "SpanContextProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; -// The context of a span, attached to google.api.Distribution.Exemplars -// in google.api.Distribution values during aggregation. +// The context of a span, attached to +// [Exemplars][google.api.Distribution.Exemplars] +// in [Distribution][google.api.Distribution] values during aggregation. // // It contains the name of a span with format: -// projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] +// +// projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] message SpanContext { - // The resource name of the span in the following format: + // The resource name of the span. The format is: // - // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] + // projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] // - // [TRACE_ID] is a unique identifier for a trace within a project; + // `[TRACE_ID]` is a unique identifier for a trace within a project; // it is a 32-character hexadecimal encoding of a 16-byte array. // - // [SPAN_ID] is a unique identifier for a span within a trace; it + // `[SPAN_ID]` is a unique identifier for a span within a trace; it // is a 16-character hexadecimal encoding of an 8-byte array. string span_name = 1; } diff --git a/google/cloud/monitoring_v3/proto/span_context_pb2.py b/google/cloud/monitoring_v3/proto/span_context_pb2.py index b3017f46..92b13954 100644 --- a/google/cloud/monitoring_v3/proto/span_context_pb2.py +++ b/google/cloud/monitoring_v3/proto/span_context_pb2.py @@ -20,10 +20,10 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\020SpanContextProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\020SpanContextProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n3google/cloud/monitoring_v3/proto/span_context.proto\x12\x14google.monitoring.v3" \n\x0bSpanContext\x12\x11\n\tspan_name\x18\x01 \x01(\tB\xa8\x01\n\x18\x63om.google.monitoring.v3B\x10SpanContextProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n3google/cloud/monitoring_v3/proto/span_context.proto\x12\x14google.monitoring.v3" \n\x0bSpanContext\x12\x11\n\tspan_name\x18\x01 \x01(\tB\xc8\x01\n\x18\x63om.google.monitoring.v3B\x10SpanContextProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), ) @@ -52,7 +52,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -75,22 +75,20 @@ dict( DESCRIPTOR=_SPANCONTEXT, __module__="google.cloud.monitoring_v3.proto.span_context_pb2", - __doc__="""The context of a span, attached to google.api.Distribution.Exemplars in - google.api.Distribution values during aggregation. - - It contains the name of a span with format: - projects/[PROJECT\_ID]/traces/[TRACE\_ID]/spans/[SPAN\_ID] - - + __doc__="""The context of a span, attached to + [Exemplars][google.api.Distribution.Exemplars] in + [Distribution][google.api.Distribution] values during aggregation. It + contains the name of a span with format: :: + projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] Attributes: span_name: - The resource name of the span in the following format: :: - projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] - [TRACE\_ID] is a unique identifier for a trace within a + The resource name of the span. The format is: :: project + s/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] + ``[TRACE_ID]`` is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a - 16-byte array. [SPAN\_ID] is a unique identifier for a span - within a trace; it is a 16-character hexadecimal encoding of - an 8-byte array. + 16-byte array. ``[SPAN_ID]`` is a unique identifier for a + span within a trace; it is a 16-character hexadecimal encoding + of an 8-byte array. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.SpanContext) ), diff --git a/google/cloud/monitoring_v3/proto/uptime.proto b/google/cloud/monitoring_v3/proto/uptime.proto index eb424e97..54a9b11e 100644 --- a/google/cloud/monitoring_v3/proto/uptime.proto +++ b/google/cloud/monitoring_v3/proto/uptime.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; @@ -26,6 +26,7 @@ option java_multiple_files = true; option java_outer_classname = "UptimeProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // An internal checker allows Uptime checks to run on private/internal GCP // resources. @@ -56,9 +57,9 @@ message InternalChecker { // A unique resource name for this InternalChecker. The format is: // - // `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`. + // projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] // - // `[PROJECT_ID]` is the Stackdriver Workspace project for the + // `[PROJECT_ID_OR_NUMBER]` is the Stackdriver Workspace project for the // Uptime check config associated with the internal checker. string name = 1; @@ -107,11 +108,20 @@ enum UptimeCheckRegion { // This message configures which resources and services to monitor for // availability. message UptimeCheckConfig { + option (google.api.resource) = { + type: "monitoring.googleapis.com/UptimeCheckConfig" + pattern: "projects/{project}/uptimeCheckConfigs/{uptime_check_config}" + pattern: "organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}" + pattern: "folders/{folder}/uptimeCheckConfigs/{uptime_check_config}" + pattern: "*" + }; + // The resource submessage for group checks. It can be used instead of a // monitored resource, when multiple resources are being monitored. message ResourceGroup { // The group of resources being monitored. Should be only the `[GROUP_ID]`, - // and not the full-path `projects/[PROJECT_ID]/groups/[GROUP_ID]`. + // and not the full-path + // `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. string group_id = 1; // The resource type of the group members. @@ -132,6 +142,34 @@ message UptimeCheckConfig { string password = 2; } + // The HTTP request method options. + enum RequestMethod { + // No request method specified. + METHOD_UNSPECIFIED = 0; + + // GET request. + GET = 1; + + // POST request. + POST = 2; + } + + // Header options corresponding to the Content-Type of the body in HTTP + // requests. Note that a `Content-Type` header cannot be present in the + // `headers` field if this field is specified. + enum ContentType { + // No content type specified. If the request method is POST, an + // unspecified content type results in a check creation rejection. + TYPE_UNSPECIFIED = 0; + + // `body` is in URL-encoded form. Equivalent to setting the `Content-Type` + // to `application/x-www-form-urlencoded` in the HTTP request. + URL_ENCODED = 1; + } + + // The HTTP request method to use for the check. + RequestMethod request_method = 8; + // If `true`, use HTTPS instead of HTTP to run the check. bool use_ssl = 1; @@ -170,11 +208,21 @@ message UptimeCheckConfig { // The maximum number of headers allowed is 100. map headers = 6; + // The content type to use for the check. + ContentType content_type = 9; + // Boolean specifying whether to include SSL certificate validation as a // part of the Uptime check. Only applies to checks where // `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, // setting `validate_ssl` to `true` has no effect. bool validate_ssl = 7; + + // The request body associated with the HTTP request. If `content_type` is + // `URL_ENCODED`, the body passed in must be URL-encoded. Users can provide + // a `Content-Length` header via the `headers` field or the API will do + // so. The maximum byte size is 1 megabyte. Note: As with all `bytes` fields + // JSON representations are base64 encoded. + bytes body = 10; } // Information required for a TCP Uptime check request. @@ -229,7 +277,7 @@ message UptimeCheckConfig { // A unique resource name for this Uptime check configuration. The format is: // - // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] // // This field should be omitted when creating the Uptime check configuration; // on create, the resource name is assigned by the server and included in the diff --git a/google/cloud/monitoring_v3/proto/uptime_pb2.py b/google/cloud/monitoring_v3/proto/uptime_pb2.py index 8ed99b3b..5044c8ff 100644 --- a/google/cloud/monitoring_v3/proto/uptime_pb2.py +++ b/google/cloud/monitoring_v3/proto/uptime_pb2.py @@ -19,6 +19,7 @@ from google.api import ( monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2, ) +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 @@ -27,13 +28,14 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\013UptimeProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\013UptimeProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n-google/cloud/monitoring_v3/proto/uptime.proto\x12\x14google.monitoring.v3\x1a#google/api/monitored_resource.proto\x1a\x1egoogle/protobuf/duration.proto"\xe6\x01\n\x0fInternalChecker\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0f\n\x07network\x18\x03 \x01(\t\x12\x10\n\x08gcp_zone\x18\x04 \x01(\t\x12\x17\n\x0fpeer_project_id\x18\x06 \x01(\t\x12:\n\x05state\x18\x07 \x01(\x0e\x32+.google.monitoring.v3.InternalChecker.State"3\n\x05State\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02:\x02\x18\x01"\xd7\x0b\n\x11UptimeCheckConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12;\n\x12monitored_resource\x18\x03 \x01(\x0b\x32\x1d.google.api.MonitoredResourceH\x00\x12O\n\x0eresource_group\x18\x04 \x01(\x0b\x32\x35.google.monitoring.v3.UptimeCheckConfig.ResourceGroupH\x00\x12G\n\nhttp_check\x18\x05 \x01(\x0b\x32\x31.google.monitoring.v3.UptimeCheckConfig.HttpCheckH\x01\x12\x45\n\ttcp_check\x18\x06 \x01(\x0b\x32\x30.google.monitoring.v3.UptimeCheckConfig.TcpCheckH\x01\x12)\n\x06period\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12P\n\x10\x63ontent_matchers\x18\t \x03(\x0b\x32\x36.google.monitoring.v3.UptimeCheckConfig.ContentMatcher\x12\x41\n\x10selected_regions\x18\n \x03(\x0e\x32\'.google.monitoring.v3.UptimeCheckRegion\x12\x17\n\x0bis_internal\x18\x0f \x01(\x08\x42\x02\x18\x01\x12\x44\n\x11internal_checkers\x18\x0e \x03(\x0b\x32%.google.monitoring.v3.InternalCheckerB\x02\x18\x01\x1a\x61\n\rResourceGroup\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12>\n\rresource_type\x18\x02 \x01(\x0e\x32\'.google.monitoring.v3.GroupResourceType\x1a\xfa\x02\n\tHttpCheck\x12\x0f\n\x07use_ssl\x18\x01 \x01(\x08\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\x05\x12X\n\tauth_info\x18\x04 \x01(\x0b\x32\x45.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication\x12\x14\n\x0cmask_headers\x18\x05 \x01(\x08\x12O\n\x07headers\x18\x06 \x03(\x0b\x32>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.HeadersEntry\x12\x14\n\x0cvalidate_ssl\x18\x07 \x01(\x08\x1a\x39\n\x13\x42\x61sicAuthentication\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x18\n\x08TcpCheck\x12\x0c\n\x04port\x18\x01 \x01(\x05\x1a\x98\x02\n\x0e\x43ontentMatcher\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\\\n\x07matcher\x18\x02 \x01(\x0e\x32K.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption"\x96\x01\n\x14\x43ontentMatcherOption\x12&\n"CONTENT_MATCHER_OPTION_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43ONTAINS_STRING\x10\x01\x12\x17\n\x13NOT_CONTAINS_STRING\x10\x02\x12\x11\n\rMATCHES_REGEX\x10\x03\x12\x15\n\x11NOT_MATCHES_REGEX\x10\x04\x42\n\n\x08resourceB\x14\n\x12\x63heck_request_type"n\n\rUptimeCheckIp\x12\x37\n\x06region\x18\x01 \x01(\x0e\x32\'.google.monitoring.v3.UptimeCheckRegion\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x12\n\nip_address\x18\x03 \x01(\t*e\n\x11UptimeCheckRegion\x12\x16\n\x12REGION_UNSPECIFIED\x10\x00\x12\x07\n\x03USA\x10\x01\x12\n\n\x06\x45UROPE\x10\x02\x12\x11\n\rSOUTH_AMERICA\x10\x03\x12\x10\n\x0c\x41SIA_PACIFIC\x10\x04*[\n\x11GroupResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INSTANCE\x10\x01\x12\x19\n\x15\x41WS_ELB_LOAD_BALANCER\x10\x02\x42\xa3\x01\n\x18\x63om.google.monitoring.v3B\x0bUptimeProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n-google/cloud/monitoring_v3/proto/uptime.proto\x12\x14google.monitoring.v3\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto"\xe6\x01\n\x0fInternalChecker\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0f\n\x07network\x18\x03 \x01(\t\x12\x10\n\x08gcp_zone\x18\x04 \x01(\t\x12\x17\n\x0fpeer_project_id\x18\x06 \x01(\t\x12:\n\x05state\x18\x07 \x01(\x0e\x32+.google.monitoring.v3.InternalChecker.State"3\n\x05State\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02:\x02\x18\x01"\xfb\x0f\n\x11UptimeCheckConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12;\n\x12monitored_resource\x18\x03 \x01(\x0b\x32\x1d.google.api.MonitoredResourceH\x00\x12O\n\x0eresource_group\x18\x04 \x01(\x0b\x32\x35.google.monitoring.v3.UptimeCheckConfig.ResourceGroupH\x00\x12G\n\nhttp_check\x18\x05 \x01(\x0b\x32\x31.google.monitoring.v3.UptimeCheckConfig.HttpCheckH\x01\x12\x45\n\ttcp_check\x18\x06 \x01(\x0b\x32\x30.google.monitoring.v3.UptimeCheckConfig.TcpCheckH\x01\x12)\n\x06period\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12P\n\x10\x63ontent_matchers\x18\t \x03(\x0b\x32\x36.google.monitoring.v3.UptimeCheckConfig.ContentMatcher\x12\x41\n\x10selected_regions\x18\n \x03(\x0e\x32\'.google.monitoring.v3.UptimeCheckRegion\x12\x17\n\x0bis_internal\x18\x0f \x01(\x08\x42\x02\x18\x01\x12\x44\n\x11internal_checkers\x18\x0e \x03(\x0b\x32%.google.monitoring.v3.InternalCheckerB\x02\x18\x01\x1a\x61\n\rResourceGroup\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12>\n\rresource_type\x18\x02 \x01(\x0e\x32\'.google.monitoring.v3.GroupResourceType\x1a\xa8\x05\n\tHttpCheck\x12W\n\x0erequest_method\x18\x08 \x01(\x0e\x32?.google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod\x12\x0f\n\x07use_ssl\x18\x01 \x01(\x08\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\x05\x12X\n\tauth_info\x18\x04 \x01(\x0b\x32\x45.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication\x12\x14\n\x0cmask_headers\x18\x05 \x01(\x08\x12O\n\x07headers\x18\x06 \x03(\x0b\x32>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.HeadersEntry\x12S\n\x0c\x63ontent_type\x18\t \x01(\x0e\x32=.google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType\x12\x14\n\x0cvalidate_ssl\x18\x07 \x01(\x08\x12\x0c\n\x04\x62ody\x18\n \x01(\x0c\x1a\x39\n\x13\x42\x61sicAuthentication\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01":\n\rRequestMethod\x12\x16\n\x12METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03GET\x10\x01\x12\x08\n\x04POST\x10\x02"4\n\x0b\x43ontentType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bURL_ENCODED\x10\x01\x1a\x18\n\x08TcpCheck\x12\x0c\n\x04port\x18\x01 \x01(\x05\x1a\x98\x02\n\x0e\x43ontentMatcher\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\\\n\x07matcher\x18\x02 \x01(\x0e\x32K.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption"\x96\x01\n\x14\x43ontentMatcherOption\x12&\n"CONTENT_MATCHER_OPTION_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43ONTAINS_STRING\x10\x01\x12\x17\n\x13NOT_CONTAINS_STRING\x10\x02\x12\x11\n\rMATCHES_REGEX\x10\x03\x12\x15\n\x11NOT_MATCHES_REGEX\x10\x04:\xf3\x01\xea\x41\xef\x01\n+monitoring.googleapis.com/UptimeCheckConfig\x12;projects/{project}/uptimeCheckConfigs/{uptime_check_config}\x12\x45organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}\x12\x39\x66olders/{folder}/uptimeCheckConfigs/{uptime_check_config}\x12\x01*B\n\n\x08resourceB\x14\n\x12\x63heck_request_type"n\n\rUptimeCheckIp\x12\x37\n\x06region\x18\x01 \x01(\x0e\x32\'.google.monitoring.v3.UptimeCheckRegion\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x12\n\nip_address\x18\x03 \x01(\t*e\n\x11UptimeCheckRegion\x12\x16\n\x12REGION_UNSPECIFIED\x10\x00\x12\x07\n\x03USA\x10\x01\x12\n\n\x06\x45UROPE\x10\x02\x12\x11\n\rSOUTH_AMERICA\x10\x03\x12\x10\n\x0c\x41SIA_PACIFIC\x10\x04*[\n\x11GroupResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INSTANCE\x10\x01\x12\x19\n\x15\x41WS_ELB_LOAD_BALANCER\x10\x02\x42\xc3\x01\n\x18\x63om.google.monitoring.v3B\x0bUptimeProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), dependencies=[ google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, ], ) @@ -66,8 +68,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1983, - serialized_end=2084, + serialized_start=2558, + serialized_end=2659, ) _sym_db.RegisterEnumDescriptor(_UPTIMECHECKREGION) @@ -98,8 +100,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2086, - serialized_end=2177, + serialized_start=2661, + serialized_end=2752, ) _sym_db.RegisterEnumDescriptor(_GROUPRESOURCETYPE) @@ -132,11 +134,62 @@ ], containing_type=None, serialized_options=None, - serialized_start=316, - serialized_end=367, + serialized_start=343, + serialized_end=394, ) _sym_db.RegisterEnumDescriptor(_INTERNALCHECKER_STATE) +_UPTIMECHECKCONFIG_HTTPCHECK_REQUESTMETHOD = _descriptor.EnumDescriptor( + name="RequestMethod", + full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="METHOD_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="GET", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="POST", index=2, number=2, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=1743, + serialized_end=1801, +) +_sym_db.RegisterEnumDescriptor(_UPTIMECHECKCONFIG_HTTPCHECK_REQUESTMETHOD) + +_UPTIMECHECKCONFIG_HTTPCHECK_CONTENTTYPE = _descriptor.EnumDescriptor( + name="ContentType", + full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="TYPE_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="URL_ENCODED", index=1, number=1, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=1803, + serialized_end=1855, +) +_sym_db.RegisterEnumDescriptor(_UPTIMECHECKCONFIG_HTTPCHECK_CONTENTTYPE) + _UPTIMECHECKCONFIG_CONTENTMATCHER_CONTENTMATCHEROPTION = _descriptor.EnumDescriptor( name="ContentMatcherOption", full_name="google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption", @@ -177,8 +230,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1685, - serialized_end=1835, + serialized_start=2014, + serialized_end=2164, ) _sym_db.RegisterEnumDescriptor(_UPTIMECHECKCONFIG_CONTENTMATCHER_CONTENTMATCHEROPTION) @@ -301,14 +354,14 @@ ], extensions=[], nested_types=[], - enum_types=[_INTERNALCHECKER_STATE,], + enum_types=[_INTERNALCHECKER_STATE], serialized_options=_b("\030\001"), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=141, - serialized_end=371, + serialized_start=168, + serialized_end=398, ) @@ -364,8 +417,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1048, - serialized_end=1145, + serialized_start=1075, + serialized_end=1172, ) _UPTIMECHECKCONFIG_HTTPCHECK_BASICAUTHENTICATION = _descriptor.Descriptor( @@ -420,8 +473,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1421, - serialized_end=1478, + serialized_start=1636, + serialized_end=1693, ) _UPTIMECHECKCONFIG_HTTPCHECK_HEADERSENTRY = _descriptor.Descriptor( @@ -476,8 +529,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1480, - serialized_end=1526, + serialized_start=1695, + serialized_end=1741, ) _UPTIMECHECKCONFIG_HTTPCHECK = _descriptor.Descriptor( @@ -487,10 +540,28 @@ file=DESCRIPTOR, containing_type=None, fields=[ + _descriptor.FieldDescriptor( + name="request_method", + full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.request_method", + index=0, + number=8, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), _descriptor.FieldDescriptor( name="use_ssl", full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.use_ssl", - index=0, + index=1, number=1, type=8, cpp_type=7, @@ -508,7 +579,7 @@ _descriptor.FieldDescriptor( name="path", full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.path", - index=1, + index=2, number=2, type=9, cpp_type=9, @@ -526,7 +597,7 @@ _descriptor.FieldDescriptor( name="port", full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.port", - index=2, + index=3, number=3, type=5, cpp_type=1, @@ -544,7 +615,7 @@ _descriptor.FieldDescriptor( name="auth_info", full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.auth_info", - index=3, + index=4, number=4, type=11, cpp_type=10, @@ -562,7 +633,7 @@ _descriptor.FieldDescriptor( name="mask_headers", full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.mask_headers", - index=4, + index=5, number=5, type=8, cpp_type=7, @@ -580,7 +651,7 @@ _descriptor.FieldDescriptor( name="headers", full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.headers", - index=5, + index=6, number=6, type=11, cpp_type=10, @@ -595,10 +666,28 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="content_type", + full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.content_type", + index=7, + number=9, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), _descriptor.FieldDescriptor( name="validate_ssl", full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.validate_ssl", - index=6, + index=8, number=7, type=8, cpp_type=7, @@ -613,20 +702,41 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="body", + full_name="google.monitoring.v3.UptimeCheckConfig.HttpCheck.body", + index=9, + number=10, + type=12, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b(""), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[ _UPTIMECHECKCONFIG_HTTPCHECK_BASICAUTHENTICATION, _UPTIMECHECKCONFIG_HTTPCHECK_HEADERSENTRY, ], - enum_types=[], + enum_types=[ + _UPTIMECHECKCONFIG_HTTPCHECK_REQUESTMETHOD, + _UPTIMECHECKCONFIG_HTTPCHECK_CONTENTTYPE, + ], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1148, - serialized_end=1526, + serialized_start=1175, + serialized_end=1855, ) _UPTIMECHECKCONFIG_TCPCHECK = _descriptor.Descriptor( @@ -653,7 +763,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -663,8 +773,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1528, - serialized_end=1552, + serialized_start=1857, + serialized_end=1881, ) _UPTIMECHECKCONFIG_CONTENTMATCHER = _descriptor.Descriptor( @@ -713,14 +823,14 @@ ], extensions=[], nested_types=[], - enum_types=[_UPTIMECHECKCONFIG_CONTENTMATCHER_CONTENTMATCHEROPTION,], + enum_types=[_UPTIMECHECKCONFIG_CONTENTMATCHER_CONTENTMATCHEROPTION], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1555, - serialized_end=1835, + serialized_start=1884, + serialized_end=2164, ) _UPTIMECHECKCONFIG = _descriptor.Descriptor( @@ -955,7 +1065,9 @@ _UPTIMECHECKCONFIG_CONTENTMATCHER, ], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352A\357\001\n+monitoring.googleapis.com/UptimeCheckConfig\022;projects/{project}/uptimeCheckConfigs/{uptime_check_config}\022Eorganizations/{organization}/uptimeCheckConfigs/{uptime_check_config}\0229folders/{folder}/uptimeCheckConfigs/{uptime_check_config}\022\001*" + ), is_extendable=False, syntax="proto3", extension_ranges=[], @@ -975,8 +1087,8 @@ fields=[], ), ], - serialized_start=374, - serialized_end=1869, + serialized_start=401, + serialized_end=2444, ) @@ -1050,8 +1162,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1871, - serialized_end=1981, + serialized_start=2446, + serialized_end=2556, ) _INTERNALCHECKER.fields_by_name["state"].enum_type = _INTERNALCHECKER_STATE @@ -1064,13 +1176,23 @@ _UPTIMECHECKCONFIG_HTTPCHECK ) _UPTIMECHECKCONFIG_HTTPCHECK_HEADERSENTRY.containing_type = _UPTIMECHECKCONFIG_HTTPCHECK +_UPTIMECHECKCONFIG_HTTPCHECK.fields_by_name[ + "request_method" +].enum_type = _UPTIMECHECKCONFIG_HTTPCHECK_REQUESTMETHOD _UPTIMECHECKCONFIG_HTTPCHECK.fields_by_name[ "auth_info" ].message_type = _UPTIMECHECKCONFIG_HTTPCHECK_BASICAUTHENTICATION _UPTIMECHECKCONFIG_HTTPCHECK.fields_by_name[ "headers" ].message_type = _UPTIMECHECKCONFIG_HTTPCHECK_HEADERSENTRY +_UPTIMECHECKCONFIG_HTTPCHECK.fields_by_name[ + "content_type" +].enum_type = _UPTIMECHECKCONFIG_HTTPCHECK_CONTENTTYPE _UPTIMECHECKCONFIG_HTTPCHECK.containing_type = _UPTIMECHECKCONFIG +_UPTIMECHECKCONFIG_HTTPCHECK_REQUESTMETHOD.containing_type = ( + _UPTIMECHECKCONFIG_HTTPCHECK +) +_UPTIMECHECKCONFIG_HTTPCHECK_CONTENTTYPE.containing_type = _UPTIMECHECKCONFIG_HTTPCHECK _UPTIMECHECKCONFIG_TCPCHECK.containing_type = _UPTIMECHECKCONFIG _UPTIMECHECKCONFIG_CONTENTMATCHER.fields_by_name[ "matcher" @@ -1140,17 +1262,15 @@ dict( DESCRIPTOR=_INTERNALCHECKER, __module__="google.cloud.monitoring_v3.proto.uptime_pb2", - __doc__="""An internal checker allows Uptime checks to run on private/internal GCP - resources. - - + __doc__="""An internal checker allows Uptime checks to run on private/internal + GCP resources. Attributes: name: A unique resource name for this InternalChecker. The format - is: ``projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKE - R_ID]``. ``[PROJECT_ID]`` is the Stackdriver Workspace - project for the Uptime check config associated with the - internal checker. + is: :: projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/ + [INTERNAL_CHECKER_ID] ``[PROJECT_ID_OR_NUMBER]`` is the + Stackdriver Workspace project for the Uptime check config + associated with the internal checker. display_name: The checker's human-readable name. The display name should be unique within a Stackdriver Workspace in order to make it @@ -1186,13 +1306,11 @@ __module__="google.cloud.monitoring_v3.proto.uptime_pb2", __doc__="""The resource submessage for group checks. It can be used instead of a monitored resource, when multiple resources are being monitored. - - Attributes: group_id: The group of resources being monitored. Should be only the ``[GROUP_ID]``, and not the full-path - ``projects/[PROJECT_ID]/groups/[GROUP_ID]``. + ``projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]``. resource_type: The resource type of the group members. """, @@ -1211,10 +1329,8 @@ __module__="google.cloud.monitoring_v3.proto.uptime_pb2", __doc__="""The authentication parameters to provide to the specified resource or URL that requires a username and password. Currently, only `Basic HTTP - authentication `__ is supported in - Uptime checks. - - + authentication `__ is supported + in Uptime checks. Attributes: username: The username to use when authenticating with the HTTP server. @@ -1236,9 +1352,9 @@ DESCRIPTOR=_UPTIMECHECKCONFIG_HTTPCHECK, __module__="google.cloud.monitoring_v3.proto.uptime_pb2", __doc__="""Information involved in an HTTP/HTTPS Uptime check request. - - Attributes: + request_method: + The HTTP request method to use for the check. use_ssl: If ``true``, use HTTPS instead of HTTP to run the check. path: @@ -1274,12 +1390,21 @@ Entering two separate headers with the same key in a Create call will cause the first to be overwritten by the second. The maximum number of headers allowed is 100. + content_type: + The content type to use for the check. validate_ssl: Boolean specifying whether to include SSL certificate validation as a part of the Uptime check. Only applies to checks where ``monitored_resource`` is set to ``uptime_url``. If ``use_ssl`` is ``false``, setting ``validate_ssl`` to ``true`` has no effect. + body: + The request body associated with the HTTP request. If + ``content_type`` is ``URL_ENCODED``, the body passed in must + be URL-encoded. Users can provide a ``Content-Length`` header + via the ``headers`` field or the API will do so. The maximum + byte size is 1 megabyte. Note: As with all ``bytes`` fields + JSON representations are base64 encoded. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.UptimeCheckConfig.HttpCheck) ), @@ -1291,8 +1416,6 @@ DESCRIPTOR=_UPTIMECHECKCONFIG_TCPCHECK, __module__="google.cloud.monitoring_v3.proto.uptime_pb2", __doc__="""Information required for a TCP Uptime check request. - - Attributes: port: The TCP port on the server against which to run the check. @@ -1310,11 +1433,9 @@ __module__="google.cloud.monitoring_v3.proto.uptime_pb2", __doc__="""Optional. Used to perform content matching. This allows matching based on substrings and regular expressions, together with their negations. - Only the first 4 MB of an HTTP or HTTPS check's response (and the first - 1 MB of a TCP check's response) are examined for purposes of content - matching. - - + Only the first 4 MB of an HTTP or HTTPS check's response (and the + first 1 MB of a TCP check's response) are examined for purposes of + content matching. Attributes: content: String or regex content to match. Maximum 1024 bytes. An empty @@ -1332,15 +1453,14 @@ __module__="google.cloud.monitoring_v3.proto.uptime_pb2", __doc__="""This message configures which resources and services to monitor for availability. - - Attributes: name: A unique resource name for this Uptime check configuration. - The format is: ``projects/[PROJECT_ID]/uptimeCheckConfigs/[UP - TIME_CHECK_ID]``. This field should be omitted when creating - the Uptime check configuration; on create, the resource name - is assigned by the server and included in the response. + The format is: :: projects/[PROJECT_ID_OR_NUMBER]/uptim + eCheckConfigs/[UPTIME_CHECK_ID] This field should be omitted + when creating the Uptime check configuration; on create, the + resource name is assigned by the server and included in the + response. display_name: A human-friendly name for the Uptime check configuration. The display name should be unique within a Stackdriver Workspace @@ -1416,8 +1536,6 @@ __module__="google.cloud.monitoring_v3.proto.uptime_pb2", __doc__="""Contains the region, location, and list of IP addresses where checkers in the location run from. - - Attributes: region: A broad region category in which the IP address is located. @@ -1445,4 +1563,5 @@ _UPTIMECHECKCONFIG_HTTPCHECK_HEADERSENTRY._options = None _UPTIMECHECKCONFIG.fields_by_name["is_internal"]._options = None _UPTIMECHECKCONFIG.fields_by_name["internal_checkers"]._options = None +_UPTIMECHECKCONFIG._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/monitoring_v3/proto/uptime_service.proto b/google/cloud/monitoring_v3/proto/uptime_service.proto index 203db186..5e53934e 100644 --- a/google/cloud/monitoring_v3/proto/uptime_service.proto +++ b/google/cloud/monitoring_v3/proto/uptime_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,18 +11,19 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/uptime.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -30,6 +31,7 @@ option java_multiple_files = true; option java_outer_classname = "UptimeServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The UptimeCheckService API is used to manage (list, create, delete, edit) // Uptime check configurations in the Stackdriver Monitoring product. An Uptime @@ -52,6 +54,7 @@ service UptimeCheckService { option (google.api.http) = { get: "/v3/{parent=projects/*}/uptimeCheckConfigs" }; + option (google.api.method_signature) = "parent"; } // Gets a single Uptime check configuration. @@ -59,6 +62,7 @@ service UptimeCheckService { option (google.api.http) = { get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new Uptime check configuration. @@ -67,6 +71,7 @@ service UptimeCheckService { post: "/v3/{parent=projects/*}/uptimeCheckConfigs" body: "uptime_check_config" }; + option (google.api.method_signature) = "parent,uptime_check_config"; } // Updates an Uptime check configuration. You can either replace the entire @@ -78,6 +83,7 @@ service UptimeCheckService { patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" body: "uptime_check_config" }; + option (google.api.method_signature) = "uptime_check_config"; } // Deletes an Uptime check configuration. Note that this method will fail @@ -87,6 +93,7 @@ service UptimeCheckService { option (google.api.http) = { delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + option (google.api.method_signature) = "name"; } // Returns the list of IP addresses that checkers run from @@ -99,9 +106,15 @@ service UptimeCheckService { // The protocol for the `ListUptimeCheckConfigs` request. message ListUptimeCheckConfigsRequest { - // The project whose Uptime check configurations are listed. The format - // is `projects/[PROJECT_ID]`. - string parent = 1; + // Required. The project whose Uptime check configurations are listed. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; // The maximum number of results to return in a single response. The server // may further constrain the maximum number of results returned in a single @@ -134,19 +147,31 @@ message ListUptimeCheckConfigsResponse { // The protocol for the `GetUptimeCheckConfig` request. message GetUptimeCheckConfigRequest { - // The Uptime check configuration to retrieve. The format - // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. - string name = 1; + // Required. The Uptime check configuration to retrieve. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; } // The protocol for the `CreateUptimeCheckConfig` request. message CreateUptimeCheckConfigRequest { - // The project in which to create the Uptime check. The format - // is `projects/[PROJECT_ID]`. - string parent = 1; - - // The new Uptime check configuration. - UptimeCheckConfig uptime_check_config = 2; + // Required. The project in which to create the Uptime check. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; + + // Required. The new Uptime check configuration. + UptimeCheckConfig uptime_check_config = 2 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `UpdateUptimeCheckConfig` request. @@ -168,14 +193,20 @@ message UpdateUptimeCheckConfigRequest { // The following fields can be updated: `display_name`, // `http_check`, `tcp_check`, `timeout`, `content_matchers`, and // `selected_regions`. - UptimeCheckConfig uptime_check_config = 3; + UptimeCheckConfig uptime_check_config = 3 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `DeleteUptimeCheckConfig` request. message DeleteUptimeCheckConfigRequest { - // The Uptime check configuration to delete. The format - // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. - string name = 1; + // Required. The Uptime check configuration to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; } // The protocol for the `ListUptimeCheckIps` request. diff --git a/google/cloud/monitoring_v3/proto/uptime_service_pb2.py b/google/cloud/monitoring_v3/proto/uptime_service_pb2.py index 51ff5e5c..3c0fdfef 100644 --- a/google/cloud/monitoring_v3/proto/uptime_service_pb2.py +++ b/google/cloud/monitoring_v3/proto/uptime_service_pb2.py @@ -16,13 +16,15 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.monitoring_v3.proto import ( uptime_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_uptime__pb2, ) from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -30,18 +32,20 @@ package="google.monitoring.v3", syntax="proto3", serialized_options=_b( - "\n\030com.google.monitoring.v3B\022UptimeServiceProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3" + "\n\030com.google.monitoring.v3B\022UptimeServiceProtoP\001Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\252\002\032Google.Cloud.Monitoring.V3\312\002\032Google\\Cloud\\Monitoring\\V3\352\002\035Google::Cloud::Monitoring::V3" ), serialized_pb=_b( - '\n5google/cloud/monitoring_v3/proto/uptime_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a-google/cloud/monitoring_v3/proto/uptime.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/api/client.proto"V\n\x1dListUptimeCheckConfigsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"\x94\x01\n\x1eListUptimeCheckConfigsResponse\x12\x45\n\x14uptime_check_configs\x18\x01 \x03(\x0b\x32\'.google.monitoring.v3.UptimeCheckConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05"+\n\x1bGetUptimeCheckConfigRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"v\n\x1e\x43reateUptimeCheckConfigRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x44\n\x13uptime_check_config\x18\x02 \x01(\x0b\x32\'.google.monitoring.v3.UptimeCheckConfig"\x97\x01\n\x1eUpdateUptimeCheckConfigRequest\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x44\n\x13uptime_check_config\x18\x03 \x01(\x0b\x32\'.google.monitoring.v3.UptimeCheckConfig".\n\x1e\x44\x65leteUptimeCheckConfigRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"B\n\x19ListUptimeCheckIpsRequest\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"t\n\x1aListUptimeCheckIpsResponse\x12=\n\x10uptime_check_ips\x18\x01 \x03(\x0b\x32#.google.monitoring.v3.UptimeCheckIp\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf3\t\n\x12UptimeCheckService\x12\xb7\x01\n\x16ListUptimeCheckConfigs\x12\x33.google.monitoring.v3.ListUptimeCheckConfigsRequest\x1a\x34.google.monitoring.v3.ListUptimeCheckConfigsResponse"2\x82\xd3\xe4\x93\x02,\x12*/v3/{parent=projects/*}/uptimeCheckConfigs\x12\xa6\x01\n\x14GetUptimeCheckConfig\x12\x31.google.monitoring.v3.GetUptimeCheckConfigRequest\x1a\'.google.monitoring.v3.UptimeCheckConfig"2\x82\xd3\xe4\x93\x02,\x12*/v3/{name=projects/*/uptimeCheckConfigs/*}\x12\xc1\x01\n\x17\x43reateUptimeCheckConfig\x12\x34.google.monitoring.v3.CreateUptimeCheckConfigRequest\x1a\'.google.monitoring.v3.UptimeCheckConfig"G\x82\xd3\xe4\x93\x02\x41"*/v3/{parent=projects/*}/uptimeCheckConfigs:\x13uptime_check_config\x12\xd5\x01\n\x17UpdateUptimeCheckConfig\x12\x34.google.monitoring.v3.UpdateUptimeCheckConfigRequest\x1a\'.google.monitoring.v3.UptimeCheckConfig"[\x82\xd3\xe4\x93\x02U2>/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}:\x13uptime_check_config\x12\x9b\x01\n\x17\x44\x65leteUptimeCheckConfig\x12\x34.google.monitoring.v3.DeleteUptimeCheckConfigRequest\x1a\x16.google.protobuf.Empty"2\x82\xd3\xe4\x93\x02,**/v3/{name=projects/*/uptimeCheckConfigs/*}\x12\x93\x01\n\x12ListUptimeCheckIps\x12/.google.monitoring.v3.ListUptimeCheckIpsRequest\x1a\x30.google.monitoring.v3.ListUptimeCheckIpsResponse"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/v3/uptimeCheckIps\x1a\xa9\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\x89\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readB\xaa\x01\n\x18\x63om.google.monitoring.v3B\x12UptimeServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3b\x06proto3' + '\n5google/cloud/monitoring_v3/proto/uptime_service.proto\x12\x14google.monitoring.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/monitoring_v3/proto/uptime.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\x8b\x01\n\x1dListUptimeCheckConfigsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+monitoring.googleapis.com/UptimeCheckConfig\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"\x94\x01\n\x1eListUptimeCheckConfigsResponse\x12\x45\n\x14uptime_check_configs\x18\x01 \x03(\x0b\x32\'.google.monitoring.v3.UptimeCheckConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05"`\n\x1bGetUptimeCheckConfigRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+monitoring.googleapis.com/UptimeCheckConfig"\xb0\x01\n\x1e\x43reateUptimeCheckConfigRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+monitoring.googleapis.com/UptimeCheckConfig\x12I\n\x13uptime_check_config\x18\x02 \x01(\x0b\x32\'.google.monitoring.v3.UptimeCheckConfigB\x03\xe0\x41\x02"\x9c\x01\n\x1eUpdateUptimeCheckConfigRequest\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12I\n\x13uptime_check_config\x18\x03 \x01(\x0b\x32\'.google.monitoring.v3.UptimeCheckConfigB\x03\xe0\x41\x02"c\n\x1e\x44\x65leteUptimeCheckConfigRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+monitoring.googleapis.com/UptimeCheckConfig"B\n\x19ListUptimeCheckIpsRequest\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"t\n\x1aListUptimeCheckIpsResponse\x12=\n\x10uptime_check_ips\x18\x01 \x03(\x0b\x32#.google.monitoring.v3.UptimeCheckIp\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xbd\n\n\x12UptimeCheckService\x12\xc0\x01\n\x16ListUptimeCheckConfigs\x12\x33.google.monitoring.v3.ListUptimeCheckConfigsRequest\x1a\x34.google.monitoring.v3.ListUptimeCheckConfigsResponse";\x82\xd3\xe4\x93\x02,\x12*/v3/{parent=projects/*}/uptimeCheckConfigs\xda\x41\x06parent\x12\xad\x01\n\x14GetUptimeCheckConfig\x12\x31.google.monitoring.v3.GetUptimeCheckConfigRequest\x1a\'.google.monitoring.v3.UptimeCheckConfig"9\x82\xd3\xe4\x93\x02,\x12*/v3/{name=projects/*/uptimeCheckConfigs/*}\xda\x41\x04name\x12\xde\x01\n\x17\x43reateUptimeCheckConfig\x12\x34.google.monitoring.v3.CreateUptimeCheckConfigRequest\x1a\'.google.monitoring.v3.UptimeCheckConfig"d\x82\xd3\xe4\x93\x02\x41"*/v3/{parent=projects/*}/uptimeCheckConfigs:\x13uptime_check_config\xda\x41\x1aparent,uptime_check_config\x12\xeb\x01\n\x17UpdateUptimeCheckConfig\x12\x34.google.monitoring.v3.UpdateUptimeCheckConfigRequest\x1a\'.google.monitoring.v3.UptimeCheckConfig"q\x82\xd3\xe4\x93\x02U2>/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}:\x13uptime_check_config\xda\x41\x13uptime_check_config\x12\xa2\x01\n\x17\x44\x65leteUptimeCheckConfig\x12\x34.google.monitoring.v3.DeleteUptimeCheckConfigRequest\x1a\x16.google.protobuf.Empty"9\x82\xd3\xe4\x93\x02,**/v3/{name=projects/*/uptimeCheckConfigs/*}\xda\x41\x04name\x12\x93\x01\n\x12ListUptimeCheckIps\x12/.google.monitoring.v3.ListUptimeCheckIpsRequest\x1a\x30.google.monitoring.v3.ListUptimeCheckIpsResponse"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/v3/uptimeCheckIps\x1a\xa9\x01\xca\x41\x19monitoring.googleapis.com\xd2\x41\x89\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readB\xca\x01\n\x18\x63om.google.monitoring.v3B\x12UptimeServiceProtoP\x01Z>google.golang.org/genproto/googleapis/monitoring/v3;monitoring\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_monitoring__v3_dot_proto_dot_uptime__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -68,7 +72,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\022+monitoring.googleapis.com/UptimeCheckConfig" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -116,8 +122,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=276, - serialized_end=362, + serialized_start=337, + serialized_end=476, ) @@ -191,8 +197,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=365, - serialized_end=513, + serialized_start=479, + serialized_end=627, ) @@ -218,9 +224,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\n+monitoring.googleapis.com/UptimeCheckConfig" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -230,8 +238,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=515, - serialized_end=558, + serialized_start=629, + serialized_end=725, ) @@ -257,7 +265,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\022+monitoring.googleapis.com/UptimeCheckConfig" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -275,7 +285,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -287,8 +297,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=560, - serialized_end=678, + serialized_start=728, + serialized_end=904, ) @@ -332,7 +342,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -344,8 +354,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=681, - serialized_end=832, + serialized_start=907, + serialized_end=1063, ) @@ -371,9 +381,11 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\n+monitoring.googleapis.com/UptimeCheckConfig" + ), file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -383,8 +395,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=834, - serialized_end=880, + serialized_start=1065, + serialized_end=1164, ) @@ -440,8 +452,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=882, - serialized_end=948, + serialized_start=1166, + serialized_end=1232, ) @@ -497,8 +509,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=950, - serialized_end=1066, + serialized_start=1234, + serialized_end=1350, ) _LISTUPTIMECHECKCONFIGSRESPONSE.fields_by_name[ @@ -557,12 +569,11 @@ DESCRIPTOR=_LISTUPTIMECHECKCONFIGSREQUEST, __module__="google.cloud.monitoring_v3.proto.uptime_service_pb2", __doc__="""The protocol for the ``ListUptimeCheckConfigs`` request. - - Attributes: parent: - The project whose Uptime check configurations are listed. The - format is ``projects/[PROJECT_ID]``. + Required. The project whose Uptime check configurations are + listed. The format is: :: + projects/[PROJECT_ID_OR_NUMBER] page_size: The maximum number of results to return in a single response. The server may further constrain the maximum number of results @@ -586,8 +597,6 @@ DESCRIPTOR=_LISTUPTIMECHECKCONFIGSRESPONSE, __module__="google.cloud.monitoring_v3.proto.uptime_service_pb2", __doc__="""The protocol for the ``ListUptimeCheckConfigs`` response. - - Attributes: uptime_check_configs: The returned Uptime check configurations. @@ -614,12 +623,11 @@ DESCRIPTOR=_GETUPTIMECHECKCONFIGREQUEST, __module__="google.cloud.monitoring_v3.proto.uptime_service_pb2", __doc__="""The protocol for the ``GetUptimeCheckConfig`` request. - - Attributes: name: - The Uptime check configuration to retrieve. The format is ``pr - ojects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]``. + Required. The Uptime check configuration to retrieve. The + format is: :: projects/[PROJECT_ID_OR_NUMBER]/uptimeChec + kConfigs/[UPTIME_CHECK_ID] """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.GetUptimeCheckConfigRequest) ), @@ -633,14 +641,12 @@ DESCRIPTOR=_CREATEUPTIMECHECKCONFIGREQUEST, __module__="google.cloud.monitoring_v3.proto.uptime_service_pb2", __doc__="""The protocol for the ``CreateUptimeCheckConfig`` request. - - Attributes: parent: - The project in which to create the Uptime check. The format is - ``projects/[PROJECT_ID]``. + Required. The project in which to create the Uptime check. The + format is: :: projects/[PROJECT_ID_OR_NUMBER] uptime_check_config: - The new Uptime check configuration. + Required. The new Uptime check configuration. """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.CreateUptimeCheckConfigRequest) ), @@ -654,8 +660,6 @@ DESCRIPTOR=_UPDATEUPTIMECHECKCONFIGREQUEST, __module__="google.cloud.monitoring_v3.proto.uptime_service_pb2", __doc__="""The protocol for the ``UpdateUptimeCheckConfig`` request. - - Attributes: update_mask: Optional. If present, only the listed fields in the current @@ -687,12 +691,11 @@ DESCRIPTOR=_DELETEUPTIMECHECKCONFIGREQUEST, __module__="google.cloud.monitoring_v3.proto.uptime_service_pb2", __doc__="""The protocol for the ``DeleteUptimeCheckConfig`` request. - - Attributes: name: - The Uptime check configuration to delete. The format is ``proj - ects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]``. + Required. The Uptime check configuration to delete. The format + is: :: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfig + s/[UPTIME_CHECK_ID] """, # @@protoc_insertion_point(class_scope:google.monitoring.v3.DeleteUptimeCheckConfigRequest) ), @@ -706,8 +709,6 @@ DESCRIPTOR=_LISTUPTIMECHECKIPSREQUEST, __module__="google.cloud.monitoring_v3.proto.uptime_service_pb2", __doc__="""The protocol for the ``ListUptimeCheckIps`` request. - - Attributes: page_size: The maximum number of results to return in a single response. @@ -734,8 +735,6 @@ DESCRIPTOR=_LISTUPTIMECHECKIPSRESPONSE, __module__="google.cloud.monitoring_v3.proto.uptime_service_pb2", __doc__="""The protocol for the ``ListUptimeCheckIps`` response. - - Attributes: uptime_check_ips: The returned list of IP addresses (including region and @@ -755,6 +754,12 @@ DESCRIPTOR._options = None +_LISTUPTIMECHECKCONFIGSREQUEST.fields_by_name["parent"]._options = None +_GETUPTIMECHECKCONFIGREQUEST.fields_by_name["name"]._options = None +_CREATEUPTIMECHECKCONFIGREQUEST.fields_by_name["parent"]._options = None +_CREATEUPTIMECHECKCONFIGREQUEST.fields_by_name["uptime_check_config"]._options = None +_UPDATEUPTIMECHECKCONFIGREQUEST.fields_by_name["uptime_check_config"]._options = None +_DELETEUPTIMECHECKCONFIGREQUEST.fields_by_name["name"]._options = None _UPTIMECHECKSERVICE = _descriptor.ServiceDescriptor( name="UptimeCheckService", @@ -764,8 +769,8 @@ serialized_options=_b( "\312A\031monitoring.googleapis.com\322A\211\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" ), - serialized_start=1069, - serialized_end=2336, + serialized_start=1353, + serialized_end=2694, methods=[ _descriptor.MethodDescriptor( name="ListUptimeCheckConfigs", @@ -775,7 +780,7 @@ input_type=_LISTUPTIMECHECKCONFIGSREQUEST, output_type=_LISTUPTIMECHECKCONFIGSRESPONSE, serialized_options=_b( - "\202\323\344\223\002,\022*/v3/{parent=projects/*}/uptimeCheckConfigs" + "\202\323\344\223\002,\022*/v3/{parent=projects/*}/uptimeCheckConfigs\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -786,7 +791,7 @@ input_type=_GETUPTIMECHECKCONFIGREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_uptime__pb2._UPTIMECHECKCONFIG, serialized_options=_b( - "\202\323\344\223\002,\022*/v3/{name=projects/*/uptimeCheckConfigs/*}" + "\202\323\344\223\002,\022*/v3/{name=projects/*/uptimeCheckConfigs/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -797,7 +802,7 @@ input_type=_CREATEUPTIMECHECKCONFIGREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_uptime__pb2._UPTIMECHECKCONFIG, serialized_options=_b( - '\202\323\344\223\002A"*/v3/{parent=projects/*}/uptimeCheckConfigs:\023uptime_check_config' + '\202\323\344\223\002A"*/v3/{parent=projects/*}/uptimeCheckConfigs:\023uptime_check_config\332A\032parent,uptime_check_config' ), ), _descriptor.MethodDescriptor( @@ -808,7 +813,7 @@ input_type=_UPDATEUPTIMECHECKCONFIGREQUEST, output_type=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_uptime__pb2._UPTIMECHECKCONFIG, serialized_options=_b( - "\202\323\344\223\002U2>/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}:\023uptime_check_config" + "\202\323\344\223\002U2>/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}:\023uptime_check_config\332A\023uptime_check_config" ), ), _descriptor.MethodDescriptor( @@ -819,7 +824,7 @@ input_type=_DELETEUPTIMECHECKCONFIGREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002,**/v3/{name=projects/*/uptimeCheckConfigs/*}" + "\202\323\344\223\002,**/v3/{name=projects/*/uptimeCheckConfigs/*}\332A\004name" ), ), _descriptor.MethodDescriptor( diff --git a/google/cloud/monitoring_v3/types.py b/google/cloud/monitoring_v3/types.py index 3e170e43..81c88a5c 100644 --- a/google/cloud/monitoring_v3/types.py +++ b/google/cloud/monitoring_v3/types.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/noxfile.py b/noxfile.py index 95fd3d91..30cc0c75 100644 --- a/noxfile.py +++ b/noxfile.py @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Generated by synthtool. DO NOT EDIT! + from __future__ import absolute_import import os import shutil @@ -21,7 +23,12 @@ import nox -LOCAL_DEPS = (os.path.join("..", "api_core"), os.path.join("..", "core")) +BLACK_VERSION = "black==19.3b0" +BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] + +if os.path.exists("samples"): + BLACK_PATHS.append("samples") + @nox.session(python="3.7") def lint(session): @@ -30,14 +37,8 @@ def lint(session): Returns a failure if the linters find linting errors or sufficiently serious code quality issues. """ - session.install("flake8", "black", *LOCAL_DEPS) - session.run( - "black", - "--check", - "google", - "tests", - "docs", - ) + session.install("flake8", BLACK_VERSION) + session.run("black", "--check", *BLACK_PATHS) session.run("flake8", "google", "tests") @@ -46,18 +47,13 @@ def blacken(session): """Run black. Format code to uniform standard. - + This currently uses Python 3.6 due to the automated Kokoro run of synthtool. That run uses an image that doesn't have 3.6 installed. Before updating this check the state of the `gcp_ubuntu_config` we use for that Kokoro run. """ - session.install("black") - session.run( - "black", - "google", - "tests", - "docs", - ) + session.install(BLACK_VERSION) + session.run("black", *BLACK_PATHS) @nox.session(python="3.7") @@ -70,26 +66,25 @@ def lint_setup_py(session): def default(session): # Install all test dependencies, then install this package in-place. session.install("mock", "pytest", "pytest-cov") - for local_dep in LOCAL_DEPS: - session.install("-e", local_dep) session.install("-e", ".") # Run py.test against the unit tests. session.run( "py.test", "--quiet", + "--cov=google.cloud.monitoring", "--cov=google.cloud", "--cov=tests.unit", "--cov-append", "--cov-config=.coveragerc", "--cov-report=", - "--cov-fail-under=97", + "--cov-fail-under=0", os.path.join("tests", "unit"), *session.posargs, ) -@nox.session(python=["2.7", "3.5", "3.6", "3.7"]) +@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"]) def unit(session): """Run the unit test suite.""" default(session) @@ -116,9 +111,7 @@ def system(session): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. session.install("mock", "pytest") - for local_dep in LOCAL_DEPS: - session.install("-e", local_dep) - session.install("-e", "../test_utils/") + session.install("git+https://github.com/googleapis/python-test-utils") session.install("-e", ".") # Run py.test against the system tests. @@ -136,25 +129,28 @@ def cover(session): test runs (not system test runs), and then erases coverage data. """ session.install("coverage", "pytest-cov") - session.run("coverage", "report", "--show-missing", "--fail-under=97") + session.run("coverage", "report", "--show-missing", "--fail-under=92") session.run("coverage", "erase") + @nox.session(python="3.7") def docs(session): """Build the docs for this library.""" - session.install('-e', '.') - session.install('sphinx', 'alabaster', 'recommonmark') + session.install("-e", ".") + session.install("sphinx<3.0.0", "alabaster", "recommonmark") - shutil.rmtree(os.path.join('docs', '_build'), ignore_errors=True) + shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( - 'sphinx-build', - '-W', # warnings as errors - '-T', # show full traceback on exception - '-N', # no colors - '-b', 'html', - '-d', os.path.join('docs', '_build', 'doctrees', ''), - os.path.join('docs', ''), - os.path.join('docs', '_build', 'html', ''), + "sphinx-build", + "-W", # warnings as errors + "-T", # show full traceback on exception + "-N", # no colors + "-b", + "html", + "-d", + os.path.join("docs", "_build", "doctrees", ""), + os.path.join("docs", ""), + os.path.join("docs", "_build", "html", ""), ) diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..4fa94931 --- /dev/null +++ b/renovate.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "config:base", ":preserveSemverRanges" + ] +} diff --git a/setup.cfg b/setup.cfg index 3bd55550..c3a2b39f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [bdist_wheel] universal = 1 diff --git a/setup.py b/setup.py index 3471737f..da4d2aae 100644 --- a/setup.py +++ b/setup.py @@ -20,40 +20,36 @@ # Package metadata. -name = 'google-cloud-monitoring' -description = 'Stackdriver Monitoring API client library' -version = '0.34.0' +name = "google-cloud-monitoring" +description = "Stackdriver Monitoring API client library" +version = "0.35.0" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta' # 'Development Status :: 5 - Production/Stable' -release_status = 'Development Status :: 3 - Alpha' -dependencies = [ - 'google-api-core[grpc] >= 1.14.0, < 2.0.0dev', -] -extras = { - 'pandas': 'pandas >= 0.17.1', -} +release_status = "Development Status :: 3 - Alpha" +dependencies = ["google-api-core[grpc] >= 1.14.0, < 2.0.0dev"] +extras = {"pandas": "pandas >= 0.17.1"} # Setup boilerplate below this line. package_root = os.path.abspath(os.path.dirname(__file__)) -readme_filename = os.path.join(package_root, 'README.rst') -with io.open(readme_filename, encoding='utf-8') as readme_file: +readme_filename = os.path.join(package_root, "README.rst") +with io.open(readme_filename, encoding="utf-8") as readme_file: readme = readme_file.read() # Only include packages under the 'google' namespace. Do not include tests, # benchmarks, etc. packages = [ - package for package in setuptools.find_packages() - if package.startswith('google')] + package for package in setuptools.find_packages() if package.startswith("google") +] # Determine which namespaces are needed. -namespaces = ['google'] -if 'google.cloud' in packages: - namespaces.append('google.cloud') +namespaces = ["google"] +if "google.cloud" in packages: + namespaces.append("google.cloud") setuptools.setup( @@ -61,30 +57,30 @@ version=version, description=description, long_description=readme, - author='Google LLC', - author_email='googleapis-packages@google.com', - license='Apache 2.0', - url='https://github.com/GoogleCloudPlatform/google-cloud-python', + author="Google LLC", + author_email="googleapis-packages@google.com", + license="Apache 2.0", + url="https://github.com/googleapis/python-monitoring", classifiers=[ release_status, - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Operating System :: OS Independent', - 'Topic :: Internet', + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Operating System :: OS Independent", + "Topic :: Internet", ], - platforms='Posix; MacOS X; Windows', + platforms="Posix; MacOS X; Windows", packages=packages, namespace_packages=namespaces, install_requires=dependencies, extras_require=extras, - python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*', + python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", include_package_data=True, zip_safe=False, ) diff --git a/synth.metadata b/synth.metadata index 9b855107..0ea62673 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-11-19T13:28:35.257420Z", + "updateTime": "2020-04-21T20:52:59.570188Z", "sources": [ { "generator": { "name": "artman", - "version": "0.42.1", - "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" + "version": "2.0.0", + "dockerImage": "googleapis/artman@sha256:b3b47805231a305d0f40c4bf069df20f6a2635574e6d4259fac651d3f9f6e098" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a", - "internalRef": "281088257" + "sha": "2bf9f22da3f101aeb536e1e88fe036323b8e9188", + "internalRef": "307654927" } }, { - "template": { - "name": "python_library", - "origin": "synthtool.gcp", - "version": "2019.10.17" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "21ce80f9d4785dc75aa36d26944bddd5a1b7e25b" } } ], diff --git a/synth.py b/synth.py index 447958ce..87dd6c76 100644 --- a/synth.py +++ b/synth.py @@ -71,9 +71,9 @@ s.replace( "google/cloud/monitoring_v3/proto/metric_service_pb2.py", - "^(\s+)have an ``id`` label: :: resource.type =\n.*", - "\g<1>have an ``id`` label::\n\n" - '\g<1> resource.type = starts_with("gce_") AND resource.label:id\n', + """(\s+)resource\.type + = starts_with\("gce_"\) AND resource\.label:id""", + """\n resource.type = starts_with("gce_") AND resource.label:id""" ) # Deal with long lines due to long proto name @@ -93,7 +93,7 @@ # ---------------------------------------------------------------------------- # Add templated files # ---------------------------------------------------------------------------- -templated_files = common.py_library(unit_cov_level=97, cov_level=97) -s.move(templated_files, excludes=["noxfile.py"]) +templated_files = common.py_library(cov_level=92, system_test_dependencies=["test_utils"]) +s.move(templated_files) s.shell.run(["nox", "-s", "blacken"], hide_output=False) diff --git a/test_utils/credentials.json.enc b/test_utils/credentials.json.enc new file mode 100644 index 00000000..f073c7e4 --- /dev/null +++ b/test_utils/credentials.json.enc @@ -0,0 +1,49 @@ +U2FsdGVkX1/vVm/dOEg1DCACYbdOcL+ey6+64A+DZGZVgF8Z/3skK6rpPocu6GOA +UZAqASsBH9QifDf8cKVXQXVYpYq6HSv2O0w7vOmVorZO9GYPo98s9/8XO+4ty/AU +aB6TD68frBAYv4cT/l5m7aYdzfzMTy0EOXoleZT09JYP3B5FV3KCO114FzMXGwrj +HXsR6E5SyUUlUnWPC3eD3aqmovay0gxOKYO3ZwjFK1nlbN/8q6/8nwBCf/Bg6SHV +V93pNxdolRlJev9kgKz4RN1z4jGCy5PAndhSLE82NFIs9LoAiEOU5YeMlN+Ulqus +J92nh+ptUe9a4pJGbAuveUWO7zdS1QyXvTMUcmmSfXCNm/eIQjNuu5+rHtIjWKh8 +Ilwj2w1aTfSptQEhk/kwRgFz/d11vfwJzvwTmCxO6zyOeL0VUWLqdCBGgG5As9He +/RenF8PZ1O0WbTt7fns5oTlTk/MUo+0xJ1xqvu/y45LaqqcBAnEdrWKmtM3dJHWv +ufQku+kD+83F/VwBnQdvgMHu6KZEs6LRrNo58r4QuK6fS7VCACdzxID1RM2cL7kT +6BFRlyGj1aigmjne9g9M9Jx4R+mZDpPU1WDzzG71J4qCUwaX8Dfwutuv4uiFvzwq +NUF0wLJJPtKWmtW+hnZ/fhHQGCRsOpZzFnqp6Zv7J7k6esqxMgIjfal7Djk5Acy8 +j3iVvm6CYmKMVqzL62JHYS9Ye83tzBCaR8hpnJQKgH3FSOFY8HSwrtQSIsl/hSeF +41sgnz0Y+/gkzNeU18qFk+eCZmvljyu+JK0nPYUgpOCJYVBNQpNHz5PUyiAEKhtM +IOSdjPRW1Y+Xf4RroJnLPoF24Ijwrow5LCm9hBRY6TPPMMmnIXCd23xcLJ1rMj6g +x4ZikElans+cwuc9wtbb7w01DcpTwQ1+eIV1qV+KIgpnLjRGLhZD4etobBsrwYu/ +vnIwy2QHCKENPb8sbdgp7x2mF7VSX0/7tf+9+i70EBiMzpOKBkiZhtLzm6hOBkEy +ODaWrx4lTTwbSw8Rmtf58APhPFMsjHoNsjiUoK249Y8Y2Ff4fMfqYsXu6VC1n/At +CuWYHc3EfBwFcLJS+RQB9kFk/4FygFBWq4Kj0MqoRruLbKmoGeJKH9q35W0f0NCD +j+iHt3014kMGiuyJe1UDQ6fvEihFFdHuDivFpPAXDt4PTY/WtpDhaGMx23kb54pK +jkAuxpznAB1lK3u9bGRXDasGeHIrNtIlPvgkrWHXvoBVqM7zry8TGtoxp3E3I42Z +cUfDWfB9GqVdrOwvrTzyZsl2uShRkAJaZFZj5aMyYxiptp4gM8CwWiNtOd2EwtRO +LxZX4M02PQFIqXV3FSDA0q6EwglUrTZdAlYeOEkopaKCtG31dEPOSQG3NGJAEYso +Cxm99H7970dp0OAgpNSgRbcWDbhVbQXnRzvFGqLeH6a9dQ/a8uD3s8Qm9Du/kB6d +XxTRe2OGxzcD0AgI8GClE4rIZHCLbcwuJRp0EYcN+pgY80O4U98fZ5RYpU6OYbU/ +MEiaBYFKtZtGkV6AQD568V7hHJWqc5DDfVHUQ/aeQwnKi2vnU66u+nnV2rZxXxLP ++dqeLRpul+wKa5b/Z5SfQ14Ff8s7aVyxaogGpyggyPL1vyq4KWZ6Or/wEE5hgNO4 +kBh6ht0QT1Hti8XY2JK1M+Jgbjgcg4jkHBGVqegrG1Rvcc2A4TYKwx+QMSBhyxrU +5qhROjS4lTcC42hQslMUkUwc4U/Y91XdFbOOnaAkwzI36NRYL0pmgZnYxGJZeRvr +E5foOhnOEVSFGdOkLfFh+FkWZQf56Lmn8Gg2wHE3dZTxLHibiUYfkgOr1uEosq29 +D1NstvlJURPQ0Q+8QQNWcl9nEZHMAjOmnL1hbx+QfuC6seucp+sXGzdZByMLZbvT +tG8KNL293CmyQowgf9MXToWYnwRkcvqfTaKyor2Ggze3JtoFW4t0j4DI1XPciZFX +XmfApHrzdB/bZadzxyaZ2NE0CuH9zDelwI6rz38xsN5liYnp5qmNKVCZVOHccXa6 +J8x365m5/VaaA2RrtdPqKxn8VaKy7+T690QgMXVGM4PbzQzQxHuSleklocqlP+sB +jSMXCZY+ng/i4UmRO9noiyW3UThYh0hIdMYs12EmmI9cnF/OuYZpl30fmqwV+VNM +td5B2fYvAvvsjiX60SFCn3DATP1GrPMBlZSmhhP3GYS+xrWt3Xxta9qIX2BEF1Gg +twnZZRjoULSRFUYPfJPEOfEH2UQwm84wxx/GezVE+S/RpBlatPOgCiLnNNaLfdTC +mTG9qY9elJv3GGQO8Lqgf4i8blExs05lSPk1BDhzTB6H9TLz+Ge0/l1QxKf3gPXU +aImK1azieXMXHECkdKxrzmehwu1dZ/oYOLc/OFQCETwSRoLPFOFpYUpizwmVVHR6 +uLSfRptte4ZOU3zHfpd/0+J4tkwHwEkGzsmMdqudlm7qME6upuIplyVBH8JiXzUK +n1RIH/OPmVEluAnexWRLZNdk7MrakIO4XACVbICENiYQgAIErP568An6twWEGDbZ +bEN64E3cVDTDRPRAunIhhsEaapcxpFEPWlHorxv36nMUt0R0h0bJlCu5QdzckfcX +ZrRuu1kl76ZfbSE8T0G4/rBb9gsU4Gn3WyvLIO3MgFBuxR68ZwcR8LpEUd8qp38H +NG4cxPmN1nGKo663Z+xI2Gt5up4gpl+fOt4mXqxY386rB7yHaOfElMG5TUYdrS9w +1xbbCVgeJ6zxX+NFlndG33cSAPprhw+C18eUu6ZU63WZcYFo3GfK6rs3lvYtofvE +8DxztdTidQedNVNE+63YCjhxd/cZUI5n/UpgYkr9owp7hNGJiR3tdoNLR2gcoGqL +qWhH928k2aSgF2j97LZ2OqoPCp0tUB7ho4jD2u4Ik3GLVNlCc3dCvWRvpHtDTQDv +tujESMfHUc9I2r4S/PD3bku/ABGwa977Yp1PjzJGr9RajA5is5n6GVpyynwjtKG4 +iyyITpdwpCgr8pueTBLwZnas3slmiMOog/E4PmPgctHzvC+vhQijhUtw5zSsmv0l +bZlw/mVhp5Ta7dTcLBKR8DA3m3vTbaEGkz0xpfQr7GfiSMRbJyvIw88pDK0gyTMD diff --git a/test_utils/scripts/circleci/get_tagged_package.py b/test_utils/scripts/circleci/get_tagged_package.py new file mode 100644 index 00000000..c148b9dc --- /dev/null +++ b/test_utils/scripts/circleci/get_tagged_package.py @@ -0,0 +1,64 @@ +# Copyright 2016 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Helper to determine package from tag. +Get the current package directory corresponding to the Circle Tag. +""" + +from __future__ import print_function + +import os +import re +import sys + + +TAG_RE = re.compile(r""" + ^ + (?P + (([a-z]+)[_-])*) # pkg-name-with-hyphens-or-underscores (empty allowed) + ([0-9]+)\.([0-9]+)\.([0-9]+) # Version x.y.z (x, y, z all ints) + $ +""", re.VERBOSE) +TAG_ENV = 'CIRCLE_TAG' +ERROR_MSG = '%s env. var. not set' % (TAG_ENV,) +BAD_TAG_MSG = 'Invalid tag name: %s. Expected pkg-name-x.y.z' +CIRCLE_CI_SCRIPTS_DIR = os.path.dirname(__file__) +ROOT_DIR = os.path.realpath( + os.path.join(CIRCLE_CI_SCRIPTS_DIR, '..', '..', '..')) + + +def main(): + """Get the current package directory. + Prints the package directory out so callers can consume it. + """ + if TAG_ENV not in os.environ: + print(ERROR_MSG, file=sys.stderr) + sys.exit(1) + + tag_name = os.environ[TAG_ENV] + match = TAG_RE.match(tag_name) + if match is None: + print(BAD_TAG_MSG % (tag_name,), file=sys.stderr) + sys.exit(1) + + pkg_name = match.group('pkg') + if pkg_name is None: + print(ROOT_DIR) + else: + pkg_dir = pkg_name.rstrip('-').replace('-', '_') + print(os.path.join(ROOT_DIR, pkg_dir)) + + +if __name__ == '__main__': + main() diff --git a/test_utils/scripts/circleci/twine_upload.sh b/test_utils/scripts/circleci/twine_upload.sh new file mode 100755 index 00000000..23a4738e --- /dev/null +++ b/test_utils/scripts/circleci/twine_upload.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Copyright 2016 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -ev + +# If this is not a CircleCI tag, no-op. +if [[ -z "$CIRCLE_TAG" ]]; then + echo "This is not a release tag. Doing nothing." + exit 0 +fi + +# H/T: http://stackoverflow.com/a/246128/1068170 +SCRIPT="$(dirname "${BASH_SOURCE[0]}")/get_tagged_package.py" +# Determine the package directory being deploying on this tag. +PKG_DIR="$(python ${SCRIPT})" + +# Ensure that we have the latest versions of Twine, Wheel, and Setuptools. +python3 -m pip install --upgrade twine wheel setuptools + +# Move into the package, build the distribution and upload. +cd ${PKG_DIR} +python3 setup.py sdist bdist_wheel +twine upload dist/* diff --git a/test_utils/scripts/get_target_packages.py b/test_utils/scripts/get_target_packages.py new file mode 100644 index 00000000..1d51830c --- /dev/null +++ b/test_utils/scripts/get_target_packages.py @@ -0,0 +1,268 @@ +# Copyright 2017 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Print a list of packages which require testing.""" + +import os +import re +import subprocess +import warnings + + +CURRENT_DIR = os.path.realpath(os.path.dirname(__file__)) +BASE_DIR = os.path.realpath(os.path.join(CURRENT_DIR, '..', '..')) +GITHUB_REPO = os.environ.get('GITHUB_REPO', 'google-cloud-python') +CI = os.environ.get('CI', '') +CI_BRANCH = os.environ.get('CIRCLE_BRANCH') +CI_PR = os.environ.get('CIRCLE_PR_NUMBER') +CIRCLE_TAG = os.environ.get('CIRCLE_TAG') +head_hash, head_name = subprocess.check_output(['git', 'show-ref', 'HEAD'] +).strip().decode('ascii').split() +rev_parse = subprocess.check_output( + ['git', 'rev-parse', '--abbrev-ref', 'HEAD'] +).strip().decode('ascii') +MAJOR_DIV = '#' * 78 +MINOR_DIV = '#' + '-' * 77 + +# NOTE: This reg-ex is copied from ``get_tagged_packages``. +TAG_RE = re.compile(r""" + ^ + (?P + (([a-z]+)-)*) # pkg-name-with-hyphens- (empty allowed) + ([0-9]+)\.([0-9]+)\.([0-9]+) # Version x.y.z (x, y, z all ints) + $ +""", re.VERBOSE) + +# This is the current set of dependencies by package. +# As of this writing, the only "real" dependency is that of error_reporting +# (on logging), the rest are just system test dependencies. +PKG_DEPENDENCIES = { + 'logging': {'pubsub'}, +} + + +def get_baseline(): + """Return the baseline commit. + + On a pull request, or on a branch, return the common parent revision + with the master branch. + + Locally, return a value pulled from environment variables, or None if + the environment variables are not set. + + On a push to master, return None. This will effectively cause everything + to be considered to be affected. + """ + + # If this is a pull request or branch, return the tip for master. + # We will test only packages which have changed since that point. + ci_non_master = (CI == 'true') and any([CI_BRANCH != 'master', CI_PR]) + + if ci_non_master: + + repo_url = 'git@github.com:GoogleCloudPlatform/{}'.format(GITHUB_REPO) + subprocess.run(['git', 'remote', 'add', 'baseline', repo_url], + stderr=subprocess.DEVNULL) + subprocess.run(['git', 'pull', 'baseline'], stderr=subprocess.DEVNULL) + + if CI_PR is None and CI_BRANCH is not None: + output = subprocess.check_output([ + 'git', 'merge-base', '--fork-point', + 'baseline/master', CI_BRANCH]) + return output.strip().decode('ascii') + + return 'baseline/master' + + # If environment variables are set identifying what the master tip is, + # use that. + if os.environ.get('GOOGLE_CLOUD_TESTING_REMOTE', ''): + remote = os.environ['GOOGLE_CLOUD_TESTING_REMOTE'] + branch = os.environ.get('GOOGLE_CLOUD_TESTING_BRANCH', 'master') + return '%s/%s' % (remote, branch) + + # If we are not in CI and we got this far, issue a warning. + if not CI: + warnings.warn('No baseline could be determined; this means tests ' + 'will run for every package. If this is local ' + 'development, set the $GOOGLE_CLOUD_TESTING_REMOTE ' + 'environment variable.') + + # That is all we can do; return None. + return None + + +def get_changed_files(): + """Return a list of files that have been changed since the baseline. + + If there is no base, return None. + """ + # Get the baseline, and fail quickly if there is no baseline. + baseline = get_baseline() + print('# Baseline commit: {}'.format(baseline)) + if not baseline: + return None + + # Return a list of altered files. + try: + return subprocess.check_output([ + 'git', 'diff', '--name-only', '{}..HEAD'.format(baseline), + ], stderr=subprocess.DEVNULL).decode('utf8').strip().split('\n') + except subprocess.CalledProcessError: + warnings.warn('Unable to perform git diff; falling back to assuming ' + 'all packages have changed.') + return None + + +def reverse_map(dict_of_sets): + """Reverse a map of one-to-many. + + So the map:: + + { + 'A': {'B', 'C'}, + 'B': {'C'}, + } + + becomes + + { + 'B': {'A'}, + 'C': {'A', 'B'}, + } + + Args: + dict_of_sets (dict[set]): A dictionary of sets, mapping + one value to many. + + Returns: + dict[set]: The reversed map. + """ + result = {} + for key, values in dict_of_sets.items(): + for value in values: + result.setdefault(value, set()).add(key) + + return result + +def get_changed_packages(file_list): + """Return a list of changed packages based on the provided file list. + + If the file list is None, then all packages should be considered to be + altered. + """ + # Determine a complete list of packages. + all_packages = set() + for file_ in os.listdir(BASE_DIR): + abs_file = os.path.realpath(os.path.join(BASE_DIR, file_)) + nox_file = os.path.join(abs_file, 'nox.py') + if os.path.isdir(abs_file) and os.path.isfile(nox_file): + all_packages.add(file_) + + # If ther is no file list, send down the full package set. + if file_list is None: + return all_packages + + # Create a set based on the list of changed files. + answer = set() + reverse_deps = reverse_map(PKG_DEPENDENCIES) + for file_ in file_list: + # Ignore root directory changes (setup.py, .gitignore, etc.). + if os.path.sep not in file_: + continue + + # Ignore changes that are not in a package (usually this will be docs). + package = file_.split(os.path.sep, 1)[0] + if package not in all_packages: + continue + + # If there is a change in core, short-circuit now and return + # everything. + if package in ('core',): + return all_packages + + # Add the package, as well as any dependencies this package has. + # NOTE: For now, dependencies only go down one level. + answer.add(package) + answer = answer.union(reverse_deps.get(package, set())) + + # We got this far without being short-circuited; return the final answer. + return answer + + +def get_tagged_package(): + """Return the package corresponding to the current tag. + + If there is not tag, will return :data:`None`. + """ + if CIRCLE_TAG is None: + return + + match = TAG_RE.match(CIRCLE_TAG) + if match is None: + return + + pkg_name = match.group('pkg') + if pkg_name == '': + # NOTE: This corresponds to the "umbrella" tag. + return + + return pkg_name.rstrip('-').replace('-', '_') + + +def get_target_packages(): + """Return a list of target packages to be run in the current build. + + If in a tag build, will run only the package(s) that are tagged, otherwise + will run the packages that have file changes in them (or packages that + depend on those). + """ + tagged_package = get_tagged_package() + if tagged_package is None: + file_list = get_changed_files() + print(MAJOR_DIV) + print('# Changed files:') + print(MINOR_DIV) + for file_ in file_list or (): + print('# {}'.format(file_)) + for package in sorted(get_changed_packages(file_list)): + yield package + else: + yield tagged_package + + +def main(): + print(MAJOR_DIV) + print('# Environment') + print(MINOR_DIV) + print('# CircleCI: {}'.format(CI)) + print('# CircleCI branch: {}'.format(CI_BRANCH)) + print('# CircleCI pr: {}'.format(CI_PR)) + print('# CircleCI tag: {}'.format(CIRCLE_TAG)) + print('# HEAD ref: {}'.format(head_hash)) + print('# {}'.format(head_name)) + print('# Git branch: {}'.format(rev_parse)) + print(MAJOR_DIV) + + packages = list(get_target_packages()) + + print(MAJOR_DIV) + print('# Target packages:') + print(MINOR_DIV) + for package in packages: + print(package) + print(MAJOR_DIV) + + +if __name__ == '__main__': + main() diff --git a/test_utils/scripts/get_target_packages_kokoro.py b/test_utils/scripts/get_target_packages_kokoro.py new file mode 100644 index 00000000..27d3a0c9 --- /dev/null +++ b/test_utils/scripts/get_target_packages_kokoro.py @@ -0,0 +1,98 @@ +# Copyright 2017 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Print a list of packages which require testing.""" + +import pathlib +import subprocess + +import ci_diff_helper +import requests + + +def print_environment(environment): + print("-> CI environment:") + print('Branch', environment.branch) + print('PR', environment.pr) + print('In PR', environment.in_pr) + print('Repo URL', environment.repo_url) + if environment.in_pr: + print('PR Base', environment.base) + + +def get_base(environment): + if environment.in_pr: + return environment.base + else: + # If we're not in a PR, just calculate the changes between this commit + # and its parent. + return 'HEAD~1' + + +def get_changed_files_from_base(base): + return subprocess.check_output([ + 'git', 'diff', '--name-only', f'{base}..HEAD', + ], stderr=subprocess.DEVNULL).decode('utf8').strip().split('\n') + + +_URL_TEMPLATE = ( + 'https://api.github.com/repos/googleapis/google-cloud-python/pulls/' + '{}/files' +) + + +def get_changed_files_from_pr(pr): + url = _URL_TEMPLATE.format(pr) + while url is not None: + response = requests.get(url) + for info in response.json(): + yield info['filename'] + url = response.links.get('next', {}).get('url') + + +def determine_changed_packages(changed_files): + packages = [ + path.parent for path in pathlib.Path('.').glob('*/noxfile.py') + ] + + changed_packages = set() + for file in changed_files: + file = pathlib.Path(file) + for package in packages: + if package in file.parents: + changed_packages.add(package) + + return changed_packages + + +def main(): + environment = ci_diff_helper.get_config() + print_environment(environment) + base = get_base(environment) + + if environment.in_pr: + changed_files = list(get_changed_files_from_pr(environment.pr)) + else: + changed_files = get_changed_files_from_base(base) + + packages = determine_changed_packages(changed_files) + + print(f"Comparing against {base}.") + print("-> Changed packages:") + + for package in packages: + print(package) + + +main() diff --git a/test_utils/scripts/run_emulator.py b/test_utils/scripts/run_emulator.py new file mode 100644 index 00000000..287b0864 --- /dev/null +++ b/test_utils/scripts/run_emulator.py @@ -0,0 +1,199 @@ +# Copyright 2016 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Run system tests locally with the emulator. + +First makes system calls to spawn the emulator and get the local environment +variable needed for it. Then calls the system tests. +""" + + +import argparse +import os +import subprocess + +import psutil + +from google.cloud.environment_vars import BIGTABLE_EMULATOR +from google.cloud.environment_vars import GCD_DATASET +from google.cloud.environment_vars import GCD_HOST +from google.cloud.environment_vars import PUBSUB_EMULATOR +from run_system_test import run_module_tests + + +BIGTABLE = 'bigtable' +DATASTORE = 'datastore' +PUBSUB = 'pubsub' +PACKAGE_INFO = { + BIGTABLE: (BIGTABLE_EMULATOR,), + DATASTORE: (GCD_DATASET, GCD_HOST), + PUBSUB: (PUBSUB_EMULATOR,), +} +EXTRA = { + DATASTORE: ('--no-legacy',), +} +_DS_READY_LINE = '[datastore] Dev App Server is now running.\n' +_PS_READY_LINE_PREFIX = '[pubsub] INFO: Server started, listening on ' +_BT_READY_LINE_PREFIX = '[bigtable] Cloud Bigtable emulator running on ' + + +def get_parser(): + """Get simple ``argparse`` parser to determine package. + + :rtype: :class:`argparse.ArgumentParser` + :returns: The parser for this script. + """ + parser = argparse.ArgumentParser( + description='Run google-cloud system tests against local emulator.') + parser.add_argument('--package', dest='package', + choices=sorted(PACKAGE_INFO.keys()), + default=DATASTORE, help='Package to be tested.') + return parser + + +def get_start_command(package): + """Get command line arguments for starting emulator. + + :type package: str + :param package: The package to start an emulator for. + + :rtype: tuple + :returns: The arguments to be used, in a tuple. + """ + result = ('gcloud', 'beta', 'emulators', package, 'start') + extra = EXTRA.get(package, ()) + return result + extra + + +def get_env_init_command(package): + """Get command line arguments for getting emulator env. info. + + :type package: str + :param package: The package to get environment info for. + + :rtype: tuple + :returns: The arguments to be used, in a tuple. + """ + result = ('gcloud', 'beta', 'emulators', package, 'env-init') + extra = EXTRA.get(package, ()) + return result + extra + + +def datastore_wait_ready(popen): + """Wait until the datastore emulator is ready to use. + + :type popen: :class:`subprocess.Popen` + :param popen: An open subprocess to interact with. + """ + emulator_ready = False + while not emulator_ready: + emulator_ready = popen.stderr.readline() == _DS_READY_LINE + + +def wait_ready_prefix(popen, prefix): + """Wait until the a process encounters a line with matching prefix. + + :type popen: :class:`subprocess.Popen` + :param popen: An open subprocess to interact with. + + :type prefix: str + :param prefix: The prefix to match + """ + emulator_ready = False + while not emulator_ready: + emulator_ready = popen.stderr.readline().startswith(prefix) + + +def wait_ready(package, popen): + """Wait until the emulator is ready to use. + + :type package: str + :param package: The package to check if ready. + + :type popen: :class:`subprocess.Popen` + :param popen: An open subprocess to interact with. + + :raises: :class:`KeyError` if the ``package`` is not among + ``datastore``, ``pubsub`` or ``bigtable``. + """ + if package == DATASTORE: + datastore_wait_ready(popen) + elif package == PUBSUB: + wait_ready_prefix(popen, _PS_READY_LINE_PREFIX) + elif package == BIGTABLE: + wait_ready_prefix(popen, _BT_READY_LINE_PREFIX) + else: + raise KeyError('Package not supported', package) + + +def cleanup(pid): + """Cleanup a process (including all of its children). + + :type pid: int + :param pid: Process ID. + """ + proc = psutil.Process(pid) + for child_proc in proc.children(recursive=True): + try: + child_proc.kill() + child_proc.terminate() + except psutil.NoSuchProcess: + pass + proc.terminate() + proc.kill() + + +def run_tests_in_emulator(package): + """Spawn an emulator instance and run the system tests. + + :type package: str + :param package: The package to run system tests against. + """ + # Make sure this package has environment vars to replace. + env_vars = PACKAGE_INFO[package] + + start_command = get_start_command(package) + # Ignore stdin and stdout, don't pollute the user's output with them. + proc_start = subprocess.Popen(start_command, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + try: + wait_ready(package, proc_start) + env_init_command = get_env_init_command(package) + proc_env = subprocess.Popen(env_init_command, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + env_status = proc_env.wait() + if env_status != 0: + raise RuntimeError(env_status, proc_env.stderr.read()) + env_lines = proc_env.stdout.read().strip().split('\n') + # Set environment variables before running the system tests. + for env_var in env_vars: + line_prefix = 'export ' + env_var + '=' + value, = [line.split(line_prefix, 1)[1] for line in env_lines + if line.startswith(line_prefix)] + os.environ[env_var] = value + run_module_tests(package, + ignore_requirements=True) + finally: + cleanup(proc_start.pid) + + +def main(): + """Main method to run this script.""" + parser = get_parser() + args = parser.parse_args() + run_tests_in_emulator(args.package) + + +if __name__ == '__main__': + main() diff --git a/test_utils/scripts/update_docs.sh b/test_utils/scripts/update_docs.sh new file mode 100755 index 00000000..8cbab9f0 --- /dev/null +++ b/test_utils/scripts/update_docs.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +# Copyright 2016 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -ev + +GH_OWNER='GoogleCloudPlatform' +GH_PROJECT_NAME='google-cloud-python' + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Function to build the docs. +function build_docs { + rm -rf docs/_build/ + rm -f docs/bigquery/generated/*.rst + # -W -> warnings as errors + # -T -> show full traceback on exception + # -N -> no color + sphinx-build \ + -W -T -N \ + -b html \ + -d docs/_build/doctrees \ + docs/ \ + docs/_build/html/ + return $? +} + +# Only update docs if we are on CircleCI. +if [[ "${CIRCLE_BRANCH}" == "master" ]] && [[ -z "${CIRCLE_PR_NUMBER}" ]]; then + echo "Building new docs on a merged commit." +elif [[ "$1" == "kokoro" ]]; then + echo "Building and publishing docs on Kokoro." +elif [[ -n "${CIRCLE_TAG}" ]]; then + echo "Building new docs on a tag (but will not deploy)." + build_docs + exit $? +else + echo "Not on master nor a release tag." + echo "Building new docs for testing purposes, but not deploying." + build_docs + exit $? +fi + +# Adding GitHub pages branch. `git submodule add` checks it +# out at HEAD. +GH_PAGES_DIR='ghpages' +git submodule add -q -b gh-pages \ + "git@github.com:${GH_OWNER}/${GH_PROJECT_NAME}" ${GH_PAGES_DIR} + +# Determine if we are building a new tag or are building docs +# for master. Then build new docs in docs/_build from master. +if [[ -n "${CIRCLE_TAG}" ]]; then + # Sphinx will use the package version by default. + build_docs +else + SPHINX_RELEASE=$(git log -1 --pretty=%h) build_docs +fi + +# Update gh-pages with the created docs. +cd ${GH_PAGES_DIR} +git rm -fr latest/ +cp -R ../docs/_build/html/ latest/ + +# Update the files push to gh-pages. +git add . +git status + +# If there are no changes, just exit cleanly. +if [[ -z "$(git status --porcelain)" ]]; then + echo "Nothing to commit. Exiting without pushing changes." + exit +fi + +# Commit to gh-pages branch to apply changes. +git config --global user.email "dpebot@google.com" +git config --global user.name "dpebot" +git commit -m "Update docs after merge to master." + +# NOTE: This may fail if two docs updates (on merges to master) +# happen in close proximity. +git push -q origin HEAD:gh-pages diff --git a/test_utils/setup.py b/test_utils/setup.py new file mode 100644 index 00000000..8e9222a7 --- /dev/null +++ b/test_utils/setup.py @@ -0,0 +1,64 @@ +# Copyright 2017 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os + +from setuptools import find_packages +from setuptools import setup + + +PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) + + +# NOTE: This is duplicated throughout and we should try to +# consolidate. +SETUP_BASE = { + 'author': 'Google Cloud Platform', + 'author_email': 'googleapis-publisher@google.com', + 'scripts': [], + 'url': 'https://github.com/GoogleCloudPlatform/google-cloud-python', + 'license': 'Apache 2.0', + 'platforms': 'Posix; MacOS X; Windows', + 'include_package_data': True, + 'zip_safe': False, + 'classifiers': [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Topic :: Internet', + ], +} + + +REQUIREMENTS = [ + 'google-auth >= 0.4.0', + 'six', +] + +setup( + name='google-cloud-testutils', + version='0.24.0', + description='System test utilities for google-cloud-python', + packages=find_packages(), + install_requires=REQUIREMENTS, + python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*', + **SETUP_BASE +) diff --git a/test_utils/test_utils/__init__.py b/test_utils/test_utils/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test_utils/test_utils/imports.py b/test_utils/test_utils/imports.py new file mode 100644 index 00000000..5991af7f --- /dev/null +++ b/test_utils/test_utils/imports.py @@ -0,0 +1,38 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import mock +import six + + +def maybe_fail_import(predicate): + """Create and return a patcher that conditionally makes an import fail. + + Args: + predicate (Callable[[...], bool]): A callable that, if it returns `True`, + triggers an `ImportError`. It must accept the same arguments as the + built-in `__import__` function. + https://docs.python.org/3/library/functions.html#__import__ + + Returns: + A mock patcher object that can be used to enable patched import behavior. + """ + orig_import = six.moves.builtins.__import__ + + def custom_import(name, globals=None, locals=None, fromlist=(), level=0): + if predicate(name, globals, locals, fromlist, level): + raise ImportError + return orig_import(name, globals, locals, fromlist, level) + + return mock.patch.object(six.moves.builtins, "__import__", new=custom_import) diff --git a/test_utils/test_utils/retry.py b/test_utils/test_utils/retry.py new file mode 100644 index 00000000..e61c001a --- /dev/null +++ b/test_utils/test_utils/retry.py @@ -0,0 +1,207 @@ +# Copyright 2016 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import time +from functools import wraps + +import six + +MAX_TRIES = 4 +DELAY = 1 +BACKOFF = 2 + + +def _retry_all(_): + """Retry all caught exceptions.""" + return True + + +class BackoffFailed(Exception): + """Retry w/ backoffs did not complete successfully.""" + + +class RetryBase(object): + """Base for retrying calling a decorated function w/ exponential backoff. + + :type max_tries: int + :param max_tries: Number of times to try (not retry) before giving up. + + :type delay: int + :param delay: Initial delay between retries in seconds. + + :type backoff: int + :param backoff: Backoff multiplier e.g. value of 2 will double the + delay each retry. + + :type logger: logging.Logger instance + :param logger: Logger to use. If None, print. + """ + def __init__(self, max_tries=MAX_TRIES, delay=DELAY, backoff=BACKOFF, + logger=None): + self.max_tries = max_tries + self.delay = delay + self.backoff = backoff + self.logger = logger.warning if logger else six.print_ + + +class RetryErrors(RetryBase): + """Decorator for retrying given exceptions in testing. + + :type exception: Exception or tuple of Exceptions + :param exception: The exception to check or may be a tuple of + exceptions to check. + + :type error_predicate: function, takes caught exception, returns bool + :param error_predicate: Predicate evaluating whether to retry after a + caught exception. + + :type max_tries: int + :param max_tries: Number of times to try (not retry) before giving up. + + :type delay: int + :param delay: Initial delay between retries in seconds. + + :type backoff: int + :param backoff: Backoff multiplier e.g. value of 2 will double the + delay each retry. + + :type logger: logging.Logger instance + :param logger: Logger to use. If None, print. + """ + def __init__(self, exception, error_predicate=_retry_all, + max_tries=MAX_TRIES, delay=DELAY, backoff=BACKOFF, + logger=None): + super(RetryErrors, self).__init__(max_tries, delay, backoff, logger) + self.exception = exception + self.error_predicate = error_predicate + + def __call__(self, to_wrap): + @wraps(to_wrap) + def wrapped_function(*args, **kwargs): + tries = 0 + while tries < self.max_tries: + try: + return to_wrap(*args, **kwargs) + except self.exception as caught_exception: + + if not self.error_predicate(caught_exception): + raise + + delay = self.delay * self.backoff**tries + msg = ("%s, Trying again in %d seconds..." % + (caught_exception, delay)) + self.logger(msg) + + time.sleep(delay) + tries += 1 + return to_wrap(*args, **kwargs) + + return wrapped_function + + +class RetryResult(RetryBase): + """Decorator for retrying based on non-error result. + + :type result_predicate: function, takes result, returns bool + :param result_predicate: Predicate evaluating whether to retry after a + result is returned. + + :type max_tries: int + :param max_tries: Number of times to try (not retry) before giving up. + + :type delay: int + :param delay: Initial delay between retries in seconds. + + :type backoff: int + :param backoff: Backoff multiplier e.g. value of 2 will double the + delay each retry. + + :type logger: logging.Logger instance + :param logger: Logger to use. If None, print. + """ + def __init__(self, result_predicate, + max_tries=MAX_TRIES, delay=DELAY, backoff=BACKOFF, + logger=None): + super(RetryResult, self).__init__(max_tries, delay, backoff, logger) + self.result_predicate = result_predicate + + def __call__(self, to_wrap): + @wraps(to_wrap) + def wrapped_function(*args, **kwargs): + tries = 0 + while tries < self.max_tries: + result = to_wrap(*args, **kwargs) + if self.result_predicate(result): + return result + + delay = self.delay * self.backoff**tries + msg = "%s. Trying again in %d seconds..." % ( + self.result_predicate.__name__, delay,) + self.logger(msg) + + time.sleep(delay) + tries += 1 + raise BackoffFailed() + + return wrapped_function + + +class RetryInstanceState(RetryBase): + """Decorator for retrying based on instance state. + + :type instance_predicate: function, takes instance, returns bool + :param instance_predicate: Predicate evaluating whether to retry after an + API-invoking method is called. + + :type max_tries: int + :param max_tries: Number of times to try (not retry) before giving up. + + :type delay: int + :param delay: Initial delay between retries in seconds. + + :type backoff: int + :param backoff: Backoff multiplier e.g. value of 2 will double the + delay each retry. + + :type logger: logging.Logger instance + :param logger: Logger to use. If None, print. + """ + def __init__(self, instance_predicate, + max_tries=MAX_TRIES, delay=DELAY, backoff=BACKOFF, + logger=None): + super(RetryInstanceState, self).__init__( + max_tries, delay, backoff, logger) + self.instance_predicate = instance_predicate + + def __call__(self, to_wrap): + instance = to_wrap.__self__ # only instance methods allowed + + @wraps(to_wrap) + def wrapped_function(*args, **kwargs): + tries = 0 + while tries < self.max_tries: + result = to_wrap(*args, **kwargs) + if self.instance_predicate(instance): + return result + + delay = self.delay * self.backoff**tries + msg = "%s. Trying again in %d seconds..." % ( + self.instance_predicate.__name__, delay,) + self.logger(msg) + + time.sleep(delay) + tries += 1 + raise BackoffFailed() + + return wrapped_function diff --git a/test_utils/test_utils/system.py b/test_utils/test_utils/system.py new file mode 100644 index 00000000..590dc62a --- /dev/null +++ b/test_utils/test_utils/system.py @@ -0,0 +1,81 @@ +# Copyright 2014 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import print_function +import os +import sys +import time + +import google.auth.credentials +from google.auth.environment_vars import CREDENTIALS as TEST_CREDENTIALS + + +# From shell environ. May be None. +CREDENTIALS = os.getenv(TEST_CREDENTIALS) + +ENVIRON_ERROR_MSG = """\ +To run the system tests, you need to set some environment variables. +Please check the CONTRIBUTING guide for instructions. +""" + + +class EmulatorCreds(google.auth.credentials.Credentials): + """A mock credential object. + + Used to avoid unnecessary token refreshing or reliance on the network + while an emulator is running. + """ + + def __init__(self): # pylint: disable=super-init-not-called + self.token = b'seekrit' + self.expiry = None + + @property + def valid(self): + """Would-be validity check of the credentials. + + Always is :data:`True`. + """ + return True + + def refresh(self, unused_request): # pylint: disable=unused-argument + """Off-limits implementation for abstract method.""" + raise RuntimeError('Should never be refreshed.') + + +def check_environ(): + err_msg = None + if CREDENTIALS is None: + err_msg = '\nMissing variables: ' + TEST_CREDENTIALS + elif not os.path.isfile(CREDENTIALS): + err_msg = '\nThe %s path %r is not a file.' % (TEST_CREDENTIALS, + CREDENTIALS) + + if err_msg is not None: + msg = ENVIRON_ERROR_MSG + err_msg + print(msg, file=sys.stderr) + sys.exit(1) + + +def unique_resource_id(delimiter='_'): + """A unique identifier for a resource. + + Intended to help locate resources created in particular + testing environments and at particular times. + """ + build_id = os.getenv('CIRCLE_BUILD_NUM', '') + if build_id == '': + return '%s%d' % (delimiter, 1000 * time.time()) + else: + return '%s%s%s%d' % (delimiter, build_id, delimiter, time.time()) diff --git a/test_utils/test_utils/vpcsc_config.py b/test_utils/test_utils/vpcsc_config.py new file mode 100644 index 00000000..36b15d6b --- /dev/null +++ b/test_utils/test_utils/vpcsc_config.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os + +import pytest + + +INSIDE_VPCSC_ENVVAR = "GOOGLE_CLOUD_TESTS_IN_VPCSC" +PROJECT_INSIDE_ENVVAR = "PROJECT_ID" +PROJECT_OUTSIDE_ENVVAR = "GOOGLE_CLOUD_TESTS_VPCSC_OUTSIDE_PERIMETER_PROJECT" +BUCKET_OUTSIDE_ENVVAR = "GOOGLE_CLOUD_TESTS_VPCSC_OUTSIDE_PERIMETER_BUCKET" + + +class VPCSCTestConfig(object): + """System test utility for VPCSC detection. + + See: https://cloud.google.com/vpc-service-controls/docs/ + """ + + @property + def inside_vpcsc(self): + """Test whether the test environment is configured to run inside VPCSC. + + Returns: + bool: + true if the environment is configured to run inside VPCSC, + else false. + """ + return INSIDE_VPCSC_ENVVAR in os.environ + + @property + def project_inside(self): + """Project ID for testing outside access. + + Returns: + str: project ID used for testing outside access; None if undefined. + """ + return os.environ.get(PROJECT_INSIDE_ENVVAR, None) + + @property + def project_outside(self): + """Project ID for testing inside access. + + Returns: + str: project ID used for testing inside access; None if undefined. + """ + return os.environ.get(PROJECT_OUTSIDE_ENVVAR, None) + + @property + def bucket_outside(self): + """GCS bucket for testing inside access. + + Returns: + str: bucket ID used for testing inside access; None if undefined. + """ + return os.environ.get(BUCKET_OUTSIDE_ENVVAR, None) + + def skip_if_inside_vpcsc(self, testcase): + """Test decorator: skip if running inside VPCSC.""" + reason = ( + "Running inside VPCSC. " + "Unset the {} environment variable to enable this test." + ).format(INSIDE_VPCSC_ENVVAR) + skip = pytest.mark.skipif(self.inside_vpcsc, reason=reason) + return skip(testcase) + + def skip_unless_inside_vpcsc(self, testcase): + """Test decorator: skip if running outside VPCSC.""" + reason = ( + "Running outside VPCSC. " + "Set the {} environment variable to enable this test." + ).format(INSIDE_VPCSC_ENVVAR) + skip = pytest.mark.skipif(not self.inside_vpcsc, reason=reason) + return skip(testcase) + + def skip_unless_inside_project(self, testcase): + """Test decorator: skip if inside project env var not set.""" + reason = ( + "Project ID for running inside VPCSC not set. " + "Set the {} environment variable to enable this test." + ).format(PROJECT_INSIDE_ENVVAR) + skip = pytest.mark.skipif(self.project_inside is None, reason=reason) + return skip(testcase) + + def skip_unless_outside_project(self, testcase): + """Test decorator: skip if outside project env var not set.""" + reason = ( + "Project ID for running outside VPCSC not set. " + "Set the {} environment variable to enable this test." + ).format(PROJECT_OUTSIDE_ENVVAR) + skip = pytest.mark.skipif(self.project_outside is None, reason=reason) + return skip(testcase) + + def skip_unless_outside_bucket(self, testcase): + """Test decorator: skip if outside bucket env var not set.""" + reason = ( + "Bucket ID for running outside VPCSC not set. " + "Set the {} environment variable to enable this test." + ).format(BUCKET_OUTSIDE_ENVVAR) + skip = pytest.mark.skipif(self.bucket_outside is None, reason=reason) + return skip(testcase) + + +vpcsc_config = VPCSCTestConfig() diff --git a/tests/system/gapic/v3/test_system_metric_service_v3.py b/tests/system/gapic/v3/test_system_metric_service_v3.py index 314a4fdd..245501f1 100644 --- a/tests/system/gapic/v3/test_system_metric_service_v3.py +++ b/tests/system/gapic/v3/test_system_metric_service_v3.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/v3/test_alert_policy_service_client_v3.py b/tests/unit/gapic/v3/test_alert_policy_service_client_v3.py index cf98f646..8859c88c 100644 --- a/tests/unit/gapic/v3/test_alert_policy_service_client_v3.py +++ b/tests/unit/gapic/v3/test_alert_policy_service_client_v3.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/v3/test_group_service_client_v3.py b/tests/unit/gapic/v3/test_group_service_client_v3.py index b996efae..1be96f89 100644 --- a/tests/unit/gapic/v3/test_group_service_client_v3.py +++ b/tests/unit/gapic/v3/test_group_service_client_v3.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/v3/test_metric_service_client_v3.py b/tests/unit/gapic/v3/test_metric_service_client_v3.py index dd5e692e..77cfa537 100644 --- a/tests/unit/gapic/v3/test_metric_service_client_v3.py +++ b/tests/unit/gapic/v3/test_metric_service_client_v3.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/v3/test_notification_channel_service_client_v3.py b/tests/unit/gapic/v3/test_notification_channel_service_client_v3.py index 1ae5aebd..dca35258 100644 --- a/tests/unit/gapic/v3/test_notification_channel_service_client_v3.py +++ b/tests/unit/gapic/v3/test_notification_channel_service_client_v3.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/v3/test_service_monitoring_service_client_v3.py b/tests/unit/gapic/v3/test_service_monitoring_service_client_v3.py index f16f4352..6899ddd4 100644 --- a/tests/unit/gapic/v3/test_service_monitoring_service_client_v3.py +++ b/tests/unit/gapic/v3/test_service_monitoring_service_client_v3.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/v3/test_uptime_check_service_client_v3.py b/tests/unit/gapic/v3/test_uptime_check_service_client_v3.py index 80af5c9e..6922164f 100644 --- a/tests/unit/gapic/v3/test_uptime_check_service_client_v3.py +++ b/tests/unit/gapic/v3/test_uptime_check_service_client_v3.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.